简体   繁体   English

在Angular 6 Project中使用2 tslint.json文件

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

在此输入图像描述

What is the significance of two tslint.json(inside src folder) and inside project folder? 两个tslint.json(在src文件夹里面)和项目文件夹里面有什么意义? What is the differnece between them? 它们之间的区别是什么?

The one in the project folder is your generic TS lint file that applies globally. 项目文件夹中的那个是全局适用的通用TS lint文件。

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. src文件夹中的一个是项目特定的TS lint文件,它扩展了另一个文件,允许您调整特定项目的TS lint设置。

Remember with Angular, you can have multiple projects and you may want slightly different TS lint settings for those projects. 请记住,使用Angular,您可以拥有多个项目,并且您可能希望这些项目的TS lint设置略有不同。

If you only have one project, I think it is fairly safe to delete the TS lint file in the src folder. 如果您只有一个项目,我认为删除src文件夹中的TS lint文件是相当安全的。 In the project I am working on we seem to have done just that. 在我正在开展的项目中,我们似乎已经做到了这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM