-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Upgrade eslint-config-preact to ESLint v9 #33
base: master
Are you sure you want to change the base?
Conversation
Sorry, but dropping support for older versions I think is a no-go, as is switching to This is a massive diff that I don't think is really called for or necessary here? |
d7b9069
to
5cfbef6
Compare
OK, I've made changes so that old versions are supported AND
Consequently, there will now be a maintenance burden in supporting both To help with this, I've extracted common options into standalone objects. However, since not everything can be shared, there will still be some burden in confirming feature parity. For now, only V9's flat config is being tested by the unit tests. I haven't seen a way to unit test both legacy and modern configs, but I can try looking into that if you decide it's a blocker for merging. Let me know if there's anything else I can explain/provide, thanks! |
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.
Do you mind providing some documentation as for why this all is necessary? It's a huge diff, touching tons of deps that don't seem to be required for bumping a peer dependency.
As for the "maintenance burden", no problem, don't worry about it. It's not exactly a high-traffic repo.
Sure! I initially used Also, to be clear, these changes aren't just bumping a peer dependency; it upgrades the config itself to v9. Added
|
Fixes #28
Hey folks, I've been working on this for a while and have finally gotten something worth sharing.
Usage Notes
Important Notes
Changes to exported type
index.js
's export type is stillLegacyConfig
, as before, but it now includes an additional property:flat
. This property holds the "modern"Config
for users to put in their ESLint >= 9.0.0 configuration files.Consequently, there will now be a maintenance burden in supporting both LegacyConfig (
< 9.0.0
) and Config (>= 9.0.0
) for future updates.Added
dependencies
:globals
: Used to address breaking change in legacy config'senv
andglobals
properties.Updated
dependencies
:@babel/[email protected]
: ESLint v9 peer dependency relaxed[email protected]
: ESLint v9 support5.1.0-0
; chose the next stable version instead[email protected]
: ESLint v9 support[email protected]
: ESLint v9 supportAdded
devDependencies
:eslint-formatter-tap
: no longer bundled with ESLintUpdated
devDependencies
:[email protected]
npm install [email protected]
resolves to9.18.0
inpackage-lock.json
, so I explicitly chose^9.10.0
because that version deprecates@types/eslint
[email protected]
and@types/jest
: Fixes subpath imports in Jest, which caused errors starting from ESLint 9.x:Removed
devDependencies
:@types/eslint
-> Not needed for eslint >=9.10.0
Testing Notes
Miscellaneous Notes
package.json
has been migrated to./eslint.config.js
./test/fixtures/.eslintrc.json
test file has been replaced by./test/eslint.config.js
, and the unit test now references it viaconfigOverrideFile
.