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

Statechart property ordering rule? #19

Open
tivac opened this issue Aug 7, 2023 · 2 comments
Open

Statechart property ordering rule? #19

tivac opened this issue Aug 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@tivac
Copy link

tivac commented Aug 7, 2023

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 for keys in a machine/state/transition/etc.

@rlaffers rlaffers added the enhancement New feature or request label Aug 10, 2023
@rlaffers
Copy link
Owner

That is actually a good idea. This may be a bit involved however, as the autofix for this would need to overwrite large chunks of code. It is not a simple case of find and replace. I will look into how feasible this is.

@tivac
Copy link
Author

tivac commented Aug 17, 2023

if you're worried about the safety/correctness of the fixes it's always possible to have them be suggestions instead for a while. I wish ESLint fixers could choose to operate just on the AST so swapping Property nodes around like this would be easy & safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants