How to ignore semicolons with "tslint:recomended"
As in the previous response, you can suppress tslint
for a file or the next line. But if you want to edit the rules for your entire directory, check the tslint.json
file, this is your global configuration for the project you're on.
You could probably find this file in the root folder of your app. If not, try pressing cmd + P
(mac) or ctrl + P
(windows) and enter tslint.json
.
Once you're there, add this entry to the rules list:
{
...
"rules": {
...
"semicolon":false
}
}
Hope it helps!
You can suppress tslint
rules for your file or the next line in your code by generating disable comments.
If you want to disable a rule for the entire file, then at the top of your file, add
/* tslint:disable:<rule name>
If you want to disable a rule for the next line, then above the line for which you want to disable the rule, add
// tslint:disable-next-line:<rule name>
where <rule name>
is the name of your rule. In your case, semicolon
.
You can get more information on how to generate disable comments here