Release 1.18.1
parent
277b92a883
commit
57a93c4518
|
@ -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):
|
||||
|
|
|
@ -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. -->
|
||||
|
|
44
CHANGELOG.md
44
CHANGELOG.md
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue