-
-
Notifications
You must be signed in to change notification settings - Fork 420
Open
Labels
Description
Doing a huge refactor after adding the unicorn eslint to my project, the unicorn/prefer-regexp-test rule threw a lot of false positives in many places where I was using the .match from RTK's slices which are in no way related to RegExp .match method.
The buggy rule is unicorn/prefer-regexp-test
Here's a snippet:
liquidityFormSlice.actions.refetch.match(action) ? wait(1000) : Promise.resolve()
// Prefer `RegExp#test(…)` over `String#match(…)`.eslint[unicorn/prefer-regexp-test](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md)liquidityFormSlice is just an object returned from RTK's createSlice method.