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!: update to eslint v9, flat config only #8

Merged
merged 21 commits into from
Aug 21, 2024

Conversation

favna
Copy link
Contributor

@favna favna commented Apr 7, 2024

Please describe the changes this PR makes and why it should be merged:

Closes #9

This updates this repo to ESLint v9 and drops support for the legacy config style, only including the flat config style which is now the only supported config style for ESLint. This PR should be considered a breaking change! (v1.0.0 or v0.2.0, whichever you prefer)

Some of the plugins that this config requires are not yet updated for ESLint v9, the list can be tracked here: eslint/eslint#18093. I also marked some of them in the code with TODO [V9 UPDATE]. I aimed to ensure that at least the source code of this config itself can be linted with the current dependency versions.

Regarding the swap from eslint-plugin-i to eslint-plugin-import-x see: un-ts/eslint-plugin-import-x#29 (comment)

I also dropped all the js files in the root in favour of Node export mapping because ESLint now has a minimum Node version of 18.18.0 so we can safely use export mapping and declutter the repository a LOT.

Lastly I also removed all the husky, is-ci and pinst dependencies because no husky scripts were set up, so it was just unnecessary bloat.

Breaking change blurb for when doing a squash-and-merge:

BREAKING CHANGE: This package now only exports flat config. For more information see the [eslint migration guide](https://eslint.org/blog/2024/04/eslint-v9.0.0-released) and [flat config guide](https://eslint.org/blog/2022/08/new-config-system-part-2/). The README of this package has instructions for how to use this package with the new flat config system.
BREAKING CHANGE: Your current config _will_ need migration, there is simply no possible chance that your current config will still work. Please refer to the README of this package.

BREAKING CHANGE: This package now only exports flat config. For more information see the [eslint migration guide](https://eslint.org/blog/2024/04/eslint-v9.0.0-released) and [flat config guide](https://eslint.org/blog/2022/08/new-config-system-part-2/). The README of this package has instructions for how to use this package with the new flat config system.
@favna favna marked this pull request as draft April 7, 2024 16:12
@favna
Copy link
Contributor Author

favna commented Jun 6, 2024

Progress update: The TODOs are worked away, but the configs and README still need fine-tuning to actually work with ESLint v9. I started trying out the /angular config and it isn't working yet as written in the README. I will have to go through every config setup and try it in the appropriate project setup and make sure the configs in neon work.

Very open to other viewers / contributes / crawl helping in this process.

TODO:

  • Angular
  • Astro
  • Cypress
  • MDX
  • NextJS
  • React (with Vite)
  • Svelte (with Vite)
  • Vue (with Vite)

@Silon
Copy link

Silon commented Aug 17, 2024

Any updates? This config is very good and definitely needs update to flat config

@favna
Copy link
Contributor Author

favna commented Aug 17, 2024

I'm slowly working through all the different setups and I want to make some more adjustments down the line as well. It's mostly just that I have a lot of other projects to do as well. Also motivation, motivation is a big factor. It'll be ready when it's ready.

@iCrawl iCrawl marked this pull request as ready for review August 21, 2024 12:04
Copy link
Owner

@iCrawl iCrawl left a comment

Choose a reason for hiding this comment

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

LGTM for now, I'll go ahead and merge this for now, and we can work on ironing out the README and additional plugins as separate PRs if wanted.

@iCrawl iCrawl merged commit 740790d into iCrawl:main Aug 21, 2024
@favna favna deleted the feat/update-to-eslint-v9-flat-config branch August 22, 2024 06:26
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.

3 participants