简体   繁体   中英

How to avoid all TSLint errors

I have 2 angular projects in my machine.
When I doing the first project nothing wrong with me there. I worked freely(without TSLint errors). But my second project always shows TSLint errors. I want the second project to be like the first one. Is there any way to do this?

Angular CLI: 8.3.26
Node: 12.16.3
OS: win32 x64
Angular: 8.2.14

@angular-devkit/architect         0.803.26
@angular-devkit/build-angular     0.803.26
@angular-devkit/build-optimizer   0.803.26
@angular-devkit/build-webpack     0.803.26
@angular-devkit/core              8.3.26
@angular-devkit/schematics        8.3.26
@angular/cli                      8.3.26
@ngtools/webpack                  8.3.26
@schematics/angular               8.3.26
@schematics/update                0.803.26
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2

This is an image of the First project. Which if works fine. Look,5 new lines, but no TSLint errors.

这是第一个项目的图像。

This is an image of the second project.

这是第一个项目的图像 I want to make the second project work like the first. Is there is any way to do this?

I found the answer to my own question.
I am using IntelliJ to code. In this IDE we can disable TSLint check.
Click on the red bulb on the left side and next click the TSLint options.
After this dialog box will appear. Uncheck the enable mode. That's it!

If you are using vs code, and you have tslint extension installed disable it to ignore lint errors. 在此处输入图像描述

Alternate options:

  • Remove the tslint.json file
  • Remove the dependency on tslint in the package.json file
  • Uninstall TSLint with npm uninstall tslint

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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