Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of the 2 tslint.json file in Angular 6 Project

enter image description here

What is the significance of two tslint.json(inside src folder) and inside project folder? What is the differnece between them?

like image 607
Rajkishore Puhan Avatar asked Sep 26 '18 20:09

Rajkishore Puhan


People also ask

What is the use of TSLint json file in Angular?

TSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors. It is widely supported across modern editors & build systems and can be customized with your own lint rules, configurations, and formatters.

Where is TSLint json Angular?

Angular Applications are already integrated with TSLint, tslint. json file can be found at the root of your project. TSLint is also defined as dev dependency in package. json.

What is the Angular json file?

The angular.json file at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults. These are used for build and development tools provided by the Angular CLI. Path values given in the configuration are relative to the root workspace directory.


1 Answers

The one in the project folder is your generic TS lint file that applies globally.

The one in the src folder is a project specific TS lint file that extends the other one, allowing you to tweak TS lint settings for the specific project.

Remember with Angular, you can have multiple projects and you may want slightly different TS lint settings for those projects.

If you only have one project, I think it is fairly safe to delete the TS lint file in the src folder. In the project I am working on we seem to have done just that.

like image 81
danday74 Avatar answered Nov 13 '22 08:11

danday74