Skip to content
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

Support for eslint v9 and flat config #49

Open
skyqrose opened this issue May 28, 2024 · 1 comment
Open

Support for eslint v9 and flat config #49

skyqrose opened this issue May 28, 2024 · 1 comment

Comments

@skyqrose
Copy link

Eslint v9 has breaking changes and a new config format. There's more discussion on another eslint plugin here: jsx-eslint/eslint-plugin-jsx-a11y#978

Alternatively, this workaround allowed me to use this plugin in a flat config (on eslint v8, I haven't tested v9). You could add it to the installation instructions.

// eslint.config.mjs
import pluginBetterMutation from "eslint-plugin-better-mutation";

export default [
  // ...
  {
    plugins: {
      'better-mutation': pluginBetterMutation,
      // ... other plugins
    },
    rules: [
      ...pluginBetterMuttation.configs.recommended.rules,
      // ... other plugins and rules
    ]
  },
  // ...
];
@sloops77
Copy link
Owner

@skyqrose thanks for your suggestion! Docs have been updated. Proper flatconfig support is incoming too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants