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

JavaScript: fix edge cases in type cast comment detection regex #5793

Merged
merged 8 commits into from Jan 30, 2019

Conversation

@yangsu
Copy link
Contributor

commented Jan 23, 2019

Fix edge cases involving {...} (record @type) and newlines in prettier's detection code for type cast comments

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If not an internal change) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

src/language-js/needs-parens.js Outdated Show resolved Hide resolved
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
src/language-js/needs-parens.js Outdated Show resolved Hide resolved
src/language-js/needs-parens.js Outdated Show resolved Hide resolved

@ikatyang ikatyang added this to the 1.16.2 milestone Jan 30, 2019

@yangsu yangsu force-pushed the quip:upstream-type-cast-fix branch from c758bf1 to dd47166 Jan 30, 2019

@ikatyang ikatyang merged commit 47da080 into prettier:master Jan 30, 2019

5 of 8 checks passed

codecov/project 94.39% (-0.02%) compared to 847a78e
Details
Header rules No header rules processed
Details
Pages changed 1 new file uploaded
Details
Mixed content No mixed content detected
Details
Redirect rules 3 redirect rules processed
Details
codecov/patch 88.88% of diff hit (target 80%)
Details
deploy/netlify Deploy preview ready!
Details
prettier.prettier Build #20190130.5 succeeded
Details
@ikatyang

This comment has been minimized.

Copy link
Member

commented Jan 30, 2019

Thanks!

@yangsu yangsu deleted the quip:upstream-type-cast-fix branch Jan 30, 2019

@yangsu

This comment has been minimized.

Copy link
Contributor Author

commented Jan 30, 2019

Thank you for the comments!

@ikatyang

This comment has been minimized.

Copy link
Member

commented Jan 30, 2019

@automatops automatops referenced this pull request Jan 30, 2019
0 of 1 task complete
@ibf-renovate ibf-renovate referenced this pull request Jan 30, 2019
0 of 1 task complete

@lock lock bot locked as resolved and limited conversation to collaborators Apr 30, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.