Skip to content

Commit

Permalink
Release 1.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
duailibe committed Jun 7, 2019
1 parent 277b92a commit 57a93c4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Tip! Don't write this stuff manually.
-->

**Prettier 1.18.0**
**Prettier 1.18.1**
[Playground link](https://prettier.io/playground/#.....)
```sh
# Options (if any):
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BEFORE SUBMITTING AN ISSUE:
-->

**Environments:**
- Prettier Version: 1.18.0
- Prettier Version: 1.18.1
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
- Runtime: <!-- Node.js v6, Chrome v67, etc. -->
- Operating System: <!-- Windows, Linux, macOS, etc. -->
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
# 1.18.1

[diff](https://github.com/prettier/prettier/compare/1.18.1...1.18.0)

- 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.

<!-- prettier-ignore -->
```tsx
// 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`](https://prettier.io/docs/en/configuration.html#configuration-overrides) in the config file, Prettier was not matching dotfiles (files that start with `.`). This was fixed in 1.18.1

[#6190]: https://github.com/prettier/prettier/pull/6190
[#6194]: https://github.com/prettier/prettier/pull/6194
[@duailibe]: https://github.com/duailibe
[@sosukesuzuki]: https://github.com/sosukesuzuki

# 1.18.0

[diff](https://github.com/prettier/prettier/compare/1.17.1...1.18.0)
Expand Down
40 changes: 0 additions & 40 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,3 @@ const link = <a href="example.com">http://example.com</a>;
```
-->

#### 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.

<!-- prettier-ignore -->
```tsx
// 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`](https://prettier.io/docs/en/configuration.html#configuration-overrides) in the config file, Prettier was not matching dotfiles (files that start with `.`). This was fixed in 1.18.1

[#6190]: https://github.com/prettier/prettier/pull/6190
[#6194]: https://github.com/prettier/prettier/pull/6194
[@duailibe]: https://github.com/duailibe
[@sosukesuzuki]: https://github.com/sosukesuzuki
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "1.19.0-dev",
"version": "1.18.1",
"description": "Prettier is an opinionated code formatter",
"bin": {
"prettier": "./bin/prettier.js"
Expand Down

0 comments on commit 57a93c4

Please sign in to comment.