eslint-plugin-eslint-plugin
eslint-plugin-eslint-plugin copied to clipboard
Detect suggestions reported with spread and ternary used in `require-meta-has-suggestions` and other rules
Some of our rules need to be able to detect when suggestions are reported.
I found a situation where we fail to unwrap the suggestions: https://github.com/typescript-eslint/typescript-eslint/blob/ad412cdd74dc5619fbe4bf27c0a5eb5c5a4b65ca/packages/eslint-plugin/src/rules/no-empty-interface.ts#L86
context.report({
node: node.id,
messageId: 'noEmptyWithSuper',
...(useAutoFix
? { fix }
: {
suggest: [
{
messageId: 'noEmptyWithSuper',
fix,
},
],
}),
});
This issue is not specific to TypeScript.