Add blog post for v3.7 (#18323)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
fisker Cheungandautofix-ci[bot] authored and GitHub committed 2025-11-27 16:31:22 +08:00
1 parent 8147dddb91
commit 43236e234e
8 files changed
+1937 -10

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
---
authors: "fisker"
title: "Prettier 3.7: Improved formatting consistency and new plugin features!"
---
We are excited to announce Prettier 3.7! This release focuses on polishing the TypeScript and Flow experience, specifically by aligning the formatting of classes and interfaces to be more consistent and predictable. We also want your opinion on the upcoming change to fix [inconsistent opening brace print logic of class and interface body](https://github.com/prettier/prettier/issues/18115).
Additionally, we also fixed lots of bugs, added support for new features in Angular 21 and Graphql 16.12, added Front Matter support to Handlebars.
For plugin developers, we've added new APIs to give you more control over comment attachment and handling of ignored nodes.
If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on. Thank you for your continued support!
<!-- truncate -->
+1 -1
View File
@@ -18,7 +18,7 @@
</style>
{{! Prettier main (--html-whitespace-sensitivity=ignore) }}
{{! Prettier main (--html-whitespace-sensitivity=ignore) }}
<style>
#foo {
color: red;
+3 -6
View File
@@ -1,4 +1,6 @@
#### Fix the inconsistent printing between class and interface (#18094, #18091, #18215 by @fisker)
#### [HIGHLIGHT] Fix the inconsistent printing between class and interface (#18094, #18091, #18215 by @fisker)
In this release, we've focused heavily on improving consistency between Class and Interface formatting. Previously, these two similar constructs were printed quite differently, leading to visual inconsistencies. We've aligned their formatting rules to provide a more predictable and cleaner output.
##### The extra indentation for type parameters in class has been removed
@@ -114,11 +116,6 @@ interface ExtendsLongOneWithGenerics
> {}
// Prettier main
interface Interface extends GenericEnvironment<
SomeType,
AnotherType,
YetAnotherType
> {}
class ExtendsLongOneWithGenerics extends Bar<
SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType,
ToBreakLineToBreakLineToBreakLine
+1 -1
View File
@@ -25,7 +25,7 @@ type SuperLongTypeNameLoremIpsumLoremIpsumBlaBlaBlaBlaBlaBlaBlaBlaBlaBlaBlaBla =
| Fooo1000
| Baz2000
| BarLoooooooooooooooooooooooooooooooooooooooooooooooooLong;
type A = // comment
type A = // comment
| Fooo1000
| Baz2000
| BarLoooooooooooooooooooooooooooooooooooooooooooooooooLong;
+1 -1
View File
@@ -7,7 +7,7 @@ interface A {
a: // Comment
B;
b: // Comment
| Fooo1000
| Fooo1000
| Baz2000
| BarLoooooooooooooooooooooooooooooooooooooooooooooooooLong;
c: // Comment
+1 -1
View File
@@ -18,7 +18,7 @@ interface I {
// Prettier main
interface I {
elements: // comment
elements: // comment
| [string, ExpressionNode, ExpressionNode]
| [string, ExpressionNode, ExpressionNode, ObjectExpression];
}
File diff suppressed because it is too large. Load diff
+7
View File
@@ -93,3 +93,10 @@ fabiospampinato:
socials:
x: fabiospampinato
github: fabiospampinato
fisker:
name: Fisker Cheung
url: https://github.com/fisker
image_url: https://github.com/fisker.png?size=58
socials:
github: fisker