目录

@typescript-eslint/ban-ts-comment

Disallow @ts-<directive> comments or require descriptions after directives.

Rule Configuration

// code-linter.json5
{
  "rules": {
    "@typescript-eslint/ban-ts-comment": "error"
  }
}

Options

For details, see @typescript-eslint/ban-ts-comment.

Example of Correct Code

console.log('hello');

Example of Incorrect Code

// @ts-expect-error
console.log('hello');

/* @ts-expect-error */
console.log('hello');

Rule Set

plugin:@typescript-eslint/all

For details about how to configure Code Linter check rules, see Code Linter.