Reputation: 61994
I have a big web app made by both legacy JavaScript code (including eslint) and new TypeScript code (including tslint).
My problem is that my IDE (WebStorm) is automatically applying both linters to all files, so in TypeScript I get errors from eslint that I should not get.
How can I make sure eslint is applied only to *.js files and not to the *.ts files (that instead should only be checked by tslint) ?
Upvotes: 6
Views: 10772
Reputation: 69
For those using Vscode, follow these steps:
CMD+,
or CRTL+,
on mac and windows respectively.eslint:probe
Upvotes: 0
Reputation: 2922
Webstorm is only following the config define by you (If you have both plugins activated on the project), you have to add to your .eslintignore
the following:
**/*.ts
And in your tslint.json
something like:
{
"extends": "tslint:latest",
"linterOptions": {
"exclude": [
"bin",
"**/*.js"
]
}
}
Upvotes: 5
Reputation: 93868
You can try adding *.ts
to an .eslintignore
.
See https://www.jetbrains.com/help/webstorm/2019.2/eslint.html#ws_eslint_suppress_linting_typescript
Upvotes: 6