Improve this page

"tslint" task

This task invokes the TSLint tool for linting TypeScript code.

When to use it

TSLint is deprecated and should only be used for legacy projects. In 2019, the groups that maintain the TypeScript compiler, ESLint, and TSLint got together and agreed to deprecate TSLint. Instead, a TypeScript parser has been integrated into ESLint, which provides a single unified solution for linting JavaScript and TypeScript source files.

New projects should use the eslint task instead.

Config files

There isn’t a Heft-specific file for this task. Heft looks for TSLint’s config file tslint.json.

package.json dependencies

You will need to add the tslint package to your project:

$ rush add --package tslint --dev

Alternatively, you can avoid this dependency by loading it from a “rig package”, as described in the Interfacing with Rush article.