@typescript-eslint/ban-tslint-comment
Disallow // tslint:disable and // tslint:enable comments
fixable
Also called typescript-eslint/ban-tslint-comment, typescript/ban-tslint-comment
TSLint is no longer maintained. Once a project has moved off it, its tslint:disable and tslint:enable comments do nothing, but they look like they still turn something off.
--fix removes the comment.
Configure#
Off by default. To turn it on:
bunfig.toml
[lint.rules]
"@typescript-eslint/ban-tslint-comment" = "error" # or "warn"Examples#
example.ts2 problems
/* tslint:disable */tslint comment detected: /* tslint:disable */
const port = 3000;
console.log(port); // tslint:disable-line:no-consoletslint comment detected: // tslint:disable-line:no-consoleexample.tsNo problems
const port = 3000;
console.log(port); // the tslint config is gone