Skip to content

Conversation

@Nicolapps
Copy link
Member

@Nicolapps Nicolapps commented Dec 3, 2025


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

  • Chores
    • Updated React and React DOM to patch version 19.2.1 across packages.
    • Bumped eslint-plugin-react-hooks to ^6.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Walkthrough

Bump of React and ReactDOM versions to 19.2.1 across root and playground package manifests, and upgrade of eslint-plugin-react-hooks from 5.2.0 to ^6 in one or more package manifests; no source-code or API changes.

Changes

Cohort / File(s) Summary
Root package manifest
package.json
Updated react and react-dom from 19.2.019.2.1; updated eslint-plugin-react-hooks from 5.2.0^6.
Playground manifest(s)
playground/package.json
Updated react and react-dom from ^19.1.1^19.2.1; updated eslint-plugin-react-hooks from 5.2.0^6 (in dependencies and devDependencies where present).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review notes:
    • Check linting rule behavior after eslint-plugin-react-hooks major-version bump (5.x^6) for any rule renames/semantics.
    • Verify CI/test runs against updated React minor patch (19.2.1) and resolve any transient warnings.

Poem

🐰 I nibbled versions, tiny and bright,

React hopped forward, a soft little flight.
Hooks got wiser with a new-seat cheer,
The playground updated — all good here! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update the React version used in dev' accurately reflects the main change: updating React, React-DOM, and eslint-plugin-react-hooks versions in package.json and playground/package.json.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nicolas/update-react

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/get-convex/agent/@convex-dev/agent@195

commit: ad1ca49

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between ba05770 and 1652482.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • playground/package-lock.json is 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-hooks v5.2.0 compatibility note from the root package applies here (see previous review comment).

Also applies to: 88-88

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1652482 and ad1ca49.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • playground/package-lock.json is 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",
Copy link

@coderabbitai coderabbitai bot Dec 4, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 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.json

Repository: get-convex/agent

Length of output: 779


🏁 Script executed:

cat -n eslint.config.js

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.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.

Copy link
Member Author

Choose a reason for hiding this comment

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

The recommendation is incorrect

Copy link

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.

@Nicolapps Nicolapps merged commit 6030b21 into main Dec 4, 2025
3 checks passed
@Nicolapps Nicolapps deleted the nicolas/update-react branch December 4, 2025 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants