diff --git a/website/blog/2021-11-21-2.5.0.md b/website/blog/2021-11-21-2.5.0.md index 657923745558..e51f8e82ec9f 100644 --- a/website/blog/2021-11-21-2.5.0.md +++ b/website/blog/2021-11-21-2.5.0.md @@ -208,6 +208,36 @@ const paragraph2 = css` ``` +#### Support ES2022 class-private-fields-in syntax in `espree` parser ([#11835](https://github.com/prettier/prettier/pull/11835) by [@fisker](https://github.com/fisker)) + + +```jsx +// Input +class Foo { + #brand; + static isC(obj) { + return #brand in Foo; + } +} + +// Prettier 2.4 +SyntaxError: Unexpected token #brand (4:12) + 2 | #brand; + 3 | static isC(obj) { +> 4 | return #brand in Foo; + | ^ + 5 | } + 6 | } + +// Prettier 2.5 +class Foo { + #brand; + static isC(obj) { + return #brand in Foo; + } +} +``` + ### TypeScript #### Fix formatting for tagged template decorators ([#11717](https://github.com/prettier/prettier/pull/11717) by [@sosukesuzuki](https://github.com/sosukesuzuki))