Edit changelog
This commit is contained in:
1 parent
96824581e8
commit
88d765a4be
10 files changed
+16
-17
No files matched your search
@@ -1,4 +1,4 @@
|
||||
#### Fix `lineSuffixBoundary` (#10122 by @thorn0)
|
||||
#### Fix `lineSuffixBoundary` IR command (#10122 by @thorn0)
|
||||
|
||||
There was a bug in the implementation of the [`lineSuffixBoundary`][lsb] command that significantly limited its usefulness: the printer algorithm didn't correctly consider it a potential line break. Now that the bug has been fixed, we urge plugin authors to give this command another try and see if it can help them simplify printing of trailing comments.
|
||||
|
||||
|
||||
@@ -33,3 +33,5 @@ To print a sub-property of the current node, use `["property1", "property2"]`:
|
||||
+ return print(["child", "child"]);
|
||||
}
|
||||
```
|
||||
|
||||
See also an example in the [docs](https://prettier.io/docs/en/plugins.html#print).
|
||||
@@ -3,13 +3,13 @@
|
||||
The following command will not throw an error when it doesn't find a YAML file.
|
||||
|
||||
```sh
|
||||
// Prettier stable
|
||||
# Prettier stable
|
||||
$ npx prettier --check "prettier/docs/*.yaml"
|
||||
Checking formatting...
|
||||
[error] No files matching the pattern were found: "prettier/docs/*.yaml".
|
||||
All matched files use Prettier code style!
|
||||
|
||||
// Prettier main
|
||||
# Prettier main
|
||||
$ npx prettier --check --no-error-on-unmatched-pattern "prettier/docs/*.yaml"
|
||||
Checking formatting...
|
||||
All matched files use Prettier code style!
|
||||
|
||||
@@ -10,7 +10,7 @@ tests\flow-repo\config_module_system_node_resolve_dirname\custom_resolve_dir\tes
|
||||
tests\flow-repo\config_module_system_node_resolve_dirname\subdir\custom_resolve_
|
||||
All matched files use Prettier code style!
|
||||
|
||||
// Prettier main
|
||||
# Prettier main
|
||||
$ prettier tests/flow-repo/config_module_system_node_resolve_dirname --check
|
||||
Checking formatting...
|
||||
All matched files use Prettier code style!
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#### Fix absolute path in custom CSS -custom-url() calls (#9966 by @vjeux)
|
||||
#### Fix absolute path in custom CSS `-custom-url()` calls (#9966 by @vjeux)
|
||||
|
||||
The CSS parser is parsing this as `["division", "absolute/path"]` instead of a single `"/absolute/path"` token unless you are in a `url()` call. Because we put space after division, it results in an incorrect path. The fix was to avoid printing a space if a division is the first token of a call, which hopefully should be safe.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```css
|
||||
/* Input */
|
||||
-custom-url(/absolute/path)
|
||||
|
||||
/* Prettier stable */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Fix missing semi in `declare export * from …` (#9767 by @fisker)
|
||||
#### Fix missing semicolon in `declare export * from …` (#9767 by @fisker)
|
||||
|
||||
<!-- Optional description if it makes sense. -->
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#### Fix missing space after keyword in anonymous graphql operations (#10689 by @patriscus)
|
||||
#### Fix missing space after keyword in anonymous operations (#10689 by @patriscus)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```graphql
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
- implement simple formatting for the `class` attribute, like Prettier formatted it in HTML before v2.3.0
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
// Input
|
||||
```hbs
|
||||
{{!-- Input --}}
|
||||
<div class="
|
||||
foo"></div>
|
||||
<div bar='"{{expr}}"'></div>
|
||||
<div baz="\{{ non-expression }}"></div>
|
||||
|
||||
// Prettier stable
|
||||
{{!-- Prettier stable --}}
|
||||
<div class="[object Object],foo"></div>
|
||||
<div bar=""{{expr}}""></div>
|
||||
<div baz="{{ non-expression }}"></div>
|
||||
|
||||
// Prettier main
|
||||
{{!-- Prettier main --}}
|
||||
<div class="foo"></div>
|
||||
<div bar='"{{expr}}"'></div>
|
||||
<div baz="\{{ non-expression }}"></div>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#### Print final blockParam on its own line (#9978 by @dcyriller)
|
||||
#### Print final `blockParam` on its own line (#9978 by @dcyriller)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```hbs
|
||||
{{!-- Input --}}
|
||||
<MyComponent @prop={{true}} @prop2={{true}} @prop3={{true}} @prop4={{true}} as |thing|></MyComponent>
|
||||
{{#block param hashKey=hashValue hashKey=hashValue hashKey=hashValue as |blockParam|}}
|
||||
Hello
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```ts
|
||||
// Input
|
||||
users.map((user: User): User => {
|
||||
return user;
|
||||
})
|
||||
|
||||
// Prettier stable
|
||||
users.map(
|
||||
(user: User): User => {
|
||||
|
||||
Reference in new issue
Block a user