From 04fbd04932ea9a8c95232938f3c5a0a61e27c819 Mon Sep 17 00:00:00 2001 From: vikr01 Date: Wed, 12 Dec 2018 21:49:48 -0800 Subject: [PATCH] revert whitepsace changes --- .../non-octal-float-strict-mode/options.json | 4 +- .../regression/octal-float-fail/options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../migrated_0012/options.json | 2 +- .../invalid-syntax/migrated_0033/options.json | 2 +- .../invalid-syntax/migrated_0034/options.json | 2 +- .../invalid-syntax/migrated_0036/options.json | 2 +- .../invalid-syntax/migrated_0037/options.json | 2 +- .../invalid-syntax/migrated_0041/options.json | 2 +- .../invalid-syntax/migrated_0042/options.json | 2 +- .../invalid-syntax/migrated_0043/options.json | 2 +- .../invalid-syntax/migrated_0044/options.json | 2 +- .../invalid-syntax/migrated_0048/options.json | 2 +- .../invalid-syntax/migrated_0049/options.json | 2 +- .../invalid-syntax/migrated_0050/options.json | 2 +- .../invalid-syntax/migrated_0051/options.json | 2 +- .../invalid-syntax/migrated_0075/options.json | 2 +- .../invalid-syntax/migrated_0137/options.json | 2 +- .../invalid-syntax/migrated_0163/options.json | 2 +- .../invalid-syntax/migrated_0165/options.json | 2 +- .../invalid-syntax/migrated_0166/options.json | 2 +- .../invalid-syntax/migrated_0167/options.json | 2 +- .../invalid-syntax/migrated_0169/options.json | 2 +- .../invalid-syntax/migrated_0277/options.json | 2 +- .../migrated_0002/options.json | 2 +- .../migrated_0003/options.json | 2 +- .../migrated_0004/options.json | 2 +- .../migrated_0005/options.json | 2 +- .../failure-numeric-literal/options.json | 2 +- .../invalid-proposal/options.json | 4 +- .../options.json | 6 +- .../options.json | 6 +- .../01-type-include/output.json | 48 +---- .../03-type-flow-include/output.json | 12 +- .../04-type-flow-include/output.json | 48 +---- .../flow/comment/01-type-include/output.json | 112 +++--------- .../comment/03-type-flow-include/output.json | 52 +++--- .../comment/04-type-flow-include/output.json | 169 ++++-------------- .../fails-in-array-expression-1/options.json | 2 +- .../fails-in-array-expression-2/options.json | 2 +- .../fails-in-array-expression-3/options.json | 2 +- .../fails-in-array-expression-4/options.json | 2 +- .../fails-in-array-expression-5/options.json | 2 +- 48 files changed, 152 insertions(+), 385 deletions(-) diff --git a/packages/babel-parser/test/fixtures/core/regression/non-octal-float-strict-mode/options.json b/packages/babel-parser/test/fixtures/core/regression/non-octal-float-strict-mode/options.json index 8ac5b45f7194..956965603040 100644 --- a/packages/babel-parser/test/fixtures/core/regression/non-octal-float-strict-mode/options.json +++ b/packages/babel-parser/test/fixtures/core/regression/non-octal-float-strict-mode/options.json @@ -1,4 +1,4 @@ { - "sourceType": "module", - "throws": "Legacy octal literals are not allowed in strict mode (1:0)" + "sourceType": "module", + "throws": "Legacy octal literals are not allowed in strict mode (1:0)" } diff --git a/packages/babel-parser/test/fixtures/core/regression/octal-float-fail/options.json b/packages/babel-parser/test/fixtures/core/regression/octal-float-fail/options.json index a89de70c61e5..ff1ac8247e68 100644 --- a/packages/babel-parser/test/fixtures/core/regression/octal-float-fail/options.json +++ b/packages/babel-parser/test/fixtures/core/regression/octal-float-fail/options.json @@ -1,3 +1,3 @@ { "throws": "Unexpected token, expected \";\" (1:2)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-expression-disallowed/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-expression-disallowed/options.json index 6079f56395bd..c83e2245d03d 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-expression-disallowed/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-expression-disallowed/options.json @@ -1,3 +1,3 @@ { "throws": "Unexpected token, expected \";\" (1:14)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-identifier-allowed/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-identifier-allowed/options.json index b412ffe6712f..53135cabff8f 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-identifier-allowed/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-identifier-allowed/options.json @@ -1,3 +1,3 @@ { "sourceType": "script" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-member-expr/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-member-expr/options.json index bf0f292caad2..552c89da58a5 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-member-expr/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-member-expr/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid left-hand side in object destructuring pattern (1:4)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-method-in-pattern/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-method-in-pattern/options.json index 559cc4e11a41..359d73aba0c0 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-method-in-pattern/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-method-in-pattern/options.json @@ -1,3 +1,3 @@ { "throws": "Object pattern can't contain getter or setter (1:6)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-nested-param/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-nested-param/options.json index 30f209db8f07..958c9174a7b4 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-nested-param/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-nested-param/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid left-hand side in object destructuring pattern (1:24)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-pattern-without-parenthesis/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-pattern-without-parenthesis/options.json index e24c4dce39b6..bbbe2f5dd5c4 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-pattern-without-parenthesis/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-pattern-without-parenthesis/options.json @@ -1,3 +1,3 @@ { "throws": "Unexpected token, expected \",\" (1:3)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/expression-primary-array/migrated_0012/options.json b/packages/babel-parser/test/fixtures/esprima/expression-primary-array/migrated_0012/options.json index abe9f835b84b..29d61fe2ba13 100644 --- a/packages/babel-parser/test/fixtures/esprima/expression-primary-array/migrated_0012/options.json +++ b/packages/babel-parser/test/fixtures/esprima/expression-primary-array/migrated_0012/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid Unicode escape (1:12)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0033/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0033/options.json index 18c53b997b56..d08f66903cbf 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0033/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0033/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:2)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0034/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0034/options.json index 18c53b997b56..d08f66903cbf 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0034/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0034/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:2)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0036/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0036/options.json index 18c53b997b56..d08f66903cbf 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0036/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0036/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:2)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0037/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0037/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0037/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0037/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0041/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0041/options.json index adf556b0a352..7b44c68a56ba 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0041/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0041/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid regular expression flag (1:16)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0042/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0042/options.json index eae3757f4451..7ee699160181 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0042/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0042/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid regular expression flag (1:18)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0043/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0043/options.json index adf556b0a352..7b44c68a56ba 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0043/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0043/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid regular expression flag (1:16)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0044/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0044/options.json index 080cb0eaaa8a..5a8646213298 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0044/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0044/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid regular expression flag (1:17)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0048/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0048/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0048/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0048/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0049/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0049/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0049/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0049/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0050/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0050/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0050/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0050/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0051/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0051/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0051/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0051/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0075/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0075/options.json index aa55ec4f840f..15db70153669 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0075/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0075/options.json @@ -1,3 +1,3 @@ { "throws": "setter must have exactly one formal parameter (1:3)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0137/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0137/options.json index 82bcfe621c49..b813254a6566 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0137/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0137/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid Unicode escape (1:0)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0163/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0163/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0163/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0163/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0165/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0165/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0165/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0165/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0166/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0166/options.json index 82bcfe621c49..b813254a6566 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0166/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0166/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid Unicode escape (1:0)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0167/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0167/options.json index 82bcfe621c49..b813254a6566 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0167/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0167/options.json @@ -1,3 +1,3 @@ { "throws": "Invalid Unicode escape (1:0)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0169/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0169/options.json index d732a1630991..a760565b1bd2 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0169/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0169/options.json @@ -1,3 +1,3 @@ { "throws": "Unterminated string constant (1:0)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json index bea671da23dd..9b47cf200ee2 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/options.json @@ -1,3 +1,3 @@ { "throws": "enum is a reserved word (1:11)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0002/options.json b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0002/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0002/options.json +++ b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0002/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0003/options.json b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0003/options.json index 18c53b997b56..d08f66903cbf 100644 --- a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0003/options.json +++ b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0003/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:2)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0004/options.json b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0004/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0004/options.json +++ b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0004/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0005/options.json b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0005/options.json index 381fd12ce2d0..c5a8baf2b8ff 100644 --- a/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0005/options.json +++ b/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0005/options.json @@ -1,3 +1,3 @@ { "throws": "Expecting Unicode escape sequence \\uXXXX (1:1)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json index 2ba960820f02..03592e655ab9 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json @@ -1,4 +1,4 @@ { "throws": "Unexpected digit after hash token (2:2)", - "plugins": ["classPrivateProperties"] + "plugins": [ "classPrivateProperties" ] } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json index 97e5a55b8f75..109111d73a1a 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json @@ -1,4 +1,6 @@ { - "plugins": [["pipelineOperator", { "proposal": "invalid" }]], + "plugins": [ + ["pipelineOperator", { "proposal": "invalid" }] + ], "throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: 'minimal', 'smart'" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json index d117d235099d..d4a1b64b4575 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json @@ -1,8 +1,4 @@ { - "plugins": [ - ["pipelineOperator", { "proposal": "smart" }], - "doExpressions", - "asyncGenerators" - ], + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions", "asyncGenerators"], "throws": "Topic reference was used in a lexical context without topic binding (2:48)" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json index 680f780892b7..791fe8252d11 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json @@ -1,7 +1,3 @@ { - "plugins": [ - ["pipelineOperator", { "proposal": "smart" }], - "doExpressions", - "asyncGenerators" - ] + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions", "asyncGenerators"] } diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json b/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json index 42033b969ac4..618209f10c9a 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 68, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 68, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 68, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -64,14 +64,14 @@ "body": { "type": "ClassBody", "start": 14, - "end": 68, + "end": 41, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -92,22 +92,6 @@ "column": 23 } } - }, - { - "type": "CommentBlock", - "value": " :: foo: number; ", - "start": 42, - "end": 66, - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 26 - } - } } ] } @@ -131,22 +115,6 @@ "column": 23 } } - }, - { - "type": "CommentBlock", - "value": " :: foo: number; ", - "start": 42, - "end": 66, - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 26 - } - } } ] } \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json index 39c844aa9f01..ed5a0e7b58b3 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 79, + "end": 78, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 79, + "end": 78, "loc": { "start": { "line": 1, @@ -33,9 +33,9 @@ "innerComments": [ { "type": "CommentBlock", - "value": " flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", + "value": "flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", "start": 0, - "end": 79, + "end": 78, "loc": { "start": { "line": 1, @@ -52,9 +52,9 @@ "comments": [ { "type": "CommentBlock", - "value": " flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", + "value": "flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", "start": 0, - "end": 79, + "end": 78, "loc": { "start": { "line": 1, diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json index 8c2727c7eb82..fb2a67dd8393 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 90, + "end": 51, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 90, + "end": 51, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 90, + "end": 51, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -64,14 +64,14 @@ "body": { "type": "ClassBody", "start": 14, - "end": 90, + "end": 51, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -92,22 +92,6 @@ "column": 33 } } - }, - { - "type": "CommentBlock", - "value": " flow-include foo: number; ", - "start": 52, - "end": 88, - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 38 - } - } } ] } @@ -131,22 +115,6 @@ "column": 33 } } - }, - { - "type": "CommentBlock", - "value": " flow-include foo: number; ", - "start": 52, - "end": 88, - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 38 - } - } } ] } \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json index b31ea80c63cf..4f80907e1de9 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 74, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 74, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 74, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -64,45 +64,45 @@ "body": { "type": "ClassBody", "start": 14, - "end": 74, + "end": 41, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, "body": [ { "type": "ClassProperty", - "start": 26, - "end": 39, + "start": 23, + "end": 36, "loc": { "start": { "line": 2, - "column": 10 + "column": 7 }, "end": { "line": 2, - "column": 23 + "column": 20 } }, "static": false, "key": { "type": "Identifier", - "start": 26, - "end": 30, + "start": 23, + "end": 27, "loc": { "start": { "line": 2, - "column": 10 + "column": 7 }, "end": { "line": 2, - "column": 14 + "column": 11 }, "identifierName": "prop" }, @@ -112,96 +112,30 @@ "variance": null, "typeAnnotation": { "type": "TypeAnnotation", - "start": 30, - "end": 38, + "start": 27, + "end": 35, "loc": { "start": { "line": 2, - "column": 14 + "column": 11 }, "end": { "line": 2, - "column": 22 + "column": 19 } }, "typeAnnotation": { "type": "StringTypeAnnotation", - "start": 32, - "end": 38, + "start": 29, + "end": 35, "loc": { "start": { "line": 2, - "column": 16 + "column": 13 }, "end": { "line": 2, - "column": 22 - } - } - } - }, - "value": null - }, - { - "type": "ClassProperty", - "start": 55, - "end": 69, - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - }, - "static": false, - "key": { - "type": "Identifier", - "start": 55, - "end": 60, - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - }, - "identifierName": "prop2" - }, - "name": "prop2" - }, - "computed": false, - "variance": null, - "typeAnnotation": { - "type": "TypeAnnotation", - "start": 60, - "end": 68, - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - }, - "typeAnnotation": { - "type": "NumberTypeAnnotation", - "start": 62, - "end": 68, - "loc": { - "start": { - "line": 3, "column": 19 - }, - "end": { - "line": 3, - "column": 25 } } } diff --git a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json index 567f48a615b3..5b41ff77f72a 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 79, + "end": 78, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 79, + "end": 78, "loc": { "start": { "line": 1, @@ -31,8 +31,8 @@ "body": [ { "type": "TypeAlias", - "start": 16, - "end": 76, + "start": 15, + "end": 75, "loc": { "start": { "line": 2, @@ -45,8 +45,8 @@ }, "id": { "type": "Identifier", - "start": 21, - "end": 24, + "start": 20, + "end": 23, "loc": { "start": { "line": 2, @@ -63,8 +63,8 @@ "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 27, - "end": 75, + "start": 26, + "end": 74, "loc": { "start": { "line": 2, @@ -79,8 +79,8 @@ "properties": [ { "type": "ObjectTypeProperty", - "start": 31, - "end": 42, + "start": 30, + "end": 41, "loc": { "start": { "line": 3, @@ -93,8 +93,8 @@ }, "key": { "type": "Identifier", - "start": 31, - "end": 34, + "start": 30, + "end": 33, "loc": { "start": { "line": 3, @@ -114,8 +114,8 @@ "method": false, "value": { "type": "NumberTypeAnnotation", - "start": 36, - "end": 42, + "start": 35, + "end": 41, "loc": { "start": { "line": 3, @@ -132,8 +132,8 @@ }, { "type": "ObjectTypeProperty", - "start": 46, - "end": 58, + "start": 45, + "end": 57, "loc": { "start": { "line": 4, @@ -146,8 +146,8 @@ }, "key": { "type": "Identifier", - "start": 46, - "end": 49, + "start": 45, + "end": 48, "loc": { "start": { "line": 4, @@ -167,8 +167,8 @@ "method": false, "value": { "type": "BooleanTypeAnnotation", - "start": 51, - "end": 58, + "start": 50, + "end": 57, "loc": { "start": { "line": 4, @@ -185,8 +185,8 @@ }, { "type": "ObjectTypeProperty", - "start": 62, - "end": 73, + "start": 61, + "end": 72, "loc": { "start": { "line": 5, @@ -199,8 +199,8 @@ }, "key": { "type": "Identifier", - "start": 62, - "end": 65, + "start": 61, + "end": 64, "loc": { "start": { "line": 5, @@ -220,8 +220,8 @@ "method": false, "value": { "type": "StringTypeAnnotation", - "start": 67, - "end": 73, + "start": 66, + "end": 72, "loc": { "start": { "line": 5, diff --git a/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json index 908bfa823b79..fb2a67dd8393 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 99, + "end": 51, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 99, + "end": 51, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 99, + "end": 51, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, @@ -64,154 +64,57 @@ "body": { "type": "ClassBody", "start": 14, - "end": 99, + "end": 51, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 4, + "line": 3, "column": 1 } }, - "body": [ + "body": [], + "innerComments": [ { - "type": "ClassProperty", - "start": 39, - "end": 52, + "type": "CommentBlock", + "value": "flow-include prop: string; ", + "start": 18, + "end": 49, "loc": { "start": { "line": 2, - "column": 23 + "column": 2 }, "end": { "line": 2, - "column": 36 + "column": 33 } - }, - "static": false, - "key": { - "type": "Identifier", - "start": 39, - "end": 43, - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - }, - "identifierName": "prop" - }, - "name": "prop" - }, - "computed": false, - "variance": null, - "typeAnnotation": { - "type": "TypeAnnotation", - "start": 43, - "end": 51, - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 35 - } - }, - "typeAnnotation": { - "type": "StringTypeAnnotation", - "start": 45, - "end": 51, - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 35 - } - } - } - }, - "value": null - }, - { - "type": "ClassProperty", - "start": 80, - "end": 94, - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 38 - } - }, - "static": false, - "key": { - "type": "Identifier", - "start": 80, - "end": 85, - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 29 - }, - "identifierName": "prop2" - }, - "name": "prop2" - }, - "computed": false, - "variance": null, - "typeAnnotation": { - "type": "TypeAnnotation", - "start": 85, - "end": 93, - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 37 - } - }, - "typeAnnotation": { - "type": "NumberTypeAnnotation", - "start": 87, - "end": 93, - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 37 - } - } - } - }, - "value": null + } } ] } } ], "directives": [] - } + }, + "comments": [ + { + "type": "CommentBlock", + "value": "flow-include prop: string; ", + "start": 18, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ] } \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-1/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-1/options.json index 18cdf0d35e40..48eabee042d5 100644 --- a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-1/options.json +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-1/options.json @@ -1,3 +1,3 @@ { "throws": "The type cast expression is expected to be wrapped with parenthesis (1:2)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-2/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-2/options.json index 624681c0d415..a7103f22c3bb 100644 --- a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-2/options.json +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-2/options.json @@ -1,3 +1,3 @@ { "throws": "The type cast expression is expected to be wrapped with parenthesis (1:3)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-3/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-3/options.json index 7f8da08031af..b4110f319b42 100644 --- a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-3/options.json +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-3/options.json @@ -1,3 +1,3 @@ { "throws": "The type cast expression is expected to be wrapped with parenthesis (1:7)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-4/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-4/options.json index 23c75013dad4..476212d7aaa1 100644 --- a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-4/options.json +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-4/options.json @@ -1,3 +1,3 @@ { "throws": "The type cast expression is expected to be wrapped with parenthesis (1:9)" -} +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-5/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-5/options.json index 3f861de320eb..ddef716c822b 100644 --- a/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-5/options.json +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fails-in-array-expression-5/options.json @@ -1,3 +1,3 @@ { "throws": "The type cast expression is expected to be wrapped with parenthesis (1:13)" -} +} \ No newline at end of file