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: Add auto-fix #711

Merged

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented May 3, 2020

This PR contains code from #710

Fixes #625

@fisker fisker marked this pull request as ready for review May 3, 2020 17:06
},
{
code: '(/^b/).test(("a"))',
output: '("a").startsWith((\'b\'))',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

string 'b' is parenthesized because the original ("a") left the () when replacing text, I'm not going to remove them.

@sindresorhus
Copy link
Owner

Can you fix the merge conflict?

# Conflicts:
#	rules/prefer-starts-ends-with.js
#	test/prefer-starts-ends-with.js
@sindresorhus sindresorhus merged commit da978e3 into sindresorhus:master May 4, 2020
@fisker fisker deleted the prefer-starts-ends-with-auto-fix branch May 4, 2020 08:21
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.

prefer-starts-ends-with: Add autofix
2 participants