What is the significance of two tslint.json(inside src folder) and inside project folder? What is the differnece between them?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With