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 ESLint v9 & Flat Config #79

Merged
merged 18 commits into from
Jun 18, 2024
Merged

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented May 15, 2024

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-panda with 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

@anubra266
Copy link
Collaborator

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

@koba04
Copy link
Contributor Author

koba04 commented May 15, 2024

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.

@koba04
Copy link
Contributor Author

koba04 commented May 16, 2024

I've confirmed eslint-docgen doesn't work with ESLint v9.
wikimedia/eslint-docgen#138

@anubra266 anubra266 marked this pull request as ready for review June 18, 2024 02:33
@anubra266
Copy link
Collaborator

@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

@anubra266 anubra266 merged commit 15a4f9c into chakra-ui:main Jun 18, 2024
4 checks passed
@koba04 koba04 deleted the eslint-v9 branch June 18, 2024 14:42
@koba04
Copy link
Contributor Author

koba04 commented Jun 18, 2024

Sorry, I couldn't have much time to work on it, and thank you for working on this!

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.

[feature-request] compatibility with Eslint V9
2 participants