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

Add 'prefer-predictable-action-arguments' rule #15

Closed kaguya3222 closed 1 year ago

kaguya3222 commented 1 year ago

This PR adds a rule for notifying a user about setting predictableActionArguments: true recommendation. Motivation: https://xstate.js.org/docs/guides/actions.html#api

ghost commented 1 year ago
👇 Click on the image for a new way to code review - Make big changes easier — review code in small groups of related files - Know where to start — see the whole change at a glance - Take a code tour — explore the change with an interactive tour - Make comments and review — all fully sync’ed with github [Try it now!](https://app.codesee.io/r/reviews?pr=15&src=https%3A%2F%2Fgithub.com%2Frlaffers%2Feslint-plugin-xstate)

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

kaguya3222 commented 1 year ago

@rlaffers Could you please check this and provide feedback? 😇

rlaffers commented 1 year ago

@kaguya3222 Thank you for your effort! :heart:

kaguya3222 commented 1 year ago

@rlaffers So, are there any issues? If there are no issues, I believe we can merge it :)

kaguya3222 commented 1 year ago

@rlaffers I've just pushed new commits to fulfill your suggestions. Also, I've added ecmaVersion: 2020 in .eslintrc file to support optional chaining operator

kaguya3222 commented 1 year ago

@rlaffers I've just pushed new commits. Deleted ecmaVersion: 2020 and updated implementation of rule without using optional chaining operator

rlaffers commented 1 year ago

Thanks!

rlaffers commented 1 year ago

:tada: This PR is included in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: