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: support flat config #609

Merged
merged 12 commits into from
May 22, 2024
Merged

feat: support flat config #609

merged 12 commits into from
May 22, 2024

Conversation

nix6839
Copy link
Contributor

@nix6839 nix6839 commented Dec 17, 2023

!! 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!

@nix6839 nix6839 force-pushed the flat-config branch 2 times, most recently from 49e4e85 to 54cf9f6 Compare April 4, 2024 07:49
@dargmuesli
Copy link

@amilajack now that eslint v9 is released, do you think merging this would be an option for you? 🙏

@u01jmg3 u01jmg3 mentioned this pull request Apr 22, 2024
fatso83 added a commit to sinonjs/eslint-config that referenced this pull request Apr 25, 2024
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
@amilajack
Copy link
Owner

Sorry for the delay here. I've published this as eslint-plugin-compat@next. Feel free to test, as I will as well.

@dargmuesli
Copy link

dargmuesli commented May 22, 2024

Thank you @amilajack! I tried 5.0.0-2 in a project of mine and it looks good.

@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?

@nix6839
Copy link
Contributor Author

nix6839 commented May 22, 2024

@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.

@amilajack
Copy link
Owner

Might be possible to fix this in this PR too as described under the link?

@dargmuesli would you be interested in submitting a PR for this?

@amilajack amilajack merged commit f51dad7 into amilajack:main May 22, 2024
4 checks passed
@dargmuesli
Copy link

dargmuesli commented May 22, 2024

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.

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.

support flat config
3 participants