Categories
TypeScript Answers

How to ignore a particular directory or file for TypeScript tslint?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *