Skip to content
Merged
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
47 changes: 33 additions & 14 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"eslint": "9.38.0",
"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.

"eslint-plugin-react-refresh": "0.4.24",
"globals": "16.4.0",
"lucide-react": "0.548.0",
Expand All @@ -130,8 +130,8 @@
"pkg-pr-new": "0.0.60",
"postcss": "8.5.6",
"prettier": "3.6.2",
"react": "19.2.0",
"react-dom": "19.2.0",
"react": "19.2.1",
"react-dom": "19.2.1",
"react-hook-form": "7.65.0",
"react-markdown": "10.1.0",
"react-router-dom": "7.9.5",
Expand Down
Loading
Loading