= T extends [infer U, ...infer R] ? R : never;
```
#### Fix format on `style[lang="sass"]` ([#9051](https://github.com/prettier/prettier/pull/9051) by [@fisker](https://github.com/fisker))
```jsx
```
#### Fix self-closing blocks and blocks with `src` attribute format ([#9052](https://github.com/prettier/prettier/pull/9052), [#9055](https://github.com/prettier/prettier/pull/9055) by [@fisker](https://github.com/fisker))
```vue
```
### prettier 2.1.0
[diff](https://github.com/prettier/prettier/compare/2.0.5...2.1.0)
π [Release Notes](https://prettier.io/blog/2020/08/24/2.1.0.html)
## prettierx 0.18.3
[compare prettierx-0.18.2...prettierx-0.18.3](https://github.com/brodybits/prettierx/compare/prettierx-0.18.2...prettierx-0.18.3)
- Update some dependencies
- fast-glob -> 3.2.6
- globby -> 11.0.4
- graphql -> 15.5.1
- jest-docblock -> 27.0.6
## prettierx 0.18.2
[compare prettierx-0.18.1...prettierx-0.18.2](https://github.com/brodybits/prettierx/compare/prettierx-0.18.1...prettierx-0.18.2)
- fix: switch to @brodybits/remark-parse fork (#598)
- Update some dependencies
- @glimmer/syntax -> 0.56.2
- ci-info -> 3.2.0
- find-parent-dir -> 0.3.1
## prettierx 0.18.1
[compare prettierx-0.18.0...prettierx-0.18.1](https://github.com/brodybits/prettierx/compare/prettierx-0.18.0...prettierx-0.18.1)
- cleanup(src): add another objectCurlySpacing option comment
- Update some dependencies
- chalk -> 4.1.1
- get-stream -> 6.0.1
- mem -> 8.1.1
## prettierx 0.18.0
[compare prettierx-0.17.0...prettierx-0.18.0](https://github.com/brodybits/prettierx/compare/prettierx-0.17.0...prettierx-0.18.0)
- Update some dependencies
- @babel/code-frame -> 7.12.13
- ci-info -> 3.1.1
- diff -> 5.0.0
- globby -> 11.0.3
- lodash -> 4.17.21
- mem -> 8.1.0
- postcss-less -> 4.0.1
- resolve -> 1.20.0
- semver -> 7.3.5
- string-width -> 4.2.2
- unified -> 9.2.1
## prettierx 0.17.0
- replace --no-align-ternary-lines with --offset-ternary-expressions (with updated formatting)
- replace --no-bracket-spacing with finer-grained options
- replace --paren-spacing with finer-grained options
- update graphql -> 15.5.0
- update some descriptions & update some documentation
[compare prettierx-0.16.1...prettierx-0.17.0](https://github.com/brodybits/prettierx/compare/prettierx-0.16.1...prettierx-0.17.0)
## prettierx 0.16.1
- fix some descriptions
- update some documentation
[compare prettierx-0.16.0...prettierx-0.16.1](https://github.com/brodybits/prettierx/compare/prettierx-0.16.0...prettierx-0.16.1)
## prettierx 0.16.0
- add & implement --break-long-method-chains option
- Update fast-glob -> 3.2.5 in dependencies
- cleanup: remove extra parent.object conditions not needed
[compare prettierx-0.15.0...prettierx-0.16.0](https://github.com/brodybits/prettierx/compare/prettierx-0.15.0...prettierx-0.16.0)
## prettierx 0.15.0
- add --html-void-tags option
- update some dependencies
- @babel/parser -> 7.12.11
- cjk-regex -> 2.0.1
- globby -> 11.0.2
- graphql -> 15.4.0
- html-element-attributes -> 2.3.0
- fix & update some documentation
[compare prettierx-0.14.3...prettierx-0.15.0](https://github.com/brodybits/prettierx/compare/prettierx-0.14.3...prettierx-0.15.0)
## prettierx 0.14.3
- Update some dependencies
- mem -> 6.1.1
- n-readlines -> 1.0.1
- resolve -> 1.19.0
- semver -> 7.3.4
- yaml-unist-parser -> 1.3.1
[compare prettierx-0.14.2...prettierx-0.14.3](https://github.com/brodybits/prettierx/compare/prettierx-0.14.2...prettierx-0.14.3)
## prettierx 0.14.2
- Add tslib to avoid a peerDependencies warning
- Update some dependencies
- @babel/code-frame -> 7.12.11
- @babel/parser -> 7.12.0
- camelcase -> 6.2.0
- lodash -> 4.17.20
- unified -> 9.2.0
[compare prettierx-0.14.0...prettierx-0.14.2](https://github.com/brodybits/prettierx/compare/prettierx-0.14.0...prettierx-0.14.2)
NOTE: prettierx release 0.14.1 was inadvertently skipped in package.json.
## prettierx 0.14.0
- merge updates from Prettier 2.0.0 ... 2.0.5, with some workarounds
- parse TypeScript using Babel by default
- move the `flow-parser` parser to `peerDependenciesMeta`, as an optional dependency (note that Prettier and `prettierx` use Babel to parse Flow by default)
- update documentation of `--space-before-function-paren` and `--generator-star-spacing` features
- apply some updates for `--paren-spacing` feature from `wp-prettier-2.0.5` branch of the `wp-prettier` fork
- resolve a limited number of issues related to the `--paren-spacing` feature
- apply some additional source code cleanup
- update some dependencies
[compare prettierx-0.13.1...prettierx-0.14.0](https://github.com/brodybits/prettierx/compare/prettierx-0.13.1...prettierx-0.14.0)
### prettier 2.0.5
[diff](https://github.com/prettier/prettier/compare/2.0.4...2.0.5)
#### Less: Fix formatting of `:extend` ([#7984](https://github.com/prettier/prettier/pull/7984) by [@fisker](https://github.com/fisker))
```less
// Input
.class {
&:extend(.some-class .some-other-class .some-very-loooooooooooooong-class all);
}
// Prettier 2.0.4
.class {
&:extend(
.some-class .some-other-class .some-very-loooooooooooooong-class all
);
}
// Prettier 2.0.4 (Second format)
.class {
&: extend(
.some-class .some-other-class .some-very-loooooooooooooong-class all
);
}
// Prettier 2.0.5
.class {
&:extend(
.some-class .some-other-class .some-very-loooooooooooooong-class all
);
}
```
#### Editor integration: Use [`resolve`](https://www.npmjs.com/package/resolve) if builtin `require.resolve` is overridden ([#8072](https://github.com/prettier/prettier/pull/8072) by [@fisker](https://github.com/fisker))
This fixes issues that the users of Atom and WebStorm faced with 2.0.4.
Prettier now switches to using the `resolve` module for resolving configuration files and plugins if it detects that `require.resolve` isn't Node's builtin function (doesn't support the second argument), which happens in environments like editor extensions. To force the fallback, set the `PRETTIER_FALLBACK_RESOLVE` environment variable to `true`.
### prettier 2.0.4
[diff](https://github.com/prettier/prettier/compare/2.0.3...2.0.4)
#### Revert [#7869](https://github.com/prettier/prettier/pull/7869), "[TypeScript] format TSAsExpression with same logic as BinaryExpression" ([#7958](https://github.com/prettier/prettier/pull/7958))
### prettier 2.0.3
[diff](https://github.com/prettier/prettier/compare/2.0.2...2.0.3)
### JavaScript
#### Fix `prettier-ignore` inside JSX ([#7877](https://github.com/prettier/prettier/pull/7877) by [@fisker](https://github.com/fisker))
```jsx
// Input
{
/* prettier-ignore */
x ? :
}
;
// Prettier 2.0.2 (first output)
{/* prettier-ignore */
x ? : }
;
// Prettier 2.0.2 (second output)
{/* prettier-ignore */ x ? : }
;
// Prettier 2.0.3
{
/* prettier-ignore */
x ? :
}
;
```
#### Fix regressions in styled-components template literals ([#7883](https://github.com/prettier/prettier/pull/7883) by [@thorn0](https://github.com/thorn0))
```js
// Input
const Icon = styled.div`
background: var(--${background});
${Link}:not(:first-child) {
fill: rebeccapurple;
}
`;
// Prettier 2.0.2
const Icon = styled.div`
background: var(-- ${background});
${Link}:not (:first-child) {
fill: rebeccapurple;
}
`;
// Prettier 2.0.3
const Icon = styled.div`
background: var(--${background});
${Link}:not(:first-child) {
fill: rebeccapurple;
}
`;
```
#### Fix: line endings were not always converted properly in multiline strings and comments ([#7891](https://github.com/prettier/prettier/pull/7891) by [@sidharthv96](https://github.com/sidharthv96))
```
// Input
export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(
(_0: IAmIncredibleLongParameterType) => {
setTimeout(() => {
/*
Multiline comment
Multiline comment
Multiline comment
*/
console.log(
"Multiline string\
Multiline string\
Multiline string"
);
});
}
);
// Prettier 2.0.2
export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(
(_0: IAmIncredibleLongParameterType) => {
setTimeout(() => {
/*
Multiline comment
Multiline comment
Multiline comment
*/
console.log(
"Multiline string\
Multiline string\
Multiline string"
);
});
}
);
// Prettier 2.0.3: same as input
```
#### Fix bug with holes in array literals ([#7911](https://github.com/prettier/prettier/pull/7911) by [@bakkot](https://github.com/bakkot))
```jsx
// Input
new Test()
.test()
.test([, 0])
.test();
// Prettier 2.0.2
[error] in.js: TypeError: Cannot read property 'type' of null
// Prettier 2.0.3
new Test().test().test([, 0]).test();
```
### TypeScript
#### Wrap TSAsExpression ([#7869](https://github.com/prettier/prettier/pull/7869) by [@sosukesuzuki](https://github.com/sosukesuzuki))
```ts
// Input
const value = thisIsAnIdentifier as ThisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface;
// Prettier 2.0.2
const value = thisIsAnIdentifier as ThisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface;
// Prettier 2.0.3
const value =
thisIsAnIdentifier as
ThisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface;
```
### Flow
#### Print dangling comments for inexact object type ([#7892](https://github.com/prettier/prettier/pull/7892) by [@sosukesuzuki](https://github.com/sosukesuzuki))
```js
// Input
type Foo = {
// comment
...,
};
// Prettier 2.0.2
Error: Comment "comment" was not printed. Please report this error!
// Prettier 2.0.3
type Foo = {
// comment
...,
};
```
#### Do not add comma for explicit inexact object with indexer property or no properties ([#7923](https://github.com/prettier/prettier/pull/7923) by [@DmitryGonchar](https://github.com/DmitryGonchar))
```jsx
// Input
type T = {
[string]: number,
...,
}
type T = {
// comment
...,
}
// Prettier 2.0.2
type T = {
[string]: number,
...,
}
type T = {
// comment
...,
}
// Prettier 2.0.3
type T = {
[string]: number,
...
}
type T = {
// comment
...
}
```
### HTML
#### Fix printing of ignored empty inline elements ([#7867](https://github.com/prettier/prettier/pull/7867) by [@fisker](https://github.com/fisker))
```html
_
_
_
_
```
#### Format `script` and `style` inside tags with a colon in the name ([#7916](https://github.com/prettier/prettier/pull/7916) by [@fisker](https://github.com/fisker))
```html
```
### Other changes
- Workaround for `require.resolve` in prettier-vscode ([#7951](https://github.com/prettier/prettier/pull/7951) by [@thorn0](https://github.com/thorn0))
- Fix unstable Angular expression binding ([#7924](https://github.com/prettier/prettier/pull/7924) by [@fisker](https://github.com/fisker))
- Update `isSCSS` regex ([#7922](https://github.com/prettier/prettier/pull/7922) by [@fisker](https://github.com/fisker))
- Fix formatting of empty files ([#7921](https://github.com/prettier/prettier/pull/7921) by [@fisker](https://github.com/fisker))
### prettier 2.0.2
[diff](https://github.com/prettier/prettier/compare/2.0.1...2.0.2)
### 2.0 regressions
#### JavaScript: Fix formatting of pseudo-elements and pseudo-classes in styled-components template literals ([#7842](https://github.com/prettier/prettier/pull/7842) by [@thorn0](https://github.com/thorn0))
```jsx
// Input
const Foo = styled.div`
${media.smallDown}::before {}
`;
// Prettier 2.0.0
const Foo = styled.div`
${media.smallDown}: : before{
}
`;
// Prettier 2.0.2
const Foo = styled.div`
${media.smallDown}::before {
}
`;
```
#### TypeScript: Avoid trailing commas on index signatures with only one parameter ([#7836](https://github.com/prettier/prettier/pull/7836) by [@bakkot](https://github.com/bakkot))
TypeScript index signatures technically allow multiple parameters and trailing commas, but it's an error to have multiple parameters there, and Babel's TypeScript parser does not accept them. So Prettier now avoids putting a trailing comma there when you have only one parameter.
```ts
// Input
export type A = {
a?: {
[
x: string
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
// Prettier 2.0.0
export type A = {
a?: {
[
x: string,
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
// Prettier 2.0.2
export type A = {
a?: {
[
x: string
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
```
#### Revert "markdown: fix redundant leading spaces in markdown list" ([#7847](https://github.com/prettier/prettier/pull/7847))
See [#7846](https://github.com/prettier/prettier/issues/7846)
### Other changes
#### TypeScript: Fix `prettier-ignore` in union types ([#7798](https://github.com/prettier/prettier/pull/7798) by [@thorn0](https://github.com/thorn0))
```ts
// Input
export type a =
// foo
| foo1&foo2
// prettier-ignore
| bar1&bar2
// baz
| baz1&baz2;
// Prettier 2.0.0
export type a =
// foo
| foo1&foo2
// prettier-ignore
// prettier-ignore
| (bar1 & bar2)
// baz
| (baz1 & baz2);
// Prettier 2.0.2
export type a =
// foo
| (foo1 & foo2)
// prettier-ignore
| bar1&bar2
// baz
| (baz1 & baz2);
```
### prettier 2.0.1
[diff](https://github.com/prettier/prettier/compare/2.0.0...2.0.1)
#### API: Fix build script to not corrupt `import-fresh` module ([#7820](https://github.com/prettier/prettier/pull/7820) by [@thorn0](https://github.com/thorn0))
### prettier 2.0.0
[diff](https://github.com/prettier/prettier/compare/1.19.1...2.0.0)
π [Release Notes](https://prettier.io/blog/2020/03/21/2.0.0.html)
## prettierx 0.13.1
- fix a spelling error in description of importFormatting opt
- Update unified -> 9.1.0 - dependency (#279)
[compare prettierx-0.14.0...dev](https://github.com/brodybits/prettierx/compare/prettierx-0.14.0...dev)
## prettierx 0.13.0
- option to import on one line in JS & TS (#265)
- update `@babel/parser` -> `7.10.5`
- update yaml dependency items (#266)
[compare prettierx-0.12.1...prettierx-0.13.0](https://github.com/brodybits/prettierx/compare/prettierx-0.12.1...prettierx-0.13.0)
## prettierx 0.12.1
- update some dependencies
- @babel/code-frame -> 7.10.4
- @babel/parser -> 7.10.4
- @iarna/toml -> 2.2.5
- angular-html-parser -> 1.7.1
- Update chalk -> 4.1.0
- escape-string-regexp -> 4.0.0
- graphql -> 15.3.0
- postcss-scss -> 2.1.1
- add yaml note to package.json
[compare prettierx-0.12.0...prettierx-0.12.1](https://github.com/brodybits/prettierx/compare/prettierx-0.12.0...prettierx-0.12.1)
## prettierx 0.12.0
- add --break-before-else option (#224)
- update some dependencies
[compare prettierx-0.11.3...prettierx-0.12.0](https://github.com/brodybits/prettierx/compare/prettierx-0.11.3...prettierx-0.12.0)
## prettierx 0.11.3
- yaml@1.8.3 explicitly in dependencies - needed for extra npm dist build test to keep working, due to an issue between @babel/parser & recent yaml@1.9.0 update
- update and fix some comments for prettierx-specific code
- remove lib entry from package files (not needed)
[compare prettierx-0.11.2...dev](https://github.com/brodybits/prettierx/compare/prettierx-0.11.2...dev)
## prettierx 0.11.2
- update parse-srcset -> 1.0.2 (npm hosted version) ref: #167
- update jest-docblock -> 25.3.0 (PR #216)
- update some other dependencies
[compare prettierx-0.11.1...prettierx-0.11.2](https://github.com/brodybits/prettierx/compare/prettierx-0.11.1...prettierx-0.11.2)
## prettierx 0.11.1
- Update dependency minimist to v1.2.3 - SECURITY (#176)
- Update parse-srcset -> 03104fe (#170)
- other updates to dependencies
- add top-level files to package files
- CHANGELOG.md
- LICENSE
- README.md
[compare prettierx-0.11.0...prettierx-0.11.0](https://github.com/brodybits/prettierx/compare/prettierx-0.11.0...prettierx-0.11.1)
## prettierx 0.11.0
[compare prettierx-0.10.0...prettierx-0.11.0](https://github.com/brodybits/prettierx/compare/prettierx-0.10.0...prettierx-0.11.0)
## prettierx 0.10.0
[compare prettierx-0.9.0...prettierx-0.10.0](https://github.com/brodybits/prettierx/compare/prettierx-0.9.0...prettierx-0.10.0)
### prettier 1.19.1
[diff](https://github.com/prettier/prettier/compare/1.19.0...1.19.1)
### CLI
#### Fix `--stdin` regression in 1.19.0 ([#6894](https://github.com/prettier/prettier/pull/6894) by [@lydell](https://github.com/lydell))
```
// Prettier stable
$ echo "test" | prettier --stdin --parser babel
[error] regeneratorRuntime is not defined
// Prettier master
$ echo "test" | prettier --stdin --parser babel
test;
```
### TypeScript
#### Fix formatting of union type as arrow function return type ([#6896](https://github.com/prettier/prettier/pull/6896) by [@thorn0](https://github.com/thorn0))
```jsx
// Input
export const getVehicleDescriptor = async (
vehicleId: string,
): Promise => {}
// Prettier stable
export const getVehicleDescriptor = async (
vehicleId: string
): Promise<| Collections.Parts.PrintedCircuitBoardAssembly["attributes"]
| undefined> => {};
// Prettier master
export const getVehicleDescriptor = async (
vehicleId: string
): Promise<
Collections.Parts.PrintedCircuitBoardAssembly["attributes"] | undefined
> => {};
```
### prettier 1.19.0
[diff](https://github.com/prettier/prettier/compare/1.18.2...1.19.0)
π [Release Notes](https://prettier.io/blog/2019/11/09/1.19.0.html)
## prettierx 0.9.0
- no bundled TypeScript & no prod build
[compare prettierx-0.8.0...prettierx-0.9.0](https://github.com/brodybits/prettierx/compare/prettierx-0.8.0...prettierx-0.9.0)
### prettier 1.18.2
[diff](https://github.com/prettier/prettier/compare/1.18.1...1.18.2)
- TypeScript: only add trailing commas in tuples for `--trailing-comma=all` ([#6199] by [@duailibe])
In Prettier 1.18 we added trailing commas in tuples when `--trailing-comma=all`, but it was also adding for `--trailing-comma=es5`.
[#6199]: https://github.com/prettier/prettier/pull/6199
[@duailibe]: https://github.com/duailibe
### prettier 1.18.1
[diff](https://github.com/prettier/prettier/compare/1.18.0...1.18.1)
- 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.
```tsx
// Input
interface Interface1 {
one: "one";
}
function function1() {
return "one";
}
// Output (Prettier 1.18.0)
interface Interface1 {
one: "one";
}
function function1() {
return "one";
}
// Output (Prettier 1.18.1)
interface Interface1 {
one: "one";
}
function function1() {
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
## prettierx 0.8.0
[compare prettierx-0.7.0...prettierx-0.8.0](https://github.com/brodybits/prettierx/compare/prettierx-0.7.0...prettierx-0.8.0)
### prettier 1.18.0
[diff](https://github.com/prettier/prettier/compare/1.17.1...1.18.0)
π [Release Notes](https://prettier.io/blog/2019/06/06/1.18.0.html)
## prettierx 0.7.1
[compare prettierx-0.7.0...prettierx-0.7.1](https://github.com/brodybits/prettierx/compare/prettierx-0.7.0...prettierx-0.7.1)
### prettier 1.17.1
[diff](https://github.com/prettier/prettier/compare/1.17.0...1.17.1)
- Range: Fix ranged formatting not using the correct line width ([#6050] by [@mathieulj])
```js
// Input
function f() {
if (true) {
call("this line is 79 chars", "long", "it should", "stay as single line");
}
}
// Output (Prettier 1.17.0 run with --range-start 30 --range-end 110)
function f() {
if (true) {
call(
"this line is 79 chars",
"long",
"it should",
"stay as single line"
);
}
}
// Output (Prettier 1.17.0 run without range)
function f() {
if (true) {
call("this line is 79 chars", "long", "it should", "stay as single line");
}
}
// Output (Prettier 1.17.1 with and without range)
function f() {
if (true) {
call("this line is 79 chars", "long", "it should", "stay as single line");
}
}
```
- JavaScript: Fix closure compiler typecasts ([#5947] by [@jridgewell])
If a closing parenthesis follows after a typecast in an inner expression, the typecast would wrap everything to the that following parenthesis.
```js
// Input
test(/** @type {!Array} */(arrOrString).length);
test(/** @type {!Array} */((arrOrString)).length + 1);
// Output (Prettier 1.17.0)
test(/** @type {!Array} */ (arrOrString.length));
test(/** @type {!Array} */ (arrOrString.length + 1));
// Output (Prettier 1.17.1)
test(/** @type {!Array} */ (arrOrString).length);
test(/** @type {!Array} */ (arrOrString).length + 1);
```
- JavaScript: respect parenthesis around optional chaining before await ([#6087] by [@evilebottnawi])
```js
// Input
async function myFunction() {
var x = (await foo.bar.blah)?.hi;
}
// Output (Prettier 1.17.0)
async function myFunction() {
var x = await foo.bar.blah?.hi;
}
// Output (Prettier 1.17.1)
async function myFunction() {
var x = (await foo.bar.blah)?.hi;
}
```
- Handlebars: Fix {{else}}{{#if}} into {{else if}} merging ([#6080] by [@dcyriller])
```
// Input
{{#if a}}
a
{{else}}
{{#if c}}
c
{{/if}}
e
{{/if}}
// Output (Prettier 1.17.0)
{{#if a}}
a
{{else if c}}
c
e
{{/if}}
// Output (Prettier 1.17.1)
Code Sample
{{#if a}}
a
{{else}}
{{#if c}}
c
{{/if}}
e
{{/if}}
```
- JavaScript: Improved multiline closure compiler typecast comment detection ([#6070] by [@yangsu])
Previously, multiline closure compiler typecast comments with lines that
start with \* weren't flagged correctly and the subsequent parenthesis were
stripped. Prettier 1.17.1 fixes this issue.
```js
// Input
const style =/**
* @type {{
* width: number,
* }}
*/({
width,
});
// Output (Prettier 1.17.0)
const style =/**
* @type {{
* width: number,
* }}
*/ {
width,
};
// Output (Prettier 1.17.1)
const style =/**
* @type {{
* width: number,
* }}
*/({
width,
});
```
[@mathieulj]: https://github.com/mathieulj
[@yangsu]: https://github.com/yangsu
[@dcyriller]: https://github.com/dcyriller
[@jridgewell]: https://github.com/jridgewell
[@evilebottnawi]: https://github.com/evilebottnawi
[#6050]: https://github.com/prettier/prettier/pull/6050
[#6070]: https://github.com/prettier/prettier/pull/6070
[#6080]: https://github.com/prettier/prettier/pull/6080
[#6087]: https://github.com/prettier/prettier/pull/6087
## prettierx 0.7.0
[compare prettierx-0.6.0...prettierx-0.7.0](https://github.com/brodybits/prettierx/compare/prettierx-0.6.0...prettierx-0.7.0)
- escape-string-regexp@2.0.0 & other updates in dependencies
- drop support for Node.js pre-8.0
### prettier 1.17.0
[diff](https://github.com/prettier/prettier/compare/1.16.2...1.17.0)
π [Release Notes](https://prettier.io/blog/2019/04/12/1.17.0.html)
## prettierx 0.6.0
[compare prettierx-0.5.0...prettierx-0.6.0](https://github.com/brodybits/prettierx/compare/prettierx-0.5.0...prettierx-0.6.0)
--paren-spacing option from WordPress ([brodybits/prettierx#16](https://github.com/brodybits/prettierx/pull/16))
## prettierx 0.5.0
[compare prettierx-0.4.1...prettierx-0.5.0](https://github.com/brodybits/prettierx/compare/prettierx-0.4.1...prettierx-0.5.0)
**prettierx-specific updates:**
- Update `@typescript-eslint/typescript-estree` dependency, to version `1.4.1` (`@typescript-eslint/typescript-estree` update is needed to resolve issue with generics, as discussed in [prettier/prettier#5824](https://github.com/prettier/prettier/pull/5824))
- explicitly comment old parsers out of `src/main/support.js`
**updates from prettier 1.17.0-dev:**
- Tweak the plugin directory search ([prettier/prettier#5819](https://github.com/prettier/prettier/pull/5819))
- Adds LWC Parser to support unquoted interop attributes ([prettier/prettier#5800](https://github.com/prettier/prettier/pull/5800))
- feat(markdown): do not align table contents if it exceeds the print width and `--prose-wrap never` is set ([prettier/prettier#5701](https://github.com/prettier/prettier/pull/5701))
- chore: update typescript-estree to new package name ([prettier/prettier#5799](https://github.com/prettier/prettier/pull/5799))
### prettier 1.16.4
[diff](https://github.com/prettier/prettier/compare/1.16.3...1.16.4)
- API: Fix `prettier.getSupportInfo()` reporting babel parser for older versions of Prettier. ([#5826] by [@azz])
In version `1.16.0` of Prettier, the `babylon` parser was renamed to `babel`. Unfortunately this lead to a minor breaking change: `prettier.getSupportInfo('1.15.0')` would report that it supported `babel`, not `babylon`, which breaks text-editor integrations. This has now been fixed.
[@azz]: https://github.com/azz
[#5826]: https://github.com/prettier/prettier/pull/5826
### prettier 1.16.2
[diff](https://github.com/prettier/prettier/compare/1.16.1...1.16.2)
- CLI: Fix CI detection to avoid unwanted TTY behavior ([#5804] by [@kachkaev])
In Prettier 1.16.0 and 1.16.1, `--list-different` and `--check` logged every file in some CI environments, instead of just unformatted files.
This unwanted behavior is now fixed.
- HTML: Do not format non-normal whitespace as normal whitespace ([#5797] by [@ikatyang])
Previously, only non-breaking whitespaces (U+00A0) are marked as non-normal whitespace,
which means other non-normal whitespaces such as non-breaking narrow whitespaces (U+202F)
could be formatted as normal whitespaces, which breaks the output. We now follow the spec to
exclude all non-[ASCII whitespace](https://infra.spec.whatwg.org/#ascii-whitespace) from whitespace normalization.
(`Β·` represents a non-breaking narrow whitespace)
```html
PrixΒ·:Β·32Β·β¬
Prix : 32 β¬
PrixΒ·:Β·32Β·β¬
```
- JavaScript: Fix record type cast comment detection ([#5793] by [@yangsu])
Previously, type cast comments with record types were ignored and prettier
stripped the subsequent parens. Prettier 1.16.2 handles these cases correctly.
```js
// Input
const v = /** @type {{key: number}} */ (value);
// Output (Prettier 1.16.1)
const v = /** @type {{key: number}} */ value;
// Output (Prettier 1.16.2)
const v = /** @type {{key: number}} */ (value);
```
[@ikatyang]: https://github.com/ikatyang
[@kachkaev]: https://github.com/kachkaev
[@yangsu]: https://github.com/yangsu
[#5793]: https://github.com/prettier/prettier/pull/5793
[#5797]: https://github.com/prettier/prettier/pull/5797
[#5804]: https://github.com/prettier/prettier/pull/5804
## prettierx 0.4.1
[compare prettierx-0.4.0...prettierx-0.4.1](https://github.com/brodybits/prettierx/compare/prettierx-0.4.0...prettierx-0.4.1)
- [prettierx] fix alignTernaryLines behavior ([brodybits/prettierx-0.4.x#46](https://github.com/brodybits/prettierx-0.4.x/pull/46))
## prettierx 0.4.0
[compare prettierx-0.3.1...prettierx-0.4.0](https://github.com/brodybits/prettierx/compare/prettierx-0.3.1...prettierx-0.4.0)
- [prettierx] --no-align-ternary-lines option ([brodybits/prettierx-0.4.x#41](https://github.com/brodybits/prettierx-0.4.x/pull/41))
## prettierx 0.3.1
[compare prettierx-0.3.0...prettierx-0.3.1](https://github.com/brodybits/prettierx/compare/prettierx-0.3.0...prettierx-0.3.1)
### prettier 1.16.1
[diff](https://github.com/prettier/prettier/compare/1.16.0...1.16.1)
- JavaScript: Do not format functions with arguments as react hooks ([#5778] by [@SimenB])
The formatting added in Prettier 1.16 would format any function receiving an
arrow function and an array literal to match React Hook's documentation.
Prettier will now format this the same as before that change if the arrow
function receives any arguments.
```js
// Input
["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce(
(allColors, color) => {
return allColors.concat(color);
},
[]
);
// Output (Prettier 1.16.0)
["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce((
allColors,
color
) => {
return allColors.concat(color);
}, []);
// Output (Prettier 1.16.1)
["red", "white", "blue", "black", "hotpink", "rebeccapurple"].reduce(
(allColors, color) => {
return allColors.concat(color);
},
[]
);
```
- JavaScript: Add necessary parentheses for decorators ([#5785] by [@ikatyang])
Parentheses for decorators with nested call expressions are optional for legacy decorators
but they're required for decorators in the current [proposal](https://tc39.github.io/proposal-decorators/#sec-syntax).
```js
// Input
class X {
@(computed().volatile())
prop
}
// Output (Prettier 1.16.0)
class X {
@computed().volatile()
prop
}
// Output (Prettier 1.16.1)
class X {
@(computed().volatile())
prop
}
```
- TypeScript: Stable parentheses for function type in the return type of arrow function ([#5790] by [@ikatyang])
There's a regression introduced in 1.16 that
parentheses for function type in the return type of arrow function were kept adding/removing.
Their parentheses are always printed now.
```ts
// Input
const foo = (): (() => void) => (): void => null;
const bar = (): () => void => (): void => null;
// First Output (Prettier 1.16.0)
const foo = (): () => void => (): void => null;
const bar = (): (() => void) => (): void => null;
// Second Output (Prettier 1.16.0)
const foo = (): (() => void) => (): void => null;
const bar = (): () => void => (): void => null;
// Output (Prettier 1.16.1)
const foo = (): (() => void) => (): void => null;
const bar = (): (() => void) => (): void => null;
```
- MDX: Correctly recognize inline JSX ([#5783] by [@ikatyang])
Previously, some inline JSXs are wrongly recognized as block HTML/JSX,
which causes unexpected behaviors. This issue is now fixed.
```md
_foo bar_
_foo
bar_
_foo bar_
```
[@ikatyang]: https://github.com/ikatyang
[@simenb]: https://github.com/SimenB
[#5778]: https://github.com/prettier/prettier/pull/5778
[#5783]: https://github.com/prettier/prettier/pull/5783
[#5785]: https://github.com/prettier/prettier/pull/5785
[#5790]: https://github.com/prettier/prettier/pull/5790
### prettier 1.16.0
[diff](https://github.com/prettier/prettier/compare/1.15.3...1.16.0)
π [Release Notes](https://prettier.io/blog/2019/01/20/1.16.0.html)
## prettierx 0.3.0
[compare prettierx-0.2.1...prettierx-0.3.0](https://github.com/brodybits/prettierx/compare/prettierx-0.2.1...prettierx-0.3.0)
- [prettierx] --no-indent-chains option ([brodybits/prettierx-0.4.x#5](https://github.com/brodybits/prettierx-0.4.x/pull/5))
- [prettierx] -- align-object-properties option ([brodybits/prettierx-0.4.x#35](https://github.com/brodybits/prettierx-0.4.x/pull/35))
## prettierx 0.2.1
[compare prettierx-0.2.0...prettierx-0.2.1](https://github.com/brodybits/prettierx/compare/prettierx-0.2.0...prettierx-0.2.1)
- chore: update typescript-estree to 18.0.0 ([prettier/prettier#5750](https://github.com/prettier/prettier/pull/5750))
- fix: update typescript and typescript-estree to latest ([prettier/prettier#5728](https://github.com/prettier/prettier/pull/5728))
- docs: fix Windows build (#5742) ([prettier/prettier#5743](https://github.com/prettier/prettier/pull/5743))
## prettierx 0.2.0
[compare prettierx-0.1.0...prettierx-0.2.0](https://github.com/brodybits/prettierx/compare/prettierx-0.1.0...prettierx-0.2.0)
- fix(javascript): skip .connect() method when composing fun ([prettier/prettier#5739](https://github.com/prettier/prettier/pull/5739))
- docs: remove redundant "./" from relative links ([prettier/prettier#5741](https://github.com/prettier/prettier/pull/5741))
- Fix formatting of lists in SCSS property/variable values ([prettier/prettier#5710](https://github.com/prettier/prettier/pull/5710))
- Escape spaces within file names in pre-commit hook script ([prettier/prettier#5721](https://github.com/prettier/prettier/pull/5721))
- typescript: remove unneeded parentheses around type annotation ([prettier/prettier#5724](https://github.com/prettier/prettier/pull/5724))
- Add solidity plugin to list of plugins ([prettier/prettier#5726](https://github.com/prettier/prettier/pull/5726))
- chore(website): upgrade react-dom to 16.3.3 ([prettier/prettier#5720](https://github.com/prettier/prettier/pull/5720))
- Update Webstorm integration docs ([prettier/prettier#5694](https://github.com/prettier/prettier/pull/5694))
## prettierx 0.1.0
[compare prettierx-0.0.3...prettierx-0.1.0](https://github.com/brodybits/prettierx/compare/prettierx-0.0.3...prettierx-0.1.0)
- standard-like formatting ([brodybits/prettierx-0.4.x#32](https://github.com/brodybits/prettierx-0.4.x/pull/32))
- Drop support for Node.js version 4 ([brodybits/prettierx-0.4.x#31](https://github.com/brodybits/prettierx-0.4.x/pull/31))
## prettierx 0.0.3
[compare prettierx-0.0.2...prettierx-0.0.3](https://github.com/brodybits/prettierx/compare/prettierx-0.0.2...prettierx-0.0.3)
- prettierx fix space-before-function-paren - babel parser ([brodybits/prettierx-0.4.x#29](https://github.com/brodybits/prettierx-0.4.x/pull/29))
## prettierx 0.0.2
[compare prettierx-0.0.1...prettierx-0.0.2](https://github.com/brodybits/prettierx/compare/prettierx-0.0.1...prettierx-0.0.2)
- Update copyright line ([prettier/prettier#5455](https://github.com/prettier/prettier/pull/5455))
- fix(mdx): handle inline html correctly ([prettier/prettier#5704](https://github.com/prettier/prettier/pull/5704))
## prettierx 0.0.1
- prettierx space-before-function-paren option ([brodybits/prettierx-0.4.x#6](https://github.com/brodybits/prettierx-0.4.x/pull/6))
- Update package.json, docs, scripts, tests, etc. for prettierx
[compare 1ca4731...prettierx-0.0.1](https://github.com/brodybits/prettierx/compare/1ca4731...prettierx-0.0.1)
### prettier 1ca4731 (1.16.0-dev)
[compare prettier 1.15.3...1ca4731](https://github.com/prettier/prettier/compare/1.15.3...1ca4731)
- docs: Happy New Year! π ([#5699](https://github.com/prettier/prettier/pull/5699))
- fix(ng,vue): add parens to avoid unexpected `}}` in interpolations ([#5657](https://github.com/prettier/prettier/pull/5657))
- feat: add babel-flow ([#5685](https://github.com/prettier/prettier/pull/5685))
- fix(playground): backward compatibility for --parser babylon ([#5690](https://github.com/prettier/prettier/pull/5690))
- fix(playground): code sample for --parser babylon
- fix(playground): backward compatibility for --parser babylon ([#5688](https://github.com/prettier/prettier/pull/5688))
- Rename "babylon" with "babel" ([#5647](https://github.com/prettier/prettier/pull/5647))
- Restore --check option docs ([#5674](https://github.com/prettier/prettier/pull/5674))
- feat(website): enable docs versioning ([#5676](https://github.com/prettier/prettier/pull/5676))
- Temporary remove --check docs until 1.16 is released to avoid confusion ([#5671](https://github.com/prettier/prettier/pull/5671))
- fix(flow,ts): format `/* HTML */` templates ([#5658](https://github.com/prettier/prettier/pull/5658))
- Add --check option ([#5629](https://github.com/prettier/prettier/pull/5629))
- chore: update azure pipelines ([#5611](https://github.com/prettier/prettier/pull/5611))
- Update string-width to support emoji natively ([#5646](https://github.com/prettier/prettier/pull/5646))
- Fix formatting with --range-start / --range-end ([#5632](https://github.com/prettier/prettier/pull/5632))
- fix(printer-postcss): ignore escape \ and escaped / in Less ([#5597](https://github.com/prettier/prettier/pull/5597))
- feat(html): format script with "application/ld+json" ([#5642](https://github.com/prettier/prettier/pull/5642))
- Add support for class private methods ([#5637](https://github.com/prettier/prettier/pull/5637))
- fix(vue): tag names are case-sensitive ([#5606](https://github.com/prettier/prettier/pull/5606))
- fix(javascript): correct indentation for expression in root template ([#5607](https://github.com/prettier/prettier/pull/5607))
- Fix incorrect grammar ([#5626](https://github.com/prettier/prettier/pull/5626))
- Remove the dynamic `require()` call in the standalone bundle ([#5612](https://github.com/prettier/prettier/pull/5612))
- test: update snapshots
- feat(html): preserve surrounding linebreaks ([#5596](https://github.com/prettier/prettier/pull/5596))
- Add support for the React `useEffect` hook ([#5608](https://github.com/prettier/prettier/pull/5608))
- Donβt run tests on Node 6 ([#5613](https://github.com/prettier/prettier/pull/5613))
- fix: get rid of CRLF ([#5494](https://github.com/prettier/prettier/pull/5494))
- Reformat the first version info in the option docs ([#5604](https://github.com/prettier/prettier/pull/5604))
- Update example for `*.vue` ([#5605](https://github.com/prettier/prettier/pull/5605))
- feat: add mjml extension to html language ([#5505](https://github.com/prettier/prettier/pull/5505))
- feat(html): smart quote for attributes ([#5590](https://github.com/prettier/prettier/pull/5590))
### prettier 1.15.3
[diff](https://github.com/prettier/prettier/compare/1.15.2...1.15.3)
- JavaScript: support `htm` ([#5565](https://github.com/prettier/prettier/pull/5565))
- JavaScript: support logical assignment operator ([#5489](https://github.com/prettier/prettier/pull/5489))
- JavaScript: do not add quotes for interpolation-only attributes in `html` templates ([#5544](https://github.com/prettier/prettier/pull/5544))
- JavaScript: add missing parenthesis for binary in optional member ([#5543](https://github.com/prettier/prettier/pull/5543))
- JavaScript: fix a parser regression ([#5530](https://github.com/prettier/prettier/pull/5530))
- JavaScript: improve union types with leading comments ([#5575](https://github.com/prettier/prettier/pull/5575))
- TypeScript: support BigInt ([#5546](https://github.com/prettier/prettier/pull/5546), [#5577](https://github.com/prettier/prettier/pull/5577))
- TypeScript: inline method decorators should stay inlined ([#5444](https://github.com/prettier/prettier/pull/5444))
- TypeScript: do not change `module` into `namespace` and break/hug their body correctly ([#5551](https://github.com/prettier/prettier/pull/5551))
- TypeScript: do not add invalid semicolon for construct in interface with `// prettier-ignore` ([#5469](https://github.com/prettier/prettier/pull/5469))
- HTML: do not touch comments ([#5525](https://github.com/prettier/prettier/pull/5525))
- HTML: preserve bogus comments ``/` ... >` ([#5565](https://github.com/prettier/prettier/pull/5565))
- HTML: support IE conditional start/end comment ([#5470](https://github.com/prettier/prettier/pull/5470))
- HTML: do not add extra indentation for js template in `