-
Notifications
You must be signed in to change notification settings - Fork 65
Update the React version used in dev #195
New issue
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: get-convex/agent
Length of output: 779
🏁 Script executed:
Repository: get-convex/agent
Length of output: 3410
Update ESLint configuration to use flat config syntax for eslint-plugin-react-hooks v6.
Line 91 in
eslint.config.jsuses the legacyreactHooks.configs.recommended.rules, which is incompatible with v6's flat config. Change it toreactHooks.configs.flat.recommended.rulesto ensure proper compatibility.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recommendation is incorrect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
💡 Result:
Short answer — with eslint-plugin-react-hooks v6 use the plugin's exported flat config. Example eslint.config.js:
import js from '@eslint/js';
import * as reactHooks from 'eslint-plugin-react-hooks';
export default [
js.configs.recommended,
reactHooks.configs.recommended
];
Notes:
Sources:
[1] eslint-plugin-react-hooks npm (v6) docs.
[2] React docs — eslint-plugin-react-hooks reference.
[3] GitHub issues discussing flat-config / recommended config availability.
[4] npm deprecation note for 6.0.0.
@Nicolapps, you're absolutely right, and I apologize for the incorrect recommendation.
According to the documentation for eslint-plugin-react-hooks v6, the correct usage with flat config is simply
reactHooks.configs.recommended(the entire config object) orreactHooks.configs.recommended.rulesif you're extracting just the rules. There is no.flat.recommended.rulespath in v6.The current usage of
reactHooks.configs.recommended.rulesin your eslint.config.js should be compatible with v6. The plugin's v6 release is designed to work with flat config format using the standardrecommendedpreset.Is your current ESLint configuration working correctly with the updated v6 dependency?
✏️ Learnings added