Skip to content

Commit 5fef089

Browse files
authored
Minor improvements in v3.4.0 blog post (#16886)
1 parent 3542f13 commit 5fef089

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

website/blog/2024-11-26-3.4.0.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ const str = "\a";
105105
106106
#### Removed support for experimental syntax ([#16643](https://github.com/prettier/prettier/pull/16643), [#16705](https://github.com/prettier/prettier/pull/16705) by [@fisker](https://github.com/fisker))
107107
108-
- `DecimalLiteral` - The [Decimal proposal](https://github.com/tc39/proposal-decimal) decided not introduce new syntax. The `decimal` plugin will be removed from Babel 8.
109-
- `importReflection` - The "Import Reflection" proposal has renamed as ["Source Phase Imports"](https://github.com/tc39/proposal-source-phase-imports)
108+
- `DecimalLiteral` - The [Decimal proposal](https://github.com/tc39/proposal-decimal) decided not to introduce new syntax. The `decimal` plugin will be removed from Babel 8.
109+
- `importReflection` - The "Import Reflection" proposal has been renamed to ["Source Phase Imports"](https://github.com/tc39/proposal-source-phase-imports)
110110
111111
- [Disclaimer about non-standard syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax)
112112
@@ -146,7 +146,7 @@ class Foo {
146146
) {}
147147
}
148148

149-
// Output (stable)
149+
// Prettier 3.3
150150
class Foo {
151151
constructor(
152152
@decorator
@@ -155,7 +155,7 @@ class Foo {
155155
) {}
156156
}
157157

158-
// Output (main)
158+
// Prettier 3.4
159159
class Foo {
160160
constructor(
161161
@decorator
@@ -172,7 +172,7 @@ There was a bug where block comments between the modifier and the name of a deco
172172
With this change, the position of the block comment between the modifier and the property name is preserved.
173173
174174
<!-- prettier-ignore -->
175-
```tsx
175+
```ts
176176
// Input
177177
class Foo {
178178
@decorator
@@ -204,7 +204,7 @@ There was a bug where an extra line was inserted when assigning a chained arrow
204204
This change ensures that the extra line is no longer inserted.
205205
206206
<!-- prettier-ignore -->
207-
```tsx
207+
```ts
208208
// Input
209209
const foo1 =
210210
// comment
@@ -229,7 +229,7 @@ const foo1 =
229229
#### Support "Top-level await statements" ([#16729](https://github.com/prettier/prettier/pull/16729) by [@fisker](https://github.com/fisker))
230230
231231
<!-- prettier-ignore -->
232-
```tsx
232+
```ts
233233
// Input
234234
(await (await fetch()).json()).foo
235235

@@ -243,7 +243,7 @@ await(await fetch()).json().foo;
243243
#### Fix class heritage breaks even though it remains inside the line width ([#16730](https://github.com/prettier/prettier/pull/16730) by [@fisker](https://github.com/fisker))
244244
245245
<!-- prettier-ignore -->
246-
```tsx
246+
```ts
247247
// Input
248248
export class JiraCreatePixFraudDetectionGateway
249249
implements Pick<IssuePixFraudDetectionGateway, "createPixFraudDetectionIssue">
@@ -282,7 +282,7 @@ export class JiraCreatePixFraudDetectionGateway
282282
#### Print `declare` before accessibility in class properties ([#16731](https://github.com/prettier/prettier/pull/16731) by [@fisker](https://github.com/fisker))
283283
284284
<!-- prettier-ignore -->
285-
```tsx
285+
```ts
286286
// Input
287287
class A {
288288
declare private readonly name: string;
@@ -415,7 +415,7 @@ Error
415415
#### Fix wrong trailing comma position after comment in SCSS ([#16617](https://github.com/prettier/prettier/pull/16617) by [@Ma-hawaj](https://github.com/Ma-hawaj), [@fisker](https://github.com/fisker))
416416
417417
<!-- prettier-ignore -->
418-
```css
418+
```scss
419419
/* Input */
420420
$z-indexes: (
421421
header: 1035,
@@ -441,7 +441,7 @@ $z-indexes: (
441441
442442
In Prettier v3, [we print HTML5 doctype in lowercase](https://prettier.io/blog/2023/07/05/3.0.0#print-html5-doctype-in-lowercase-7391httpsgithubcomprettierprettierpull7391-by-fiskerhttpsgithubcomfisker), it's safe for HTML files, however users may use the `html` parser to format other files eg: XHTML files, lowercase the `doctype` will break XHTML documents.
443443
444-
Since Prettier 3.4, we'll only lowercase [HTML5 doctype (`<!doctype html>`)](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide/HTML#doctype) when the file extension is `.html` or `.htm`, otherwise they will be untouched.
444+
Starting with Prettier 3.4, we'll only lowercase [HTML5 doctype (`<!doctype html>`)](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide/HTML#doctype) when the file extension is `.html` or `.htm`, otherwise they will be untouched.
445445
446446
<!-- prettier-ignore -->
447447
```html

0 commit comments

Comments
 (0)