- Notifications
You must be signed in to change notification settings - Fork59
upgrade the eslint lib to v9#570
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
I want to preface this by saying I'm still new eslint plugin development (and eslint in general), so there are still some things I'm not 100% sure of. I've come to conclusion that there's 2 separate things here (definitely intertwined with each other still).:
This PR upgrades us to eslint v9; however, I think more than upgrading to eslint v9, we want to support flat config. Flat config I believe is available from8.57.0 and on. So, we don't necessarilyneed to upgrade to v9 to support flat config. But if we do, even better. At the very least, we want to be backwards compatible, so we don't break things for folks who haven't updated to flat config (regardless of version). If we're fine with breaking changes for folks not on flat config, this is a different story, but even so I think we'd still have work to do since our exported configs are notflat config. I think in order for us to be backwards compatible, we'll need to exportboth legacy and flat configs as mentionedhere. In addition, I think we should update our plugin structure. I found some examples of other plugins that have both configs:
Ithink that may be the reason for some of the issues I ran into. Bc I tookclipboard-copy-element which is on v8.42.0 (no flat config). I
And, when I ran it with the current This is the section that I think affects us:https://eslint.org/docs/latest/extend/plugin-migration-flat-config#migrating-configs-for-flat-config since we doexport configs, and those are not flat configs. We'll want both legacy and flat configs. Let me know if I'm misunderstanding something here. |
I’m using ref:https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config |
Uh oh!
There was an error while loading.Please reload this page.
ref#539
upgrade the eslint lib to v9 by following this dochttps://eslint.org/docs/latest/use/migrate-to-9.0.0
also updated
context.getScope()
by thishttps://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getscope() to resolve errorwe have both
.eslintrc.js
to support eslint v8 andeslint.config.mjs
to support eslint v9