Skip to content

Fix printing comment for the last operand of union types#15409

Merged
sosukesuzuki merged 3 commits intoprettier:mainfrom
sosukesuzuki:fix-11910
Sep 16, 2023
Merged

Fix printing comment for the last operand of union types#15409
sosukesuzuki merged 3 commits intoprettier:mainfrom
sosukesuzuki:fix-11910

Conversation

@sosukesuzuki
Copy link
Copy Markdown
Contributor

@sosukesuzuki sosukesuzuki commented Sep 16, 2023

Description

Fixes #11910

Checklist

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

Try the playground for this PR

if (
precedingNode &&
(precedingNode.type === "TSUnionType" ||
precedingNode.type === "UnionTypeAnnotation") &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think tests are using flow parsers. Please add more parsers in the tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you, added 9cd628f

@sosukesuzuki sosukesuzuki merged commit 4169dbb into prettier:main Sep 16, 2023
@sosukesuzuki sosukesuzuki deleted the fix-11910 branch September 16, 2023 12:52
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Last indented list item inline comment is being moved to outer comment and combined with existing comment

2 participants