-
-
Notifications
You must be signed in to change notification settings - Fork 421
Open
Labels
bugtypesIssues that happen in TypeScript or that require typesIssues that happen in TypeScript or that require types
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.
Metadata
Metadata
Assignees
Labels
bugtypesIssues that happen in TypeScript or that require typesIssues that happen in TypeScript or that require types