Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tivac opened this issue Aug 3, 2023 · 2 comments
Closed

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

tivac opened this issue Aug 3, 2023 · 2 comments
Labels
bug Something isn't working released

Comments

@tivac
Copy link

tivac commented Aug 3, 2023

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):

  • Node version: 16.20.0
  • ESLint version: 8.46.0
  • eslint-plugin-xstate version: 1.1.1

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.

@tivac tivac added the bug Something isn't working label Aug 3, 2023
@rlaffers
Copy link
Owner

rlaffers commented Aug 4, 2023

Thanks for the report, will be fixed shortly.

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

🎉 This issue has been resolved in version 1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants