Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 2.02 KB

CHANGELOG.unreleased.md

File metadata and controls

85 lines (61 loc) · 2.02 KB

TypeScript: Add trailing comma in tsx, only for arrow function (#6190 by @sosukesuzuki)

Prettier inserts a trailing comma to single type parameter for arrow functions in tsx, since v 1.18. But, this feature inserts a trailing comma to type parameter for besides arrow functions too (e.g, function , interface). This change fix it.

// Input
interface Interface1<T> {
  one: "one";
}
function function1<T>() {
  return "one";
}

// Output (Prettier stable)
interface Interface1<T,> {
  one: "one";
}
function function1<T,>() {
  return "one";
}

// Output (Prettier master)
interface Interface1<T> {
  one: "one";
}
function function1<T>() {
  return "one";
}

Config: Match dotfiles in config overrides (#6194 by @duailibe)

When using overrides in the config file, Prettier was not matching dotfiles (files that start with .). This was fixed in 1.18.1