-
Notifications
You must be signed in to change notification settings - Fork 91
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
Upgrade to new ESLint Flat configuration files #146
Comments
We don't have plans to put effort into this migration, but would be open to a PR for this support. |
@jennifer-shehane Ok, thanks for the reply. Looking into your |
@jennifer-shehane : Be aware that this plugin will essentially stop working by default in ESLint 9 as the flat format becomes the default. |
This comment was marked as resolved.
This comment was marked as resolved.
Cannot update to ESLint 9 because of this issue. |
This comment was marked as resolved.
This comment was marked as resolved.
Actually, you can use So this should be working with v8 flat config: import { FlatCompat } from '@eslint/eslintrc'
const compat = new FlatCompat()
export default [
{
rules: {
// your rules
}
}, ...compat.config({
extends: ['plugin:cypress/recommended'],
rules: {
// your rules
}
})
] EDIT: Actually, this is also working with eslint v9. So while support for flat configs is probably required to make this package future-proof, you can use this package with eslint v9 using |
Thanks very much for your advice! I was able to successfully test this on https://github.com/cypress-io/cypress-example-kitchensink with ESLint Using the There is still quite some work to do for full native ESLint 9.x compatibility after this. |
Thanks once again for drawing attention to Once this document has been approved and published, it should be a small step to open up the plugin to usage with ESLint |
|
How could this compatibility support be restricted to a specific directory?
Now using the flat config compatibility support, I would add the contents of the
How can I restrict that this config only should be applied to files within the |
Could you please put your question into a separate new issue? |
Hello! I see now you started worked on this migration, last week I forked the repo to give it a try and I put here the code in case can be helpful, if you want I can open a PR but I don't want to mess with your changes, putting it just in case it can be helpful for you and it can save you some time |
Thanks very much for sharing your work. 👍🏻 Some of it overlaps with what I already did, or is in PRs I have submitted or have prepared, so it would not make sense to make a direct PR out of it at the moment. The other changes I did not cover yet are definitely interesting, so I suggest waiting a little until the planned changes have been processed. |
My planned changes have all been processed now. The repo is using ESLint eslint-plugin-cypress/package.json Line 30 in a109c4a
So although it supports usage from an ESLint flat file config ( |
This should not be a blocker anymore, even though the issue is still open. You can check out the https://github.com/cypress-io/cypress-example-kitchensink repo which is already running ESLint |
|
🎉 This issue has been resolved in version 3.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey there, thanks for your ESLint plugin 🙌. Starting with v9, ESLint provides a new flat config format (
eslint.config.js
). Also see the configuration migration guide and the plugin migration guide.Do you have any plans to upgrade this plugin to the new format? For example, the
env
field does not exist anymore and globals have to provided in a different way. Also see my Stack Overflow answer here. And there are many other breaking changes too.I've just migrated my
eslint-plugin-erb
to the new API. Feel free to take inspiration from it, e.g. I provide a legacy recommended configuration for backwards compatibility here.The text was updated successfully, but these errors were encountered: