Repository navigation
Drop legacy ESLint config support - export flat config as main format - #527
Conversation
🦋 Changeset detectedLatest commit: b9b3835 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
|
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
ota-meshi
left a comment
There was a problem hiding this comment.
The explanations in the rules documents seem to be out of date. Please fix these as well.
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
Fixed in commit 75c4560. Updated |
Co-authored-by: ota-meshi <16508807+ota-meshi@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR implements a breaking change to drop support for legacy ESLint configuration format and make flat configuration the main export format. Users on ESLint v9+ can now use configs.recommended instead of configs['flat/recommended'], though the flat/* namespace is maintained for backward compatibility.
Changes:
- Main config exports (base, recommended, standard, prettier) now directly export flat config format
- Removed legacy config files and associated code/tests
- Updated all documentation and rule references to use new config format
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Updated to import flat configs as main exports, maintain flat/* for backward compatibility |
| src/configs/base.ts | Removed legacy base config file |
| src/configs/recommended.ts | Removed legacy recommended config file |
| src/configs/standard.ts | Removed legacy standard config file |
| src/configs/prettier.ts | Removed legacy prettier config file |
| tools/update-rulesets.ts | Updated auto-generation script to only generate flat configs |
| tools/update-docs.ts | Updated to reference new config format in documentation |
| tools/update-docs-rules-index.ts | Updated rules index header to reference new config format |
| tests/src/eslint-plugin.ts | Removed legacy config integration tests |
| tests/src/configs/standard.ts | Updated to test new config format and verify backward compatibility |
| tests/fixtures/integrations/eslint-plugin/legacy-test01/* | Removed legacy test fixtures |
| tests/fixtures/integrations/eslint-plugin/legacy-issue89/* | Removed legacy test fixtures |
| README.md | Updated documentation to show flat config as main format, removed legacy examples |
| docs/user-guide/index.md | Updated user guide to show flat config as main format, removed legacy examples |
| docs/rules/index.md | Updated header to reference configs.recommended and configs.standard |
| docs/rules/*.md | Updated all rule documentation to reference new config format |
| .changeset/drop-legacy-config-support.md | Added changeset documenting the breaking change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Drop support for legacy config - make flat config the main export
Summary
Successfully implemented the breaking change to drop legacy ESLint config support and make flat configuration the main export format.
Key changes:
flat/*namespace configs maintained for backward compatibility (point to same flat configs)configs.recommendedandconfigs.standardinstead of legacy"plugin:yml/recommended"and"plugin:yml/standard"formatMigration:
Users on ESLint v9.38.0+ should update from
configs['flat/recommended']toconfigs.recommended(thoughflat/*still works for backward compatibility).Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.