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

prefer-starts-ends-with: Fix pipe in regex #783

Merged
merged 3 commits into from Jun 24, 2020

Conversation

timlesallen
Copy link
Contributor

@timlesallen timlesallen commented Jun 24, 2020

Fix the case where /^A|B/.test(s)s.startsWith('A|B').

Fixes #782

@fisker fisker changed the title Fix pipe in regex prefer-starts-ends-with: Fix pipe in regex Jun 24, 2020
@fisker
Copy link
Collaborator

fisker commented Jun 24, 2020

Thank you, I'll merge after CI pass.

@fisker fisker merged commit 1dca2f3 into sindresorhus:master Jun 24, 2020
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.

Unsafe replacement with .startsWith() when doing xo --fix
2 participants