chore: fix some typos in comments (#16221)
Signed-off-by: StevenMia <flite@foxmail.com>
This commit is contained in:
1 parent
3861ff30e0
commit
22e9d52c91
4 files changed
+5
-5
No files matched your search
@@ -877,7 +877,7 @@ function f(
|
||||
```ts
|
||||
// Before
|
||||
type UploadState<E, EM, D> =
|
||||
// The upload hasnt begun yet
|
||||
// The upload hasn't begun yet
|
||||
| A
|
||||
| // The upload timed out
|
||||
B
|
||||
@@ -886,7 +886,7 @@ type UploadState<E, EM, D> =
|
||||
|
||||
// After
|
||||
type UploadState<E, EM, D> =
|
||||
// The upload hasnt begun yet
|
||||
// The upload hasn't begun yet
|
||||
| A
|
||||
// The upload timed out
|
||||
| B
|
||||
|
||||
@@ -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])
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
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 -->
|
||||
```ts
|
||||
|
||||
@@ -512,7 +512,7 @@ SyntaxError: Unexpected token (1:1)
|
||||
// Prettier 2.0
|
||||
<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)
|
||||
> 1 | <div /> < 5;
|
||||
| ^
|
||||
|
||||
Reference in new issue
Block a user