Closed
Description
[Feature Request] @typescript-eslint/require-ts-comment-description
Rule Details
Examples of 👎 incorrect code for this rule:
// @ts-expect-error
const x: string = 1;
// @ts-ignore
const x: string = 1;
Examples of 👍 correct code for this rule:
// @ts-expect-error because this code is testing a compiler I'm writing
const x: string = 1;
// @ts-ignore: because this code is testing a compiler I'm writing
const x: string = 1;
Options
{
"rules": {
"@typescript-eslint/require-ts-comment-description": "error"
}
}
The configuration looks like this:
interface Options {
'ts-expect-error'?: boolean;
'ts-ignore'?: boolean;
'ts-nocheck'?: boolean;
'ts-check'?: boolean;
}
const defaultOptions: Options = {
'ts-expect-error': true,
'ts-ignore': true,
'ts-nocheck': true,
'ts-check': true,
};
Additional Info
There is a similar rule in https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html.
I thought typescript-eslint had such a rule, but apparently not. My apologies if I just missed it.