Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: report missing plugins on type exports (#11417)
* fix: report missing plugins on type exports * nit refactors * Update packages/babel-parser/src/parser/statement.js [skip ci]
- Loading branch information
Showing
15 changed files
with
70 additions
and
4 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
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/flow/expect-plugin/export-interface/input.js
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 @@ | ||
export interface Foo {} |
7 changes: 7 additions & 0 deletions
7
packages/babel-parser/test/fixtures/flow/expect-plugin/export-interface/options.json
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,7 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"jsx" | ||
], | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (1:7)" | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/babel-parser/test/fixtures/flow/expect-plugin/export-type-named/input.js
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,2 @@ | ||
var Foo; | ||
export type { Foo }; |
7 changes: 7 additions & 0 deletions
7
packages/babel-parser/test/fixtures/flow/expect-plugin/export-type-named/options.json
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,7 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"jsx" | ||
], | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (2:7)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/flow/expect-plugin/export-type/input.js
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 @@ | ||
export type Foo = number; |
7 changes: 7 additions & 0 deletions
7
packages/babel-parser/test/fixtures/flow/expect-plugin/export-type/options.json
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,7 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": [ | ||
"jsx" | ||
], | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (1:7)" | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/babel-parser/test/fixtures/flow/expect-plugin/options.json
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,4 @@ | ||
{ | ||
"sourceType": "module", | ||
"plugins": ["jsx"] | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/typescript/expect-plugin/export-interface/input.js
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 @@ | ||
export interface Foo {} |
4 changes: 4 additions & 0 deletions
4
packages/babel-parser/test/fixtures/typescript/expect-plugin/export-interface/options.json
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,4 @@ | ||
{ | ||
"sourceType": "module", | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (1:7)" | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/babel-parser/test/fixtures/typescript/expect-plugin/export-type-named/input.js
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,2 @@ | ||
var Foo; | ||
export type { Foo }; |
4 changes: 4 additions & 0 deletions
4
packages/babel-parser/test/fixtures/typescript/expect-plugin/export-type-named/options.json
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,4 @@ | ||
{ | ||
"sourceType": "module", | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (2:7)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/typescript/expect-plugin/export-type/input.js
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 @@ | ||
export type Foo = number; |
4 changes: 4 additions & 0 deletions
4
packages/babel-parser/test/fixtures/typescript/expect-plugin/export-type/options.json
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,4 @@ | ||
{ | ||
"sourceType": "module", | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'flow, typescript' (1:7)" | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-parser/test/fixtures/typescript/expect-plugin/options.json
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,3 @@ | ||
{ | ||
"sourceType": "module" | ||
} |