-
-
Notifications
You must be signed in to change notification settings - Fork 106
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: support flat config #609
Conversation
b296dd1
to
d9d8467
Compare
c088ed6
to
f775583
Compare
212f231
to
b0e2ec3
Compare
49e4e85
to
54cf9f6
Compare
@amilajack now that eslint v9 is released, do you think merging this would be an option for you? 🙏 |
Eslint-plugin-compat has not been maintained for 7 months. Version 9 of Eslint has long been out and a PR exists for fixing the compatibility. We might need to either fork or find something else. amilajack/eslint-plugin-compat#609
Sorry for the delay here. I've published this as |
Thank you @amilajack! I tried @nix6839 I understand that this PR only adds flat config support. I still want to mention that with ESLint v9.3.0 I get the TypeError: context.getAncestors is not a function. Might be possible to fix this in this PR too as described under the link? |
I think it's going to be a big task, so it should be worked on in a separate PR. |
@dargmuesli would you be interested in submitting a PR for this? |
Out of time right now. Depending on other work on this I might come back to it in the future. Other contributions are welcome. |
!! IMPORTANT !!
If user previously imported this package using ESM,
import { configs, rules } from 'eslint-plugin-compat'
will not work.This is a BREAKING CHANGE, so need to increase a major version to release it.
If you agree to a major version upgrade, it would be good to also remove
config
.If you don't want to make a BREAKING CHANGE, I can maintain compatibility by splitting the package entry point into
.mts
and.cts
. (I had implemented it once, but the code was too complicated, so I deleted it for now: 686d75a)Please feel free to let me know which method you prefer. :)
What's Changed
Resolves: #603
P.S. ESLint v9 has been released. IMO, it's a good time to drop support for versions below ESLint v8.57.0!