-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into remove-webpack
# Conflicts: # package.json # yarn.lock
- Loading branch information
Showing
249 changed files
with
5,660 additions
and
1,774 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#### Support `BigIntLiteralTypeAnnotation` and `BigIntTypeAnnotation` (#9523 by @fisker) | ||
|
||
Add support for `BigIntLiteralTypeAnnotation` and `BigIntTypeAnnotation` in Flow. | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Input | ||
const foo: bigint = 1n; | ||
const bar: baz<1n> = 1n; | ||
|
||
// Prettier stable | ||
Error: unknown type: "BigIntTypeAnnotation" | ||
at ... | ||
|
||
// Prettier master | ||
const foo: bigint = 1n; | ||
const bar: baz<1n> = 1n; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#### Treat more simple types as non-breaking in generic type annotations (#9543 by @fisker) | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Input | ||
const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<symbol> = a | ||
const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = a; | ||
const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = a; | ||
|
||
// Prettier master | ||
const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo< | ||
symbol | ||
> = a; | ||
const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo< | ||
"STRING" | ||
> = a; | ||
const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo< | ||
0 | ||
> = a; | ||
|
||
// Prettier stable (typescript and flow parser) | ||
const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<symbol> = a | ||
const foo2: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<"STRING"> = a; | ||
const foo3: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<0> = a; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#### Fix missing parentheses around `prettier-ignore`d type assertions (#9553 by @fisker) | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Input | ||
transform( | ||
// prettier-ignore | ||
(pointTransformer: (Point => Point)) | ||
); | ||
|
||
// Prettier stable | ||
transform( | ||
// prettier-ignore | ||
pointTransformer: (Point => Point) | ||
); | ||
|
||
// Prettier master | ||
transform( | ||
// prettier-ignore | ||
(pointTransformer: (Point => Point)) | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#### Improve comment types detection (#9563 by @fisker) | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Input | ||
foo/*::<bar>*/(baz); | ||
class Foo { | ||
bar( data: Array<string>) {} | ||
} | ||
|
||
// Prettier master | ||
foo/*:: <bar> */(baz); | ||
class Foo { | ||
bar(data: Array/*:: <string> */) {} | ||
} | ||
|
||
// Prettier stable | ||
foo/*:: <bar> */(baz); | ||
class Foo { | ||
bar(data: Array<string>) {} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#### Add `espree` parser (#9000 by @fisker) | ||
#### [HIGHLIGHT]Add `espree` and `meriyah` parser (#9000, #9514 by @fisker) | ||
|
||
A new value for the `parser` option has been added: [`espree`](https://github.com/eslint/espree) - which is the [`ESLint`](https://github.com/eslint/eslint) default parser. | ||
Two new values for the `parser` option has been added: | ||
|
||
Note that `espree` only works for [ECMAScript Finished Proposals](https://github.com/tc39/proposals/blob/master/finished-proposals.md), and is stricter than the `babel` parser. | ||
- [`espree`](https://github.com/eslint/espree) - which is the default parser used by [`ESLint`](https://github.com/eslint/eslint). | ||
|
||
Note that `espree` only works for [Finished ECMAScript Proposals](https://github.com/tc39/proposals/blob/master/finished-proposals.md), and is stricter than the `babel` parser. | ||
|
||
- [`meriyah`](https://github.com/meriyah/meriyah) - A [fast](https://meriyah.github.io/meriyah/performance/) JavaScript parser, successor of [cherow](https://github.com/cherow/cherow). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#### Fix inconsistencies in formatting of types between `typescript` and `flow` (#9521 by @fisker) | ||
|
||
<!-- prettier-ignore --> | ||
```ts | ||
// Input | ||
const name: SomeGeneric< | ||
Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP"> | ||
> = null; | ||
|
||
// Prettier master (--parser=typescript) | ||
const name: SomeGeneric<Pick< | ||
Config, | ||
"ONE_LONG_PROP" | "ANOTHER_LONG_PROP" | ||
>> = null; | ||
|
||
// Prettier master (--parser=flow) | ||
const name: SomeGeneric< | ||
Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP"> | ||
> = null; | ||
|
||
// Prettier stable (typescript and flow parser) | ||
const name: SomeGeneric< | ||
Pick<Config, "ONE_LONG_PROP" | "ANOTHER_LONG_PROP"> | ||
> = null; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.