rlaffers / eslint-plugin-xstate

ESLint plugin to check for common mistakes and enforce good practices when using XState.
MIT License
48 stars 4 forks source link

no-ondone-outside-compound-state triggers for invoke with arrays #18

Closed tivac closed 1 year ago

tivac commented 1 year ago

Describe the bug If you specify an invoke property in xstate using an array of things to invoke, and one of those has an onDone property, the no-ondone-outside-compound-state rule will trigger on it and claim it's invalid.

Expected behavior The onDone is fine, because it works fine in xstate and is correct usage.

Actual behavior A false positive match that fails linting.

Versions (please complete the following information):

Additional context https://stackblitz.com/edit/eslint-plugin-xstate-invoke-array-ondone?file=statechart.js

Use npm run lint in the terminal pane to see the rule incorrectly match.

rlaffers commented 1 year ago

Thanks for the report, will be fixed shortly.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: