Repository navigation
chore: migrate to flat config - #1724
Conversation
commit: |
b730695 to
13cb2e8
Compare
13cb2e8 to
469e1ef
Compare
| "espree": "11.1.0", | ||
| "eslint-visitor-keys": "5.0.0" |
There was a problem hiding this comment.
Adding this because provenance-action is failing.
📝 WalkthroughWalkthroughThis pull request migrates the project's ESLint configuration from the legacy JSON-based format (.eslintrc) to the new ESLint flat config format (eslint.config.mjs). The changes include upgrading ESLint from version 8.57.1 to 9.39.2, removing the Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 15: The package.json "engines" field is too permissive for our linting
toolchain; update the "engines" entry in package.json to require Node 18.18.0 or
newer by changing it to: node: ^18.18.0 || ^20.9.0 || >=21.1.0 so local
contributors and dependency managers see the correct minimum Node version for
ESLint 9 / typescript-eslint 8; ensure package.json is the file you edit and
commit the updated engines string.
| "dev:preview": "node ./playground/.output/server/index.mjs", | ||
| "dev:prepare": "pnpm build:stub && nuxi prepare playground", | ||
| "lint": "eslint --ext .vue,.ts,.js,.mjs .", | ||
| "lint": "eslint .", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
ESLint 9.x minimum Node.js version requirements
💡 Result:
For ESLint 9.x, the minimum supported Node.js version is 18.18.0.
ESLint 9 supports these Node.js versions/ranges: ^18.18.0, ^20.9.0, or >=21.1.0 (and drops Node <18.18 and Node 19). [1], [2]
Sources:
[1] ESLint “Migrate to v9.x” guide. (eslint.org)
[2] ESLint v9.0.0 release post. (eslint.org)
Citations:
- 1: https://eslint.org/docs/latest/use/migrate-to-9.0.0?utm_source=openai
- 2: https://eslint.org/blog/2024/04/eslint-v9.0.0-released/?utm_source=openai
🌐 Web query:
typescript-eslint 8.x minimum Node.js version requirements
💡 Result:
typescript-eslint v8.x requires Node.js in this supported range:
^18.18.0 || ^20.9.0 || >=21.1.0→ practical minimum is Node 18.18.0 (or 20.9.0+, or 21.1.0+). [1][2]
Sources: dependency version policy page [1] and the v8 announcement (which notes the bump to that Node range) [2].
🏁 Script executed:
# Read the full package.json to see the engines field and dependencies
cat package.jsonRepository: nuxt/bridge
Length of output: 2062
🏁 Script executed:
# Check CI workflows for Node versions
find .github/workflows -type f \( -name "*.yml" -o -name "*.yaml" \) -exec cat {} \;Repository: nuxt/bridge
Length of output: 10883
Update engines field to match ESLint 9 and typescript-eslint 8 Node requirements.
ESLint 9.39.2 and typescript-eslint 8.54.0 require Node 18.18.0 or higher, but engines currently permits Node 14.16+ and 16.11+. This creates a mismatch: contributors using Node 14 or 16 will encounter tooling failures when linting. Update engines to "node": "^18.18.0 || ^20.9.0 || >=21.1.0" to reflect the actual minimum supported version. (Note: CI already runs modern LTS and includes an installed-check validation step, but the declared engines range must be accurate for end users and dependency managers.)
🤖 Prompt for AI Agents
In `@package.json` at line 15, The package.json "engines" field is too permissive
for our linting toolchain; update the "engines" entry in package.json to require
Node 18.18.0 or newer by changing it to: node: ^18.18.0 || ^20.9.0 || >=21.1.0
so local contributors and dependency managers see the correct minimum Node
version for ESLint 9 / typescript-eslint 8; ensure package.json is the file you
edit and commit the updated engines string.
🔗 Linked issue
❓ Type of change
📚 Description
Migrate ESLint configuration from legacy .eslintrc format to the new flat config format (eslint.config.mjs).
@nuxtjs/eslint-config-typescriptdoes not support flat config.I manually added equivalent rules to support them.
📝 Checklist