-
-
Notifications
You must be signed in to change notification settings - Fork 700
refactor: split configs and plugin to separate modules
#2967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
configs and plugin to resolve circular dependenciesconfigs and plugin to separate modules
FloEdelmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, thank you! 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the plugin architecture by splitting configs and plugin into separate modules to avoid circular dependencies and resolve test errors.
Key Changes:
- Created
lib/plugin.jscontaining rules and processors (auto-generated) - Created
lib/configs/index.jsto centralize all config exports - Updated
lib/index.jsto combine plugin and configs modules - Updated flat config files to reference
../../plugininstead of../../index - Replaced
tools/update-lib-index.jswithtools/update-lib-plugin.js
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/update.js | Updated to require the new update-lib-plugin script instead of update-lib-index |
| tools/update-lib-plugin.js | New script that generates lib/plugin.js with rules and processors |
| tools/update-lib-index.js | Removed - replaced by separate plugin and configs modules |
| tools/update-lib-flat-configs.js | Updated to reference ../../plugin instead of ../../index in generated flat configs |
| lib/plugin.js | New auto-generated file containing plugin meta, rules, and processors |
| lib/index.js | Refactored to import and combine separate configs and plugin modules |
| lib/configs/index.js | New file that centralizes all config exports (eslintrc, flat, and no-layout-rules) |
| lib/configs/flat/base.js | Updated to require ../../plugin instead of ../../index to avoid circular dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move
configsandpluginsto separate modules, avoid circular dependencies. This can help resolve test errors in #2916.