eslint-plugin-xstate
eslint-plugin-xstate copied to clipboard
ESLint plugin to check for common mistakes and enforce good practices when using XState.
My machine: ``` createMachine({ initial: 'I am off', states: { 'I am off': { on: { EVENT_1: { target: 'I am on', }, EVENT_2: { target: 'I am on', },...
**Describe the bug** The plugin does not detect any errors if a generic FSM is structured in two distinct files, as follows: _authFSM.ts_ ``` import { Machine } from 'xstate';...
`no-invalid-state-props` and `no-invalid-transition-props` do a good job of ensuring only valid keys are used, but it'd be cool to have a new stylistic rule that could enforce a user-configurable order...
**Describe the bug** This should not cause a lint error as per the [V5 update guidance](https://stately.ai/docs/migration#use-enqueueactions-instead-of-pure-and-choose): ``` enqueueActions( ( { enqueue } ) => { enqueue( assign() ); } ```...
The xstate documentation's recommended approach for specifying types in Typescript is [`to use the setup function`](https://stately.ai/docs/typescript#specifying-types). This then chains into a normal `createMachine` call, but this pattern is not currently...
**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](https://github.com/rlaffers/eslint-plugin-xstate/blob/9988c15a5c739779837687d752b477d8fa9764b8/package.json#L40). **Expected behavior** For the plugin to work with eslint v9 **Actual...