close

ban-tslint-comment

Configuration

rslint.config.ts
import { defineConfig, ts } from '@rslint/core';

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/ban-tslint-comment': 'error',
    },
  },
]);

Rule Details

Disallow TSLint directive comments such as // tslint:disable and // tslint:disable-next-line. These directives are not used by ESLint and are typically left behind when migrating from TSLint.

Examples of incorrect code for this rule:

/* tslint:disable */
/* tslint:enable */
// tslint:disable-next-line
someCode(); // tslint:disable-line

Examples of correct code for this rule:

// some other comment
/* another comment that mentions tslint */

Original Documentation