We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
require-meta-has-suggestions
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related of #272 but distinct and might be a bit easier to fix since we just need to evaluate the spread.
const fixOrSuggest: { fix: TSESLint.ReportFixFunction | null; suggest: TSESLint.ReportSuggestionArray<MessageIds> | null; } = { fix: null, suggest: [ { messageId: 'suggestUnknown', fix(fixer): TSESLint.RuleFix { return fixer.replaceText(node, 'unknown'); }, }, { messageId: 'suggestNever', fix(fixer): TSESLint.RuleFix { return fixer.replaceText(node, 'never'); }, }, ], }; if (fixToUnknown) { fixOrSuggest.fix = (fixer): TSESLint.RuleFix => fixer.replaceText(node, 'unknown'); } context.report({ node, messageId: 'unexpectedAny', ...fixOrSuggest, });
https://github.com/typescript-eslint/typescript-eslint/blob/ad412cdd74dc5619fbe4bf27c0a5eb5c5a4b65ca/packages/eslint-plugin/src/rules/no-explicit-any.ts#L205
This is not specific to TypeScript.
The text was updated successfully, but these errors were encountered:
This might be another case like #283 🤔 . What if a rule calls to a helper function to report with suggestions? Same strategy as #283 (comment)?
Sorry, something went wrong.
context.report()
Successfully merging a pull request may close this issue.
Related of #272 but distinct and might be a bit easier to fix since we just need to evaluate the spread.
https://github.com/typescript-eslint/typescript-eslint/blob/ad412cdd74dc5619fbe4bf27c0a5eb5c5a4b65ca/packages/eslint-plugin/src/rules/no-explicit-any.ts#L205
This is not specific to TypeScript.
The text was updated successfully, but these errors were encountered: