Update CHANGELOG.unreleased.md
parent
e3b2f4adb4
commit
8149852ff9
|
@ -2,20 +2,20 @@
|
||||||
|
|
||||||
Format:
|
Format:
|
||||||
|
|
||||||
- Category: Title ([#PR] by [@user])
|
### Category: Title ([#PR] by [@user])
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
```
|
```
|
||||||
// Input
|
// Input
|
||||||
Code Sample
|
Code Sample
|
||||||
|
|
||||||
// Output (Prettier stable)
|
// Output (Prettier stable)
|
||||||
Code Sample
|
Code Sample
|
||||||
|
|
||||||
// Output (Prettier master)
|
// Output (Prettier master)
|
||||||
Code Sample
|
Code Sample
|
||||||
```
|
```
|
||||||
|
|
||||||
Details:
|
Details:
|
||||||
|
|
||||||
|
@ -23,64 +23,64 @@ Details:
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
- TypeScript: Correctly handle `//` in TSX ([#5728] by [@JamesHenry])
|
### TypeScript: Correctly handle `//` in TSX ([#5728] by [@JamesHenry])
|
||||||
|
|
||||||
Previously, putting `//` as a child of a JSX element in TypeScript led to an error
|
Previously, putting `//` as a child of a JSX element in TypeScript led to an error
|
||||||
because it was interpreted as a comment. Prettier master fixes this issue.
|
because it was interpreted as a comment. Prettier master fixes this issue.
|
||||||
|
|
||||||
<!-- prettier-ignore --\>
|
<!-- prettier-ignore --\>
|
||||||
```js
|
```js
|
||||||
// Input
|
// Input
|
||||||
const link = <a href="example.com">http://example.com</a>
|
const link = <a href="example.com">http://example.com</a>
|
||||||
|
|
||||||
// Output (Prettier stable)
|
// Output (Prettier stable)
|
||||||
// Error: Comment location overlaps with node location
|
// Error: Comment location overlaps with node location
|
||||||
|
|
||||||
// Output (Prettier master)
|
// Output (Prettier master)
|
||||||
const link = <a href="example.com">http://example.com</a>;
|
const link = <a href="example.com">http://example.com</a>;
|
||||||
```
|
```
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
- JavaScript: Don't break simple template literals ([#5979] by [@jwbay])
|
### JavaScript: Don't break simple template literals ([#5979] by [@jwbay])
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore -->
|
||||||
```js
|
```js
|
||||||
// Input
|
// Input
|
||||||
console.log(chalk.white(`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`))
|
console.log(chalk.white(`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`))
|
||||||
|
|
||||||
// Output (Prettier stable)
|
// Output (Prettier stable)
|
||||||
console.log(
|
console.log(
|
||||||
chalk.white(
|
chalk.white(
|
||||||
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${
|
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${
|
||||||
coverageSummary.total.lines.pct
|
coverageSummary.total.lines.pct
|
||||||
}%`
|
}%`
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Output (Prettier master)
|
// Output (Prettier master)
|
||||||
console.log(
|
console.log(
|
||||||
chalk.white(
|
chalk.white(
|
||||||
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`
|
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
- TypeScript: Keep trailing comma in tsx type parameters ([#6115] by [@sosukesuzuki])
|
### TypeScript: Keep trailing comma in tsx type parameters ([#6115] by [@sosukesuzuki])
|
||||||
|
|
||||||
Previously, a trailing comma after single type parameter in arrow function was cleaned up. The formatted result is valid as ts, but is invalid as tsx. Prettier master fixes this issue.
|
Previously, a trailing comma after single type parameter in arrow function was cleaned up. The formatted result is valid as ts, but is invalid as tsx. Prettier master fixes this issue.
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore -->
|
||||||
```tsx
|
```tsx
|
||||||
// Input
|
// Input
|
||||||
type G<T> = any;
|
type G<T> = any;
|
||||||
const myFunc = <T,>(arg1: G<T>) => false;
|
const myFunc = <T,>(arg1: G<T>) => false;
|
||||||
|
|
||||||
// Output (Prettier stable)
|
// Output (Prettier stable)
|
||||||
type G<T> = any;
|
type G<T> = any;
|
||||||
const myFunc = <T>(arg1: G<T>) => false;
|
const myFunc = <T>(arg1: G<T>) => false;
|
||||||
|
|
||||||
// Output (prettier master)
|
// Output (prettier master)
|
||||||
type G<T> = any;
|
type G<T> = any;
|
||||||
const myFunc = <T,>(arg1: G<T>) => false;
|
const myFunc = <T,>(arg1: G<T>) => false;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue