Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Prettier to ^1.18.0 conflicts with Typescript 3.2.1 #1123

Closed
cartogram opened this issue Oct 16, 2019 · 1 comment
Closed

Prettier to ^1.18.0 conflicts with Typescript 3.2.1 #1123

cartogram opened this issue Oct 16, 2019 · 1 comment
Labels
Area: tooling Effort: low stale Stale issue that hasn't received any attention in a while

Comments

@cartogram
Copy link
Contributor

cartogram commented Oct 16, 2019

TLDR: Updating Prettier to the latest minor version requires us to be on Typescript 3.3 or later.

When attempting to update to the latest minor version of Prettier, I encountered an issue where the formatted TypeScript output added a trailing comma to Tuples.

For example

// Before
export function useSomeHook(): [
  string,
  string
] { /*...*/}

// After 
export function useSomeHook(): [
  string,
  string, <-- Trailing comma 
] { /*...*/}

This is a problem because our version of Typescript does not support trailing commas on Tuples. It looks like they were were added in Typescript 3.3 via this PR.

Work has already been started in this PR to upgrade Typescript. When that is shipped, we can upgrade to the latest prettier.

@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issue that hasn't received any attention in a while label Oct 4, 2020
@stale stale bot closed this as completed Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: tooling Effort: low stale Stale issue that hasn't received any attention in a while
Projects
None yet
Development

No branches or pull requests

1 participant