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 #7920 - do not add comma for explicit inexact object with indexer property #7923

Conversation

DmitryGonchar
Copy link
Contributor

@DmitryGonchar DmitryGonchar commented Apr 1, 2020

Fixes #7920 - do not add comma for explicit inexact object with indexer property - for all cases. Previously it was removed only when type had some simple "properties" field defined.

In tests, the main factor that it works is that comma being shown or hidden behaves the same for both the simple/main case

type T = {
  a: number,
  ...,
}

and for object with indexer property or without properties.

  • 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

@DmitryGonchar DmitryGonchar changed the title Fix #7920 - do not force comma for explicit inexact object with indexer property. Fix #7920 - do not add comma for explicit inexact object with indexer property Apr 1, 2020
@alexander-akait alexander-akait merged commit 964230d into prettier:master Apr 1, 2020
@DmitryGonchar DmitryGonchar deleted the issue/7920-do-not-force-comma-for-explicit-inexact-object-indexer branch April 1, 2020 12:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 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] Prettier forces an extra comma for inexact object type flow syntax, only for object indexer.
4 participants