Describe the rule
First off, amazing plugin. I just discovered it today. I've been using separate sorting plugins and now I can just use perfectionist!
React Hook dependency array order has no effect on functionality. In keeping with sorting everywhere else, I wrote my own ESLint plugin to sort them.
https://github.com/stevensacks/eslint-plugin-sort-react-dependency-arrays
It seems like this functionality would be a natural addition to your great library. Perhaps you'd consider adding it? Thanks!
Code example
Before:
useEffect(() => {
// ... some code
}, [t, isSubmitting, success, error]);
After:
useEffect(() => {
// ... some code
}, [error, isSubmitting, success, t]);
Additional comments
No response
Validations
Describe the rule
First off, amazing plugin. I just discovered it today. I've been using separate sorting plugins and now I can just use perfectionist!
React Hook dependency array order has no effect on functionality. In keeping with sorting everywhere else, I wrote my own ESLint plugin to sort them.
https://github.com/stevensacks/eslint-plugin-sort-react-dependency-arrays
It seems like this functionality would be a natural addition to your great library. Perhaps you'd consider adding it? Thanks!
Code example
Before:
After:
Additional comments
No response
Validations