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

Update regex-shorthand to ignore regex with u flag #451

Closed
wants to merge 9 commits into from

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Nov 29, 2019

regexp-tree might optimize RegExp to invalid codes, crash ESLint

fixes: #446
fixes #447
fixes #448

@fisker fisker changed the title Fix regex-shorthand crush bug Fix regex-shorthand crash bug Nov 29, 2019
@sindresorhus
Copy link
Owner

This is a good temporary workaround, but we should find the actual cause for this and get it fixed.

regexp-tree might optimize RegExp to invalid codes

Can you open an issue on regexp-tree about that?

@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

turns out this also fixes #448, adding more test

…nto issue-446

# Conflicts:
#	test/regex-shorthand.js
@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

@sindresorhus
Copy link
Owner

Does this also fix #447 ? Can you add a test for it?

@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

Does this also fix #447 ? Can you add a test for it?

No, this doesn't, different case. If I find anything will do another PR.

@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

one second

@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

Yes, this fixes #447, I think he didn't use --fix, so only suggest the wrong code, but not crash ESLint

@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

Adding tests, we should do a path release

@fisker
Copy link
Collaborator Author

fisker commented Nov 29, 2019

@sindresorhus this .toRegExp() might not safe, maybe we should skip the u flag?

@fisker fisker changed the title Fix regex-shorthand crash bug Update regex-shorthand to ignore regex with u flag Nov 29, 2019
@fisker
Copy link
Collaborator Author

fisker commented Nov 30, 2019

close in favor of #454

@fisker fisker closed this Nov 30, 2019
@fisker fisker mentioned this pull request Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants