fix: update eslint-config-next to resolve pre-commit hook failures#22915
fix: update eslint-config-next to resolve pre-commit hook failures#22915
Conversation
- Align all eslint-config-next versions to ^15.4.5 to match Next.js ^15.3.0 - Add eslint-config-next and eslint-plugin-unused-imports to root dependencies - Fix workspace dependency hoisting issues causing ESLint config resolution failures - Ensure pre-commit hooks can properly resolve 'next' ESLint configuration Co-Authored-By: zomars@cal.com <zomars@me.com>
Co-Authored-By: zomars@cal.com <zomars@me.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
package.json
Outdated
| "date-fns-tz": "^3.2.0", | ||
| "eslint": "^8.34.0", | ||
| "eslint-config-next": "^15.4.5", | ||
| "eslint-plugin-unused-imports": "latest", |
There was a problem hiding this comment.
DevinAI, avoid using latest
… latest Addresses GitHub comment feedback to avoid using 'latest' version specifier Co-Authored-By: zomars@cal.com <zomars@me.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
…ascade - Revert massive yarn.lock changes and use targeted approach - Use eslint-config-next ^14.0.4 instead of ^15.4.5 to avoid cascading - Add yarn resolution to ensure consistent version across monorepo - Add required ESLint plugins to root dependencies for proper hoisting - Resolves ESLint configuration error blocking pre-commit hooks Co-Authored-By: zomars@cal.com <zomars@me.com>
|
This PR is being marked as stale due to inactivity. |
fix: update eslint-config-next to resolve pre-commit hook failures
Summary
This PR fixes the ESLint configuration error
"ESLint couldn't find the config 'next'"that was blocking commits due to pre-commit hooks. The issue was caused by multiple conflicting versions ofeslint-config-nextacross the monorepo preventing proper workspace dependency hoisting.Changes made:
eslint-config-nextversions to^15.4.5across 4 packages to align with Next.js^15.3.0eslint-config-next@^15.4.5andeslint-plugin-unused-importsto rootpackage.jsondependencies to force workspace hoistingyarn.lockwith new dependency resolutionsVerification:
yarn lint:reportresolves ESLint configurations properlyReview & Testing Checklist for Human
yarn lint:reportto ensure all ESLint rules work correctly across packagesyarn buildto ensure no regressions in build processyarn type-check:cioutput with main branch to confirm type errors existed before this changeRecommended test plan:
yarn installto get updated dependencies.ts/.tsxfile inapps/orpackages/yarn lint:reportto ensure no ESLint configuration errorsDiagram
%%{ init : { "theme" : "default" }}%% graph TD PC["Pre-commit hooks<br/>.husky/pre-commit"]:::context LS["lint-staged<br/>package.json"]:::context RC[".eslintrc.js<br/>(root config)"]:::context EP["packages/config/<br/>eslint-preset.js"]:::context PC --> LS LS --> RC RC --> EP EP --> ECN["eslint-config-next<br/>(extends 'next')"]:::major-edit subgraph "Package Updates" P1["packages/config/<br/>package.json"]:::major-edit P2["example-apps/credential-sync/<br/>package.json"]:::major-edit P3["packages/platform/examples/base/<br/>package.json"]:::major-edit P4["apps/ui-playground/<br/>package.json"]:::major-edit ROOT["package.json<br/>(root)"]:::major-edit end ECN --> P1 ECN --> P2 ECN --> P3 ECN --> P4 ECN --> ROOT ROOT --> NM["node_modules/<br/>eslint-config-next<br/>(hoisted)"]:::minor-edit subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
eslint-config-next(13.2.1, 14.0.4, 15.1.6) prevented Yarn from hoisting the package to rootnode_modules, causing ESLint to fail when running from root during pre-commit hookseslint-config-next@^15.4.5and added it to root dependencies to force hoistingSession details: