You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](https://github.com/prettier/prettier/pull/16796) by [@tats-u](https://github.com/tats-u))
6
+
7
+
Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese.
8
+
9
+
<!-- prettier-ignore -->
10
+
```md
11
+
<!-- Input (--prose-wrap=never) -->
12
+
13
+
C言
14
+
語
15
+
・
16
+
C++
17
+
・
18
+
Go
19
+
・
20
+
Rust
21
+
22
+
<!-- Prettier 3.4.1 -->
23
+
C言語・ C++ ・ Go ・ Rust
24
+
25
+
<!-- Prettier 3.4.2 -->
26
+
C言語・C++・Go・Rust
27
+
```
28
+
29
+
U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”).
30
+
31
+
#### Fix comments print on class methods with decorators ([#16891](https://github.com/prettier/prettier/pull/16891) by [@fisker](https://github.com/fisker))
32
+
33
+
<!-- prettier-ignore -->
34
+
```jsx
35
+
// Input
36
+
class A {
37
+
@decorator
38
+
/**
39
+
* The method description
40
+
*
41
+
*/
42
+
async method(foo: Foo, bar: Bar) {
43
+
console.log(foo);
44
+
}
45
+
}
46
+
47
+
// Prettier 3.4.1
48
+
class A {
49
+
@decorator
50
+
async /**
51
+
* The method description
52
+
*
53
+
*/
54
+
method(foo: Foo, bar: Bar) {
55
+
console.log(foo);
56
+
}
57
+
}
58
+
59
+
// Prettier 3.4.2
60
+
class A {
61
+
@decorator
62
+
/**
63
+
* The method description
64
+
*
65
+
*/
66
+
async method(foo: Foo, bar: Bar) {
67
+
console.log(foo);
68
+
}
69
+
}
70
+
```
71
+
72
+
#### Fix non-idempotent formatting ([#16899](https://github.com/prettier/prettier/pull/16899) by [@seiyab](https://github.com/seiyab))
73
+
74
+
This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.
Copy file name to clipboardExpand all lines: website/versioned_docs/version-stable/browser.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Required options:
19
19
20
20
-**[`parser`](options.md#parser) (or [`filepath`](options.md#file-path))**: One of these options has to be specified for Prettier to know which parser to use.
21
21
22
-
-**`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in <https://unpkg.com/browse/[email protected].1/plugins/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
22
+
-**`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files in <https://unpkg.com/browse/[email protected].2/plugins/>. Note that `estree` plugin should be loaded when printing JavaScript, TypeScript, Flow, or JSON.
23
23
24
24
You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.
0 commit comments