-
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
Conversation
WalkthroughBump of React and ReactDOM versions to 19.2.1 across root and playground package manifests, and upgrade of Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
commit: |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonplayground/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
package.json(1 hunks)playground/package.json(1 hunks)
🔇 Additional comments (1)
playground/package.json (1)
86-86: React version alignment looks good.Bumping playground's React dependencies to ^19.2.1 aligns the monorepo versions and ensures consistency. The caret specifier is appropriate for runtime dependencies. The @types definitions are correctly aligned.
The same
eslint-plugin-react-hooksv5.2.0 compatibility note from the root package applies here (see previous review comment).Also applies to: 88-88
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonplayground/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
package.json(2 hunks)playground/package.json(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- playground/package.json
🔇 Additional comments (1)
package.json (1)
133-134: Security-critical patch upgrade approved.React 19.2.1 fixes an unauthenticated remote code execution vulnerability in React Server Components, with a recommendation to upgrade immediately. This patch version bump is justified and should be prioritized for deployment.
| "eslint-plugin-jsx-a11y": "6.10.2", | ||
| "eslint-plugin-react": "7.37.5", | ||
| "eslint-plugin-react-hooks": "5.2.0", | ||
| "eslint-plugin-react-hooks": "^6", |
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:
#!/bin/bash
# Check ESLint configuration files and format
echo "=== Checking for ESLint configuration files ==="
fd '\.(eslintrc|eslintignore)' --type f . 2>/dev/null || echo "No legacy ESLintRC files found"
fd 'eslint\.config\.(js|mjs|cjs)' --type f . 2>/dev/null || echo "No flat config files found"
echo ""
echo "=== Checking package.json for eslintConfig field ==="
jq '.eslintConfig' package.json 2>/dev/null || echo "No eslintConfig in package.json"
echo ""
echo "=== Listing all config-related files in root ==="
ls -la | grep -E '(eslint|config)' || echo "No config files in root"
echo ""
echo "=== Checking current eslint-plugin-react-hooks version in package.json ==="
grep -A 1 -B 1 'eslint-plugin-react-hooks' package.jsonRepository: get-convex/agent
Length of output: 779
🏁 Script executed:
cat -n eslint.config.jsRepository: 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.js uses the legacy reactHooks.configs.recommended.rules, which is incompatible with v6's flat config. Change it to reactHooks.configs.flat.recommended.rules to ensure proper compatibility.
🤖 Prompt for AI Agents
package.json lines 122-122: update the ESLint usage to the flat config API—open
eslint.config.js around line 91 and replace the legacy reference
reactHooks.configs.recommended.rules with
reactHooks.configs.flat.recommended.rules so the project uses the v6 flat config
for eslint-plugin-react-hooks; ensure any other references to
reactHooks.configs.recommended are updated to the flat variant and run ESLint to
verify no config errors remain.
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:
eslint-plugin-react-hooks version 6 flat config usage
💡 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:
- The plugin documents a flat-config-compatible "recommended" preset. [1][2]
- There were past publish hiccups (an accidental 6.0.0 publish and related issues), so if you run into missing/incorrect exported configs check the exact package version and consider using the rc/build the package recommends. [3][4]
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) or reactHooks.configs.recommended.rules if you're extracting just the rules. There is no .flat.recommended.rules path in v6.
The current usage of reactHooks.configs.recommended.rules in your eslint.config.js should be compatible with v6. The plugin's v6 release is designed to work with flat config format using the standard recommended preset.
Is your current ESLint configuration working correctly with the updated v6 dependency?
(\__/)
(•ㅅ•)
/ > 📚 Taking notes!
✏️ Learnings added
Learnt from: Nicolapps
Repo: get-convex/agent PR: 195
File: package.json:122-122
Timestamp: 2025-12-04T01:26:11.809Z
Learning: In eslint-plugin-react-hooks v6, the correct flat config usage is `reactHooks.configs.recommended` for the full config object or `reactHooks.configs.recommended.rules` for just the rules. There is no `.flat.recommended.rules` path.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.