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-invalid-state-props doesn't allow exit at the root #17

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

no-invalid-state-props doesn't allow exit at the root #17

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
exit actions on the root of a state machine are flagged by the no-invalid-state-props rule, but they work exactly as expected when the machine is run using invoke from a parent machine so I don't think they should be marked as an error?

Expected behavior
exit actions on the root of a machine are allowed by the rule.

Actual behavior
exit actions on the root of the machine are flagged as invalid.

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-exit-at-root?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, this 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