To ignore a particular directory or file for TypeScript tslint, we can add set the linterOptions.exclude
option in tslint.json
.
For instance, we write
{
"extends": "tslint:latest",
"linterOptions": {
"exclude": ["bin", "lib/*generated.js"]
}
}
to skip linting on the bin
and lin./*generated.js
folders.