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

Flow: Print dangling comments for empty inexact object type #7892

Merged
merged 4 commits into from Mar 31, 2020

Conversation

sosukesuzuki
Copy link
Member

Fixes #7718

The following comments cannot be formatted in this PR:
Input:

type Foo = {
  // comment0
  ...,
  // comment1
};

Output:

type Foo = {
  // comment0
  // comment1
  ...,
};

Expected:

type Foo = {
  // comment0
  ...,
  // comment1
};

It is hard to format this because there was not much information about inexact in the AST. But, since this is an edge case, I don't think this is a problem.

  • I’ve added tests to confirm my change works.
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@prettier prettier deleted a comment from netlify bot Mar 28, 2020
@sosukesuzuki sosukesuzuki merged commit 0f56b4a into prettier:master Mar 31, 2020
@sosukesuzuki sosukesuzuki deleted the fix-inexact-comment branch March 31, 2020 11:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flow] "Comment was not printed" error with explicit inexact objects
3 participants