- Learn React with TypeScript 3
- Carl Rippon
- 92字
- 2021-06-10 19:16:40
Excluding files
We can exclude files from the linting process. This is useful for excluding third-party code. We do this by specifying an array of files in an exclude field in the linterOptions field:
{
"extends": ["tslint:recommended"],
"linterOptions": {
"exclude": ["node_modules/**/*.ts"]
}
}
The preceding configuration excludes third-party node packages from the linting process.
Now that we've added TSLint to our tool belt, we are going to add another tool that will automatically format our code for us. This will help our code adhere to some of the code formattings TSLint rules.