Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
Currently, the fix
within suggest
is optional, however it shouldn't. Even if we forget to use it, ESLint give us this error.
context.report({
node,
messageId,
suggest: [{ messageId: messageIdSuggest }] // missing `fix` and no error
})
Expected Result
context.report({
node,
messageId,
suggest: [{ messageId: messageIdSuggest }] // error - missing `fix`
})
Actual Result
No errors being shown.
Additional Info
Maybe a solution would be:
type ReportSuggestionArray<TMessageIds extends string> =
- ReportDescriptorBase<TMessageIds>[];
+ (ReportDescriptorBase<TMessageIds> & {
+ readonly fix: ReportFixFunction | null;
+ })[];
Versions
package | version |
---|---|
@typescript-eslint/experimental-utils |
4.3.2 |
TypeScript |
4.4.3 |
node |
14.16.1 |