Release 1.18.1

master
Lucas Duailibe 2019-06-07 09:57:16 -03:00
parent 277b92a883
commit 57a93c4518
5 changed files with 47 additions and 43 deletions

View File

@ -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):

View File

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

View File

@ -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)

View File

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

View File

@ -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"