We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
prefer-regexp-test
The rule prefer-regexp-test triggers an error for:
criteria.match(item)
but criteria isn't a string it is an instance of my own class. I don't want the rule to trigger.
criteria
The text was updated successfully, but these errors were encountered:
I don't think we can do anything, we can't know the types.
Sorry, something went wrong.
Then I guess the rule shouldn't change the code. Maybe just provide suggestions as discussed in #441?
If we want to disable auto-fix, I'd prefer to add an option {fix: false}, but still auto-fix by default.
{fix: false}
This autofix also broke my code.
I think the autofix should only apply if it can confidently determine that the type is a RegExp (e.g. declared as a const in the same file).
No branches or pull requests
The rule
prefer-regexp-test
triggers an error for:but
criteria
isn't a string it is an instance of my own class. I don't want the rule to trigger.The text was updated successfully, but these errors were encountered: