chore: fix some typos in comments (#16221)

Signed-off-by: StevenMia <flite@foxmail.com>
This commit is contained in:
StevenMia authored and GitHub committed 2024-04-28 21:10:45 +01:00
1 parent 3861ff30e0
commit 22e9d52c91
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -877,7 +877,7 @@ function f(
```ts ```ts
// Before // Before
type UploadState<E, EM, D> = type UploadState<E, EM, D> =
// The upload hasnt begun yet // The upload hasn't begun yet
| A | A
| // The upload timed out | // The upload timed out
B B
@@ -886,7 +886,7 @@ type UploadState<E, EM, D> =
// After // After
type UploadState<E, EM, D> = type UploadState<E, EM, D> =
// The upload hasnt begun yet // The upload hasn't begun yet
| A | A
// The upload timed out // The upload timed out
| B | B
+1 -1
View File
@@ -1077,7 +1077,7 @@ This was not intended to be allowed, and has been reverted (in this case, you wo
#### Respect EditorConfig when `--config` is passed ([#3992] by [@josephfrazier]) #### Respect EditorConfig when `--config` is passed ([#3992] by [@josephfrazier])
This is a minor change to the the way `.editorconfig` files are handled. Previously when `--config` was provided, `.editorconfig` was ignored. This is a minor change to the way `.editorconfig` files are handled. Previously when `--config` was provided, `.editorconfig` was ignored.
--- ---
+1 -1
View File
@@ -754,7 +754,7 @@ type A = { [key in B] };
#### Fix edge cases of printing index signatures ([#7228](https://github.com/prettier/prettier/pull/7228) by [@cola119](https://github.com/cola119)) #### Fix edge cases of printing index signatures ([#7228](https://github.com/prettier/prettier/pull/7228) by [@cola119](https://github.com/cola119))
Even though index signatures without type annotations or with multiple parameters aren't valid TypeScript, the TypeScript parser supports this syntax. In line with the [previous error recovery efforts](https://prettier.io/blog/2019/11/09/1.19.0.html#enable-formatting-even-if-there-are-parse-errors-in-some-cases-6816-by-thorn0-and-the-babel-team), Prettier now makes sure its output still can be parsed in these cases. Previous versions produced unparseable code. Even though index signatures without type annotations or with multiple parameters aren't valid TypeScript, the TypeScript parser supports this syntax. In line with the [previous error recovery efforts](https://prettier.io/blog/2019/11/09/1.19.0.html#enable-formatting-even-if-there-are-parse-errors-in-some-cases-6816-by-thorn0-and-the-babel-team), Prettier now makes sure its output still can be parsed in these cases. Previous versions produced unparsable code.
<!-- prettier-ignore --> <!-- prettier-ignore -->
```ts ```ts
+1 -1
View File
@@ -512,7 +512,7 @@ SyntaxError: Unexpected token (1:1)
// Prettier 2.0 // Prettier 2.0
<div/> < 5; <div/> < 5;
// Prettier 2.0 second outout // Prettier 2.0 second output
SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:9) SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:9)
> 1 | <div /> < 5; > 1 | <div /> < 5;
| ^ | ^