Skip to content
New issue

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

Add prefer-regexp-test rule #970

Merged
merged 12 commits into from Jan 8, 2021

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Dec 30, 2020

Fixes #732


return {
[regExpExecCallSelector](node) {
if (isBooleanNode(node)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do an early-return here too.

rules/prefer-regexp-test.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

This is not waiting for #976, right?

@fisker
Copy link
Collaborator Author

fisker commented Jan 2, 2021

This is not waiting for #976, right?

Current implementation not relay on #976, but better swith to that utility I'm going to add in #976 before merge.

fisker and others added 2 commits January 2, 2021 12:02
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
@sindresorhus
Copy link
Owner

but better swith to that utility I'm going to add in #976 before merge.

👍

@sindresorhus
Copy link
Owner

Tests are failing.

@fisker
Copy link
Collaborator Author

fisker commented Jan 8, 2021

Fixed.

@sindresorhus sindresorhus merged commit 7b74b40 into sindresorhus:master Jan 8, 2021
@fisker fisker deleted the prefer-regexp-test branch January 8, 2021 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule proposal: prefer-regexp-test
2 participants