refactor: standardize eslint configs#7560
Conversation
…ries to use shared configurations - Modified ESLint configurations in various apps and libraries to import from shared ESLint configurations. - Updated rules in the main ESLint config to enforce stricter unused variable checks. - Removed redundant configurations and streamlined ESLint setups for better maintainability.
- Updated ESLint configurations in various apps and libraries to consistently import from shared configurations. - Removed redundant rules and streamlined setups for improved maintainability. - Adjusted specific ESLint rules and ignored files to enhance project-specific linting.
- Deleted the ESLint configuration file `eslint.config.mjs` to streamline project setup. - This change may indicate a shift towards using shared ESLint configurations across projects.
WalkthroughCentralizes ESLint configuration by introducing shared configs (common, next, api, e2e, yogaWithReactEmail) and updating many project-specific eslint.config.mjs files to re-export these. Adjusts some ignore patterns and a few per-file overrides. Adds ESLint tsconfig for shared configs and minor TS config/test tweaks in select apps. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as ESLint CLI
participant P as Project eslint.config.mjs
participant S as Shared Config (next/api/e2e/yoga)
participant C as commonConfig
Dev->>P: Load config
P-->>S: Import shared preset
S-->>C: Import and spread commonConfig
C-->>S: Provide base rules/overrides
S-->>P: Return composed shared config
P-->>Dev: Export final config (plus minimal local overrides)
sequenceDiagram
autonumber
actor Dev as ESLint CLI
participant NextApp as apps/*/eslint.config.mjs
participant NextCfg as libs/shared/eslint/next.mjs
participant Common as libs/shared/eslint/common.mjs
Dev->>NextApp: Load
NextApp-->>NextCfg: ...nextConfig
NextCfg-->>Common: Spread commonConfig
Common-->>NextCfg: Base + JS/TS blocks + ignores
NextCfg-->>NextApp: Next plugin rules + NX extends + base
NextApp-->>Dev: Add app-specific ignores/rules and export
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
✨ 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/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
View your CI Pipeline Execution ↗ for commit 2996870
☁️ Nx Cloud last updated this comment at |
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
…rneys Admin apps - Introduced `next.config.js` files for the Arclight, Journeys, and Journeys Admin applications. - Configurations include support for internationalization, image optimization, and custom rewrites. - Integrated plugins such as `withNx` and `withPlausibleProxy` for enhanced functionality. - Set up production source maps and TypeScript error handling for CI environments.
…s for multiple apps - Added specific ignores for ESLint configurations in Arclight, Journeys, Journeys Admin, Watch, and Watch Modern apps to exclude Next.js config files. - Deleted `next.config.ts` files for Arclight, Journeys, Journeys Admin, Watch, and Watch Modern apps to streamline project structure and reduce redundancy. - Enhanced maintainability by standardizing ESLint setups across applications.
…standardize-eslint-configs
- Deleted the path mapping for "@core/shared/eslint/*" to streamline TypeScript configuration and improve clarity.
Summary by CodeRabbit
Chores
Refactor
Tests