Skip to content
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

feat: eslint 9 support #627

Merged
merged 2 commits into from
Jul 11, 2024
Merged

feat: eslint 9 support #627

merged 2 commits into from
Jul 11, 2024

Conversation

brettz9
Copy link
Contributor

@brettz9 brettz9 commented Jul 2, 2024

Adds ESLint 9 support.

Attempts to dogfood with flat config and ESLint 9 use internally, but a few plugins could not be upgraded (See the config file).

I also upgraded a number of dependencies/devDeps and adjusted tests accordingly.

This still should need a closer look and testing (I couldn't get the spec:e2e script working though that could be a slow connection where I am), but I thought I'd try to get the ball rolling with this draft.

@brettz9 brettz9 changed the title ESLint 9 feat: eslint 9 support Jul 2, 2024
@brettz9 brettz9 mentioned this pull request Jul 2, 2024
@brettz9 brettz9 force-pushed the eslint9 branch 3 times, most recently from 20a7f34 to 5514b2c Compare July 2, 2024 10:59
Copy link

@dargmuesli dargmuesli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those changes backwards compatible? If not, the merged changes should include an exclamation mark likefeat!: eslint 9 support to make sure the release has a proper version.

CHANGELOG.md Outdated Show resolved Hide resolved
CODE_OF_CONDUCT.md Outdated Show resolved Hide resolved
@brettz9
Copy link
Contributor Author

brettz9 commented Jul 2, 2024

Are those changes backwards compatible? If not, the merged changes should include an exclamation mark likefeat!: eslint 9 support to make sure the release has a proper version.

Ah yes, thanks for the reminder. It is currently breaking, with globals now requiring Node 18 (and I should update engines as well), though I could revert those changes if such a switch is not desired, as otherwise the changes should not be breaking. I would personally think it is reasonable to up the minimum version and use the latest version.

brettz9 added 2 commits July 3, 2024 08:59
Requires Node 18 (due to globals update)
@brettz9 brettz9 changed the title feat: eslint 9 support feat!: eslint 9 support Jul 3, 2024
@brettz9
Copy link
Contributor Author

brettz9 commented Jul 3, 2024

I've updated to indicate it is a breaking change, but the PR title doesn't accept the exclamation mark, so I just did it within the commit.

@brettz9 brettz9 changed the title feat!: eslint 9 support feat: eslint 9 support Jul 3, 2024
@amilajack
Copy link
Owner

@brettz9 is this PR ready for review? it's still in draft

@brettz9
Copy link
Contributor Author

brettz9 commented Jul 9, 2024

Yes, it's ready for review. I just put it as a draft because I didn't want to convey it was ready for a quick merge, as someone should at least confirm the spec:e2e tests (I have a spotty connection where I am so it may be that which is preventing me from completing and reviewing those tests.)

@brettz9 brettz9 marked this pull request as ready for review July 9, 2024 19:04
@amilajack amilajack merged commit a2db2d6 into amilajack:main Jul 11, 2024
5 of 6 checks passed
@amilajack
Copy link
Owner

Published this to next tag. Please test and I can push to latest tag

npm i eslint-plugin-compat@next

@dargmuesli
Copy link

Seems to be working for me!
Just keep in mind to check if it's breaking for eslint v8 users and publish as v6 maybe, not v5.1.0.

@brettz9
Copy link
Contributor Author

brettz9 commented Jul 11, 2024

It should still work with ESLint 8 (and whatever earlier versions were still working before the changes--the peerDependencies go back a ways). But it is a breaking change due to the Node version bump.

Works for me also in both ESLint 8 and ESLint 9.

@brettz9 brettz9 deleted the eslint9 branch July 11, 2024 21:29
@xconverge
Copy link

xconverge commented Jul 11, 2024

I do see this with yarn (4.3.1), but will ignore it. I just figured I would mention it...

 eslint is listed by your project with version 9.6.0 (pe4bd0), which doesn't satisfy what eslint-plugin-compat and other dependencies request (^8.0.0).

maybe missing a || ^9.0.0 somewhere? hmm it looks right in this MR...

lock file looks good too..not sure what is going on

-"eslint-plugin-compat@npm:5.0.0":
-  version: 5.0.0
-  resolution: "eslint-plugin-compat@npm:5.0.0"
+"eslint-plugin-compat@npm:5.1.0-0":
+  version: 5.1.0-0
+  resolution: "eslint-plugin-compat@npm:5.1.0-0"
   dependencies:
-    "@mdn/browser-compat-data": "npm:^5.5.19"
+    "@mdn/browser-compat-data": "npm:^5.5.35"
     ast-metadata-inferer: "npm:^0.8.0"
-    browserslist: "npm:^4.23.0"
-    caniuse-lite: "npm:^1.0.30001605"
+    browserslist: "npm:^4.23.1"
+    caniuse-lite: "npm:^1.0.30001639"
     find-up: "npm:^5.0.0"
-    globals: "npm:^13.24.0"
+    globals: "npm:^15.7.0"
     lodash.memoize: "npm:^4.1.2"
-    semver: "npm:^7.6.0"
+    semver: "npm:^7.6.2"
   peerDependencies:
-    eslint: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0
-  checksum: 10c0/07c0a90e601dffec0ea31c2c85c32679ab13238c030936d25fa57433e8c37566428249ee4fee6f98a107d8fc90214000ac4e6d4eaf646bd34bb96248bc5112e3
+    eslint: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0
+  checksum: 10c0/183183bb39e10ea0c3a489679a43b8c351f915457000330f57954a49b6d4a647237bd0b3a4621b4cf6a3f3c90e62a159cdf28f0d4716238321dc3919676a7ed0
   languageName: node
   linkType: hard

@amilajack
Copy link
Owner

Published 6.0.0 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants