chore(deps): FE-454 Update to ESLint 9#298
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the repository to support ESLint 9 with its new flat config format, replacing the legacy ESLint 8 configuration system. The migration includes converting all modules to ES modules ("type": "module"), replacing CommonJS with ES module syntax, and restructuring configuration files to use the flat config format.
Key Changes:
- Updated ESLint peer dependency from ^8.0.0 to ^9.0.0 across all packages
- Converted all configuration files from CommonJS to ES modules
- Restructured ESLint configs to use flat config format instead of the legacy .eslintrc format
Reviewed Changes
Copilot reviewed 33 out of 41 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated ESLint to 9.x, added module type, modified test script for ES modules |
| packages/eslint-plugin/package.json | Updated ESLint peer dependency to 9.x and added module type |
| packages/eslint-config/package.json | Updated ESLint peer dependency to 9.x, added module type, replaced patch dependency with @eslint/js and globals |
| packages/eslint-plugin/index.js | Converted to ES modules with flat config format for plugin configuration |
| packages/eslint-plugin/rules/jsx-short-circuit-conditionals.js | Converted to ES modules and removed deprecated config properties |
| packages/eslint-plugin/tests/jsx-short-circuit-conditionals.spec.js | Converted to ES modules with compatibility handling for default exports |
| packages/eslint-config/index.js | Converted to async ES module returning flat config array |
| packages/eslint-config/configs/*.js | Converted all config files to ES modules with flat config format |
| packages/eslint-config/utils/index.js | Converted to async ES module using dynamic imports |
| packages/eslint-config/test/*.spec.js | Updated test files to ES modules with proper async handling |
| packages/eslint-config/prettier.config.js | Converted to ES module export |
| packages/eslint-config/jest.config.js | Added transform config for ES modules |
| eslint.config.js | New flat config file replacing .eslintrc.js |
| README.md | Updated documentation for ESLint 9 migration |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
71d0856 to
6940e6a
Compare
|
Any estimate on when this upgrade will be available? I'm currently converting our Catalyst project to Nextjs 16 and ESLint 9 but getting a little stuck on the BigCommerce configs. |
|
@oliverdowie thanks for the question! It actually helps to know there are other people out there interested / waiting on this. We'll aim to get it finalised next week. |
fb8a65e to
6bc5d91
Compare
|
hey @danielochoa-epam , can you please rebase instead of merging master into here? |
BREAKING CHANGE: This package now requires ESLint 9.x - Convert all configs to ESLint 9 flat config format - Convert from CommonJS to ES modules - Update peer dependency from eslint@^8.0.0 to eslint@^9.0.0 - Restructured all config files to use flat config array format - Replaced 'extends' with spread operator imports - Updated plugin references to use new naming convention - Added "type": "module" to package.json files - Replaced require() with import statements - Replaced module.exports with export default - Now exports async config array - Conditionally includes configs based on installed packages - Updated test utilities for new ESLint API - Regenerated snapshots with new format - Bump lerna ^8.1.2 → ^8.1.8 - Bump typescript ^5.0.2 → ^5.6.3 Addresses Copilot review comments: - Fix 'Disallows' → 'Disallow' in rule description - Remove redundant schema comment - Clarify hasPackage() implementation comment
de14ba8 to
1e2354c
Compare
What & Why?
Migrate from ESLint 8 to ESLint 9 with the new flat config format.
BREAKING CHANGE: This package now requires ESLint 9.x
Why ESLint 9?
📖 Review Guide
🟢 Skip These (~14K lines)
*.snapfilesyarn.lock💡 Tip: Add
*.snapto GitHub's file filter to hide them:*.snapto "File filter"🔴 Focus Review Here (~1.3K lines)
configs/base.jsconfigs/typescript.jsconfigs/react.jsindex.jsutils/index.jshasPackage()helper🟡 Glance At (~300 lines)
test/*.spec.jsREADME.mdpackage.json"type": "module", peer depsChanges Summary
Config Structure
ES Modules
Entry Point
Examples
Before (ESLint 8)
After (ESLint 9)
Testing