Update CHANGELOG.unreleased.md
parent
e3b2f4adb4
commit
8149852ff9
|
@ -2,20 +2,20 @@
|
|||
|
||||
Format:
|
||||
|
||||
- Category: Title ([#PR] by [@user])
|
||||
### Category: Title ([#PR] by [@user])
|
||||
|
||||
Description
|
||||
Description
|
||||
|
||||
```
|
||||
// Input
|
||||
Code Sample
|
||||
```
|
||||
// Input
|
||||
Code Sample
|
||||
|
||||
// Output (Prettier stable)
|
||||
Code Sample
|
||||
// Output (Prettier stable)
|
||||
Code Sample
|
||||
|
||||
// Output (Prettier master)
|
||||
Code Sample
|
||||
```
|
||||
// Output (Prettier master)
|
||||
Code Sample
|
||||
```
|
||||
|
||||
Details:
|
||||
|
||||
|
@ -23,64 +23,64 @@ Details:
|
|||
|
||||
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
|
||||
because it was interpreted as a comment. Prettier master fixes this issue.
|
||||
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.
|
||||
|
||||
<!-- prettier-ignore --\>
|
||||
```js
|
||||
// Input
|
||||
const link = <a href="example.com">http://example.com</a>
|
||||
<!-- prettier-ignore --\>
|
||||
```js
|
||||
// Input
|
||||
const link = <a href="example.com">http://example.com</a>
|
||||
|
||||
// Output (Prettier stable)
|
||||
// Error: Comment location overlaps with node location
|
||||
// Output (Prettier stable)
|
||||
// Error: Comment location overlaps with node location
|
||||
|
||||
// Output (Prettier master)
|
||||
const link = <a href="example.com">http://example.com</a>;
|
||||
```
|
||||
// Output (Prettier master)
|
||||
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 -->
|
||||
```js
|
||||
// Input
|
||||
console.log(chalk.white(`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`))
|
||||
<!-- prettier-ignore -->
|
||||
```js
|
||||
// Input
|
||||
console.log(chalk.white(`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`))
|
||||
|
||||
// Output (Prettier stable)
|
||||
console.log(
|
||||
chalk.white(
|
||||
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${
|
||||
coverageSummary.total.lines.pct
|
||||
}%`
|
||||
)
|
||||
);
|
||||
// Output (Prettier stable)
|
||||
console.log(
|
||||
chalk.white(
|
||||
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${
|
||||
coverageSummary.total.lines.pct
|
||||
}%`
|
||||
)
|
||||
);
|
||||
|
||||
// Output (Prettier master)
|
||||
console.log(
|
||||
chalk.white(
|
||||
`Covered Lines below threshold: ${coverageSettings.lines}%. Actual: ${coverageSummary.total.lines.pct}%`
|
||||
)
|
||||
);
|
||||
```
|
||||
// Output (Prettier master)
|
||||
console.log(
|
||||
chalk.white(
|
||||
`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 -->
|
||||
```tsx
|
||||
// Input
|
||||
type G<T> = any;
|
||||
const myFunc = <T,>(arg1: G<T>) => false;
|
||||
<!-- prettier-ignore -->
|
||||
```tsx
|
||||
// Input
|
||||
type G<T> = any;
|
||||
const myFunc = <T,>(arg1: G<T>) => false;
|
||||
|
||||
// Output (Prettier stable)
|
||||
type G<T> = any;
|
||||
const myFunc = <T>(arg1: G<T>) => false;
|
||||
// Output (Prettier stable)
|
||||
type G<T> = any;
|
||||
const myFunc = <T>(arg1: G<T>) => false;
|
||||
|
||||
// Output (prettier master)
|
||||
type G<T> = any;
|
||||
const myFunc = <T,>(arg1: G<T>) => false;
|
||||
```
|
||||
// Output (prettier master)
|
||||
type G<T> = any;
|
||||
const myFunc = <T,>(arg1: G<T>) => false;
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue