eslint-plugin-xstate icon indicating copy to clipboard operation
eslint-plugin-xstate copied to clipboard

ESLint plugin to check for common mistakes and enforce good practices when using XState.

Results 5 eslint-plugin-xstate issues
Sort by recently updated
recently updated
newest added

My machine: ``` createMachine({ initial: 'I am off', states: { 'I am off': { on: { EVENT_1: { target: 'I am on', }, EVENT_2: { target: 'I am on', },...

bug

**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';...

bug
has workaround

`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...

enhancement

**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() ); } ```...

bug

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...