Skip to content

fix(eslint-plugin-react-hooks): use messageId instead of inline message in rule reports#35955

Open
fresh3nough wants to merge 1 commit intofacebook:mainfrom
fresh3nough:fix/eslint-hooks-vscode-messageId
Open

fix(eslint-plugin-react-hooks): use messageId instead of inline message in rule reports#35955
fresh3nough wants to merge 1 commit intofacebook:mainfrom
fresh3nough:fix/eslint-hooks-vscode-messageId

Conversation

@fresh3nough
Copy link

Summary

Converts both RulesOfHooks and ExhaustiveDeps rules to use ESLint messageId API with meta.messages instead of inline message strings in context.report() calls. This follows ESLint best practices and fixes issues with the VS Code ESLint extension not showing rule codes in the Problems pane, which also causes other ESLint rules in the same file to break.

How did you test this change?

All 5082 existing tests pass (4 test suites across ESLint v7 and v9 with multiple parsers). TypeScript typecheck passes.

Fixes: #35897

…ge in rule reports

Convert both RulesOfHooks and ExhaustiveDeps rules to use ESLint's
messageId API with meta.messages instead of inline message strings in
context.report() calls. This follows ESLint best practices and fixes
issues with the VS Code ESLint extension not showing rule codes in the
Problems pane, which also causes other ESLint rules in the same file
to break.

Fixes: facebook#35897
@meta-cla meta-cla bot added the CLA Signed label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compiler Bug]: eslint-plugin-react-hooks breaks the VS Code ESLint extension

1 participant