Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude a folder from tslint?

I like to exclude the test folder form linting with tslint in vscode. So I have placed an exclude into my tslint.json config file. Unfortunately the exclude statement is not working. Does any one know how to set the exclude up?

 {
    "exclude": "tests/**/*.ts",
    "rulesDirectory": ["node_modules/tslint-microsoft-contrib"],
    "rules": {
        "export-name": true,
        ...
     }
}
like image 468
Michael Hoeller Avatar asked Sep 08 '16 10:09

Michael Hoeller


1 Answers

This worked for me in tslint: 6.1.2.

In the root folder where tslint.json is located create the file path to directory.

"linterOptions": {
  "exclude": [
    "libs/folder/folder/**",
    "apps/stuff/stuff/**"
  ]
}
like image 172
SoEzPz Avatar answered Sep 17 '22 16:09

SoEzPz