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

Fix printing separator in objects with prettier-ignore #3448

Merged
merged 2 commits into from Dec 10, 2017

Conversation

duailibe
Copy link
Member

@duailibe duailibe commented Dec 10, 2017

When trying to fix a bug of double printing separators in TypeScript interfaces in combination with //prettier-ignore, #3103 introduced a regression of not printing commas in regular objects. This commit restricts the "not print" the separator for TypeScript only. The problem is the parser considers the trailing ; part of the node, but not , for objects - so when prettier prints the node as-is, sometimes it prints the separator, sometimes it doesn't.

Added a regression test + more tests for the TS bug

Copy link
Contributor

@vjeux vjeux left a comment

Choose a reason for hiding this comment

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

Thanks!

@duailibe duailibe merged commit dbf22eb into prettier:master Dec 10, 2017
@duailibe duailibe deleted the fix-ignore branch December 10, 2017 04:57
@duailibe duailibe added this to the 1.9.2 milestone Dec 10, 2017
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 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