Edit changelog entries (@j-f1's suggestions)

This commit is contained in:
Georgii Dolzhykov committed 2021-04-20 23:48:06 +03:00
1 parent 7630b4a2ad
commit 8588462f4b
4 files changed
+16 -25

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
#### Add CLI option to prevent errors on unmatched pattern (#10058 by @daronmcintosh)
The following command will not throw an error when it doesn't find a YAML file.
The Prettier CLI will no longer display an error when no files match the glob pattern passed as input.
```sh
# Prettier stable
+2 -2
View File
@@ -8,12 +8,12 @@ query ($unnamed: String) {
}
# Prettier stable
query ($unnamed: String) {
query($unnamed: String) {
id
}
# Prettier main
query($unnamed: String) {
query ($unnamed: String) {
id
}
```
+1 -1
View File
@@ -1,6 +1,6 @@
#### Improve detection of AMD `define` (#10528 by @thorn0)
Prettier special-cases AMD `define` calls to avoid unexpected line breaks in them. `define` calls that weren't expression statements and had nothing to do with AMD were formatted this way too. This happens no longer.
Prettier special-cases AMD `define` calls to avoid unexpected line breaks in them. We now only format `define` calls if they are at the top level of a function or program and are passed arguments in the way AMD expects.
<!-- prettier-ignore -->
```jsx
+12 -21
View File
@@ -3,29 +3,20 @@
<!-- prettier-ignore -->
```ts
// Input
const getAccountCount = async () =>
(await
((await (
await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
).findItem("My bookmarks")) as TreeItem
).getChildren()
).length
const accountCount = (findItemInSection(BOOKMARKED_PROJECTS_SECTION_NAME,
"My bookmarks") as TreeItem).getChildren().length;
// Prettier stable
const getAccountCount = async () =>
(
await ((await (
await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
).findItem("My bookmarks")) as TreeItem).getChildren()
).length;
const accountCount = (findItemInSection(
BOOKMARKED_PROJECTS_SECTION_NAME,
"My bookmarks"
) as TreeItem).getChildren().length;
// Prettier main
const getAccountCount = async () =>
(
await (
(await (
await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
).findItem("My bookmarks")) as TreeItem
).getChildren()
).length;
const accountCount = (
findItemInSection(
BOOKMARKED_PROJECTS_SECTION_NAME,
"My bookmarks"
) as TreeItem
).getChildren().length;
```