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

Support "Flat Config" (ESLint 9) #26

Open
Mist3rBru opened this issue Apr 12, 2024 · 7 comments
Open

Support "Flat Config" (ESLint 9) #26

Mist3rBru opened this issue Apr 12, 2024 · 7 comments

Comments

@Mist3rBru
Copy link

ESLint is migrating to a new "flat config" format that will be the default in ESLint v9.

It doesn't look like eslint-plugin-no-secrets has support yet. It would be nice if was implemented.

Some additional resources:

@nickdeis
Copy link
Owner

Hey @Mist3rBru!
Thanks for filing this issue. This actually looks kind of doable and has some added benefits around processors (which have been a frustrating part of eslint extension development).
Are you planning to migrate to eslint 9 soon? I might need some help making sure this actually works.
Thanks,
Nick

@Mist3rBru
Copy link
Author

Mist3rBru commented Apr 15, 2024

Yes, I am migrating as plugins support this new config format.
I can help to test it if you want to, and maybe it should be released as a beta version like 0.9.0-beta.1 while it is tested.

@nickdeis
Copy link
Owner

Awesome @Mist3rBru , so I just gave this an initial run, and while I'm running into a few issues, I'm learning quite quickly why this is called "Flat" config. Overall I think it's the right move for eslint even if it's a pain. I'll let you know when I'm done.

@nickdeis
Copy link
Owner

Hey @Mist3rBru , so the code changes are done, just doing some testing here: #27.

@nickdeis
Copy link
Owner

nickdeis commented Apr 19, 2024

Hey @Mist3rBru ,
I have published an experimental version here:
https://www.npmjs.com/package/eslint-plugin-no-secrets/v/1.0.1-eslint9
Let me know how it goes!
Best,
Nick

nickdeis pushed a commit that referenced this issue Apr 19, 2024
@Mist3rBru
Copy link
Author

Hey @nickdeis,
It's awesome, I've tested with both configs and it worked well. Great job!

A interesting thing that I've noticed is that the error that was throwing, was about the schema's validation for the rule's options, and you opted to disable it. I just wonder why not to create a schema for it.

schema: false,

@nickdeis
Copy link
Owner

nickdeis commented Apr 21, 2024

Hey @Mist3rBru,
I'm actually reading up on that portion, and I didn't add it because I need to figure out the best way to generate the JSON schema thar would require the least amount of work (probably typescript, I am not handing writing JSON schema). I also wanted to get something out sooner rather than later because I know how important eslint is for myself and a lot of other teams!
I'm probably going to keep this issue open a bit longer to see if anyone else has any comments about eslint 9.
Thanks!
Nick

nickdeis added a commit that referenced this issue May 12, 2024
* Issue #26: Support Eslint Flat Config

* Add documentation around release

* Add another note about package updates

---------

Co-authored-by: Nicholas Deis <nicholasdeis@Nicholass-MacBook-Air.local>
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

No branches or pull requests

2 participants