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

@yangsu yangsu 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
@ikatyang ikatyang merged commit 47da080 into prettier:master Jan 30, 2019
@ikatyang
Copy link
Member

Thanks!

@yangsu yangsu deleted the upstream-type-cast-fix branch January 30, 2019 07:27
@yangsu
Copy link
Contributor Author

yangsu commented Jan 30, 2019

Thank you for the comments!

@ikatyang
Copy link
Member

👉 https://github.com/prettier/prettier/releases/tag/1.16.2

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Apr 30, 2019
@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.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants