-
Notifications
You must be signed in to change notification settings - Fork 132
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 |
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: