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
Move to flat config #702
Comments
This seems to tackle a lot of things I have recently run into. Looking forward to the integration. |
I wanted to start this effort. But I think first, we need to think about what it means for What does this mean for
|
Love the idea, some of that is also covered/discussed in: Such a change would also get the funding from: |
I've got a good start on this, I am going on vacation starting saturday for a couple of weeks, but I think I can get a draft PR for this before then, if not it should be in shortly when I get back. Some more thoughts we can discuss and how my initial implementation looks:
Some potential downsides/pitfalls:
New possibilities/features for xo:
|
The point of TypeScript is to have types. Same applies to linting. I'm not very interested in supporting use-cases for not using the type aware rules.
ESLint may support types built-in at some point: eslint/eslint#16557
I would be fine with using TypeScript for XO. That would be preferable over lots of JSDoc comments. |
I would love to see I've been using |
Just an update here... I have worked on this a bit and have a version which works ok. It doesn't quite cover all Unfortunately the initial results show that a large and complex ESLint flat config is quite a bit slower than what xo does now, even though we can cache the eslint instance, which is surprising. this implies that either:
It is likely a combination of both factors. Since I discovered that its a big downgrade in performance I haven't worked on it anymore, and I've lost my motivation for this effort... I think what I did was a good experiment, but now I think we maybe should take the path of least resistance with upgrade to flat config and use the current code base and just hook in the eslint compatibility libs and continue to use xo as it is. --- Not sure how the performance will look then. https://github.com/spence-s/flat-xo for anyone who would like to review or try out the code. |
This is put on a break until ESLint improves flat config performance: #707 (comment) |
Here are some other projects tackling this issue, for reference: |
This issue is now funded. |
Took a look at this repo again over the weekend. https://github.com/spence-s/flat-xo However, there are still some things to note. It seems these plugins do not yet support flat configs. (see eslint/eslint#18093)
Also, there is a ton of work to do for testing, many of xo's current tests are about parsing the old config type so those can't be ported over. Also the cli flags are changing so tests around those can't be ported either. Anyway - I am going to continue work in the flat-xo repo, I welcome anyone who wants to contribute there, and when I get some better tests and stability, we can figure out the best way to get the code in the new repo under xo namespace/cli and all that good stuff. If anyone wants to try to beat me to this I would encourage them to try, I think this thing is still a good while away from stability. |
|
Does this issue also cover the other config repositories? |
Ideally yes, but I assume that support will follow later. Other than IMO |
https://eslint.org/blog/2022/08/new-config-system-part-2/
The change has been out for a while and it might be a good time to start exporting it. I believe this will solve a lot of config-related issues:
eslint-plugin-node
andeslint-plugin-n
rules #613Some notes around this in #428 (comment)
Upvote & Fund
The text was updated successfully, but these errors were encountered: