From 5fef089377dbbd9c50cb04a2d65190a29ea68346 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Tue, 26 Nov 2024 10:42:30 +0100 Subject: [PATCH] Minor improvements in v3.4.0 blog post (#16886) --- website/blog/2024-11-26-3.4.0.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/website/blog/2024-11-26-3.4.0.md b/website/blog/2024-11-26-3.4.0.md index ae9778bdc..4aafa760c 100644 --- a/website/blog/2024-11-26-3.4.0.md +++ b/website/blog/2024-11-26-3.4.0.md @@ -105,8 +105,8 @@ const str = "\a"; #### 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)) -- `DecimalLiteral` - The [Decimal proposal](https://github.com/tc39/proposal-decimal) decided not introduce new syntax. The `decimal` plugin will be removed from Babel 8. -- `importReflection` - The "Import Reflection" proposal has renamed as ["Source Phase Imports"](https://github.com/tc39/proposal-source-phase-imports) +- `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. +- `importReflection` - The "Import Reflection" proposal has been renamed to ["Source Phase Imports"](https://github.com/tc39/proposal-source-phase-imports) - [Disclaimer about non-standard syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) @@ -146,7 +146,7 @@ class Foo { ) {} } -// Output (stable) +// Prettier 3.3 class Foo { constructor( @decorator @@ -155,7 +155,7 @@ class Foo { ) {} } -// Output (main) +// Prettier 3.4 class Foo { constructor( @decorator @@ -172,7 +172,7 @@ There was a bug where block comments between the modifier and the name of a deco With this change, the position of the block comment between the modifier and the property name is preserved. -```tsx +```ts // Input class Foo { @decorator @@ -204,7 +204,7 @@ There was a bug where an extra line was inserted when assigning a chained arrow This change ensures that the extra line is no longer inserted. -```tsx +```ts // Input const foo1 = // comment @@ -229,7 +229,7 @@ const foo1 = #### Support "Top-level await statements" ([#16729](https://github.com/prettier/prettier/pull/16729) by [@fisker](https://github.com/fisker)) -```tsx +```ts // Input (await (await fetch()).json()).foo @@ -243,7 +243,7 @@ await(await fetch()).json().foo; #### 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)) -```tsx +```ts // Input export class JiraCreatePixFraudDetectionGateway implements Pick @@ -282,7 +282,7 @@ export class JiraCreatePixFraudDetectionGateway #### Print `declare` before accessibility in class properties ([#16731](https://github.com/prettier/prettier/pull/16731) by [@fisker](https://github.com/fisker)) -```tsx +```ts // Input class A { declare private readonly name: string; @@ -415,7 +415,7 @@ Error #### 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)) -```css +```scss /* Input */ $z-indexes: ( header: 1035, @@ -441,7 +441,7 @@ $z-indexes: ( 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. -Since Prettier 3.4, we'll only lowercase [HTML5 doctype (``)](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. +Starting with Prettier 3.4, we'll only lowercase [HTML5 doctype (``)](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. ```html