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):
Describe the bug If you specify an
invoke
property in xstate using an array of things to invoke, and one of those has anonDone
property, theno-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.