eslint-plugin-xstate
eslint-plugin-xstate copied to clipboard
Support eslint v9
Describe the bug
Eslint v9 has been out since April https://eslint.org/blog/2024/04/eslint-v9.0.0-released/.
It is not declared as supported in peerDependencies.
Expected behavior
For the plugin to work with eslint v9
Actual behavior
Gives errors in peerDependencies, and when using flatConfig, unclear about other issues
Might also be an issue with sharable config
// file: eslint.config.mjs
import xstate from "eslint-plugin-xstate";
export default [
xstate.configs.recommended,
]
leads to
ESLint: 9.8.0
A config object has a "plugins" key defined as an array of strings.
Flat config requires "plugins" to be an object in this form:
{
plugins: {
xstate: pluginObject
}
}
Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#importing-plugins-and-custom-parsers
If you're using a shareable config that you cannot rewrite in flat config format, then use the compatibility utility:
https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
Versions (please complete the following information):
- Node version:
v22.5.1
- ESLint version:
v9.8.0
- eslint-plugin-xstate version:
3.2.1