Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 86 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/react-dom": "^19.0.4",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.21.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-hooks": "^7.0.0",

This comment was marked as outdated.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The ESLint configuration for eslint-plugin-react-hooks uses ...reactHooks.configs.recommended.rules, an incorrect pattern for v7.x, causing linting rules to be silently ignored.
Severity: MEDIUM

Suggested Fix

In eslint.config.js, replace the spread of ...reactHooks.configs.recommended.rules with a complete config object. For example, add reactHooks.configs.flat.recommended to the extends array or spread it directly into the configuration array if it's a top-level export.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L22

Potential issue: The project upgraded `eslint-plugin-react-hooks` to v7.0.1, which
introduced a breaking change in its configuration structure for ESLint's flat config
format. The current configuration in `eslint.config.js` attempts to spread
`reactHooks.configs.recommended.rules`. However, in v7.x, this structure is no longer
valid. The correct pattern is to use the full config object, such as
`reactHooks.configs.flat.recommended`. As a result of this misconfiguration, the React
Hooks linting rules will be silently skipped, potentially allowing code with hooks
violations to be committed without any warnings.

Did we get this right? 👍 / 👎 to inform future reviews.

"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"typescript": "~5.8.0",
Expand Down