-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[babel 7] Allow setting
ignoreExtensions
in Flow preset
- Loading branch information
1 parent
8c3f035
commit 0385034
Showing
5 changed files
with
21 additions
and
16 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
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-flow/test/fixtures/ignoreExtensions/false/input.ts
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 @@ | ||
// The TS plugin is not enabled, so this will throw because | ||
// the Flow preset will not enable Flow support in TS files. | ||
type A = string; |
4 changes: 4 additions & 0 deletions
4
packages/babel-preset-flow/test/fixtures/ignoreExtensions/false/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 @@ | ||
{ | ||
"presets": [["flow", { "ignoreExtensions": false }]], | ||
"throws": "Missing semicolon. (3:4)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-preset-flow/test/fixtures/ignoreExtensions/true/input.ts
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 @@ | ||
type A = string; |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-flow/test/fixtures/ignoreExtensions/true/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 @@ | ||
{ | ||
"presets": [["flow", { "ignoreExtensions": true }]] | ||
} |