Closed u01jmg3 closed 2 months ago
ESLint 9.0 also requires the flat config format, so this issue is probably kind of a duplicate of this older one? https://github.com/amilajack/eslint-plugin-compat/issues/603
Just need PR #609 to land. @amilajack can you help us out?
Just need PR #609 to land. @amilajack can you help us out?
The flat config ticket was merged yesterday!
The next tag misses updated peerDependencies :)
Great work landing flat config file support 👏🏻
Will keep this issue open though because, as mentioned by @dargmuesli (https://github.com/amilajack/eslint-plugin-compat/pull/609#issuecomment-2123734301), currently this plugin doesn't fully support ESLint 9 due to the error: [context.getAncestors is not a function](https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getancestors())
You can already use eslint-plugin-compat
with eslint v9 by installing @eslint/compat
and having this eslint.config.js
:
// @ts-check
import { fixupConfigRules } from '@eslint/compat'
import eslintPluginCompat from 'eslint-plugin-compat'
const compatConfiguration = fixupConfigRules(
eslintPluginCompat.configs['flat/recommended'],
)
export default [
...compatConfiguration,
]
Thanks 🙏🏻, @dargmuesli - could this method also be used with eslint-plugin-escompat?
I think flat config must be supported.
Are there any specific fixes that could use some help here? Happy to donate some time this week if help is needed to move ESLint 9 support forward.
Great! 🥳 As mentioned
currently this plugin doesn't fully support ESLint 9 due to the error: [context.getAncestors is not a function](https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getancestors())
There might be some follow up issues that surface after this issue is fixed, but I don't think there are many as the compat workaround I posted above works pretty flawlessly.
@dargmuesli that’s great, but mainly I’d like to hear from a maintainer (I guess that’s mainly @amilajack) what I can help do (or not help with). If maintainers are paying attention to ESLint v9 support, it’s not going to go very far just because I poke at it, and it’s not clear what they do or don’t need help with.
I've submitted #627 , a PR which should hopefully be a jump start on moving to ESLint 9 support. Hopefully someone can review and see if anything else needs to be done.
Maybe update the changelog as well?
Looks like releases are getting made, but despite having @semantic-release/changelog
set up, the change log does not appear to be updating for whatever reason... Not just the prereleases, but earlier versions...
@amilajack : I think this can be closed now (by #627)
Thanks!
https://github.com/amilajack/eslint-plugin-compat/blob/eba26a7f65c26774fcbc46185a0ca7c5bcdc309d/package.json#L117
https://github.com/eslint/eslint/releases/tag/v9.0.0