feat(eslint-config)!: enable recommended react-hooks rules from v6#424
Merged
feat(eslint-config)!: enable recommended react-hooks rules from v6#424
Conversation
Spread `reactHooks.configs.flat.recommended.rules` into the flat React config and add `extends: ['plugin:react-hooks/recommended']` to the eslintrc rule set. Switch the flat config's `languageOptions` to `react.configs.flat?.recommended.languageOptions` so JSX parser options are propagated correctly. BREAKING CHANGE: 13 new error-level react-hooks rules are now enabled by default (component-hook-factories, config, error-boundaries, gating, globals, immutability, preserve-manual-memoization, purity, refs, set-state-in-effect, set-state-in-render, static-components, use-memo), plus 2 new warn-level rules (incompatible-library, unsupported-syntax). Downstream consumers may see new lint errors on existing React code and should either fix the violations or explicitly override these rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
oss-frontend-github-app bot
pushed a commit
that referenced
this pull request
Apr 18, 2026
## [eslint-config-moneyforward-v6.0.0](5.1.4...6.0.0) (2026-04-18) ### ⚠ BREAKING CHANGES * **eslint-config:** 13 new error-level react-hooks rules are now enabled by default (component-hook-factories, config, error-boundaries, gating, globals, immutability, preserve-manual-memoization, purity, refs, set-state-in-effect, set-state-in-render, static-components, use-memo), plus 2 new warn-level rules (incompatible-library, unsupported-syntax). Downstream consumers may see new lint errors on existing React code and should either fix the violations or explicitly override these rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore: fix ci ### Features * **eslint-config:** enable recommended react-hooks rules from v6 ([#424](#424)) ([5308724](5308724)) ### Bug Fixes * **deps:** update dependency @next/eslint-plugin-next to v15.5.15 ([#441](#441)) ([65bd3d1](65bd3d1)) * **deps:** update dependency eslint-plugin-import to v2.32.0 ([#430](#430)) ([c638eb9](c638eb9)) * **deps:** update dependency eslint-plugin-jest to v29 ([#425](#425)) ([6e84da9](6e84da9)) * **deps:** update dependency eslint-plugin-jsdoc to v62 ([#426](#426)) ([bd6bbc2](bd6bbc2)) * **deps:** update dependency eslint-plugin-n to v17.24.0 ([#447](#447)) ([975af80](975af80)) * **deps:** update dependency eslint-plugin-react-hooks to v7.1.0 ([#443](#443)) ([789ee77](789ee77)) * **deps:** update dependency eslint-plugin-storybook to v10 ([#427](#427)) ([f75c9f6](f75c9f6)) * **deps:** update dependency eslint-plugin-storybook to v9.1.20 ([#445](#445)) ([c2378b1](c2378b1)) * **deps:** update dependency eslint-plugin-testing-library to v7.16.2 ([#446](#446)) ([148c9f3](148c9f3)) * **deps:** update dependency globals to v17 ([#429](#429)) ([83b3424](83b3424)) * **deps:** update typescript-eslint monorepo to v8.58.2 ([#448](#448)) ([de7dc10](de7dc10))
|
🎉 This PR is included in version eslint-config-moneyforward-v6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed / motivation ?
Enable the new rule set shipped in
eslint-plugin-react-hooksv6+ (the React Compiler era rules) as part ofeslint-config-moneyforward. Previously onlyexhaustive-depsandrules-of-hookswere explicitly set to error; this change pulls in the plugin's fullrecommendedpreset so the shared config keeps up with current best practices.Changes
packages/eslint-config/configs/flat/react.mjsreactHooks.configs.flat.recommended.rulesto enable the new rules in the flat configlanguageOptionsto referencereact.configs.flat?.recommended.languageOptionsso the flat-config JSX parser options are propagated correctlypackages/eslint-config/rules/react-hooks.jsextends: ['plugin:react-hooks/recommended']for the eslintrc consumersNewly activated rules
Error level (13 new rules)
react-hooks/component-hook-factoriesreact-hooks/configreact-hooks/error-boundariesreact-hooks/gatingreact-hooks/globalsreact-hooks/immutabilityreact-hooks/preserve-manual-memoizationreact-hooks/purityreact-hooks/refsreact-hooks/set-state-in-effectreact-hooks/set-state-in-renderreact-hooks/static-componentsreact-hooks/use-memoWarn level (2 new rules)
react-hooks/incompatible-libraryreact-hooks/unsupported-syntaxImpact on consumers and mitigations
Downstream projects may see new lint errors on existing React code. Suggested paths:
Linked PR / Issues
N/A
Type of change
Versioning
Per the Versioning policy in the package README, changes that add error-level rules require a major bump (5.1.4 → 6.0.0). The commit message uses `feat(eslint-config)!` and a `BREAKING CHANGE:` footer so semantic-release will produce v6.0.0 automatically.
Pre-flight checklist
References
🤖 Generated with Claude Code