eslint-plugin-panda
eslint-plugin-panda copied to clipboard
feat: support ESLint v9 & Flat Config
Fixes #61
This adds ESLint v9 support & Flat Config.
TODO:
- [ ] Update all deps for ESLint
- [ ] test
eslint-docgen - [ ] Provide a better way to use
eslint-plugin-pandawith ESLint v9 (Flat Config) - [ ] Have different sandboxes for traditional config and v9 config (@anubra266 sneaked this in 😉 )
We can already use @pandacss/eslint-plugin like this
import panda from '@pandacss/eslint-plugin'
export default [
{
plugins: {
'@pandacss': panda,
},
rules: {
...panda.configs.recommended.rules,
}
}
]
See more details https://github.com/koba04/eslint-plugin-panda/blob/eslint-v9/sandbox/eslint.config.mjs
@koba04 Thanks for picking this up. Just wanted to note, that we'd like to be backward compatible, so there'd have to be an entry that exposes support for the traditional config.
Yeah, I expect the current implementation works with ESLint v9 (Flat Config), and this still works with ESLint v8 and Legacy Config. In fact, I don't have any changes for plugin implementation.
So this might be good enough to have the document for Flat Config setting.
I've confirmed eslint-docgen doesn't work with ESLint v9.
https://github.com/wikimedia/eslint-docgen/issues/138
@koba04 I've updated your PR.
- We use legacy eslint in project root for backwards compatibility.
- We now have two sandboxes two test legacy and v9 respectively
Sorry, I couldn't have much time to work on it, and thank you for working on this!