-
Notifications
You must be signed in to change notification settings - Fork 146
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
Prepare the rules for ESLint v9 #899
Comments
An example of a similar migration on another eslint plugin: https://github.com/eslint-community/eslint-plugin-security/pull/145/files |
@thenbe Thanks for the example! It will definitely help when migrating this plugin. |
For anyone tracking this PR: eslint released some compatibility utilities that allows users to use this plugin in its current state with eslint v9. tldr: // eslint.config.js
import testingLibrary from 'eslint-plugin-testing-library';
+ import { fixupPluginRules } from '@eslint/compat';
{
files: ['**/*.test.{js,ts,jsx,tsx}'],
plugins: {
- 'testing-library': {
- rules: testingLibrary.rules,
- },
+ 'testing-library': fixupPluginRules({
+ rules: testingLibrary.rules,
+ }),
},
rules: testingLibrary.configs.react.rules,
} |
Thank you for this. I didn't remember this existed when I went through the flat-config docs. For anyone using with // Parse errors in imported module '@eslint/compat': parserPath or languageOptions.parser is required! (undefined:undefined) import/namespace
import { fixupPluginRules } from "@eslint/compat"; It's important to note that |
is there Any ETA for it? |
I have opened #925 which should resolve this without requiring a new major |
🎉 This issue has been resolved in version 6.3.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I know this was technically closed by PR #928, but due to outdated dependencies there are still errors attempting to install the latest version with ESLint v9:
Maybe this depends on issue #855 before ESLint v9 is fully supported? |
@dosolkowski-work Technically, ESLint v9 is now supported as all rules are updated Having a (peer)dependency nog support it (officially), doesn't make that less true. We are however going to release a major version where all dependencies are updated to their latest version (together with some other breaking changes), which will at that point not throw the warning anymore It's a warning, so you can just ignore it (for now) 😉 |
Plugin version
n/a
What problem do you want to solve?
Your take on the correct solution?
Apply the changes mentioned in the linked migration docs so the custom rules are adapted to ESLint v9 and the
Anything else?
No response
Do you want to submit a pull request to implement this change?
Yes
The text was updated successfully, but these errors were encountered: