diff --git a/package.json b/package.json index 4711af21a..f429736e4 100644 --- a/package.json +++ b/package.json @@ -137,8 +137,8 @@ "eslint-plugin-unicorn": "49.0.0", "esm-utils": "4.2.1", "execa": "7.2.0", - "jest": "29.7.0", - "jest-light-runner": "0.5.1", + "jest": "30.0.0-alpha.2", + "jest-light-runner": "0.6.0-alpha.1", "jest-snapshot-serializer-ansi": "2.1.0", "jest-snapshot-serializer-raw": "2.0.0", "jest-watch-typeahead": "2.2.2", diff --git a/tests/format/flow-repo/enums/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow-repo/enums/__snapshots__/jsfmt.spec.js.snap index 1e4786a3d..3ebed47e7 100644 --- a/tests/format/flow-repo/enums/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow-repo/enums/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`declared.js [babel-flow] format 1`] = ` | ^ 4 | A, 5 | B, - 6 | }" + 6 | } +Cause: Unexpected token (3:8)" `; exports[`declared.js format 1`] = ` @@ -65,7 +66,8 @@ exports[`lib.js [babel-flow] format 1`] = ` | ^ 5 | J, 6 | K, - 7 | }" + 7 | } +Cause: Unexpected token (4:10)" `; exports[`lib.js format 1`] = ` diff --git a/tests/format/flow-repo/tuples/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow-repo/tuples/__snapshots__/jsfmt.spec.js.snap index baaa9f30d..13e608c84 100644 --- a/tests/format/flow-repo/tuples/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow-repo/tuples/__snapshots__/jsfmt.spec.js.snap @@ -60,7 +60,8 @@ exports[`spread.js [babel-flow] format 1`] = ` | ^ 2 | 3 | type B = [...foo: S]; - 4 |" + 4 | +Cause: Unexpected token (1:10)" `; exports[`spread.js format 1`] = ` diff --git a/tests/format/flow-repo/type-guards/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow-repo/type-guards/__snapshots__/jsfmt.spec.js.snap index d16099ed4..a7dabbf2f 100644 --- a/tests/format/flow-repo/type-guards/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow-repo/type-guards/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`comments-in-type-annotations.js [babel-flow] format 1`] = ` | ^ 4 | 5 | const arrow = (x: any): /* C1 */ x is (number /* C2 */ => /* C3 */ x /* C4 */ is /* C5 */ string /* C6 */ => /* C7 */ x /* C8 */ is /* C9 */ boolean) => true; - 6 |" + 6 | +Cause: Unexpected token, expected "{" (3:50)" `; exports[`comments-in-type-annotations.js format 1`] = ` @@ -49,7 +50,8 @@ exports[`passing.js [babel-flow] format 1`] = ` | ^ 6 | 7 | const arrow0 = (x: any): x is A => true; - 8 | const arrow1 = (x: any): x is (y: A) => B => true;" + 8 | const arrow1 = (x: any): x is (y: A) => B => true; +Cause: Unexpected token, expected "{" (5:19)" `; exports[`passing.js format 1`] = ` diff --git a/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap index 39860b333..d43a5d5a7 100644 --- a/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`embedded.js [babel-flow] format 1`] = ` | ^ 4 | 5 | const HTML_WITH_CONST = /* HTML */ \` - 6 |
" + 6 |
+Cause: Unexpected token (3:10)" `; exports[`embedded.js format 1`] = ` diff --git a/tests/format/flow/as-satisfies-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/as-satisfies-expression/__snapshots__/jsfmt.spec.js.snap index f8301732e..2fec649bb 100644 --- a/tests/format/flow/as-satisfies-expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/as-satisfies-expression/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`as.js [babel-flow] format 1`] = ` | ^ 4 | this.isTabActionBar((e.target || e.srcElement) as HTMLElement); 5 | (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)) as InjectionError; - 6 | 'current' in (props.pagination as {...});" + 6 | 'current' in (props.pagination as {...}); +Cause: Unexpected token, expected "," (3:26)" `; exports[`as.js format 1`] = ` @@ -138,7 +139,8 @@ exports[`as-const.js [babel-flow] format 1`] = ` | ^ 13 | 14 | (type) as const; - 15 |" + 15 | +Cause: Unexpected token (12:10)" `; exports[`as-const.js format 1`] = ` @@ -189,7 +191,8 @@ exports[`assignment.js [babel-flow] format 1`] = ` | ^ 18 | 19 | this.intervalID = (setInterval(() => { - 20 | self.step();" + 20 | self.step(); +Cause: Unexpected token, expected "," (17:22)" `; exports[`assignment.js format 1`] = ` @@ -252,7 +255,8 @@ exports[`export_default_as.js [babel-flow] format 1`] = ` 2 | > 3 | export default (function log() {} as typeof console.log) | ^ - 4 |" + 4 | +Cause: Unexpected token, expected "," (3:34)" `; exports[`export_default_as.js format 1`] = ` @@ -281,7 +285,8 @@ exports[`long-identifiers.js [babel-flow] format 1`] = ` | ^ 12 | }; 13 | - 14 | averredBathersBoxroomBuggyNurl(" + 14 | averredBathersBoxroomBuggyNurl( +Cause: Unexpected token, expected "," (11:36)" `; exports[`long-identifiers.js format 1`] = ` @@ -337,7 +342,8 @@ exports[`nested-await-and-as.js [babel-flow] format 1`] = ` | ^ 8 | ).getChildren() 9 | ).length - 10 |" + 10 | +Cause: Unexpected token, expected "," (7:32)" `; exports[`nested-await-and-as.js format 1`] = ` @@ -378,7 +384,8 @@ exports[`return.js [babel-flow] format 1`] = ` > 7 | } as Foo; | ^ 8 | } - 9 |" + 9 | +Cause: Missing semicolon. (7:3)" `; exports[`return.js format 1`] = ` @@ -417,7 +424,8 @@ exports[`satisfies.js [babel-flow] format 1`] = ` | ^ 33 | 34 | abc satisfies mixed; // not a keyword - 35 | }" + 35 | } +Cause: Unexpected token, expected "type" (32:7)" `; exports[`satisfies.js format 1`] = ` @@ -520,7 +528,8 @@ exports[`ternary.js [babel-flow] format 1`] = ` | ^ 29 | } 30 | - 31 | bifornCringerMoshedPerplexSawder =" + 31 | bifornCringerMoshedPerplexSawder = +Cause: Unexpected token, expected "," (28:31)" `; exports[`ternary.js format 1`] = ` diff --git a/tests/format/flow/await/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/await/__snapshots__/jsfmt.spec.js.snap index 7ebbdbd89..78a1b8c12 100644 --- a/tests/format/flow/await/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/await/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`await-keywords.js [babel-flow] format 1`] = ` | ^ 13 | } 14 | - 15 | function foo(promise) { await (promise); }" + 15 | function foo(promise) { await (promise); } +Cause: 'await' is only allowed within async functions and at the top levels of modules. (12:6)" `; exports[`await-keywords.js format 1`] = ` diff --git a/tests/format/flow/conditional-types-comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/conditional-types-comments/__snapshots__/jsfmt.spec.js.snap index 758dac9bd..1b4b0a863 100644 --- a/tests/format/flow/conditional-types-comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/conditional-types-comments/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`comments.js [babel-flow] format 1`] = ` | ^ 4 | ? // comment 5 | foo - 6 | : bar;" + 6 | : bar; +Cause: Unexpected token (3:11)" `; exports[`comments.js format 1`] = ` diff --git a/tests/format/flow/conditional-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/conditional-types/__snapshots__/jsfmt.spec.js.snap index d526f2d96..bd8afd97a 100644 --- a/tests/format/flow/conditional-types/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/conditional-types/__snapshots__/jsfmt.spec.js.snap @@ -4,7 +4,8 @@ exports[`comments-in-type-annotation.js [babel-flow] format 1`] = ` "Unexpected token (1:24) > 1 | type A = () => infer R extends/* comment */ string | ^ - 2 |" + 2 | +Cause: Unexpected token (1:23)" `; exports[`comments-in-type-annotation.js format 1`] = ` @@ -29,7 +30,8 @@ exports[`conditional-types.js [babel-flow] format 1`] = ` | ^ 4 | 5 | interface DeepReadonlyArray extends ReadonlyArray> {} - 6 |" + 6 | +Cause: Unexpected token (3:32)" `; exports[`conditional-types.js format 1`] = ` @@ -110,7 +112,8 @@ exports[`cursor.js [babel-flow] format 1`] = ` "Unexpected token (1:24) > 1 | type A = () => infer R extends string | ^ - 2 |" + 2 | +Cause: Unexpected token (1:23)" `; exports[`cursor.js format 1`] = ` @@ -136,7 +139,8 @@ exports[`infer-type.js [babel-flow] format 1`] = ` | ^ 4 | 5 | type Unpacked = - 6 | T extends (infer U)[] ? U :" + 6 | T extends (infer U)[] ? U : +Cause: Unexpected token, expected "," (3:22)" `; exports[`infer-type.js format 1`] = ` @@ -183,7 +187,8 @@ exports[`nested-in-condition.js [babel-flow] format 1`] = ` | ^ 5 | DoubleGobbledygookProvider 6 | ? UniqueDalgametreService - 7 | : CompositeZamazingoResolver;" + 7 | : CompositeZamazingoResolver; +Cause: Unexpected token, expected ")" (4:25)" `; exports[`nested-in-condition.js format 1`] = ` @@ -254,7 +259,8 @@ exports[`new-ternary-spec.js [babel-flow] format 1`] = ` | ^ 6 | : T extends number ? "number" 7 | : T extends boolean ? "boolean" - 8 | : T extends undefined ? "undefined"" + 8 | : T extends undefined ? "undefined" +Cause: Unexpected token (5:4)" `; exports[`new-ternary-spec.js format 1`] = ` @@ -314,7 +320,8 @@ exports[`parentheses.js [babel-flow] format 1`] = ` 3 | // #13275 > 4 | type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never; | ^ - 5 |" + 5 | +Cause: Unexpected token (4:16)" `; exports[`parentheses.js format 1`] = ` diff --git a/tests/format/flow/declare-variable/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/declare-variable/__snapshots__/jsfmt.spec.js.snap index c6e2ebad2..732d8d816 100644 --- a/tests/format/flow/declare-variable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/declare-variable/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`decare.js [babel-flow] format 1`] = ` | ^ 3 | declare const c: string; 4 | declare export var a: string; - 5 | declare export let b: string;" + 5 | declare export let b: string; +Cause: Unexpected token (2:8)" `; exports[`decare.js format 1`] = ` diff --git a/tests/format/flow/function-type-param/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/function-type-param/__snapshots__/jsfmt.spec.js.snap index d6d305000..b45a03d60 100644 --- a/tests/format/flow/function-type-param/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/function-type-param/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`extends-bound.js [babel-flow] format 1`] = ` 2 | > 3 | type F = (t: T) => T; | ^ - 4 |" + 4 | +Cause: Unexpected token, expected "," (3:12)" `; exports[`extends-bound.js format 1`] = ` diff --git a/tests/format/flow/jsx/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/jsx/__snapshots__/jsfmt.spec.js.snap index cc5a54f16..9c7d58450 100644 --- a/tests/format/flow/jsx/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/jsx/__snapshots__/jsfmt.spec.js.snap @@ -20,7 +20,8 @@ exports[`generic-component.js [babel-flow] format 1`] = ` | ^ 2 | 3 | const c2 = /> - 4 |" + 4 | +Cause: Unexpected token (1:23)" `; exports[`generic-component.js format 1`] = ` diff --git a/tests/format/flow/mapped-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/mapped-types/__snapshots__/jsfmt.spec.js.snap index aedba5a0d..24238bd30 100644 --- a/tests/format/flow/mapped-types/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/mapped-types/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`comments.js [babel-flow] format 1`] = ` | ^ 4 | }; 5 | - 6 | type Type = {" + 6 | type Type = { +Cause: Unexpected token, expected "]" (3:6)" `; exports[`comments.js [babel-ts] format 1`] = ` @@ -19,7 +20,8 @@ exports[`comments.js [babel-ts] format 1`] = ` | ^ 4 | }; 5 | - 6 | type Type = {" + 6 | type Type = { +Cause: Unexpected token (3:2)" `; exports[`comments.js [typescript] format 1`] = ` @@ -30,7 +32,8 @@ exports[`comments.js [typescript] format 1`] = ` | ^ 4 | }; 5 | - 6 | type Type = {" + 6 | type Type = { +Cause: Property or signature expected." `; exports[`comments.js format 1`] = ` @@ -132,7 +135,8 @@ exports[`mapped-types.js [babel-flow] format 1`] = ` | ^ 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number}; 5 | type MappedWithVariance = {+[key in keyof O]: number}; - 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};" + 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number}; +Cause: Unexpected token, expected "]" (3:20)" `; exports[`mapped-types.js [babel-ts] format 1`] = ` @@ -143,7 +147,8 @@ exports[`mapped-types.js [babel-ts] format 1`] = ` | ^ 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number}; 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number}; - 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};" + 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number}; +Cause: Unexpected token (5:27)" `; exports[`mapped-types.js [typescript] format 1`] = ` @@ -154,7 +159,8 @@ exports[`mapped-types.js [typescript] format 1`] = ` | ^ 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number}; 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number}; - 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};" + 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number}; +Cause: Property or signature expected." `; exports[`mapped-types.js format 1`] = ` @@ -221,7 +227,8 @@ exports[`ts-compatibility.js [babel-flow] format 1`] = ` | ^ 4 | type Test = {[key in keyof T]: number}; 5 | type Test = {[otherKeyName in keyof T]: number}; - 6 | type Test = {[key in T]:number};" + 6 | type Test = {[key in T]:number}; +Cause: Unexpected token, expected "]" (3:18)" `; exports[`ts-compatibility.js format 1`] = ` diff --git a/tests/format/flow/tuples/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/tuples/__snapshots__/jsfmt.spec.js.snap index fdd4a6b6f..62044fded 100644 --- a/tests/format/flow/tuples/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/flow/tuples/__snapshots__/jsfmt.spec.js.snap @@ -4,7 +4,8 @@ exports[`labeled.js [babel-flow] format 1`] = ` "Unexpected token, expected "," (1:12) > 1 | type T = [a: string, b: number]; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "," (1:11)" `; exports[`labeled.js format 1`] = ` @@ -27,7 +28,8 @@ exports[`optional.js [babel-flow] format 1`] = ` | ^ 2 | 3 | // Unaffected - 4 | type B = [?string, [?string], (?string) => boolean];" + 4 | type B = [?string, [?string], (?string) => boolean]; +Cause: Unexpected token, expected "," (1:11)" `; exports[`optional.js format 1`] = ` @@ -54,7 +56,8 @@ exports[`variance.js [babel-flow] format 1`] = ` "Unexpected token, expected "," (1:12) > 1 | type T = [a: string, +b: number, -c: boolean]; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "," (1:11)" `; exports[`variance.js format 1`] = ` diff --git a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap index 105bc69dd..8e45ff4bd 100644 --- a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap @@ -1012,7 +1012,8 @@ exports[`tuple-and-record.js [acorn] format 1`] = ` | ^ 8 | #[1,2], 9 | ] - 10 |" + 10 | +Cause: Unexpected character '[' (7:3)" `; exports[`tuple-and-record.js [espree] format 1`] = ` @@ -1023,7 +1024,8 @@ exports[`tuple-and-record.js [espree] format 1`] = ` | ^ 8 | #[1,2], 9 | ] - 10 |" + 10 | +Cause: Unexpected character '['" `; exports[`tuple-and-record.js [flow] format 1`] = ` @@ -1045,7 +1047,8 @@ exports[`tuple-and-record.js [meriyah] format 1`] = ` | ^ 8 | #[1,2], 9 | ] - 10 |" + 10 | +Cause: [7:3]: '#' not followed by identifier" `; exports[`tuple-and-record.js [typescript] format 1`] = ` @@ -1056,7 +1059,8 @@ exports[`tuple-and-record.js [typescript] format 1`] = ` | ^ 8 | #[1,2], 9 | ] - 10 |" + 10 | +Cause: Invalid character." `; exports[`tuple-and-record.js format 1`] = ` diff --git a/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap index 417e406e8..cc9b2c69d 100644 --- a/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/arrows-bind/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`arrows-bind.js [acorn] format 1`] = ` | ^ 2 | (a => b)::c; 3 | a::(b => c); - 4 |" + 4 | +Cause: Unexpected token (1:8)" `; exports[`arrows-bind.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`arrows-bind.js [espree] format 1`] = ` | ^ 2 | (a => b)::c; 3 | a::(b => c); - 4 |" + 4 | +Cause: Unexpected token :" `; exports[`arrows-bind.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`arrows-bind.js [meriyah] format 1`] = ` | ^ 2 | (a => b)::c; 3 | a::(b => c); - 4 |" + 4 | +Cause: [1:9]: Expected ')'" `; exports[`arrows-bind.js format 1`] = ` diff --git a/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap index 929639741..b86819a05 100644 --- a/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/arrows/__snapshots__/jsfmt.spec.js.snap @@ -4548,7 +4548,8 @@ exports[`tuple-and-record.js - {"arrowParens":"always"} [acorn] format 1`] = ` | ^ 5 | (#{ foo: bar, bar: baz, baz: foo }); 6 | - 7 | map(() => ([" + 7 | map(() => ([ +Cause: Identifier 'fn12' has already been declared (4:6)" `; exports[`tuple-and-record.js - {"arrowParens":"always"} [espree] format 1`] = ` @@ -4559,7 +4560,8 @@ exports[`tuple-and-record.js - {"arrowParens":"always"} [espree] format 1`] = ` | ^ 5 | (#{ foo: bar, bar: baz, baz: foo }); 6 | - 7 | map(() => ([" + 7 | map(() => ([ +Cause: Identifier 'fn12' has already been declared" `; exports[`tuple-and-record.js - {"arrowParens":"always"} [meriyah] format 1`] = ` @@ -4570,7 +4572,8 @@ exports[`tuple-and-record.js - {"arrowParens":"always"} [meriyah] format 1`] = ` | ^ 6 | 7 | map(() => ([ - 8 | // comment" + 8 | // comment +Cause: [5:4]: '#' not followed by identifier" `; exports[`tuple-and-record.js - {"arrowParens":"always"} [typescript] format 1`] = ` @@ -4581,7 +4584,8 @@ exports[`tuple-and-record.js - {"arrowParens":"always"} [typescript] format 1`] | ^ 6 | 7 | map(() => ([ - 8 | // comment" + 8 | // comment +Cause: Invalid character." `; exports[`tuple-and-record.js - {"arrowParens":"always"} format 1`] = ` @@ -4661,7 +4665,8 @@ exports[`tuple-and-record.js - {"arrowParens":"avoid"} [acorn] format 1`] = ` | ^ 5 | (#{ foo: bar, bar: baz, baz: foo }); 6 | - 7 | map(() => ([" + 7 | map(() => ([ +Cause: Identifier 'fn12' has already been declared (4:6)" `; exports[`tuple-and-record.js - {"arrowParens":"avoid"} [espree] format 1`] = ` @@ -4672,7 +4677,8 @@ exports[`tuple-and-record.js - {"arrowParens":"avoid"} [espree] format 1`] = ` | ^ 5 | (#{ foo: bar, bar: baz, baz: foo }); 6 | - 7 | map(() => ([" + 7 | map(() => ([ +Cause: Identifier 'fn12' has already been declared" `; exports[`tuple-and-record.js - {"arrowParens":"avoid"} [meriyah] format 1`] = ` @@ -4683,7 +4689,8 @@ exports[`tuple-and-record.js - {"arrowParens":"avoid"} [meriyah] format 1`] = ` | ^ 6 | 7 | map(() => ([ - 8 | // comment" + 8 | // comment +Cause: [5:4]: '#' not followed by identifier" `; exports[`tuple-and-record.js - {"arrowParens":"avoid"} [typescript] format 1`] = ` @@ -4694,7 +4701,8 @@ exports[`tuple-and-record.js - {"arrowParens":"avoid"} [typescript] format 1`] = | ^ 6 | 7 | map(() => ([ - 8 | // comment" + 8 | // comment +Cause: Invalid character." `; exports[`tuple-and-record.js - {"arrowParens":"avoid"} format 1`] = ` diff --git a/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap index 8a8713a20..66010df20 100644 --- a/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/arrows/newline-before-arrow/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,8 @@ exports[`newline-before-arrow.js [acorn] format 1`] = ` 1 | async x > 2 | => x | ^ - 3 |" + 3 | +Cause: Unexpected token (2:0)" `; exports[`newline-before-arrow.js [espree] format 1`] = ` @@ -13,7 +14,8 @@ exports[`newline-before-arrow.js [espree] format 1`] = ` 1 | async x > 2 | => x | ^ - 3 |" + 3 | +Cause: Unexpected token =>" `; exports[`newline-before-arrow.js [meriyah] format 1`] = ` @@ -21,7 +23,8 @@ exports[`newline-before-arrow.js [meriyah] format 1`] = ` 1 | async x > 2 | => x | ^ - 3 |" + 3 | +Cause: [2:2]: No line break is allowed after '=>'" `; exports[`newline-before-arrow.js format 1`] = ` diff --git a/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap index 9930e719b..ed2082d0e 100644 --- a/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/async-do-expressions/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`async-do-expressions.js [acorn] format 1`] = ` | ^ 2 | 1; 3 | }; - 4 |" + 4 | +Cause: Unexpected token (1:6)" `; exports[`async-do-expressions.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`async-do-expressions.js [espree] format 1`] = ` | ^ 2 | 1; 3 | }; - 4 |" + 4 | +Cause: Unexpected token do" `; exports[`async-do-expressions.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`async-do-expressions.js [meriyah] format 1`] = ` | ^ 2 | 1; 3 | }; - 4 |" + 4 | +Cause: [1:8]: Unexpected token: 'do'" `; exports[`async-do-expressions.js format 1`] = ` diff --git a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap index 2170d484e..cb1691d50 100644 --- a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`async-do-expressions.js [acorn] format 1`] = ` "Unexpected token (1:7) > 1 | async do { await requestAPI().json() }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:6)" `; exports[`async-do-expressions.js [espree] format 1`] = ` "Unexpected token do (1:7) > 1 | async do { await requestAPI().json() }; | ^ - 2 |" + 2 | +Cause: Unexpected token do" `; exports[`async-do-expressions.js [meriyah] format 1`] = ` "Unexpected token: 'do' (1:8) > 1 | async do { await requestAPI().json() }; | ^ - 2 |" + 2 | +Cause: [1:8]: Unexpected token: 'do'" `; exports[`async-do-expressions.js format 1`] = ` @@ -435,7 +438,8 @@ exports[`decimal.js [acorn] format 1`] = ` | ^ 4 | 9223372036854775807m; 5 | 0.m; - 6 | 3.1415926535897932m;" + 6 | 3.1415926535897932m; +Cause: Identifier directly after number (3:3)" `; exports[`decimal.js [espree] format 1`] = ` @@ -446,7 +450,8 @@ exports[`decimal.js [espree] format 1`] = ` | ^ 4 | 9223372036854775807m; 5 | 0.m; - 6 | 3.1415926535897932m;" + 6 | 3.1415926535897932m; +Cause: Identifier directly after number" `; exports[`decimal.js [meriyah] format 1`] = ` @@ -457,7 +462,8 @@ exports[`decimal.js [meriyah] format 1`] = ` | ^ 4 | 9223372036854775807m; 5 | 0.m; - 6 | 3.1415926535897932m;" + 6 | 3.1415926535897932m; +Cause: [3:3]: No identifiers allowed directly after numeric literal" `; exports[`decimal.js format 1`] = ` @@ -529,7 +535,8 @@ exports[`decorator-auto-accessors.js [acorn] format 1`] = ` > 2 | accessor clicked = false; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`decorator-auto-accessors.js [espree] format 1`] = ` @@ -538,7 +545,8 @@ exports[`decorator-auto-accessors.js [espree] format 1`] = ` > 2 | accessor clicked = false; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token clicked" `; exports[`decorator-auto-accessors.js format 1`] = ` @@ -567,7 +575,8 @@ exports[`decorators.js [acorn] format 1`] = ` | ^ 4 | class MyClass { } 5 | - 6 | function annotation(target) {" + 6 | function annotation(target) { +Cause: Unexpected character '@' (3:0)" `; exports[`decorators.js [espree] format 1`] = ` @@ -578,7 +587,8 @@ exports[`decorators.js [espree] format 1`] = ` | ^ 4 | class MyClass { } 5 | - 6 | function annotation(target) {" + 6 | function annotation(target) { +Cause: Unexpected character '@'" `; exports[`decorators.js format 1`] = ` @@ -655,21 +665,24 @@ exports[`deferred-import-evaluation.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import defer * as ns from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`deferred-import-evaluation.js [espree] format 1`] = ` "Unexpected token * (1:14) > 1 | import defer * as ns from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token *" `; exports[`deferred-import-evaluation.js [meriyah] format 1`] = ` "Import source must be string (1:14) > 1 | import defer * as ns from "x"; | ^ - 2 |" + 2 | +Cause: [1:14]: Import source must be string" `; exports[`deferred-import-evaluation.js format 1`] = ` @@ -694,7 +707,8 @@ exports[`destructuring-private.js [acorn] format 1`] = ` | ^ 6 | console.log(x); // => 1 7 | } - 8 | equals({ #x: otherX }) {" + 8 | equals({ #x: otherX }) { +Cause: Unexpected token (5:12)" `; exports[`destructuring-private.js [espree] format 1`] = ` @@ -705,7 +719,8 @@ exports[`destructuring-private.js [espree] format 1`] = ` | ^ 6 | console.log(x); // => 1 7 | } - 8 | equals({ #x: otherX }) {" + 8 | equals({ #x: otherX }) { +Cause: Unexpected token #x" `; exports[`destructuring-private.js [meriyah] format 1`] = ` @@ -716,7 +731,8 @@ exports[`destructuring-private.js [meriyah] format 1`] = ` | ^ 6 | console.log(x); // => 1 7 | } - 8 | equals({ #x: otherX }) {" + 8 | equals({ #x: otherX }) { +Cause: [5:13]: Unexpected token: 'PrivateField'" `; exports[`destructuring-private.js format 1`] = ` @@ -763,7 +779,8 @@ exports[`do-expressions.js [acorn] format 1`] = ` | ^ 4 | if(x > 10) { 5 | 'big'; - 6 | } else {" + 6 | } else { +Cause: Unexpected token (3:8)" `; exports[`do-expressions.js [espree] format 1`] = ` @@ -774,7 +791,8 @@ exports[`do-expressions.js [espree] format 1`] = ` | ^ 4 | if(x > 10) { 5 | 'big'; - 6 | } else {" + 6 | } else { +Cause: Unexpected token do" `; exports[`do-expressions.js [meriyah] format 1`] = ` @@ -785,7 +803,8 @@ exports[`do-expressions.js [meriyah] format 1`] = ` | ^ 4 | if(x > 10) { 5 | 'big'; - 6 | } else {" + 6 | } else { +Cause: [3:10]: Unexpected token: 'do'" `; exports[`do-expressions.js format 1`] = ` @@ -857,7 +876,8 @@ exports[`explicit-resource-management.js [acorn] format 1`] = ` | ^ 3 | } // cleanup 4 | - 5 | {" + 5 | { +Cause: Unexpected token (2:8)" `; exports[`explicit-resource-management.js [espree] format 1`] = ` @@ -867,7 +887,8 @@ exports[`explicit-resource-management.js [espree] format 1`] = ` | ^ 3 | } // cleanup 4 | - 5 | {" + 5 | { +Cause: Unexpected token handle" `; exports[`explicit-resource-management.js [meriyah] format 1`] = ` @@ -877,7 +898,8 @@ exports[`explicit-resource-management.js [meriyah] format 1`] = ` | ^ 3 | } // cleanup 4 | - 5 | {" + 5 | { +Cause: [2:14]: Unexpected token: 'identifier'" `; exports[`explicit-resource-management.js format 1`] = ` @@ -922,7 +944,8 @@ exports[`export-default-from.js [acorn] format 1`] = ` 3 | > 4 | export v from 'mod'; | ^ - 5 |" + 5 | +Cause: Unexpected token (4:7)" `; exports[`export-default-from.js [espree] format 1`] = ` @@ -931,7 +954,8 @@ exports[`export-default-from.js [espree] format 1`] = ` 3 | > 4 | export v from 'mod'; | ^ - 5 |" + 5 | +Cause: Unexpected token v" `; exports[`export-default-from.js [meriyah] format 1`] = ` @@ -940,7 +964,8 @@ exports[`export-default-from.js [meriyah] format 1`] = ` 3 | > 4 | export v from 'mod'; | ^ - 5 |" + 5 | +Cause: [4:8]: Unexpected token: 'identifier'" `; exports[`export-default-from.js format 1`] = ` @@ -986,7 +1011,8 @@ exports[`flow.js [__babel_estree] format 1`] = ` 2 | > 3 | function foo(one: any, two: number, three?): string {} | ^ - 4 |" + 4 | +Cause: Unexpected token, expected "," (3:16)" `; exports[`flow.js [acorn] format 1`] = ` @@ -995,7 +1021,8 @@ exports[`flow.js [acorn] format 1`] = ` 2 | > 3 | function foo(one: any, two: number, three?): string {} | ^ - 4 |" + 4 | +Cause: Unexpected token (3:16)" `; exports[`flow.js [babel] format 1`] = ` @@ -1004,7 +1031,8 @@ exports[`flow.js [babel] format 1`] = ` 2 | > 3 | function foo(one: any, two: number, three?): string {} | ^ - 4 |" + 4 | +Cause: Unexpected token, expected "," (3:16)" `; exports[`flow.js [babel-flow] format 1`] = ` @@ -1049,7 +1077,8 @@ exports[`flow.js [espree] format 1`] = ` 2 | > 3 | function foo(one: any, two: number, three?): string {} | ^ - 4 |" + 4 | +Cause: Unexpected token :" `; exports[`flow.js [meriyah] format 1`] = ` @@ -1058,7 +1087,8 @@ exports[`flow.js [meriyah] format 1`] = ` 2 | > 3 | function foo(one: any, two: number, three?): string {} | ^ - 4 |" + 4 | +Cause: [3:17]: Expected ')'" `; exports[`function-bind.js [acorn] format 1`] = ` @@ -1069,7 +1099,8 @@ exports[`function-bind.js [acorn] format 1`] = ` | ^ 4 | // is equivalent to: 5 | func.bind(obj) - 6 |" + 6 | +Cause: Unexpected token (3:4)" `; exports[`function-bind.js [espree] format 1`] = ` @@ -1080,7 +1111,8 @@ exports[`function-bind.js [espree] format 1`] = ` | ^ 4 | // is equivalent to: 5 | func.bind(obj) - 6 |" + 6 | +Cause: Unexpected token :" `; exports[`function-bind.js [meriyah] format 1`] = ` @@ -1091,7 +1123,8 @@ exports[`function-bind.js [meriyah] format 1`] = ` | ^ 4 | // is equivalent to: 5 | func.bind(obj) - 6 |" + 6 | +Cause: [3:5]: Unexpected token: ':'" `; exports[`function-bind.js format 1`] = ` @@ -1147,7 +1180,8 @@ exports[`function-sent.js [acorn] format 1`] = ` | ^ 5 | console.log("Yield", yield); 6 | } - 7 |" + 7 | +Cause: Unexpected token (4:32)" `; exports[`function-sent.js [espree] format 1`] = ` @@ -1158,7 +1192,8 @@ exports[`function-sent.js [espree] format 1`] = ` | ^ 5 | console.log("Yield", yield); 6 | } - 7 |" + 7 | +Cause: Unexpected token ." `; exports[`function-sent.js [meriyah] format 1`] = ` @@ -1169,7 +1204,8 @@ exports[`function-sent.js [meriyah] format 1`] = ` | ^ 5 | console.log("Yield", yield); 6 | } - 7 |" + 7 | +Cause: [4:33]: Expected '('" `; exports[`function-sent.js format 1`] = ` @@ -1208,21 +1244,24 @@ exports[`import-assertions-dynamic.js [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`import-assertions-dynamic.js [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`import-assertions-dynamic.js [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`import-assertions-dynamic.js format 1`] = ` @@ -1243,21 +1282,24 @@ exports[`import-assertions-static.js [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`import-assertions-static.js [espree] format 1`] = ` "Unexpected token assert (1:31) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`import-assertions-static.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:36]: Unexpected token: 'identifier'" `; exports[`import-assertions-static.js format 1`] = ` @@ -1278,21 +1320,24 @@ exports[`import-attributes-dynamic.js [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`import-attributes-dynamic.js [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`import-attributes-dynamic.js [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`import-attributes-dynamic.js format 1`] = ` @@ -1313,21 +1358,24 @@ exports[`import-attributes-static.js [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`import-attributes-static.js [espree] format 1`] = ` "Unexpected token with (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`import-attributes-static.js [meriyah] format 1`] = ` "Unexpected token: 'with' (1:34) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:34]: Unexpected token: 'with'" `; exports[`import-attributes-static.js format 1`] = ` @@ -1396,21 +1444,24 @@ exports[`import-reflection.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`import-reflection.js [espree] format 1`] = ` "Unexpected token foo (1:15) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token foo" `; exports[`import-reflection.js [meriyah] format 1`] = ` "Import source must be string (1:17) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: [1:17]: Import source must be string" `; exports[`import-reflection.js format 1`] = ` @@ -1485,7 +1536,8 @@ exports[`module-blocks.js [acorn] format 1`] = ` | ^ 2 | export let m = 2; 3 | export let n = 3; - 4 | };" + 4 | }; +Cause: Unexpected token (1:15)" `; exports[`module-blocks.js [espree] format 1`] = ` @@ -1494,7 +1546,8 @@ exports[`module-blocks.js [espree] format 1`] = ` | ^ 2 | export let m = 2; 3 | export let n = 3; - 4 | };" + 4 | }; +Cause: Unexpected token {" `; exports[`module-blocks.js [meriyah] format 1`] = ` @@ -1503,7 +1556,8 @@ exports[`module-blocks.js [meriyah] format 1`] = ` | ^ 2 | export let m = 2; 3 | export let n = 3; - 4 | };" + 4 | }; +Cause: [1:16]: Unexpected token: '{'" `; exports[`module-blocks.js format 1`] = ` @@ -1531,7 +1585,8 @@ exports[`module-string-names.js [meriyah] format 1`] = ` > 1 | import { "😄" as smile } from "./emojis.js"; | ^ 2 | export { smile as "😄" } from "./emojis.js"; - 3 |" + 3 | +Cause: [1:13]: Expected '}'" `; exports[`module-string-names.js format 1`] = ` @@ -1863,21 +1918,24 @@ exports[`optional-chaining-assignment.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | maybeAnObj?.prop = theValue; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" `; exports[`optional-chaining-assignment.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | maybeAnObj?.prop = theValue; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`optional-chaining-assignment.js [meriyah] format 1`] = ` "Invalid left-hand side in assignment (1:18) > 1 | maybeAnObj?.prop = theValue; | ^ - 2 |" + 2 | +Cause: [1:18]: Invalid left-hand side in assignment" `; exports[`optional-chaining-assignment.js format 1`] = ` @@ -1902,7 +1960,8 @@ exports[`partial-application.js [acorn] format 1`] = ` | ^ 6 | addOne(2); // 3 7 | - 8 | const addTen = add(?, 10); // apply from the right" + 8 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token (5:22)" `; exports[`partial-application.js [espree] format 1`] = ` @@ -1913,7 +1972,8 @@ exports[`partial-application.js [espree] format 1`] = ` | ^ 6 | addOne(2); // 3 7 | - 8 | const addTen = add(?, 10); // apply from the right" + 8 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token ?" `; exports[`partial-application.js [meriyah] format 1`] = ` @@ -1924,7 +1984,8 @@ exports[`partial-application.js [meriyah] format 1`] = ` | ^ 6 | addOne(2); // 3 7 | - 8 | const addTen = add(?, 10); // apply from the right" + 8 | const addTen = add(?, 10); // apply from the right +Cause: [5:23]: Unexpected token: '?'" `; exports[`partial-application.js format 1`] = ` @@ -1989,7 +2050,8 @@ exports[`pipeline-operator-fsharp.js [acorn] format 1`] = ` | ^ 6 | |> x => doubleSay(x, ', ') 7 | |> capitalize - 8 | |> x => x + '!'" + 8 | |> x => x + '!' +Cause: Unexpected token (5:3)" `; exports[`pipeline-operator-fsharp.js [espree] format 1`] = ` @@ -2000,7 +2062,8 @@ exports[`pipeline-operator-fsharp.js [espree] format 1`] = ` | ^ 6 | |> x => doubleSay(x, ', ') 7 | |> capitalize - 8 | |> x => x + '!'" + 8 | |> x => x + '!' +Cause: Unexpected token >" `; exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = ` @@ -2011,7 +2074,8 @@ exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = ` | ^ 6 | |> x => doubleSay(x, ', ') 7 | |> capitalize - 8 | |> x => x + '!'" + 8 | |> x => x + '!' +Cause: [5:4]: Unexpected token: '>'" `; exports[`pipeline-operator-fsharp.js format 1`] = ` @@ -2097,7 +2161,8 @@ exports[`pipeline-operator-hack.js [acorn] format 1`] = ` | ^ 6 | |> equals(%, prefix); 7 | - 8 | // (The % token isn't final; it might instead be @ or ? or #.)" + 8 | // (The % token isn't final; it might instead be @ or ? or #.) +Cause: Unexpected token (5:2)" `; exports[`pipeline-operator-hack.js [espree] format 1`] = ` @@ -2108,7 +2173,8 @@ exports[`pipeline-operator-hack.js [espree] format 1`] = ` | ^ 6 | |> equals(%, prefix); 7 | - 8 | // (The % token isn't final; it might instead be @ or ? or #.)" + 8 | // (The % token isn't final; it might instead be @ or ? or #.) +Cause: Unexpected token >" `; exports[`pipeline-operator-hack.js [meriyah] format 1`] = ` @@ -2119,7 +2185,8 @@ exports[`pipeline-operator-hack.js [meriyah] format 1`] = ` | ^ 6 | |> equals(%, prefix); 7 | - 8 | // (The % token isn't final; it might instead be @ or ? or #.)" + 8 | // (The % token isn't final; it might instead be @ or ? or #.) +Cause: [5:3]: Unexpected token: '>'" `; exports[`pipeline-operator-hack.js format 1`] = ` @@ -2156,7 +2223,8 @@ exports[`pipeline-operator-minimal.js [acorn] format 1`] = ` | ^ 8 | |> doubleSay 9 | |> capitalize - 10 | |> exclaim;" + 10 | |> exclaim; +Cause: Identifier 'result' has already been declared (7:4)" `; exports[`pipeline-operator-minimal.js [espree] format 1`] = ` @@ -2167,7 +2235,8 @@ exports[`pipeline-operator-minimal.js [espree] format 1`] = ` | ^ 8 | |> doubleSay 9 | |> capitalize - 10 | |> exclaim;" + 10 | |> exclaim; +Cause: Identifier 'result' has already been declared" `; exports[`pipeline-operator-minimal.js [meriyah] format 1`] = ` @@ -2178,7 +2247,8 @@ exports[`pipeline-operator-minimal.js [meriyah] format 1`] = ` | ^ 9 | |> capitalize 10 | |> exclaim; - 11 |" + 11 | +Cause: [8:4]: Unexpected token: '>'" `; exports[`pipeline-operator-minimal.js format 1`] = ` @@ -2393,7 +2463,8 @@ exports[`record-tuple-record.js [acorn] format 1`] = ` | ^ 2 | a: 1, 3 | b: 2, - 4 | c: 3," + 4 | c: 3, +Cause: Unexpected character '{' (1:17)" `; exports[`record-tuple-record.js [espree] format 1`] = ` @@ -2402,7 +2473,8 @@ exports[`record-tuple-record.js [espree] format 1`] = ` | ^ 2 | a: 1, 3 | b: 2, - 4 | c: 3," + 4 | c: 3, +Cause: Unexpected character '{'" `; exports[`record-tuple-record.js [meriyah] format 1`] = ` @@ -2411,7 +2483,8 @@ exports[`record-tuple-record.js [meriyah] format 1`] = ` | ^ 2 | a: 1, 3 | b: 2, - 4 | c: 3," + 4 | c: 3, +Cause: [1:17]: '#' not followed by identifier" `; exports[`record-tuple-record.js format 1`] = ` @@ -2444,21 +2517,24 @@ exports[`record-tuple-tuple.js [acorn] format 1`] = ` "Unexpected character '[' (1:17) > 1 | const tuple1 = #[1, 2, 3]; | ^ - 2 |" + 2 | +Cause: Unexpected character '[' (1:16)" `; exports[`record-tuple-tuple.js [espree] format 1`] = ` "Unexpected character '[' (1:17) > 1 | const tuple1 = #[1, 2, 3]; | ^ - 2 |" + 2 | +Cause: Unexpected character '['" `; exports[`record-tuple-tuple.js [meriyah] format 1`] = ` "'#' not followed by identifier (1:16) > 1 | const tuple1 = #[1, 2, 3]; | ^ - 2 |" + 2 | +Cause: [1:16]: '#' not followed by identifier" `; exports[`record-tuple-tuple.js format 1`] = ` @@ -2479,7 +2555,8 @@ exports[`regex-v-flag.js [meriyah] format 1`] = ` "Unexpected regular expression flag (1:3) > 1 | /a/v; | ^ - 2 |" + 2 | +Cause: [1:3]: Unexpected regular expression flag" `; exports[`regex-v-flag.js format 1`] = ` @@ -2500,21 +2577,24 @@ exports[`regexp-modifiers.js [acorn] format 1`] = ` "Invalid regular expression: /^(?i:[a-z])[a-z]$/: Invalid group (1:13) > 1 | const re = /^(?i:[a-z])[a-z]$/; | ^ - 2 |" + 2 | +Cause: Invalid regular expression: /^(?i:[a-z])[a-z]$/: Invalid group (1:12)" `; exports[`regexp-modifiers.js [espree] format 1`] = ` "Invalid regular expression: /^(?i:[a-z])[a-z]$/: Invalid group (1:13) > 1 | const re = /^(?i:[a-z])[a-z]$/; | ^ - 2 |" + 2 | +Cause: Invalid regular expression: /^(?i:[a-z])[a-z]$/: Invalid group" `; exports[`regexp-modifiers.js [meriyah] format 1`] = ` "Unterminated regular expression (1:30) > 1 | const re = /^(?i:[a-z])[a-z]$/; | ^ - 2 |" + 2 | +Cause: [1:30]: Unterminated regular expression" `; exports[`regexp-modifiers.js format 1`] = ` @@ -2536,7 +2616,8 @@ exports[`source-phase-imports.js [acorn] format 1`] = ` > 1 | import source fooSource from "foo"; | ^ 2 | import.source("x"); - 3 |" + 3 | +Cause: Unexpected token (1:14)" `; exports[`source-phase-imports.js [espree] format 1`] = ` @@ -2544,7 +2625,8 @@ exports[`source-phase-imports.js [espree] format 1`] = ` > 1 | import source fooSource from "foo"; | ^ 2 | import.source("x"); - 3 |" + 3 | +Cause: Unexpected token fooSource" `; exports[`source-phase-imports.js [meriyah] format 1`] = ` @@ -2552,7 +2634,8 @@ exports[`source-phase-imports.js [meriyah] format 1`] = ` > 1 | import source fooSource from "foo"; | ^ 2 | import.source("x"); - 3 |" + 3 | +Cause: [1:23]: Import source must be string" `; exports[`source-phase-imports.js format 1`] = ` @@ -2579,7 +2662,8 @@ exports[`throw-expressions.js [acorn] format 1`] = ` | ^ 4 | const test = param === true || throw new Error('Falsy!'); 5 | } - 6 |" + 6 | +Cause: Unexpected token (3:22)" `; exports[`throw-expressions.js [espree] format 1`] = ` @@ -2590,7 +2674,8 @@ exports[`throw-expressions.js [espree] format 1`] = ` | ^ 4 | const test = param === true || throw new Error('Falsy!'); 5 | } - 6 |" + 6 | +Cause: Unexpected token throw" `; exports[`throw-expressions.js [meriyah] format 1`] = ` @@ -2601,7 +2686,8 @@ exports[`throw-expressions.js [meriyah] format 1`] = ` | ^ 4 | const test = param === true || throw new Error('Falsy!'); 5 | } - 6 |" + 6 | +Cause: [3:27]: Unexpected token: 'throw'" `; exports[`throw-expressions.js format 1`] = ` @@ -2632,7 +2718,8 @@ exports[`typescript.js [__babel_estree] format 1`] = ` 2 | > 3 | const x: number = 0; | ^ - 4 |" + 4 | +Cause: Unexpected token (3:7)" `; exports[`typescript.js [acorn] format 1`] = ` @@ -2641,7 +2728,8 @@ exports[`typescript.js [acorn] format 1`] = ` 2 | > 3 | const x: number = 0; | ^ - 4 |" + 4 | +Cause: Unexpected token (3:7)" `; exports[`typescript.js [babel] format 1`] = ` @@ -2650,7 +2738,8 @@ exports[`typescript.js [babel] format 1`] = ` 2 | > 3 | const x: number = 0; | ^ - 4 |" + 4 | +Cause: Unexpected token (3:7)" `; exports[`typescript.js [babel-flow] format 1`] = ` @@ -2695,7 +2784,8 @@ exports[`typescript.js [espree] format 1`] = ` 2 | > 3 | const x: number = 0; | ^ - 4 |" + 4 | +Cause: Unexpected token :" `; exports[`typescript.js [meriyah] format 1`] = ` @@ -2704,7 +2794,8 @@ exports[`typescript.js [meriyah] format 1`] = ` 2 | > 3 | const x: number = 0; | ^ - 4 |" + 4 | +Cause: [3:8]: Missing initializer in const declaration" `; exports[`v8intrinsic.js [acorn] format 1`] = ` @@ -2715,7 +2806,8 @@ exports[`v8intrinsic.js [acorn] format 1`] = ` | ^ 4 | 5 | - 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +Cause: Unexpected token (3:0)" `; exports[`v8intrinsic.js [espree] format 1`] = ` @@ -2726,7 +2818,8 @@ exports[`v8intrinsic.js [espree] format 1`] = ` | ^ 4 | 5 | - 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +Cause: Unexpected token %" `; exports[`v8intrinsic.js [meriyah] format 1`] = ` @@ -2737,7 +2830,8 @@ exports[`v8intrinsic.js [meriyah] format 1`] = ` | ^ 4 | 5 | - 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json" + 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json +Cause: [3:1]: Unexpected token: '%'" `; exports[`v8intrinsic.js format 1`] = ` diff --git a/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap index 04e294c24..ca97eefda 100644 --- a/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/binary-expressions/__snapshots__/jsfmt.spec.js.snap @@ -1159,7 +1159,8 @@ exports[`tuple-and-record.js [acorn] format 1`] = ` | ^ 7 | // comment 8 | a, - 9 | ]" + 9 | ] +Cause: Unexpected character '[' (6:14)" `; exports[`tuple-and-record.js [espree] format 1`] = ` @@ -1170,7 +1171,8 @@ exports[`tuple-and-record.js [espree] format 1`] = ` | ^ 7 | // comment 8 | a, - 9 | ]" + 9 | ] +Cause: Unexpected character '['" `; exports[`tuple-and-record.js [flow] format 1`] = ` @@ -1192,7 +1194,8 @@ exports[`tuple-and-record.js [meriyah] format 1`] = ` | ^ 7 | // comment 8 | a, - 9 | ]" + 9 | ] +Cause: [6:14]: '#' not followed by identifier" `; exports[`tuple-and-record.js [typescript] format 1`] = ` @@ -1203,7 +1206,8 @@ exports[`tuple-and-record.js [typescript] format 1`] = ` | ^ 7 | // comment 8 | a, - 9 | ]" + 9 | ] +Cause: Invalid character." `; exports[`tuple-and-record.js format 1`] = ` diff --git a/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap index 8226a369f..95ffe0f0c 100644 --- a/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/bind-expressions/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`await.js [acorn] format 1`] = ` > 3 | return (await request)::doSyncThing(); | ^ 4 | }; - 5 |" + 5 | +Cause: Unexpected token (3:26)" `; exports[`await.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`await.js [espree] format 1`] = ` > 3 | return (await request)::doSyncThing(); | ^ 4 | }; - 5 |" + 5 | +Cause: Unexpected token :" `; exports[`await.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`await.js [meriyah] format 1`] = ` > 3 | return (await request)::doSyncThing(); | ^ 4 | }; - 5 |" + 5 | +Cause: [3:27]: Unexpected token: ':'" `; exports[`await.js - {"semi":false} [acorn] format 1`] = ` @@ -37,7 +40,8 @@ exports[`await.js - {"semi":false} [acorn] format 1`] = ` > 3 | return (await request)::doSyncThing(); | ^ 4 | }; - 5 |" + 5 | +Cause: Unexpected token (3:26)" `; exports[`await.js - {"semi":false} [espree] format 1`] = ` @@ -47,7 +51,8 @@ exports[`await.js - {"semi":false} [espree] format 1`] = ` > 3 | return (await request)::doSyncThing(); | ^ 4 | }; - 5 |" + 5 | +Cause: Unexpected token :" `; exports[`await.js - {"semi":false} [meriyah] format 1`] = ` @@ -57,7 +62,8 @@ exports[`await.js - {"semi":false} [meriyah] format 1`] = ` > 3 | return (await request)::doSyncThing(); | ^ 4 | }; - 5 |" + 5 | +Cause: [3:27]: Unexpected token: ':'" `; exports[`await.js - {"semi":false} format 1`] = ` @@ -107,7 +113,8 @@ exports[`bind_parens.js [acorn] format 1`] = ` | ^ 2 | a || (b::c); 3 | ::obj.prop; - 4 | (void 0)::func();" + 4 | (void 0)::func(); +Cause: Unexpected token (1:8)" `; exports[`bind_parens.js [espree] format 1`] = ` @@ -116,7 +123,8 @@ exports[`bind_parens.js [espree] format 1`] = ` | ^ 2 | a || (b::c); 3 | ::obj.prop; - 4 | (void 0)::func();" + 4 | (void 0)::func(); +Cause: Unexpected token :" `; exports[`bind_parens.js [meriyah] format 1`] = ` @@ -125,7 +133,8 @@ exports[`bind_parens.js [meriyah] format 1`] = ` | ^ 2 | a || (b::c); 3 | ::obj.prop; - 4 | (void 0)::func();" + 4 | (void 0)::func(); +Cause: [1:9]: Unexpected token: ':'" `; exports[`bind_parens.js - {"semi":false} [acorn] format 1`] = ` @@ -134,7 +143,8 @@ exports[`bind_parens.js - {"semi":false} [acorn] format 1`] = ` | ^ 2 | a || (b::c); 3 | ::obj.prop; - 4 | (void 0)::func();" + 4 | (void 0)::func(); +Cause: Unexpected token (1:8)" `; exports[`bind_parens.js - {"semi":false} [espree] format 1`] = ` @@ -143,7 +153,8 @@ exports[`bind_parens.js - {"semi":false} [espree] format 1`] = ` | ^ 2 | a || (b::c); 3 | ::obj.prop; - 4 | (void 0)::func();" + 4 | (void 0)::func(); +Cause: Unexpected token :" `; exports[`bind_parens.js - {"semi":false} [meriyah] format 1`] = ` @@ -152,7 +163,8 @@ exports[`bind_parens.js - {"semi":false} [meriyah] format 1`] = ` | ^ 2 | a || (b::c); 3 | ::obj.prop; - 4 | (void 0)::func();" + 4 | (void 0)::func(); +Cause: [1:9]: Unexpected token: ':'" `; exports[`bind_parens.js - {"semi":false} format 1`] = ` @@ -324,7 +336,8 @@ exports[`long_name_method.js [acorn] format 1`] = ` | ^ 4 | } 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token (3:53)" `; exports[`long_name_method.js [espree] format 1`] = ` @@ -335,7 +348,8 @@ exports[`long_name_method.js [espree] format 1`] = ` | ^ 4 | } 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token :" `; exports[`long_name_method.js [meriyah] format 1`] = ` @@ -346,7 +360,8 @@ exports[`long_name_method.js [meriyah] format 1`] = ` | ^ 4 | } 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: [3:54]: Unexpected token: ':'" `; exports[`long_name_method.js - {"semi":false} [acorn] format 1`] = ` @@ -357,7 +372,8 @@ exports[`long_name_method.js - {"semi":false} [acorn] format 1`] = ` | ^ 4 | } 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token (3:53)" `; exports[`long_name_method.js - {"semi":false} [espree] format 1`] = ` @@ -368,7 +384,8 @@ exports[`long_name_method.js - {"semi":false} [espree] format 1`] = ` | ^ 4 | } 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: Unexpected token :" `; exports[`long_name_method.js - {"semi":false} [meriyah] format 1`] = ` @@ -379,7 +396,8 @@ exports[`long_name_method.js - {"semi":false} [meriyah] format 1`] = ` | ^ 4 | } 5 | - 6 | testLongNameMethodAndSomethingElseLallala() {" + 6 | testLongNameMethodAndSomethingElseLallala() { +Cause: [3:54]: Unexpected token: ':'" `; exports[`long_name_method.js - {"semi":false} format 1`] = ` @@ -451,7 +469,8 @@ exports[`method_chain.js [acorn] format 1`] = ` | ^ 11 | ::throttle(() => 12 | interval(10) - 13 | ::take(1)" + 13 | ::take(1) +Cause: Unexpected token (10:8)" `; exports[`method_chain.js [espree] format 1`] = ` @@ -462,7 +481,8 @@ exports[`method_chain.js [espree] format 1`] = ` | ^ 11 | ::throttle(() => 12 | interval(10) - 13 | ::take(1)" + 13 | ::take(1) +Cause: Unexpected token :" `; exports[`method_chain.js [meriyah] format 1`] = ` @@ -473,7 +493,8 @@ exports[`method_chain.js [meriyah] format 1`] = ` | ^ 11 | ::throttle(() => 12 | interval(10) - 13 | ::take(1)" + 13 | ::take(1) +Cause: [10:9]: Unexpected token: ':'" `; exports[`method_chain.js - {"semi":false} [acorn] format 1`] = ` @@ -484,7 +505,8 @@ exports[`method_chain.js - {"semi":false} [acorn] format 1`] = ` | ^ 11 | ::throttle(() => 12 | interval(10) - 13 | ::take(1)" + 13 | ::take(1) +Cause: Unexpected token (10:8)" `; exports[`method_chain.js - {"semi":false} [espree] format 1`] = ` @@ -495,7 +517,8 @@ exports[`method_chain.js - {"semi":false} [espree] format 1`] = ` | ^ 11 | ::throttle(() => 12 | interval(10) - 13 | ::take(1)" + 13 | ::take(1) +Cause: Unexpected token :" `; exports[`method_chain.js - {"semi":false} [meriyah] format 1`] = ` @@ -506,7 +529,8 @@ exports[`method_chain.js - {"semi":false} [meriyah] format 1`] = ` | ^ 11 | ::throttle(() => 12 | interval(10) - 13 | ::take(1)" + 13 | ::take(1) +Cause: [10:9]: Unexpected token: ':'" `; exports[`method_chain.js - {"semi":false} format 1`] = ` @@ -610,7 +634,8 @@ exports[`short_name_method.js [acorn] format 1`] = ` | ^ 4 | } 5 | - 6 | shortMethod() {" + 6 | shortMethod() { +Cause: Unexpected token (3:23)" `; exports[`short_name_method.js [espree] format 1`] = ` @@ -621,7 +646,8 @@ exports[`short_name_method.js [espree] format 1`] = ` | ^ 4 | } 5 | - 6 | shortMethod() {" + 6 | shortMethod() { +Cause: Unexpected token :" `; exports[`short_name_method.js [meriyah] format 1`] = ` @@ -632,7 +658,8 @@ exports[`short_name_method.js [meriyah] format 1`] = ` | ^ 4 | } 5 | - 6 | shortMethod() {" + 6 | shortMethod() { +Cause: [3:24]: Unexpected token: ':'" `; exports[`short_name_method.js - {"semi":false} [acorn] format 1`] = ` @@ -643,7 +670,8 @@ exports[`short_name_method.js - {"semi":false} [acorn] format 1`] = ` | ^ 4 | } 5 | - 6 | shortMethod() {" + 6 | shortMethod() { +Cause: Unexpected token (3:23)" `; exports[`short_name_method.js - {"semi":false} [espree] format 1`] = ` @@ -654,7 +682,8 @@ exports[`short_name_method.js - {"semi":false} [espree] format 1`] = ` | ^ 4 | } 5 | - 6 | shortMethod() {" + 6 | shortMethod() { +Cause: Unexpected token :" `; exports[`short_name_method.js - {"semi":false} [meriyah] format 1`] = ` @@ -665,7 +694,8 @@ exports[`short_name_method.js - {"semi":false} [meriyah] format 1`] = ` | ^ 4 | } 5 | - 6 | shortMethod() {" + 6 | shortMethod() { +Cause: [3:24]: Unexpected token: ':'" `; exports[`short_name_method.js - {"semi":false} format 1`] = ` @@ -733,7 +763,8 @@ exports[`unary.js [acorn] format 1`] = ` | ^ 2 | !(x::y /* foo */); 3 | !(/* foo */ x::y); - 4 | !(" + 4 | !( +Cause: Unexpected token (1:2)" `; exports[`unary.js [espree] format 1`] = ` @@ -742,7 +773,8 @@ exports[`unary.js [espree] format 1`] = ` | ^ 2 | !(x::y /* foo */); 3 | !(/* foo */ x::y); - 4 | !(" + 4 | !( +Cause: Unexpected token :" `; exports[`unary.js [meriyah] format 1`] = ` @@ -751,7 +783,8 @@ exports[`unary.js [meriyah] format 1`] = ` | ^ 2 | !(x::y /* foo */); 3 | !(/* foo */ x::y); - 4 | !(" + 4 | !( +Cause: [1:3]: Unexpected token: ':'" `; exports[`unary.js - {"semi":false} [acorn] format 1`] = ` @@ -760,7 +793,8 @@ exports[`unary.js - {"semi":false} [acorn] format 1`] = ` | ^ 2 | !(x::y /* foo */); 3 | !(/* foo */ x::y); - 4 | !(" + 4 | !( +Cause: Unexpected token (1:2)" `; exports[`unary.js - {"semi":false} [espree] format 1`] = ` @@ -769,7 +803,8 @@ exports[`unary.js - {"semi":false} [espree] format 1`] = ` | ^ 2 | !(x::y /* foo */); 3 | !(/* foo */ x::y); - 4 | !(" + 4 | !( +Cause: Unexpected token :" `; exports[`unary.js - {"semi":false} [meriyah] format 1`] = ` @@ -778,7 +813,8 @@ exports[`unary.js - {"semi":false} [meriyah] format 1`] = ` | ^ 2 | !(x::y /* foo */); 3 | !(/* foo */ x::y); - 4 | !(" + 4 | !( +Cause: [1:3]: Unexpected token: ':'" `; exports[`unary.js - {"semi":false} format 1`] = ` diff --git a/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap index 44dad6613..87b09e4a7 100644 --- a/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`null-arguments-item.js [__babel_estree] format 1`] = ` | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); 3 | foo("a", - 4 | //1" + 4 | //1 +Cause: Unexpected token ','. (1:11)" `; exports[`null-arguments-item.js [acorn] format 1`] = ` @@ -15,7 +16,8 @@ exports[`null-arguments-item.js [acorn] format 1`] = ` | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); 3 | foo("a", - 4 | //1" + 4 | //1 +Cause: Unexpected token (1:10)" `; exports[`null-arguments-item.js [babel] format 1`] = ` @@ -24,7 +26,8 @@ exports[`null-arguments-item.js [babel] format 1`] = ` | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); 3 | foo("a", - 4 | //1" + 4 | //1 +Cause: Unexpected token ','. (1:11)" `; exports[`null-arguments-item.js [espree] format 1`] = ` @@ -33,7 +36,8 @@ exports[`null-arguments-item.js [espree] format 1`] = ` | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); 3 | foo("a", - 4 | //1" + 4 | //1 +Cause: Unexpected token ," `; exports[`null-arguments-item.js [meriyah] format 1`] = ` @@ -42,5 +46,6 @@ exports[`null-arguments-item.js [meriyah] format 1`] = ` | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); 3 | foo("a", - 4 | //1" + 4 | //1 +Cause: [1:11]: Unexpected token: ','" `; diff --git a/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap index afb5366db..99a11b72f 100644 --- a/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap @@ -181,7 +181,8 @@ exports[`tuple-and-record.js [acorn] format 1`] = ` | ^ 3 | 4 | class C extends [] {} - 5 | class D extends #[] {}" + 5 | class D extends #[] {} +Cause: Unexpected character '{' (2:17)" `; exports[`tuple-and-record.js [espree] format 1`] = ` @@ -191,7 +192,8 @@ exports[`tuple-and-record.js [espree] format 1`] = ` | ^ 3 | 4 | class C extends [] {} - 5 | class D extends #[] {}" + 5 | class D extends #[] {} +Cause: Unexpected character '{'" `; exports[`tuple-and-record.js [flow] format 1`] = ` @@ -211,7 +213,8 @@ exports[`tuple-and-record.js [meriyah] format 1`] = ` | ^ 3 | 4 | class C extends [] {} - 5 | class D extends #[] {}" + 5 | class D extends #[] {} +Cause: [2:17]: '#' not followed by identifier" `; exports[`tuple-and-record.js [typescript] format 1`] = ` @@ -221,7 +224,8 @@ exports[`tuple-and-record.js [typescript] format 1`] = ` | ^ 3 | 4 | class C extends [] {} - 5 | class D extends #[] {}" + 5 | class D extends #[] {} +Cause: Invalid character." `; exports[`tuple-and-record.js format 1`] = ` diff --git a/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap index f6184ecb6..3203c0439 100644 --- a/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/classes-private-fields/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`optional-chaining.js [acorn] format 1`] = ` 2 | > 3 | delete obj?.#x.a | ^ - 4 |" + 4 | +Cause: Private field '#x' must be declared in an enclosing class (3:12)" `; exports[`optional-chaining.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`optional-chaining.js [espree] format 1`] = ` 2 | > 3 | delete obj?.#x.a | ^ - 4 |" + 4 | +Cause: Private field '#x' must be declared in an enclosing class" `; exports[`optional-chaining.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`optional-chaining.js [meriyah] format 1`] = ` 2 | > 3 | delete obj?.#x.a | ^ - 4 |" + 4 | +Cause: [3:13]: Dot property must be an identifier" `; exports[`optional-chaining.js - {"semi":false} [acorn] format 1`] = ` @@ -33,7 +36,8 @@ exports[`optional-chaining.js - {"semi":false} [acorn] format 1`] = ` 2 | > 3 | delete obj?.#x.a | ^ - 4 |" + 4 | +Cause: Private field '#x' must be declared in an enclosing class (3:12)" `; exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = ` @@ -42,7 +46,8 @@ exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = ` 2 | > 3 | delete obj?.#x.a | ^ - 4 |" + 4 | +Cause: Private field '#x' must be declared in an enclosing class" `; exports[`optional-chaining.js - {"semi":false} [meriyah] format 1`] = ` @@ -51,7 +56,8 @@ exports[`optional-chaining.js - {"semi":false} [meriyah] format 1`] = ` 2 | > 3 | delete obj?.#x.a | ^ - 4 |" + 4 | +Cause: [3:13]: Dot property must be an identifier" `; exports[`optional-chaining.js - {"semi":false} format 1`] = ` diff --git a/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap index 37af8ce7c..727838b7a 100644 --- a/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`example.js [acorn] format 1`] = ` "super() call outside constructor of a subclass (1:1) > 1 | super(); | ^ - 2 |" + 2 | +Cause: super() call outside constructor of a subclass (1:0)" `; exports[`example.js [espree] format 1`] = ` "'super' keyword outside a method (1:1) > 1 | super(); | ^ - 2 |" + 2 | +Cause: 'super' keyword outside a method" `; exports[`example.js [meriyah] format 1`] = ` "Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6) > 1 | super(); | ^ - 2 |" + 2 | +Cause: [1:6]: Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass" `; exports[`example.js format 1`] = ` diff --git a/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap index 822eae541..f4171f136 100644 --- a/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/comments-pipeline-own-line/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`pipeline_own_line.js [acorn] format 1`] = ` | ^ 5 | } 6 | - 7 | bifornCringerMoshedPerplexSawder(" + 7 | bifornCringerMoshedPerplexSawder( +Cause: Unexpected token (4:2)" `; exports[`pipeline_own_line.js [espree] format 1`] = ` @@ -19,7 +20,8 @@ exports[`pipeline_own_line.js [espree] format 1`] = ` | ^ 5 | } 6 | - 7 | bifornCringerMoshedPerplexSawder(" + 7 | bifornCringerMoshedPerplexSawder( +Cause: Unexpected token >" `; exports[`pipeline_own_line.js [meriyah] format 1`] = ` @@ -30,7 +32,8 @@ exports[`pipeline_own_line.js [meriyah] format 1`] = ` | ^ 5 | } 6 | - 7 | bifornCringerMoshedPerplexSawder(" + 7 | bifornCringerMoshedPerplexSawder( +Cause: [4:3]: Unexpected token: '>'" `; exports[`pipeline_own_line.js format 1`] = ` diff --git a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap index d78900603..8b1c8a8d1 100644 --- a/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/comments/__snapshots__/jsfmt.spec.js.snap @@ -6106,7 +6106,8 @@ exports[`tuple-and-record.js [acorn] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: Unexpected character '{' (7:1)" `; exports[`tuple-and-record.js [espree] format 1`] = ` @@ -6117,7 +6118,8 @@ exports[`tuple-and-record.js [espree] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: Unexpected character '{'" `; exports[`tuple-and-record.js [flow] format 1`] = ` @@ -6139,7 +6141,8 @@ exports[`tuple-and-record.js [meriyah] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: [7:1]: '#' not followed by identifier" `; exports[`tuple-and-record.js [typescript] format 1`] = ` @@ -6150,7 +6153,8 @@ exports[`tuple-and-record.js [typescript] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: Invalid character." `; exports[`tuple-and-record.js - {"semi":false} [acorn] format 1`] = ` @@ -6161,7 +6165,8 @@ exports[`tuple-and-record.js - {"semi":false} [acorn] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: Unexpected character '{' (7:1)" `; exports[`tuple-and-record.js - {"semi":false} [espree] format 1`] = ` @@ -6172,7 +6177,8 @@ exports[`tuple-and-record.js - {"semi":false} [espree] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: Unexpected character '{'" `; exports[`tuple-and-record.js - {"semi":false} [flow] format 1`] = ` @@ -6194,7 +6200,8 @@ exports[`tuple-and-record.js - {"semi":false} [meriyah] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: [7:1]: '#' not followed by identifier" `; exports[`tuple-and-record.js - {"semi":false} [typescript] format 1`] = ` @@ -6205,7 +6212,8 @@ exports[`tuple-and-record.js - {"semi":false} [typescript] format 1`] = ` | ^ 8 | key: 'value' 9 | } - 10 |" + 10 | +Cause: Invalid character." `; exports[`tuple-and-record.js - {"semi":false} format 1`] = ` diff --git a/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap index 2263bc534..c6bcfecb4 100644 --- a/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`basic.js [acorn] format 1`] = ` > 2 | accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`basic.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`basic.js [espree] format 1`] = ` > 2 | accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token bar" `; exports[`basic.js - {"semi":false} [acorn] format 1`] = ` @@ -24,7 +26,8 @@ exports[`basic.js - {"semi":false} [acorn] format 1`] = ` > 2 | accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`basic.js - {"semi":false} [espree] format 1`] = ` @@ -33,7 +36,8 @@ exports[`basic.js - {"semi":false} [espree] format 1`] = ` > 2 | accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token bar" `; exports[`basic.js - {"semi":false} format 1`] = ` @@ -80,7 +84,8 @@ exports[`comments.js [acorn] format 1`] = ` | ^ 3 | // comment 4 | accessor b; - 5 | }" + 5 | } +Cause: Unexpected character '@' (2:2)" `; exports[`comments.js [espree] format 1`] = ` @@ -90,7 +95,8 @@ exports[`comments.js [espree] format 1`] = ` | ^ 3 | // comment 4 | accessor b; - 5 | }" + 5 | } +Cause: Unexpected character '@'" `; exports[`comments.js - {"semi":false} [acorn] format 1`] = ` @@ -100,7 +106,8 @@ exports[`comments.js - {"semi":false} [acorn] format 1`] = ` | ^ 3 | // comment 4 | accessor b; - 5 | }" + 5 | } +Cause: Unexpected character '@' (2:2)" `; exports[`comments.js - {"semi":false} [espree] format 1`] = ` @@ -110,7 +117,8 @@ exports[`comments.js - {"semi":false} [espree] format 1`] = ` | ^ 3 | // comment 4 | accessor b; - 5 | }" + 5 | } +Cause: Unexpected character '@'" `; exports[`comments.js - {"semi":false} format 1`] = ` @@ -164,7 +172,8 @@ exports[`computed.js [acorn] format 1`] = ` > 2 | accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`computed.js [espree] format 1`] = ` @@ -173,7 +182,8 @@ exports[`computed.js [espree] format 1`] = ` > 2 | accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token [" `; exports[`computed.js - {"semi":false} [acorn] format 1`] = ` @@ -182,7 +192,8 @@ exports[`computed.js - {"semi":false} [acorn] format 1`] = ` > 2 | accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`computed.js - {"semi":false} [espree] format 1`] = ` @@ -191,7 +202,8 @@ exports[`computed.js - {"semi":false} [espree] format 1`] = ` > 2 | accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token [" `; exports[`computed.js - {"semi":false} format 1`] = ` @@ -311,7 +323,8 @@ exports[`private.js [acorn] format 1`] = ` > 2 | accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`private.js [espree] format 1`] = ` @@ -320,7 +333,8 @@ exports[`private.js [espree] format 1`] = ` > 2 | accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token #bar" `; exports[`private.js - {"semi":false} [acorn] format 1`] = ` @@ -329,7 +343,8 @@ exports[`private.js - {"semi":false} [acorn] format 1`] = ` > 2 | accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:11)" `; exports[`private.js - {"semi":false} [espree] format 1`] = ` @@ -338,7 +353,8 @@ exports[`private.js - {"semi":false} [espree] format 1`] = ` > 2 | accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token #bar" `; exports[`private.js - {"semi":false} format 1`] = ` @@ -384,7 +400,8 @@ exports[`static.js [acorn] format 1`] = ` > 2 | static accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:18)" `; exports[`static.js [espree] format 1`] = ` @@ -393,7 +410,8 @@ exports[`static.js [espree] format 1`] = ` > 2 | static accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token bar" `; exports[`static.js - {"semi":false} [acorn] format 1`] = ` @@ -402,7 +420,8 @@ exports[`static.js - {"semi":false} [acorn] format 1`] = ` > 2 | static accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:18)" `; exports[`static.js - {"semi":false} [espree] format 1`] = ` @@ -411,7 +430,8 @@ exports[`static.js - {"semi":false} [espree] format 1`] = ` > 2 | static accessor bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token bar" `; exports[`static.js - {"semi":false} format 1`] = ` @@ -457,7 +477,8 @@ exports[`static-computed.js [acorn] format 1`] = ` > 2 | static accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:18)" `; exports[`static-computed.js [espree] format 1`] = ` @@ -466,7 +487,8 @@ exports[`static-computed.js [espree] format 1`] = ` > 2 | static accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token [" `; exports[`static-computed.js - {"semi":false} [acorn] format 1`] = ` @@ -475,7 +497,8 @@ exports[`static-computed.js - {"semi":false} [acorn] format 1`] = ` > 2 | static accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:18)" `; exports[`static-computed.js - {"semi":false} [espree] format 1`] = ` @@ -484,7 +507,8 @@ exports[`static-computed.js - {"semi":false} [espree] format 1`] = ` > 2 | static accessor ["bar"]; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token [" `; exports[`static-computed.js - {"semi":false} format 1`] = ` @@ -530,7 +554,8 @@ exports[`static-private.js [acorn] format 1`] = ` > 2 | static accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:18)" `; exports[`static-private.js [espree] format 1`] = ` @@ -539,7 +564,8 @@ exports[`static-private.js [espree] format 1`] = ` > 2 | static accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token #bar" `; exports[`static-private.js - {"semi":false} [acorn] format 1`] = ` @@ -548,7 +574,8 @@ exports[`static-private.js - {"semi":false} [acorn] format 1`] = ` > 2 | static accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:18)" `; exports[`static-private.js - {"semi":false} [espree] format 1`] = ` @@ -557,7 +584,8 @@ exports[`static-private.js - {"semi":false} [espree] format 1`] = ` > 2 | static accessor #bar; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token #bar" `; exports[`static-private.js - {"semi":false} format 1`] = ` @@ -604,7 +632,8 @@ exports[`with-semicolon-1.js [acorn] format 1`] = ` | ^ 3 | [foo]() {} 4 | } - 5 | " + 5 | +Cause: Unexpected token (2:11)" `; exports[`with-semicolon-1.js [espree] format 1`] = ` @@ -614,7 +643,8 @@ exports[`with-semicolon-1.js [espree] format 1`] = ` | ^ 3 | [foo]() {} 4 | } - 5 | " + 5 | +Cause: Unexpected token clicked" `; exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = ` @@ -624,7 +654,8 @@ exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = ` | ^ 3 | [foo]() {} 4 | } - 5 | " + 5 | +Cause: Unexpected token (2:11)" `; exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = ` @@ -634,7 +665,8 @@ exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = ` | ^ 3 | [foo]() {} 4 | } - 5 | " + 5 | +Cause: Unexpected token clicked" `; exports[`with-semicolon-1.js - {"semi":false} format 1`] = ` @@ -685,7 +717,8 @@ exports[`with-semicolon-2.js [acorn] format 1`] = ` | ^ 3 | *foo() {} 4 | } - 5 |" + 5 | +Cause: Unexpected token (2:11)" `; exports[`with-semicolon-2.js [espree] format 1`] = ` @@ -695,7 +728,8 @@ exports[`with-semicolon-2.js [espree] format 1`] = ` | ^ 3 | *foo() {} 4 | } - 5 |" + 5 | +Cause: Unexpected token clicked" `; exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = ` @@ -705,7 +739,8 @@ exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = ` | ^ 3 | *foo() {} 4 | } - 5 |" + 5 | +Cause: Unexpected token (2:11)" `; exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = ` @@ -715,7 +750,8 @@ exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = ` | ^ 3 | *foo() {} 4 | } - 5 |" + 5 | +Cause: Unexpected token clicked" `; exports[`with-semicolon-2.js - {"semi":false} format 1`] = ` diff --git a/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap index 36873709b..40a75b929 100644 --- a/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decorators-export/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`after_export.js [acorn] format 1`] = ` | ^ 2 | 3 | export default @decorator class {} - 4 |" + 4 | +Cause: Unexpected character '@' (1:7)" `; exports[`after_export.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`after_export.js [espree] format 1`] = ` | ^ 2 | 3 | export default @decorator class {} - 4 |" + 4 | +Cause: Unexpected character '@'" `; exports[`after_export.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`after_export.js [meriyah] format 1`] = ` | ^ 2 | 3 | export default @decorator class {} - 4 |" + 4 | +Cause: [1:8]: Unexpected token: '@'" `; exports[`after_export.js format 1`] = ` @@ -55,7 +58,8 @@ exports[`before_export.js [acorn] format 1`] = ` | ^ 2 | export class Foo {} 3 | - 4 | @decorator" + 4 | @decorator +Cause: Unexpected character '@' (1:0)" `; exports[`before_export.js [espree] format 1`] = ` @@ -64,7 +68,8 @@ exports[`before_export.js [espree] format 1`] = ` | ^ 2 | export class Foo {} 3 | - 4 | @decorator" + 4 | @decorator +Cause: Unexpected character '@'" `; exports[`before_export.js format 1`] = ` diff --git a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap index 2206dd70a..749084e88 100644 --- a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`classes.js [acorn] format 1`] = ` | ^ 2 | 3 | @deco export class Bar {} - 4 |" + 4 | +Cause: Unexpected character '@' (1:0)" `; exports[`classes.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`classes.js [espree] format 1`] = ` | ^ 2 | 3 | @deco export class Bar {} - 4 |" + 4 | +Cause: Unexpected character '@'" `; exports[`classes.js format 1`] = ` @@ -73,7 +75,8 @@ exports[`comments.js [acorn] format 1`] = ` | ^ 4 | a: 'a', // Comment is in the wrong place 5 | // test - 6 | b: '2'" + 6 | b: '2' +Cause: Unexpected character '@' (3:0)" `; exports[`comments.js [espree] format 1`] = ` @@ -84,7 +87,8 @@ exports[`comments.js [espree] format 1`] = ` | ^ 4 | a: 'a', // Comment is in the wrong place 5 | // test - 6 | b: '2'" + 6 | b: '2' +Cause: Unexpected character '@'" `; exports[`comments.js format 1`] = ` @@ -176,7 +180,8 @@ exports[`member-expression.js [acorn] format 1`] = ` | ^ 4 | method() {} 5 | }, - 6 | class {" + 6 | class { +Cause: Unexpected character '@' (3:4)" `; exports[`member-expression.js [espree] format 1`] = ` @@ -187,7 +192,8 @@ exports[`member-expression.js [espree] format 1`] = ` | ^ 4 | method() {} 5 | }, - 6 | class {" + 6 | class { +Cause: Unexpected character '@'" `; exports[`member-expression.js format 1`] = ` @@ -310,7 +316,8 @@ exports[`methods.js [acorn] format 1`] = ` | ^ 4 | async plop() {} 5 | - 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")" + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument") +Cause: Unexpected character '@' (3:2)" `; exports[`methods.js [espree] format 1`] = ` @@ -321,7 +328,8 @@ exports[`methods.js [espree] format 1`] = ` | ^ 4 | async plop() {} 5 | - 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")" + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument") +Cause: Unexpected character '@'" `; exports[`methods.js format 1`] = ` @@ -364,7 +372,8 @@ exports[`mixed.js [acorn] format 1`] = ` | ^ 4 | export default class MyComponent { 5 | @task - 6 | *foo() {" + 6 | *foo() { +Cause: Unexpected character '@' (3:0)" `; exports[`mixed.js [espree] format 1`] = ` @@ -375,7 +384,8 @@ exports[`mixed.js [espree] format 1`] = ` | ^ 4 | export default class MyComponent { 5 | @task - 6 | *foo() {" + 6 | *foo() { +Cause: Unexpected character '@'" `; exports[`mixed.js format 1`] = ` @@ -412,7 +422,8 @@ exports[`mobx.js [acorn] format 1`] = ` | ^ 4 | @observable price = 0; 5 | @observable amount = 1; - 6 |" + 6 | +Cause: Unexpected character '@' (3:0)" `; exports[`mobx.js [espree] format 1`] = ` @@ -423,7 +434,8 @@ exports[`mobx.js [espree] format 1`] = ` | ^ 4 | @observable price = 0; 5 | @observable amount = 1; - 6 |" + 6 | +Cause: Unexpected character '@'" `; exports[`mobx.js format 1`] = ` @@ -525,7 +537,8 @@ exports[`multiline.js [acorn] format 1`] = ` | ^ 3 | foo, 4 | bar - 5 | ]) prop = value;" + 5 | ]) prop = value; +Cause: Unexpected character '@' (2:2)" `; exports[`multiline.js [espree] format 1`] = ` @@ -535,7 +548,8 @@ exports[`multiline.js [espree] format 1`] = ` | ^ 3 | foo, 4 | bar - 5 | ]) prop = value;" + 5 | ]) prop = value; +Cause: Unexpected character '@'" `; exports[`multiline.js format 1`] = ` @@ -584,7 +598,8 @@ exports[`multiple.js [acorn] format 1`] = ` | ^ 3 | @nonenumerable 4 | @doubledValue - 5 | legs = 4;" + 5 | legs = 4; +Cause: Unexpected character '@' (2:2)" `; exports[`multiple.js [espree] format 1`] = ` @@ -594,7 +609,8 @@ exports[`multiple.js [espree] format 1`] = ` | ^ 3 | @nonenumerable 4 | @doubledValue - 5 | legs = 4;" + 5 | legs = 4; +Cause: Unexpected character '@'" `; exports[`multiple.js format 1`] = ` @@ -653,7 +669,8 @@ exports[`parens.js [acorn] format 1`] = ` | ^ 3 | x 4 | } - 5 |" + 5 | +Cause: Unexpected character '@' (2:2)" `; exports[`parens.js [espree] format 1`] = ` @@ -663,7 +680,8 @@ exports[`parens.js [espree] format 1`] = ` | ^ 3 | x 4 | } - 5 |" + 5 | +Cause: Unexpected character '@'" `; exports[`parens.js format 1`] = ` @@ -692,7 +710,8 @@ exports[`redux.js [acorn] format 1`] = ` | ^ 2 | export class MyApp extends React.Component {} 3 | - 4 | @connect(state => ({ todos: state.todos }))" + 4 | @connect(state => ({ todos: state.todos })) +Cause: Unexpected character '@' (1:0)" `; exports[`redux.js [espree] format 1`] = ` @@ -701,7 +720,8 @@ exports[`redux.js [espree] format 1`] = ` | ^ 2 | export class MyApp extends React.Component {} 3 | - 4 | @connect(state => ({ todos: state.todos }))" + 4 | @connect(state => ({ todos: state.todos })) +Cause: Unexpected character '@'" `; exports[`redux.js format 1`] = ` diff --git a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap index 26ee81411..933869c6e 100644 --- a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,8 @@ exports[`arguments.js [acorn] format 1`] = ` > 1 | console.log(@deco class Foo {}) | ^ 2 | console.log(@deco class {}) - 3 |" + 3 | +Cause: Unexpected character '@' (1:12)" `; exports[`arguments.js [espree] format 1`] = ` @@ -13,7 +14,8 @@ exports[`arguments.js [espree] format 1`] = ` > 1 | console.log(@deco class Foo {}) | ^ 2 | console.log(@deco class {}) - 3 |" + 3 | +Cause: Unexpected character '@'" `; exports[`arguments.js [flow] format 1`] = ` @@ -29,7 +31,8 @@ exports[`arguments.js - {"semi":false} [acorn] format 1`] = ` > 1 | console.log(@deco class Foo {}) | ^ 2 | console.log(@deco class {}) - 3 |" + 3 | +Cause: Unexpected character '@' (1:12)" `; exports[`arguments.js - {"semi":false} [espree] format 1`] = ` @@ -37,7 +40,8 @@ exports[`arguments.js - {"semi":false} [espree] format 1`] = ` > 1 | console.log(@deco class Foo {}) | ^ 2 | console.log(@deco class {}) - 3 |" + 3 | +Cause: Unexpected character '@'" `; exports[`arguments.js - {"semi":false} [flow] format 1`] = ` @@ -99,7 +103,8 @@ exports[`class-expression.js [acorn] format 1`] = ` | ^ 2 | const a2 = (@deco class {}); 3 | - 4 | (@deco class Foo {});" + 4 | (@deco class Foo {}); +Cause: Unexpected character '@' (1:12)" `; exports[`class-expression.js [espree] format 1`] = ` @@ -108,7 +113,8 @@ exports[`class-expression.js [espree] format 1`] = ` | ^ 2 | const a2 = (@deco class {}); 3 | - 4 | (@deco class Foo {});" + 4 | (@deco class Foo {}); +Cause: Unexpected character '@'" `; exports[`class-expression.js [flow] format 1`] = ` @@ -126,7 +132,8 @@ exports[`class-expression.js - {"semi":false} [acorn] format 1`] = ` | ^ 2 | const a2 = (@deco class {}); 3 | - 4 | (@deco class Foo {});" + 4 | (@deco class Foo {}); +Cause: Unexpected character '@' (1:12)" `; exports[`class-expression.js - {"semi":false} [espree] format 1`] = ` @@ -135,7 +142,8 @@ exports[`class-expression.js - {"semi":false} [espree] format 1`] = ` | ^ 2 | const a2 = (@deco class {}); 3 | - 4 | (@deco class Foo {});" + 4 | (@deco class Foo {}); +Cause: Unexpected character '@'" `; exports[`class-expression.js - {"semi":false} [flow] format 1`] = ` @@ -267,7 +275,8 @@ exports[`member-expression.js [acorn] format 1`] = ` > 1 | (@deco class Foo {}).name; | ^ 2 | (@deco class {}).name; - 3 |" + 3 | +Cause: Unexpected character '@' (1:1)" `; exports[`member-expression.js [espree] format 1`] = ` @@ -275,7 +284,8 @@ exports[`member-expression.js [espree] format 1`] = ` > 1 | (@deco class Foo {}).name; | ^ 2 | (@deco class {}).name; - 3 |" + 3 | +Cause: Unexpected character '@'" `; exports[`member-expression.js [flow] format 1`] = ` @@ -291,7 +301,8 @@ exports[`member-expression.js - {"semi":false} [acorn] format 1`] = ` > 1 | (@deco class Foo {}).name; | ^ 2 | (@deco class {}).name; - 3 |" + 3 | +Cause: Unexpected character '@' (1:1)" `; exports[`member-expression.js - {"semi":false} [espree] format 1`] = ` @@ -299,7 +310,8 @@ exports[`member-expression.js - {"semi":false} [espree] format 1`] = ` > 1 | (@deco class Foo {}).name; | ^ 2 | (@deco class {}).name; - 3 |" + 3 | +Cause: Unexpected character '@'" `; exports[`member-expression.js - {"semi":false} [flow] format 1`] = ` @@ -361,7 +373,8 @@ exports[`super-class.js [acorn] format 1`] = ` | ^ 2 | 3 | class Foo extends (@deco class {}){} - 4 |" + 4 | +Cause: Unexpected character '@' (1:19)" `; exports[`super-class.js [espree] format 1`] = ` @@ -370,7 +383,8 @@ exports[`super-class.js [espree] format 1`] = ` | ^ 2 | 3 | class Foo extends (@deco class {}){} - 4 |" + 4 | +Cause: Unexpected character '@'" `; exports[`super-class.js [flow] format 1`] = ` @@ -388,7 +402,8 @@ exports[`super-class.js - {"semi":false} [acorn] format 1`] = ` | ^ 2 | 3 | class Foo extends (@deco class {}){} - 4 |" + 4 | +Cause: Unexpected character '@' (1:19)" `; exports[`super-class.js - {"semi":false} [espree] format 1`] = ` @@ -397,7 +412,8 @@ exports[`super-class.js - {"semi":false} [espree] format 1`] = ` | ^ 2 | 3 | class Foo extends (@deco class {}){} - 4 |" + 4 | +Cause: Unexpected character '@'" `; exports[`super-class.js - {"semi":false} [flow] format 1`] = ` diff --git a/tests/format/js/deferred-import-evaluation/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/deferred-import-evaluation/__snapshots__/jsfmt.spec.js.snap index 082f67737..30b6fec05 100644 --- a/tests/format/js/deferred-import-evaluation/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/deferred-import-evaluation/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`import-defer.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import defer * as ns from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`import-defer.js [espree] format 1`] = ` "Unexpected token * (1:14) > 1 | import defer * as ns from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token *" `; exports[`import-defer.js [meriyah] format 1`] = ` "Import source must be string (1:14) > 1 | import defer * as ns from "x"; | ^ - 2 |" + 2 | +Cause: [1:14]: Import source must be string" `; exports[`import-defer.js format 1`] = ` @@ -39,21 +42,24 @@ exports[`import-defer-attributes-declaration.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import defer * as ns from "x" with { attr: "val" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`import-defer-attributes-declaration.js [espree] format 1`] = ` "Unexpected token * (1:14) > 1 | import defer * as ns from "x" with { attr: "val" }; | ^ - 2 |" + 2 | +Cause: Unexpected token *" `; exports[`import-defer-attributes-declaration.js [meriyah] format 1`] = ` "Import source must be string (1:14) > 1 | import defer * as ns from "x" with { attr: "val" }; | ^ - 2 |" + 2 | +Cause: [1:14]: Import source must be string" `; exports[`import-defer-attributes-declaration.js format 1`] = ` @@ -74,68 +80,78 @@ exports[`no-default.js [__babel_estree] format 1`] = ` "Only \`import defer * as x from "./module"\` is valid. (1:14) > 1 | import defer x from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)" `; exports[`no-default.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import defer x from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`no-default.js [babel] format 1`] = ` "Only \`import defer * as x from "./module"\` is valid. (1:14) > 1 | import defer x from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)" `; exports[`no-default.js [espree] format 1`] = ` "Unexpected token x (1:14) > 1 | import defer x from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token x" `; exports[`no-default.js [meriyah] format 1`] = ` "Import source must be string (1:14) > 1 | import defer x from "x"; | ^ - 2 |" + 2 | +Cause: [1:14]: Import source must be string" `; exports[`no-named.js [__babel_estree] format 1`] = ` "Only \`import defer * as x from "./module"\` is valid. (1:16) > 1 | import defer { x } from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)" `; exports[`no-named.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import defer { x } from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`no-named.js [babel] format 1`] = ` "Only \`import defer * as x from "./module"\` is valid. (1:16) > 1 | import defer { x } from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)" `; exports[`no-named.js [espree] format 1`] = ` "Unexpected token { (1:14) > 1 | import defer { x } from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token {" `; exports[`no-named.js [meriyah] format 1`] = ` "Import source must be string (1:14) > 1 | import defer { x } from "x"; | ^ - 2 |" + 2 | +Cause: [1:14]: Import source must be string" `; diff --git a/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap index 43e7fa3a4..3dd5e8d76 100644 --- a/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/destructuring-private-fields/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`arrow-params.js [acorn] format 1`] = ` > 3 | #p = ({ #x: x }) => {} | ^ 4 | } - 5 |" + 5 | +Cause: Unexpected token (3:10)" `; exports[`arrow-params.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`arrow-params.js [espree] format 1`] = ` > 3 | #p = ({ #x: x }) => {} | ^ 4 | } - 5 |" + 5 | +Cause: Unexpected token #x" `; exports[`arrow-params.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`arrow-params.js [meriyah] format 1`] = ` > 3 | #p = ({ #x: x }) => {} | ^ 4 | } - 5 |" + 5 | +Cause: [3:11]: Unexpected token: 'PrivateField'" `; exports[`arrow-params.js format 1`] = ` @@ -58,7 +61,8 @@ exports[`assignment.js [acorn] format 1`] = ` | ^ 6 | } 7 | } - 8 |" + 8 | +Cause: Unexpected token (5:7)" `; exports[`assignment.js [espree] format 1`] = ` @@ -69,7 +73,8 @@ exports[`assignment.js [espree] format 1`] = ` | ^ 6 | } 7 | } - 8 |" + 8 | +Cause: Unexpected token #x" `; exports[`assignment.js [meriyah] format 1`] = ` @@ -80,7 +85,8 @@ exports[`assignment.js [meriyah] format 1`] = ` | ^ 6 | } 7 | } - 8 |" + 8 | +Cause: [5:8]: Unexpected token: 'PrivateField'" `; exports[`assignment.js format 1`] = ` @@ -116,7 +122,8 @@ exports[`async-arrow-params.js [acorn] format 1`] = ` > 3 | #p = async ({ #x: x }) => {} | ^ 4 | } - 5 |" + 5 | +Cause: Unexpected token (3:16)" `; exports[`async-arrow-params.js [espree] format 1`] = ` @@ -126,7 +133,8 @@ exports[`async-arrow-params.js [espree] format 1`] = ` > 3 | #p = async ({ #x: x }) => {} | ^ 4 | } - 5 |" + 5 | +Cause: Unexpected token #x" `; exports[`async-arrow-params.js [meriyah] format 1`] = ` @@ -136,7 +144,8 @@ exports[`async-arrow-params.js [meriyah] format 1`] = ` > 3 | #p = async ({ #x: x }) => {} | ^ 4 | } - 5 |" + 5 | +Cause: [3:17]: Unexpected token: 'PrivateField'" `; exports[`async-arrow-params.js format 1`] = ` @@ -167,7 +176,8 @@ exports[`bindings.js [acorn] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: Unexpected token (4:11)" `; exports[`bindings.js [espree] format 1`] = ` @@ -178,7 +188,8 @@ exports[`bindings.js [espree] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: Unexpected token #x" `; exports[`bindings.js [meriyah] format 1`] = ` @@ -189,7 +200,8 @@ exports[`bindings.js [meriyah] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: [4:12]: Unexpected token: 'PrivateField'" `; exports[`bindings.js format 1`] = ` @@ -224,7 +236,8 @@ exports[`for-lhs.js [acorn] format 1`] = ` | ^ 6 | } 7 | } - 8 |" + 8 | +Cause: Unexpected token (5:10)" `; exports[`for-lhs.js [espree] format 1`] = ` @@ -235,7 +248,8 @@ exports[`for-lhs.js [espree] format 1`] = ` | ^ 6 | } 7 | } - 8 |" + 8 | +Cause: Unexpected token #x" `; exports[`for-lhs.js [meriyah] format 1`] = ` @@ -246,7 +260,8 @@ exports[`for-lhs.js [meriyah] format 1`] = ` | ^ 6 | } 7 | } - 8 |" + 8 | +Cause: [5:11]: Unexpected token: 'PrivateField'" `; exports[`for-lhs.js format 1`] = ` @@ -283,7 +298,8 @@ exports[`nested-bindings.js [acorn] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: Unexpected token (4:16)" `; exports[`nested-bindings.js [espree] format 1`] = ` @@ -294,7 +310,8 @@ exports[`nested-bindings.js [espree] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: Unexpected token #x" `; exports[`nested-bindings.js [meriyah] format 1`] = ` @@ -305,7 +322,8 @@ exports[`nested-bindings.js [meriyah] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: [4:17]: Unexpected token: 'PrivateField'" `; exports[`nested-bindings.js format 1`] = ` @@ -345,7 +363,8 @@ exports[`valid-multiple-bindings.js [acorn] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: Unexpected token (4:11)" `; exports[`valid-multiple-bindings.js [espree] format 1`] = ` @@ -356,7 +375,8 @@ exports[`valid-multiple-bindings.js [espree] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: Unexpected token #x" `; exports[`valid-multiple-bindings.js [meriyah] format 1`] = ` @@ -367,7 +387,8 @@ exports[`valid-multiple-bindings.js [meriyah] format 1`] = ` | ^ 5 | } 6 | } - 7 |" + 7 | +Cause: [4:12]: Unexpected token: 'PrivateField'" `; exports[`valid-multiple-bindings.js format 1`] = ` diff --git a/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap index 1123ad3db..809934681 100644 --- a/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`call-arguments.js [acorn] format 1`] = ` | ^ 4 | var bar = "foo"; 5 | if (!bar) throw new Error( - 6 | "unreachable"" + 6 | "unreachable" +Cause: Unexpected token (3:2)" `; exports[`call-arguments.js [espree] format 1`] = ` @@ -19,7 +20,8 @@ exports[`call-arguments.js [espree] format 1`] = ` | ^ 4 | var bar = "foo"; 5 | if (!bar) throw new Error( - 6 | "unreachable"" + 6 | "unreachable" +Cause: Unexpected token do" `; exports[`call-arguments.js [meriyah] format 1`] = ` @@ -30,7 +32,8 @@ exports[`call-arguments.js [meriyah] format 1`] = ` | ^ 4 | var bar = "foo"; 5 | if (!bar) throw new Error( - 6 | "unreachable"" + 6 | "unreachable" +Cause: [3:4]: Unexpected token: 'do'" `; exports[`call-arguments.js format 1`] = ` @@ -127,7 +130,8 @@ exports[`do.js [acorn] format 1`] = ` | ^ 4 | if(env === 'production') 'https://abc.mno.com/'; 5 | else if(env === 'development') 'http://localhost:4000'; - 6 | }" + 6 | } +Cause: Unexpected token (3:4)" `; exports[`do.js [espree] format 1`] = ` @@ -138,7 +142,8 @@ exports[`do.js [espree] format 1`] = ` | ^ 4 | if(env === 'production') 'https://abc.mno.com/'; 5 | else if(env === 'development') 'http://localhost:4000'; - 6 | }" + 6 | } +Cause: Unexpected token do" `; exports[`do.js [meriyah] format 1`] = ` @@ -149,7 +154,8 @@ exports[`do.js [meriyah] format 1`] = ` | ^ 4 | if(env === 'production') 'https://abc.mno.com/'; 5 | else if(env === 'development') 'http://localhost:4000'; - 6 | }" + 6 | } +Cause: [3:6]: Unexpected token: 'do'" `; exports[`do.js format 1`] = ` diff --git a/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap index 2f14318ed..58413f20f 100644 --- a/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap @@ -4,14 +4,16 @@ exports[`assertions.js [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`assertions.js [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`assertions.js [flow] format 1`] = ` @@ -25,7 +27,8 @@ exports[`assertions.js [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`assertions.js format 1`] = ` diff --git a/tests/format/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap index 37ead1b3d..b68238451 100644 --- a/tests/format/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap @@ -4,14 +4,16 @@ exports[`for-await-using-of-comments.js [acorn] format 1`] = ` "Unexpected token (1:19) > 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:18)" `; exports[`for-await-using-of-comments.js [espree] format 1`] = ` "Unexpected token await (1:19) > 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; | ^ - 2 |" + 2 | +Cause: Unexpected token await" `; exports[`for-await-using-of-comments.js [flow] format 1`] = ` @@ -25,7 +27,8 @@ exports[`for-await-using-of-comments.js [meriyah] format 1`] = ` "for await (... of ...) is only valid in async functions and async generators (1:52) > 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/; | ^ - 2 |" + 2 | +Cause: [1:52]: for await (... of ...) is only valid in async functions and async generators" `; exports[`for-await-using-of-comments.js format 1`] = ` @@ -49,7 +52,8 @@ exports[`invalid-duplicate-using-bindings.js [acorn] format 1`] = ` | ^ 3 | } 4 | { - 5 | using g = foo();" + 5 | using g = foo(); +Cause: Unexpected token (2:8)" `; exports[`invalid-duplicate-using-bindings.js [espree] format 1`] = ` @@ -59,7 +63,8 @@ exports[`invalid-duplicate-using-bindings.js [espree] format 1`] = ` | ^ 3 | } 4 | { - 5 | using g = foo();" + 5 | using g = foo(); +Cause: Unexpected token f" `; exports[`invalid-duplicate-using-bindings.js [flow] format 1`] = ` @@ -79,7 +84,8 @@ exports[`invalid-duplicate-using-bindings.js [meriyah] format 1`] = ` | ^ 3 | } 4 | { - 5 | using g = foo();" + 5 | using g = foo(); +Cause: [2:9]: Unexpected token: 'identifier'" `; exports[`invalid-duplicate-using-bindings.js [typescript] format 1`] = ` @@ -89,7 +95,8 @@ exports[`invalid-duplicate-using-bindings.js [typescript] format 1`] = ` | ^ 3 | } 4 | { - 5 | using g = foo();" + 5 | using g = foo(); +Cause: 'using' declarations must be initialized." `; exports[`invalid-duplicate-using-bindings.js format 1`] = ` @@ -123,14 +130,16 @@ exports[`invalid-script-top-level-using-binding.js [acorn] format 1`] = ` "Unexpected token (1:7) > 1 | using x = bar(); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:6)" `; exports[`invalid-script-top-level-using-binding.js [espree] format 1`] = ` "Unexpected token x (1:7) > 1 | using x = bar(); | ^ - 2 |" + 2 | +Cause: Unexpected token x" `; exports[`invalid-script-top-level-using-binding.js [flow] format 1`] = ` @@ -144,7 +153,8 @@ exports[`invalid-script-top-level-using-binding.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:7) > 1 | using x = bar(); | ^ - 2 |" + 2 | +Cause: [1:7]: Unexpected token: 'identifier'" `; exports[`invalid-script-top-level-using-binding.js format 1`] = ` @@ -168,7 +178,8 @@ exports[`using-declarations.js [acorn] format 1`] = ` | ^ 3 | } 4 | - 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);" + 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); +Cause: Unexpected token (2:16)" `; exports[`using-declarations.js [espree] format 1`] = ` @@ -178,7 +189,8 @@ exports[`using-declarations.js [espree] format 1`] = ` | ^ 3 | } 4 | - 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);" + 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); +Cause: Unexpected token a" `; exports[`using-declarations.js [flow] format 1`] = ` @@ -198,7 +210,8 @@ exports[`using-declarations.js [meriyah] format 1`] = ` | ^ 3 | } 4 | - 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);" + 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;); +Cause: [2:17]: Unexpected token: 'identifier'" `; exports[`using-declarations.js [typescript] format 1`] = ` @@ -209,7 +222,8 @@ exports[`using-declarations.js [typescript] format 1`] = ` | ^^^^^^^^^ 6 | 7 | for(using /* 1 */ foo of bar()); - 8 |" + 8 | +Cause: 'using' declarations may not be initialized in for statement." `; exports[`using-declarations.js format 1`] = ` @@ -321,7 +335,8 @@ exports[`valid-await-using-binding-basic.js [acorn] format 1`] = ` > 2 | await using basic = getReader(); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:14)" `; exports[`valid-await-using-binding-basic.js [espree] format 1`] = ` @@ -330,7 +345,8 @@ exports[`valid-await-using-binding-basic.js [espree] format 1`] = ` > 2 | await using basic = getReader(); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token basic" `; exports[`valid-await-using-binding-basic.js [flow] format 1`] = ` @@ -348,7 +364,8 @@ exports[`valid-await-using-binding-basic.js [meriyah] format 1`] = ` > 2 | await using basic = getReader(); | ^ 3 | } - 4 |" + 4 | +Cause: [2:19]: Unexpected token: 'identifier'" `; exports[`valid-await-using-binding-basic.js format 1`] = ` @@ -375,7 +392,8 @@ exports[`valid-await-using-binding-escaped.js [acorn] format 1`] = ` > 2 | await using \\u0061b = c; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:14)" `; exports[`valid-await-using-binding-escaped.js [espree] format 1`] = ` @@ -384,7 +402,8 @@ exports[`valid-await-using-binding-escaped.js [espree] format 1`] = ` > 2 | await using \\u0061b = c; | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token \\u0061b" `; exports[`valid-await-using-binding-escaped.js [flow] format 1`] = ` @@ -402,7 +421,8 @@ exports[`valid-await-using-binding-escaped.js [meriyah] format 1`] = ` > 2 | await using \\u0061b = c; | ^ 3 | } - 4 |" + 4 | +Cause: [2:15]: Unexpected token: 'identifier'" `; exports[`valid-await-using-binding-escaped.js format 1`] = ` @@ -429,7 +449,8 @@ exports[`valid-await-using-binding-non-bmp.js [acorn] format 1`] = ` > 2 | await using 𠮷 = foo(); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:14)" `; exports[`valid-await-using-binding-non-bmp.js [espree] format 1`] = ` @@ -438,7 +459,8 @@ exports[`valid-await-using-binding-non-bmp.js [espree] format 1`] = ` > 2 | await using 𠮷 = foo(); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token 𠮷" `; exports[`valid-await-using-binding-non-bmp.js [flow] format 1`] = ` @@ -456,7 +478,8 @@ exports[`valid-await-using-binding-non-bmp.js [meriyah] format 1`] = ` > 2 | await using 𠮷 = foo(); | ^ 3 | } - 4 |" + 4 | +Cause: [2:17]: Unexpected token: 'identifier'" `; exports[`valid-await-using-binding-non-bmp.js format 1`] = ` @@ -484,7 +507,8 @@ exports[`valid-await-using-binding-using.js [acorn] format 1`] = ` | ^ 3 | for (await using using of of); 4 | } - 5 |" + 5 | +Cause: Unexpected token (2:14)" `; exports[`valid-await-using-binding-using.js [espree] format 1`] = ` @@ -494,7 +518,8 @@ exports[`valid-await-using-binding-using.js [espree] format 1`] = ` | ^ 3 | for (await using using of of); 4 | } - 5 |" + 5 | +Cause: Unexpected token using" `; exports[`valid-await-using-binding-using.js [flow] format 1`] = ` @@ -514,7 +539,8 @@ exports[`valid-await-using-binding-using.js [meriyah] format 1`] = ` | ^ 3 | for (await using using of of); 4 | } - 5 |" + 5 | +Cause: [2:19]: Unexpected token: 'identifier'" `; exports[`valid-await-using-binding-using.js format 1`] = ` @@ -545,7 +571,8 @@ exports[`valid-await-using-comments.js [acorn] format 1`] = ` | ^ 4 | } 5 | { - 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;" + 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +Cause: Unexpected token (3:27)" `; exports[`valid-await-using-comments.js [espree] format 1`] = ` @@ -556,7 +583,8 @@ exports[`valid-await-using-comments.js [espree] format 1`] = ` | ^ 4 | } 5 | { - 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;" + 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +Cause: Unexpected token b" `; exports[`valid-await-using-comments.js [flow] format 1`] = ` @@ -578,7 +606,8 @@ exports[`valid-await-using-comments.js [meriyah] format 1`] = ` | ^ 4 | } 5 | { - 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;" + 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; +Cause: [3:28]: Unexpected token: 'identifier'" `; exports[`valid-await-using-comments.js [typescript] format 1`] = ` @@ -589,7 +618,8 @@ exports[`valid-await-using-comments.js [typescript] format 1`] = ` | ^^^^^^^^^^^^^ 7 | } 8 | { - 9 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/;" + 9 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/; +Cause: 'await using' declarations may not be initialized in for statement." `; exports[`valid-await-using-comments.js format 1`] = ` @@ -676,7 +706,8 @@ exports[`valid-for-using-binding-of-of.js [acorn] format 1`] = ` | ^ 3 | for await (await using of of of); 4 | } - 5 |" + 5 | +Cause: Assigning to rvalue (2:7)" `; exports[`valid-for-using-binding-of-of.js [espree] format 1`] = ` @@ -686,7 +717,8 @@ exports[`valid-for-using-binding-of-of.js [espree] format 1`] = ` | ^ 3 | for await (await using of of of); 4 | } - 5 |" + 5 | +Cause: Assigning to rvalue" `; exports[`valid-for-using-binding-of-of.js [flow] format 1`] = ` @@ -706,7 +738,8 @@ exports[`valid-for-using-binding-of-of.js [meriyah] format 1`] = ` | ^ 3 | for await (await using of of of); 4 | } - 5 |" + 5 | +Cause: [2:21]: Invalid left-hand side in for-of" `; exports[`valid-for-using-binding-of-of.js [typescript] format 1`] = ` @@ -716,7 +749,8 @@ exports[`valid-for-using-binding-of-of.js [typescript] format 1`] = ` | ^ 3 | for await (await using of of of); 4 | } - 5 |" + 5 | +Cause: ')' expected." `; exports[`valid-for-using-binding-of-of.js format 1`] = ` @@ -745,7 +779,8 @@ exports[`valid-for-using-declaration.js [acorn] format 1`] = ` > 2 | for (await using basic = reader();;); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:19)" `; exports[`valid-for-using-declaration.js [espree] format 1`] = ` @@ -754,7 +789,8 @@ exports[`valid-for-using-declaration.js [espree] format 1`] = ` > 2 | for (await using basic = reader();;); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token basic" `; exports[`valid-for-using-declaration.js [flow] format 1`] = ` @@ -772,7 +808,8 @@ exports[`valid-for-using-declaration.js [meriyah] format 1`] = ` > 2 | for (await using basic = reader();;); | ^ 3 | } - 4 |" + 4 | +Cause: [2:24]: Expected ';'" `; exports[`valid-for-using-declaration.js [typescript] format 1`] = ` @@ -781,7 +818,8 @@ exports[`valid-for-using-declaration.js [typescript] format 1`] = ` > 2 | for (await using basic = reader();;); | ^^^^^^^^^^^^^^^^ 3 | } - 4 |" + 4 | +Cause: 'await using' declarations may not be initialized in for statement." `; exports[`valid-for-using-declaration.js format 1`] = ` @@ -808,7 +846,8 @@ exports[`valid-module-block-top-level-await-using-binding.js [acorn] format 1`] | ^ 2 | await using foo = bar(); 3 | } - 4 |" + 4 | +Cause: Unexpected token (1:17)" `; exports[`valid-module-block-top-level-await-using-binding.js [espree] format 1`] = ` @@ -817,7 +856,8 @@ exports[`valid-module-block-top-level-await-using-binding.js [espree] format 1`] | ^ 2 | await using foo = bar(); 3 | } - 4 |" + 4 | +Cause: Unexpected token {" `; exports[`valid-module-block-top-level-await-using-binding.js [flow] format 1`] = ` @@ -835,7 +875,8 @@ exports[`valid-module-block-top-level-await-using-binding.js [meriyah] format 1` | ^ 2 | await using foo = bar(); 3 | } - 4 |" + 4 | +Cause: [1:18]: Unexpected token: '{'" `; exports[`valid-module-block-top-level-await-using-binding.js [typescript] format 1`] = ` @@ -844,7 +885,8 @@ exports[`valid-module-block-top-level-await-using-binding.js [typescript] format | ^ 2 | await using foo = bar(); 3 | } - 4 |" + 4 | +Cause: ',' expected." `; exports[`valid-module-block-top-level-await-using-binding.js format 1`] = ` @@ -871,7 +913,8 @@ exports[`valid-module-block-top-level-using-binding.js [acorn] format 1`] = ` | ^ 2 | using foo = bar(); 3 | } - 4 |" + 4 | +Cause: Unexpected token (1:7)" `; exports[`valid-module-block-top-level-using-binding.js [espree] format 1`] = ` @@ -880,7 +923,8 @@ exports[`valid-module-block-top-level-using-binding.js [espree] format 1`] = ` | ^ 2 | using foo = bar(); 3 | } - 4 |" + 4 | +Cause: Unexpected token {" `; exports[`valid-module-block-top-level-using-binding.js [flow] format 1`] = ` @@ -898,7 +942,8 @@ exports[`valid-module-block-top-level-using-binding.js [meriyah] format 1`] = ` | ^ 2 | using foo = bar(); 3 | } - 4 |" + 4 | +Cause: [1:8]: Unexpected token: '{'" `; exports[`valid-module-block-top-level-using-binding.js [typescript] format 1`] = ` @@ -907,7 +952,8 @@ exports[`valid-module-block-top-level-using-binding.js [typescript] format 1`] = | ^ 2 | using foo = bar(); 3 | } - 4 |" + 4 | +Cause: Namespace must be given a name." `; exports[`valid-module-block-top-level-using-binding.js format 1`] = ` @@ -1057,7 +1103,8 @@ exports[`valid-using-binding-basic.js [acorn] format 1`] = ` > 2 | using basic = getReader(); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token (2:8)" `; exports[`valid-using-binding-basic.js [espree] format 1`] = ` @@ -1066,7 +1113,8 @@ exports[`valid-using-binding-basic.js [espree] format 1`] = ` > 2 | using basic = getReader(); | ^ 3 | } - 4 |" + 4 | +Cause: Unexpected token basic" `; exports[`valid-using-binding-basic.js [flow] format 1`] = ` @@ -1084,7 +1132,8 @@ exports[`valid-using-binding-basic.js [meriyah] format 1`] = ` > 2 | using basic = getReader(); | ^ 3 | } - 4 |" + 4 | +Cause: [2:13]: Unexpected token: 'identifier'" `; exports[`valid-using-binding-basic.js format 1`] = ` @@ -1109,14 +1158,16 @@ exports[`valid-using-binding-escaped.js [acorn] format 1`] = ` "Unexpected token (1:9) > 1 | { using \\u0061b = c; } | ^ - 2 |" + 2 | +Cause: Unexpected token (1:8)" `; exports[`valid-using-binding-escaped.js [espree] format 1`] = ` "Unexpected token \\u0061b (1:9) > 1 | { using \\u0061b = c; } | ^ - 2 |" + 2 | +Cause: Unexpected token \\u0061b" `; exports[`valid-using-binding-escaped.js [flow] format 1`] = ` @@ -1130,7 +1181,8 @@ exports[`valid-using-binding-escaped.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:9) > 1 | { using \\u0061b = c; } | ^ - 2 |" + 2 | +Cause: [1:9]: Unexpected token: 'identifier'" `; exports[`valid-using-binding-escaped.js format 1`] = ` @@ -1153,14 +1205,16 @@ exports[`valid-using-binding-non-bmp.js [acorn] format 1`] = ` "Unexpected token (1:9) > 1 | { using 𠮷 = foo(); } | ^ - 2 |" + 2 | +Cause: Unexpected token (1:8)" `; exports[`valid-using-binding-non-bmp.js [espree] format 1`] = ` "Unexpected token 𠮷 (1:9) > 1 | { using 𠮷 = foo(); } | ^ - 2 |" + 2 | +Cause: Unexpected token 𠮷" `; exports[`valid-using-binding-non-bmp.js [flow] format 1`] = ` @@ -1174,7 +1228,8 @@ exports[`valid-using-binding-non-bmp.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:11) > 1 | { using 𠮷 = foo(); } | ^ - 2 |" + 2 | +Cause: [1:11]: Unexpected token: 'identifier'" `; exports[`valid-using-binding-non-bmp.js format 1`] = ` @@ -1200,7 +1255,8 @@ exports[`valid-using-binding-using.js [acorn] format 1`] = ` | ^ 3 | for (using using of of); 4 | } - 5 |" + 5 | +Cause: Unexpected token (2:8)" `; exports[`valid-using-binding-using.js [espree] format 1`] = ` @@ -1210,7 +1266,8 @@ exports[`valid-using-binding-using.js [espree] format 1`] = ` | ^ 3 | for (using using of of); 4 | } - 5 |" + 5 | +Cause: Unexpected token using" `; exports[`valid-using-binding-using.js [flow] format 1`] = ` @@ -1230,7 +1287,8 @@ exports[`valid-using-binding-using.js [meriyah] format 1`] = ` | ^ 3 | for (using using of of); 4 | } - 5 |" + 5 | +Cause: [2:13]: Unexpected token: 'identifier'" `; exports[`valid-using-binding-using.js format 1`] = ` diff --git a/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap index 2dd6c96d2..69728e9f7 100644 --- a/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap @@ -4,14 +4,16 @@ exports[`default-escaped.js [acorn] format 1`] = ` "Unexpected token (2:8) 1 | // export asyn\\u{63} from "async"; > 2 | export n\\u{63} from "async"; - | ^" + | ^ +Cause: Unexpected token (2:7)" `; exports[`default-escaped.js [espree] format 1`] = ` "Unexpected token n\\u{63} (2:8) 1 | // export asyn\\u{63} from "async"; > 2 | export n\\u{63} from "async"; - | ^" + | ^ +Cause: Unexpected token n\\u{63}" `; exports[`default-escaped.js [flow] format 1`] = ` @@ -25,7 +27,8 @@ exports[`default-escaped.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (2:12) 1 | // export asyn\\u{63} from "async"; > 2 | export n\\u{63} from "async"; - | ^" + | ^ +Cause: [2:12]: Unexpected token: 'identifier'" `; exports[`default-escaped.js format 1`] = ` diff --git a/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap index fa0a79dc1..556afb71d 100644 --- a/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/export-default/export-default-from/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`export.js [acorn] format 1`] = ` | ^ 3 | export a, * as b from 'mod'; 4 | export c, { foo } from 'mod'; - 5 | export * as d from 'mod';" + 5 | export * as d from 'mod'; +Cause: Unexpected token (2:7)" `; exports[`export.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`export.js [espree] format 1`] = ` | ^ 3 | export a, * as b from 'mod'; 4 | export c, { foo } from 'mod'; - 5 | export * as d from 'mod';" + 5 | export * as d from 'mod'; +Cause: Unexpected token v" `; exports[`export.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`export.js [meriyah] format 1`] = ` | ^ 3 | export a, * as b from 'mod'; 4 | export c, { foo } from 'mod'; - 5 | export * as d from 'mod';" + 5 | export * as d from 'mod'; +Cause: [2:8]: Unexpected token: 'identifier'" `; exports[`export.js format 1`] = ` diff --git a/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap index 854ded8a5..473e7b1ba 100644 --- a/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap @@ -75,7 +75,8 @@ exports[`export-star-as-string.js [typescript] format 1`] = ` "Identifier expected. (1:13) > 1 | export * as 'foo' from 'foo' | ^ - 2 |" + 2 | +Cause: Identifier expected." `; exports[`export-star-as-string.js format 1`] = ` @@ -103,7 +104,8 @@ exports[`export-star-as-string2.js [typescript] format 1`] = ` "Identifier expected. (1:13) > 1 | export * as "foo" from 'foo' | ^ - 2 |" + 2 | +Cause: Identifier expected." `; exports[`export-star-as-string2.js format 1`] = ` diff --git a/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap index 052c9ed21..5eff834ed 100644 --- a/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/export/__snapshots__/jsfmt.spec.js.snap @@ -349,28 +349,32 @@ exports[`undefined.js [acorn] format 1`] = ` "Export 'undefinedExport' is not defined (1:10) > 1 | export { undefinedExport }; | ^ - 2 |" + 2 | +Cause: Export 'undefinedExport' is not defined (1:9)" `; exports[`undefined.js [espree] format 1`] = ` "Export 'undefinedExport' is not defined (1:10) > 1 | export { undefinedExport }; | ^ - 2 |" + 2 | +Cause: Export 'undefinedExport' is not defined" `; exports[`undefined.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Export 'undefinedExport' is not defined (1:10) > 1 | export { undefinedExport }; | ^ - 2 |" + 2 | +Cause: Export 'undefinedExport' is not defined (1:9)" `; exports[`undefined.js - {"bracketSpacing":false} [espree] format 1`] = ` "Export 'undefinedExport' is not defined (1:10) > 1 | export { undefinedExport }; | ^ - 2 |" + 2 | +Cause: Export 'undefinedExport' is not defined" `; exports[`undefined.js - {"bracketSpacing":false} format 1`] = ` diff --git a/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap index 1c6fa187c..864243cdb 100644 --- a/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/function-single-destructuring/__snapshots__/jsfmt.spec.js.snap @@ -243,7 +243,8 @@ exports[`tuple-and-record.js [acorn] format 1`] = ` | ^ 23 | } 24 | - 25 | function StatelessFunctionalComponent3([" + 25 | function StatelessFunctionalComponent3([ +Cause: Unexpected character '{' (22:5)" `; exports[`tuple-and-record.js [espree] format 1`] = ` @@ -254,7 +255,8 @@ exports[`tuple-and-record.js [espree] format 1`] = ` | ^ 23 | } 24 | - 25 | function StatelessFunctionalComponent3([" + 25 | function StatelessFunctionalComponent3([ +Cause: Unexpected character '{'" `; exports[`tuple-and-record.js [flow] format 1`] = ` @@ -276,7 +278,8 @@ exports[`tuple-and-record.js [meriyah] format 1`] = ` | ^ 23 | } 24 | - 25 | function StatelessFunctionalComponent3([" + 25 | function StatelessFunctionalComponent3([ +Cause: [22:5]: '#' not followed by identifier" `; exports[`tuple-and-record.js format 1`] = ` diff --git a/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap index 710718ef2..82a7a8e26 100644 --- a/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/ignore/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`class-expression-decorator.js [acorn] format 1`] = ` | ^ 4 | class {} 5 | ); - 6 |" + 6 | +Cause: Unexpected character '@' (3:2)" `; exports[`class-expression-decorator.js [espree] format 1`] = ` @@ -19,7 +20,8 @@ exports[`class-expression-decorator.js [espree] format 1`] = ` | ^ 4 | class {} 5 | ); - 6 |" + 6 | +Cause: Unexpected character '@'" `; exports[`class-expression-decorator.js [flow] format 1`] = ` @@ -61,7 +63,8 @@ exports[`decorator.js [acorn] format 1`] = ` > 2 | @decorator | ^ 3 | class A {} - 4 |" + 4 | +Cause: Unexpected character '@' (2:0)" `; exports[`decorator.js [espree] format 1`] = ` @@ -70,7 +73,8 @@ exports[`decorator.js [espree] format 1`] = ` > 2 | @decorator | ^ 3 | class A {} - 4 |" + 4 | +Cause: Unexpected character '@'" `; exports[`decorator.js format 1`] = ` diff --git a/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap index d6ea22a64..cd510baf0 100644 --- a/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`dynamic-import.js [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`dynamic-import.js [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`dynamic-import.js [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`dynamic-import.js format 1`] = ` @@ -42,7 +45,8 @@ exports[`empty.js [acorn] format 1`] = ` | ^ 3 | export * as baz from "baz.json" assert { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: Unexpected token (2:32)" `; exports[`empty.js [espree] format 1`] = ` @@ -52,7 +56,8 @@ exports[`empty.js [espree] format 1`] = ` | ^ 3 | export * as baz from "baz.json" assert { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: Unexpected token assert" `; exports[`empty.js [meriyah] format 1`] = ` @@ -62,7 +67,8 @@ exports[`empty.js [meriyah] format 1`] = ` | ^ 3 | export * as baz from "baz.json" assert { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: [2:38]: Unexpected token: 'identifier'" `; exports[`empty.js format 1`] = ` @@ -94,21 +100,24 @@ exports[`multi-types.js [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`multi-types.js [espree] format 1`] = ` "Unexpected token assert (1:31) > 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`multi-types.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) > 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: [1:36]: Unexpected token: 'identifier'" `; exports[`multi-types.js format 1`] = ` @@ -129,21 +138,24 @@ exports[`non-type.js [acorn] format 1`] = ` "Unexpected token (1:28) > 1 | import foo from "foo.json" assert { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:27)" `; exports[`non-type.js [espree] format 1`] = ` "Unexpected token assert (1:28) > 1 | import foo from "foo.json" assert { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`non-type.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:33) > 1 | import foo from "foo.json" assert { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: [1:33]: Unexpected token: 'identifier'" `; exports[`non-type.js format 1`] = ` @@ -182,7 +194,8 @@ exports[`re-export.js [acorn] format 1`] = ` | ^ 2 | export * from "foo.json" assert { type: "json" }; 3 | export * as foo3 from "foo.json" assert { type: "json" }; - 4 |" + 4 | +Cause: Unexpected token (1:43)" `; exports[`re-export.js [espree] format 1`] = ` @@ -191,7 +204,8 @@ exports[`re-export.js [espree] format 1`] = ` | ^ 2 | export * from "foo.json" assert { type: "json" }; 3 | export * as foo3 from "foo.json" assert { type: "json" }; - 4 |" + 4 | +Cause: Unexpected token assert" `; exports[`re-export.js [meriyah] format 1`] = ` @@ -200,7 +214,8 @@ exports[`re-export.js [meriyah] format 1`] = ` | ^ 2 | export * from "foo.json" assert { type: "json" }; 3 | export * as foo3 from "foo.json" assert { type: "json" }; - 4 |" + 4 | +Cause: [1:49]: Unexpected token: 'identifier'" `; exports[`re-export.js format 1`] = ` @@ -225,21 +240,24 @@ exports[`static-import.js [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`static-import.js [espree] format 1`] = ` "Unexpected token assert (1:31) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`static-import.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:36]: Unexpected token: 'identifier'" `; exports[`static-import.js format 1`] = ` @@ -260,21 +278,24 @@ exports[`without-from.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import "foo" assert { type: "json" } | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`without-from.js [espree] format 1`] = ` "Unexpected token assert (1:14) > 1 | import "foo" assert { type: "json" } | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`without-from.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:19) > 1 | import "foo" assert { type: "json" } | ^ - 2 |" + 2 | +Cause: [1:19]: Unexpected token: 'identifier'" `; exports[`without-from.js format 1`] = ` diff --git a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap index 8ac26309b..884bb803b 100644 --- a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`dynamic-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`dynamic-import.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`dynamic-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { assert: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = ` @@ -39,19 +42,22 @@ import("./foo.json", {assert: {type: "json"}}); exports[`empty.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:33) > 1 | export * as bar from "bar.json" assert { } - | ^" + | ^ +Cause: Unexpected token (1:32)" `; exports[`empty.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token assert (1:33) > 1 | export * as bar from "bar.json" assert { } - | ^" + | ^ +Cause: Unexpected token assert" `; exports[`empty.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:38) > 1 | export * as bar from "bar.json" assert { } - | ^" + | ^ +Cause: [1:38]: Unexpected token: 'identifier'" `; exports[`empty.js - {"bracketSpacing":false} format 1`] = ` @@ -72,21 +78,24 @@ exports[`re-export.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:44) > 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:43)" `; exports[`re-export.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token assert (1:44) > 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:49) > 1 | export { default as foo2 } from "foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:49]: Unexpected token: 'identifier'" `; exports[`re-export.js - {"bracketSpacing":false} format 1`] = ` @@ -108,21 +117,24 @@ exports[`static-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`static-import.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token assert (1:31) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token assert" `; exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) > 1 | import json from "./foo.json" assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:36]: Unexpected token: 'identifier'" `; exports[`static-import.js - {"bracketSpacing":false} format 1`] = ` diff --git a/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap index 08fa4fda4..9024e0269 100644 --- a/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`dynamic-import.js [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`dynamic-import.js [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`dynamic-import.js [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`dynamic-import.js format 1`] = ` @@ -42,7 +45,8 @@ exports[`empty.js [acorn] format 1`] = ` | ^ 3 | export * as baz from "baz.json" with { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: Unexpected token (2:32)" `; exports[`empty.js [espree] format 1`] = ` @@ -52,7 +56,8 @@ exports[`empty.js [espree] format 1`] = ` | ^ 3 | export * as baz from "baz.json" with { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: Unexpected token with" `; exports[`empty.js [meriyah] format 1`] = ` @@ -62,7 +67,8 @@ exports[`empty.js [meriyah] format 1`] = ` | ^ 3 | export * as baz from "baz.json" with { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: [2:36]: Unexpected token: 'with'" `; exports[`empty.js [typescript] format 1`] = ` @@ -72,7 +78,8 @@ exports[`empty.js [typescript] format 1`] = ` | ^ 3 | export * as baz from "baz.json" with { /* comment */ } 4 | - 5 | import * as foo from "foo.json"" + 5 | import * as foo from "foo.json" +Cause: ';' expected." `; exports[`empty.js format 1`] = ` @@ -105,28 +112,32 @@ exports[`multi-types.js [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" with { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`multi-types.js [espree] format 1`] = ` "Unexpected token with (1:31) > 1 | import json from "./foo.json" with { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`multi-types.js [meriyah] format 1`] = ` "Unexpected token: 'with' (1:34) > 1 | import json from "./foo.json" with { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: [1:34]: Unexpected token: 'with'" `; exports[`multi-types.js [typescript] format 1`] = ` "';' expected. (1:31) > 1 | import json from "./foo.json" with { type: "json", type: "bar" }; | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`multi-types.js format 1`] = ` @@ -147,28 +158,32 @@ exports[`non-type.js [acorn] format 1`] = ` "Unexpected token (1:28) > 1 | import foo from "foo.json" with { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:27)" `; exports[`non-type.js [espree] format 1`] = ` "Unexpected token with (1:28) > 1 | import foo from "foo.json" with { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`non-type.js [meriyah] format 1`] = ` "Unexpected token: 'with' (1:31) > 1 | import foo from "foo.json" with { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: [1:31]: Unexpected token: 'with'" `; exports[`non-type.js [typescript] format 1`] = ` "';' expected. (1:28) > 1 | import foo from "foo.json" with { lazy: "true" }; | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`non-type.js format 1`] = ` @@ -191,7 +206,8 @@ exports[`re-export.js [acorn] format 1`] = ` | ^ 2 | export * from "foo.json" with { type: "json" }; 3 | export * as foo3 from "foo.json" with { type: "json" }; - 4 |" + 4 | +Cause: Unexpected token (1:43)" `; exports[`re-export.js [espree] format 1`] = ` @@ -200,7 +216,8 @@ exports[`re-export.js [espree] format 1`] = ` | ^ 2 | export * from "foo.json" with { type: "json" }; 3 | export * as foo3 from "foo.json" with { type: "json" }; - 4 |" + 4 | +Cause: Unexpected token with" `; exports[`re-export.js [meriyah] format 1`] = ` @@ -209,7 +226,8 @@ exports[`re-export.js [meriyah] format 1`] = ` | ^ 2 | export * from "foo.json" with { type: "json" }; 3 | export * as foo3 from "foo.json" with { type: "json" }; - 4 |" + 4 | +Cause: [1:47]: Unexpected token: 'with'" `; exports[`re-export.js [typescript] format 1`] = ` @@ -218,7 +236,8 @@ exports[`re-export.js [typescript] format 1`] = ` | ^ 2 | export * from "foo.json" with { type: "json" }; 3 | export * as foo3 from "foo.json" with { type: "json" }; - 4 |" + 4 | +Cause: ';' expected." `; exports[`re-export.js format 1`] = ` @@ -243,28 +262,32 @@ exports[`static-import.js [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`static-import.js [espree] format 1`] = ` "Unexpected token with (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`static-import.js [meriyah] format 1`] = ` "Unexpected token: 'with' (1:34) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:34]: Unexpected token: 'with'" `; exports[`static-import.js [typescript] format 1`] = ` "';' expected. (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`static-import.js format 1`] = ` @@ -285,28 +308,32 @@ exports[`without-from.js [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | import "foo" with { type: "json" } | ^ - 2 |" + 2 | +Cause: Unexpected token (1:13)" `; exports[`without-from.js [espree] format 1`] = ` "Unexpected token with (1:14) > 1 | import "foo" with { type: "json" } | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`without-from.js [meriyah] format 1`] = ` "Unexpected token: 'with' (1:17) > 1 | import "foo" with { type: "json" } | ^ - 2 |" + 2 | +Cause: [1:17]: Unexpected token: 'with'" `; exports[`without-from.js [typescript] format 1`] = ` "';' expected. (1:14) > 1 | import "foo" with { type: "json" } | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`without-from.js format 1`] = ` diff --git a/tests/format/js/import-attributes/bracket-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-attributes/bracket-spacing/__snapshots__/jsfmt.spec.js.snap index 828d539d1..18d759c64 100644 --- a/tests/format/js/import-attributes/bracket-spacing/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-attributes/bracket-spacing/__snapshots__/jsfmt.spec.js.snap @@ -4,21 +4,24 @@ exports[`dynamic-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`dynamic-import.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token , (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: Unexpected token ," `; exports[`dynamic-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Expected ')' (1:20) > 1 | import("./foo.json", { with: { type: "json" } }); | ^ - 2 |" + 2 | +Cause: [1:20]: Expected ')'" `; exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = ` @@ -39,19 +42,22 @@ import("./foo.json", {with: {type: "json"}}); exports[`empty.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:33) > 1 | export * as bar from "bar.json" with { } - | ^" + | ^ +Cause: Unexpected token (1:32)" `; exports[`empty.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token with (1:33) > 1 | export * as bar from "bar.json" with { } - | ^" + | ^ +Cause: Unexpected token with" `; exports[`empty.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'with' (1:36) > 1 | export * as bar from "bar.json" with { } - | ^" + | ^ +Cause: [1:36]: Unexpected token: 'with'" `; exports[`empty.js - {"bracketSpacing":false} format 1`] = ` @@ -72,21 +78,24 @@ exports[`re-export.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:44) > 1 | export { default as foo2 } from "foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:43)" `; exports[`re-export.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token with (1:44) > 1 | export { default as foo2 } from "foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'with' (1:47) > 1 | export { default as foo2 } from "foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:47]: Unexpected token: 'with'" `; exports[`re-export.js - {"bracketSpacing":false} format 1`] = ` @@ -108,21 +117,24 @@ exports[`static-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:30)" `; exports[`static-import.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token with (1:31) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token with" `; exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'with' (1:34) > 1 | import json from "./foo.json" with { type: "json" }; | ^ - 2 |" + 2 | +Cause: [1:34]: Unexpected token: 'with'" `; exports[`static-import.js - {"bracketSpacing":false} format 1`] = ` diff --git a/tests/format/js/import-reflection/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-reflection/__snapshots__/jsfmt.spec.js.snap index 96fa08e87..ef3380bf9 100644 --- a/tests/format/js/import-reflection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-reflection/__snapshots__/jsfmt.spec.js.snap @@ -4,14 +4,16 @@ exports[`comments.js [acorn] format 1`] = ` "Unexpected token (1:48) > 1 | /* 0 */import /* 1 */module /* 2 */from /* 3 */from /* 4 */"./module.wasm"/* 5 */; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:47)" `; exports[`comments.js [espree] format 1`] = ` "Unexpected token from (1:48) > 1 | /* 0 */import /* 1 */module /* 2 */from /* 3 */from /* 4 */"./module.wasm"/* 5 */; | ^ - 2 |" + 2 | +Cause: Unexpected token from" `; exports[`comments.js [flow] format 1`] = ` @@ -25,14 +27,16 @@ exports[`comments.js [meriyah] format 1`] = ` "Import source must be string (1:51) > 1 | /* 0 */import /* 1 */module /* 2 */from /* 3 */from /* 4 */"./module.wasm"/* 5 */; | ^ - 2 |" + 2 | +Cause: [1:51]: Import source must be string" `; exports[`comments.js [typescript] format 1`] = ` "';' expected. (1:60) > 1 | /* 0 */import /* 1 */module /* 2 */from /* 3 */from /* 4 */"./module.wasm"/* 5 */; | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`comments.js format 1`] = ` @@ -53,14 +57,16 @@ exports[`import-reflection.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`import-reflection.js [espree] format 1`] = ` "Unexpected token foo (1:15) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token foo" `; exports[`import-reflection.js [flow] format 1`] = ` @@ -74,14 +80,16 @@ exports[`import-reflection.js [meriyah] format 1`] = ` "Import source must be string (1:17) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: [1:17]: Import source must be string" `; exports[`import-reflection.js [typescript] format 1`] = ` "'=' expected. (1:15) > 1 | import module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: '=' expected." `; exports[`import-reflection.js format 1`] = ` @@ -103,7 +111,8 @@ exports[`valid-default-import.mjs [acorn] format 1`] = ` > 1 | import module foo from "./module.wasm"; | ^ 2 | import bar from "./module.wasm"; - 3 |" + 3 | +Cause: Unexpected token (1:14)" `; exports[`valid-default-import.mjs [espree] format 1`] = ` @@ -111,7 +120,8 @@ exports[`valid-default-import.mjs [espree] format 1`] = ` > 1 | import module foo from "./module.wasm"; | ^ 2 | import bar from "./module.wasm"; - 3 |" + 3 | +Cause: Unexpected token foo" `; exports[`valid-default-import.mjs [flow] format 1`] = ` @@ -127,7 +137,8 @@ exports[`valid-default-import.mjs [meriyah] format 1`] = ` > 1 | import module foo from "./module.wasm"; | ^ 2 | import bar from "./module.wasm"; - 3 |" + 3 | +Cause: [1:17]: Import source must be string" `; exports[`valid-default-import.mjs [typescript] format 1`] = ` @@ -135,7 +146,8 @@ exports[`valid-default-import.mjs [typescript] format 1`] = ` > 1 | import module foo from "./module.wasm"; | ^ 2 | import bar from "./module.wasm"; - 3 |" + 3 | +Cause: '=' expected." `; exports[`valid-default-import.mjs format 1`] = ` @@ -158,14 +170,16 @@ exports[`valid-from-as-default-module-binding.mjs [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import module from from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`valid-from-as-default-module-binding.mjs [espree] format 1`] = ` "Unexpected token from (1:20) > 1 | import module from from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token from" `; exports[`valid-from-as-default-module-binding.mjs [flow] format 1`] = ` @@ -179,14 +193,16 @@ exports[`valid-from-as-default-module-binding.mjs [meriyah] format 1`] = ` "Import source must be string (1:23) > 1 | import module from from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: [1:23]: Import source must be string" `; exports[`valid-from-as-default-module-binding.mjs [typescript] format 1`] = ` "';' expected. (1:25) > 1 | import module from from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`valid-from-as-default-module-binding.mjs format 1`] = ` @@ -207,14 +223,16 @@ exports[`valid-from-as-default-module-binding-escaped.mjs [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import module \\u0066rom from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`valid-from-as-default-module-binding-escaped.mjs [espree] format 1`] = ` "Unexpected token \\u0066rom (1:15) > 1 | import module \\u0066rom from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token \\u0066rom" `; exports[`valid-from-as-default-module-binding-escaped.mjs [flow] format 1`] = ` @@ -228,14 +246,16 @@ exports[`valid-from-as-default-module-binding-escaped.mjs [meriyah] format 1`] = "Import source must be string (1:17) > 1 | import module \\u0066rom from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: [1:17]: Import source must be string" `; exports[`valid-from-as-default-module-binding-escaped.mjs [typescript] format 1`] = ` "Keywords cannot contain escape characters. (1:15) > 1 | import module \\u0066rom from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Keywords cannot contain escape characters." `; exports[`valid-from-as-default-module-binding-escaped.mjs format 1`] = ` diff --git a/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap index a40691a62..ac2c64bef 100644 --- a/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/invalid-code/__snapshots__/jsfmt.spec.js.snap @@ -4,14 +4,16 @@ exports[`duplicate_bindings.js [acorn] format 1`] = ` "Identifier 'A' has already been declared (1:19) > 1 | class A{} class A{} | ^ - 2 |" + 2 | +Cause: Identifier 'A' has already been declared (1:18)" `; exports[`duplicate_bindings.js [espree] format 1`] = ` "Identifier 'A' has already been declared (1:19) > 1 | class A{} class A{} | ^ - 2 |" + 2 | +Cause: Identifier 'A' has already been declared" `; exports[`duplicate_bindings.js format 1`] = ` diff --git a/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap index 91a032d9b..b3f594e45 100644 --- a/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/method-chain/__snapshots__/jsfmt.spec.js.snap @@ -1553,7 +1553,8 @@ exports[`tuple-and-record.js [acorn] format 1`] = ` | ^ 3 | 4 | foo.a().b().c({n, o}) - 5 | foo.a().b().c(#{n, o})" + 5 | foo.a().b().c(#{n, o}) +Cause: Unexpected character '[' (2:15)" `; exports[`tuple-and-record.js [espree] format 1`] = ` @@ -1563,7 +1564,8 @@ exports[`tuple-and-record.js [espree] format 1`] = ` | ^ 3 | 4 | foo.a().b().c({n, o}) - 5 | foo.a().b().c(#{n, o})" + 5 | foo.a().b().c(#{n, o}) +Cause: Unexpected character '['" `; exports[`tuple-and-record.js [flow] format 1`] = ` @@ -1583,7 +1585,8 @@ exports[`tuple-and-record.js [meriyah] format 1`] = ` | ^ 3 | 4 | foo.a().b().c({n, o}) - 5 | foo.a().b().c(#{n, o})" + 5 | foo.a().b().c(#{n, o}) +Cause: [2:15]: '#' not followed by identifier" `; exports[`tuple-and-record.js [typescript] format 1`] = ` @@ -1593,7 +1596,8 @@ exports[`tuple-and-record.js [typescript] format 1`] = ` | ^ 3 | 4 | foo.a().b().c({n, o}) - 5 | foo.a().b().c(#{n, o})" + 5 | foo.a().b().c(#{n, o}) +Cause: Invalid character." `; exports[`tuple-and-record.js format 1`] = ` diff --git a/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap index 6c178e55c..61cd278bf 100644 --- a/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`comments.js [acorn] format 1`] = ` | ^ 2 | /*A4*/ 3 | export const foo = "foo"; - 4 | export { foo }; /*A5*/" + 4 | export { foo }; /*A5*/ +Cause: Unexpected token (1:31)" `; exports[`comments.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`comments.js [espree] format 1`] = ` | ^ 2 | /*A4*/ 3 | export const foo = "foo"; - 4 | export { foo }; /*A5*/" + 4 | export { foo }; /*A5*/ +Cause: Unexpected token {" `; exports[`comments.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`comments.js [meriyah] format 1`] = ` | ^ 2 | /*A4*/ 3 | export const foo = "foo"; - 4 | export { foo }; /*A5*/" + 4 | export { foo }; /*A5*/ +Cause: [1:32]: Unexpected token: '{'" `; exports[`comments.js format 1`] = ` @@ -67,7 +70,8 @@ exports[`module-blocks.js [acorn] format 1`] = ` | ^ 2 | 3 | class B { - 4 | #p() {" + 4 | #p() { +Cause: Unexpected token (1:7)" `; exports[`module-blocks.js [espree] format 1`] = ` @@ -76,7 +80,8 @@ exports[`module-blocks.js [espree] format 1`] = ` | ^ 2 | 3 | class B { - 4 | #p() {" + 4 | #p() { +Cause: Unexpected token {" `; exports[`module-blocks.js [meriyah] format 1`] = ` @@ -85,7 +90,8 @@ exports[`module-blocks.js [meriyah] format 1`] = ` | ^ 2 | 3 | class B { - 4 | #p() {" + 4 | #p() { +Cause: [1:8]: Unexpected token: '{'" `; exports[`module-blocks.js format 1`] = ` @@ -211,7 +217,8 @@ exports[`range.js [acorn] format 1`] = ` | ^ 2 | }; 3 | - 4 | foo(module { export let foo = "foo"; })" + 4 | foo(module { export let foo = "foo"; }) +Cause: Unexpected token (1:25)" `; exports[`range.js [espree] format 1`] = ` @@ -220,7 +227,8 @@ exports[`range.js [espree] format 1`] = ` | ^ 2 | }; 3 | - 4 | foo(module { export let foo = "foo"; })" + 4 | foo(module { export let foo = "foo"; }) +Cause: Unexpected token {" `; exports[`range.js [meriyah] format 1`] = ` @@ -229,7 +237,8 @@ exports[`range.js [meriyah] format 1`] = ` | ^ 2 | }; 3 | - 4 | foo(module { export let foo = "foo"; })" + 4 | foo(module { export let foo = "foo"; }) +Cause: [1:26]: Unexpected token: '{'" `; exports[`range.js format 1`] = ` @@ -267,7 +276,8 @@ exports[`worker.js [acorn] format 1`] = ` | ^ 2 | onmessage = function({data}) { 3 | let mod = import(data); - 4 | postMessage(mod.fn());" + 4 | postMessage(mod.fn()); +Cause: Unexpected token (1:31)" `; exports[`worker.js [espree] format 1`] = ` @@ -276,7 +286,8 @@ exports[`worker.js [espree] format 1`] = ` | ^ 2 | onmessage = function({data}) { 3 | let mod = import(data); - 4 | postMessage(mod.fn());" + 4 | postMessage(mod.fn()); +Cause: Unexpected token {" `; exports[`worker.js [meriyah] format 1`] = ` @@ -285,7 +296,8 @@ exports[`worker.js [meriyah] format 1`] = ` | ^ 2 | onmessage = function({data}) { 3 | let mod = import(data); - 4 | postMessage(mod.fn());" + 4 | postMessage(mod.fn()); +Cause: [1:32]: Expected ')'" `; exports[`worker.js format 1`] = ` diff --git a/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap index 59fca2ebe..2f1408a20 100644 --- a/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`module-string-names-export.js [meriyah] format 1`] = ` | ^ 2 | export { "smile" as smile2 } from "./emojis.js"; 3 | export { "smile" as "smile3" } from "./emojis.js"; - 4 | export { foo1, bar as "foo2" } from "./emojis.js";" + 4 | export { foo1, bar as "foo2" } from "./emojis.js"; +Cause: [1:26]: Only a identifier can be used to indicate alias" `; exports[`module-string-names-export.js format 1`] = ` @@ -42,7 +43,8 @@ exports[`module-string-names-import.js [meriyah] format 1`] = ` | ^ 2 | import { "foo" as bar, "default" as qux } from "module-a"; 3 | import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; - 4 |" + 4 | +Cause: [1:18]: Expected '}'" `; exports[`module-string-names-import.js format 1`] = ` diff --git a/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap index b01edb089..99efe4ece 100644 --- a/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`text.js [acorn] format 1`] = ` | ^ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: Bad escape sequence in untagged template literal (6:17)" `; exports[`text.js [espree] format 1`] = ` @@ -19,7 +20,8 @@ exports[`text.js [espree] format 1`] = ` | ^ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: Bad escape sequence in untagged template literal" `; exports[`text.js [flow] format 1`] = ` @@ -39,7 +41,8 @@ exports[`text.js [meriyah] format 1`] = ` | ^ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: [6:20]: Invalid hexadecimal escape sequence" `; exports[`text.js [typescript] format 1`] = ` @@ -50,7 +53,8 @@ exports[`text.js [typescript] format 1`] = ` | ^ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`; +Cause: Hexadecimal digit expected." `; exports[`text.js format 1`] = ` diff --git a/tests/format/js/new-target/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/new-target/__snapshots__/jsfmt.spec.js.snap index 5afd170cc..26c0be5b8 100644 --- a/tests/format/js/new-target/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/new-target/__snapshots__/jsfmt.spec.js.snap @@ -4,14 +4,16 @@ exports[`outside-functions.js [acorn] format 1`] = ` "'new.target' can only be used in functions and class static block (1:11) > 1 | const x = new.target; | ^ - 2 |" + 2 | +Cause: 'new.target' can only be used in functions and class static block (1:10)" `; exports[`outside-functions.js [espree] format 1`] = ` "'new.target' can only be used in functions and class static block (1:11) > 1 | const x = new.target; | ^ - 2 |" + 2 | +Cause: 'new.target' can only be used in functions and class static block" `; exports[`outside-functions.js [flow] format 1`] = ` @@ -25,7 +27,8 @@ exports[`outside-functions.js [meriyah] format 1`] = ` "new.target only allowed within functions (1:20) > 1 | const x = new.target; | ^ - 2 |" + 2 | +Cause: [1:20]: new.target only allowed within functions" `; exports[`outside-functions.js format 1`] = ` @@ -46,14 +49,16 @@ exports[`range.js [acorn] format 1`] = ` "'new.target' can only be used in functions and class static block (2:1) 1 | const x = > 2 | new.target; - | ^" + | ^ +Cause: 'new.target' can only be used in functions and class static block (2:0)" `; exports[`range.js [espree] format 1`] = ` "'new.target' can only be used in functions and class static block (2:1) 1 | const x = > 2 | new.target; - | ^" + | ^ +Cause: 'new.target' can only be used in functions and class static block" `; exports[`range.js [flow] format 1`] = ` @@ -67,7 +72,8 @@ exports[`range.js [meriyah] format 1`] = ` "new.target only allowed within functions (2:10) 1 | const x = > 2 | new.target; - | ^" + | ^ +Cause: [2:10]: new.target only allowed within functions" `; exports[`range.js format 1`] = ` diff --git a/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap index 62fddaed3..a41e9e189 100644 --- a/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/no-semi-babylon-extensions/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`no-semi.js [acorn] format 1`] = ` | ^ 3 | 4 | class A { - 5 | a = b;" + 5 | a = b; +Cause: Unexpected token (2:1)" `; exports[`no-semi.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`no-semi.js [espree] format 1`] = ` | ^ 3 | 4 | class A { - 5 | a = b;" + 5 | a = b; +Cause: Unexpected token :" `; exports[`no-semi.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`no-semi.js [meriyah] format 1`] = ` | ^ 3 | 4 | class A { - 5 | a = b;" + 5 | a = b; +Cause: [2:2]: Unexpected token: ':'" `; exports[`no-semi.js - {"semi":false} [acorn] format 1`] = ` @@ -37,7 +40,8 @@ exports[`no-semi.js - {"semi":false} [acorn] format 1`] = ` | ^ 3 | 4 | class A { - 5 | a = b;" + 5 | a = b; +Cause: Unexpected token (2:1)" `; exports[`no-semi.js - {"semi":false} [espree] format 1`] = ` @@ -47,7 +51,8 @@ exports[`no-semi.js - {"semi":false} [espree] format 1`] = ` | ^ 3 | 4 | class A { - 5 | a = b;" + 5 | a = b; +Cause: Unexpected token :" `; exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = ` @@ -57,7 +62,8 @@ exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = ` | ^ 3 | 4 | class A { - 5 | a = b;" + 5 | a = b; +Cause: [2:2]: Unexpected token: ':'" `; exports[`no-semi.js - {"semi":false} format 1`] = ` diff --git a/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap index 19773df14..391c9d291 100644 --- a/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/non-strict/__snapshots__/jsfmt.spec.js.snap @@ -48,7 +48,8 @@ exports[`octal-number.js [typescript] format 1`] = ` "Octal literals are not allowed. Use the syntax '0o777'. (1:1) > 1 | 0777 | ^ - 2 |" + 2 | +Cause: Octal literals are not allowed. Use the syntax '0o777'." `; exports[`octal-number.js format 1`] = ` diff --git a/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap index f74cde3be..b4d516a88 100644 --- a/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/numeric-separators/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`number.js [typescript] format 1`] = ` > 3 | a = 09e1_1; | ^ 4 | a = 09.1_1; - 5 |" + 5 | +Cause: Decimals with leading zeros are not allowed." `; exports[`number.js format 1`] = ` diff --git a/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap index 1aa2deba2..259a9b285 100644 --- a/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/objects/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`bigint-key.js [typescript] format 1`] = ` | ^ 2 | a = {1n() {}} 3 | a = {get 1n() {}} - 4 |" + 4 | +Cause: Property assignment expected." `; exports[`bigint-key.js format 1`] = ` @@ -87,7 +88,8 @@ exports[`expression.js [acorn] format 1`] = ` | ^ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); 7 | ({}(), 0); - 8 | ({} = 0);" + 8 | ({} = 0); +Cause: Unexpected token (5:3)" `; exports[`expression.js [espree] format 1`] = ` @@ -98,7 +100,8 @@ exports[`expression.js [espree] format 1`] = ` | ^ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); 7 | ({}(), 0); - 8 | ({} = 0);" + 8 | ({} = 0); +Cause: Unexpected token :" `; exports[`expression.js [flow] format 1`] = ` @@ -120,7 +123,8 @@ exports[`expression.js [meriyah] format 1`] = ` | ^ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); 7 | ({}(), 0); - 8 | ({} = 0);" + 8 | ({} = 0); +Cause: [5:4]: Expected ')'" `; exports[`expression.js [typescript] format 1`] = ` @@ -131,7 +135,8 @@ exports[`expression.js [typescript] format 1`] = ` | ^ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0); 7 | ({}(), 0); - 8 | ({} = 0);" + 8 | ({} = 0); +Cause: ')' expected." `; exports[`expression.js format 1`] = ` diff --git a/tests/format/js/optional-chaining-assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/optional-chaining-assignment/__snapshots__/jsfmt.spec.js.snap index a805cf434..2b0544122 100644 --- a/tests/format/js/optional-chaining-assignment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/optional-chaining-assignment/__snapshots__/jsfmt.spec.js.snap @@ -4,350 +4,400 @@ exports[`invalid-destructuring-arr.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2) > 1 | [a?.b] = []; | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)" `; exports[`invalid-destructuring-arr.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:2) > 1 | [a?.b] = []; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:1)" `; exports[`invalid-destructuring-arr.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2) > 1 | [a?.b] = []; | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)" `; exports[`invalid-destructuring-arr.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:2) > 1 | [a?.b] = []; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-destructuring-arr.js [meriyah] format 1`] = ` "Invalid left-hand side in assignment (1:10) > 1 | [a?.b] = []; | ^ - 2 |" + 2 | +Cause: [1:10]: Invalid left-hand side in assignment" `; exports[`invalid-destructuring-obj.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10) > 1 | ({ prop: a?.b } = {}); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)" `; exports[`invalid-destructuring-obj.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:10) > 1 | ({ prop: a?.b } = {}); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:9)" `; exports[`invalid-destructuring-obj.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10) > 1 | ({ prop: a?.b } = {}); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)" `; exports[`invalid-destructuring-obj.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:10) > 1 | ({ prop: a?.b } = {}); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-destructuring-obj.js [meriyah] format 1`] = ` "Invalid left-hand side in assignment (1:19) > 1 | ({ prop: a?.b } = {}); | ^ - 2 |" + 2 | +Cause: [1:19]: Invalid left-hand side in assignment" `; exports[`invalid-fn-param.js [__babel_estree] format 1`] = ` "Unexpected token, expected "," (1:13) > 1 | function f(a?.b) {} | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "," (1:12)" `; exports[`invalid-fn-param.js [acorn] format 1`] = ` "Unexpected token (1:13) > 1 | function f(a?.b) {} | ^ - 2 |" + 2 | +Cause: Unexpected token (1:12)" `; exports[`invalid-fn-param.js [babel] format 1`] = ` "Unexpected token, expected "," (1:13) > 1 | function f(a?.b) {} | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "," (1:12)" `; exports[`invalid-fn-param.js [espree] format 1`] = ` "Unexpected token ?. (1:13) > 1 | function f(a?.b) {} | ^ - 2 |" + 2 | +Cause: Unexpected token ?." `; exports[`invalid-fn-param.js [meriyah] format 1`] = ` "Expected ')' (1:14) > 1 | function f(a?.b) {} | ^ - 2 |" + 2 | +Cause: [1:14]: Expected ')'" `; exports[`invalid-fn-param-arrow.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of function parameter list. (1:2) > 1 | (a?.b) => {} | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)" `; exports[`invalid-fn-param-arrow.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:2) > 1 | (a?.b) => {} | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:1)" `; exports[`invalid-fn-param-arrow.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of function parameter list. (1:2) > 1 | (a?.b) => {} | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)" `; exports[`invalid-fn-param-arrow.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:2) > 1 | (a?.b) => {} | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-fn-param-arrow.js [meriyah] format 1`] = ` "The left-hand side of the arrow can only be destructed through assignment (1:9) > 1 | (a?.b) => {} | ^ - 2 |" + 2 | +Cause: [1:9]: The left-hand side of the arrow can only be destructed through assignment" `; exports[`invalid-fn-param-assign.js [__babel_estree] format 1`] = ` "Unexpected token, expected "," (1:13) > 1 | function f(a?.b = c) {} | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "," (1:12)" `; exports[`invalid-fn-param-assign.js [acorn] format 1`] = ` "Unexpected token (1:13) > 1 | function f(a?.b = c) {} | ^ - 2 |" + 2 | +Cause: Unexpected token (1:12)" `; exports[`invalid-fn-param-assign.js [babel] format 1`] = ` "Unexpected token, expected "," (1:13) > 1 | function f(a?.b = c) {} | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "," (1:12)" `; exports[`invalid-fn-param-assign.js [espree] format 1`] = ` "Unexpected token ?. (1:13) > 1 | function f(a?.b = c) {} | ^ - 2 |" + 2 | +Cause: Unexpected token ?." `; exports[`invalid-fn-param-assign.js [meriyah] format 1`] = ` "Expected ')' (1:14) > 1 | function f(a?.b = c) {} | ^ - 2 |" + 2 | +Cause: [1:14]: Expected ')'" `; exports[`invalid-for-await-of.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of for-of statement. (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" `; exports[`invalid-for-await-of.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:5)" `; exports[`invalid-for-await-of.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of for-of statement. (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" `; exports[`invalid-for-await-of.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-for-await-of.js [meriyah] format 1`] = ` "Invalid left-hand side in for-of (1:12) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: [1:12]: Invalid left-hand side in for-of" `; exports[`invalid-for-in.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of for-in statement. (1:6) > 1 | for (a?.b in x); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)" `; exports[`invalid-for-in.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:6) > 1 | for (a?.b in x); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:5)" `; exports[`invalid-for-in.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of for-in statement. (1:6) > 1 | for (a?.b in x); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)" `; exports[`invalid-for-in.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:6) > 1 | for (a?.b in x); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-for-in.js [meriyah] format 1`] = ` "Invalid left-hand side in for-in (1:12) > 1 | for (a?.b in x); | ^ - 2 |" + 2 | +Cause: [1:12]: Invalid left-hand side in for-in" `; exports[`invalid-for-of.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of for-of statement. (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" `; exports[`invalid-for-of.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:5)" `; exports[`invalid-for-of.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of for-of statement. (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)" `; exports[`invalid-for-of.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:6) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-for-of.js [meriyah] format 1`] = ` "Invalid left-hand side in for-of (1:12) > 1 | for (a?.b of x); | ^ - 2 |" + 2 | +Cause: [1:12]: Invalid left-hand side in for-of" `; exports[`invalid-inc-postfix.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of postfix operation. (1:1) > 1 | a?.b++; | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" `; exports[`invalid-inc-postfix.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | a?.b++; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" `; exports[`invalid-inc-postfix.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of postfix operation. (1:1) > 1 | a?.b++; | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)" `; exports[`invalid-inc-postfix.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | a?.b++; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-inc-postfix.js [meriyah] format 1`] = ` "Invalid increment/decrement operand (1:6) > 1 | a?.b++; | ^ - 2 |" + 2 | +Cause: [1:6]: Invalid increment/decrement operand" `; exports[`invalid-inc-prefix.js [__babel_estree] format 1`] = ` "Invalid optional chaining in the left-hand side of prefix operation. (1:3) > 1 | ++a?.b; | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)" `; exports[`invalid-inc-prefix.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:3) > 1 | ++a?.b; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:2)" `; exports[`invalid-inc-prefix.js [babel] format 1`] = ` "Invalid optional chaining in the left-hand side of prefix operation. (1:3) > 1 | ++a?.b; | ^ - 2 |" + 2 | +Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)" `; exports[`invalid-inc-prefix.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:3) > 1 | ++a?.b; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`invalid-inc-prefix.js [meriyah] format 1`] = ` "Invalid increment/decrement operand (1:7) > 1 | ++a?.b; | ^ - 2 |" + 2 | +Cause: [1:7]: Invalid increment/decrement operand" `; exports[`valid-complex-case.js [acorn] format 1`] = ` @@ -355,7 +405,8 @@ exports[`valid-complex-case.js [acorn] format 1`] = ` > 1 | let?.()[a] =1; | ^ 2 | let?.[a] = 1; - 3 |" + 3 | +Cause: The keyword 'let' is reserved (1:0)" `; exports[`valid-complex-case.js [espree] format 1`] = ` @@ -363,7 +414,8 @@ exports[`valid-complex-case.js [espree] format 1`] = ` > 1 | let?.()[a] =1; | ^ 2 | let?.[a] = 1; - 3 |" + 3 | +Cause: The keyword 'let' is reserved" `; exports[`valid-complex-case.js [meriyah] format 1`] = ` @@ -371,7 +423,8 @@ exports[`valid-complex-case.js [meriyah] format 1`] = ` > 1 | let?.()[a] =1; | ^ 2 | let?.[a] = 1; - 3 |" + 3 | +Cause: [1:5]: \`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode" `; exports[`valid-complex-case.js format 1`] = ` @@ -394,14 +447,16 @@ exports[`valid-lhs-eq.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | a?.b.c = d; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" `; exports[`valid-lhs-eq.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | a?.b.c = d; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`valid-lhs-eq.js format 1`] = ` @@ -422,14 +477,16 @@ exports[`valid-lhs-plus-eq.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | a?.b.c += d; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:0)" `; exports[`valid-lhs-plus-eq.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:1) > 1 | a?.b.c += d; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`valid-lhs-plus-eq.js format 1`] = ` @@ -450,21 +507,24 @@ exports[`valid-parenthesized.js [acorn] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:2) > 1 | (a?.b) = c; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side (1:1)" `; exports[`valid-parenthesized.js [espree] format 1`] = ` "Optional chaining cannot appear in left-hand side (1:2) > 1 | (a?.b) = c; | ^ - 2 |" + 2 | +Cause: Optional chaining cannot appear in left-hand side" `; exports[`valid-parenthesized.js [meriyah] format 1`] = ` "Invalid left-hand side in assignment (1:8) > 1 | (a?.b) = c; | ^ - 2 |" + 2 | +Cause: [1:8]: Invalid left-hand side in assignment" `; exports[`valid-parenthesized.js format 1`] = ` diff --git a/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap index de5ca9608..534fd87c8 100644 --- a/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/partial-application/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`test.js [acorn] format 1`] = ` | ^ 2 | addOne(2); // 3 3 | - 4 | const addTen = add(?, 10); // apply from the right" + 4 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token (1:22)" `; exports[`test.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`test.js [espree] format 1`] = ` | ^ 2 | addOne(2); // 3 3 | - 4 | const addTen = add(?, 10); // apply from the right" + 4 | const addTen = add(?, 10); // apply from the right +Cause: Unexpected token ?" `; exports[`test.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`test.js [meriyah] format 1`] = ` | ^ 2 | addOne(2); // 3 3 | - 4 | const addTen = add(?, 10); // apply from the right" + 4 | const addTen = add(?, 10); // apply from the right +Cause: [1:23]: Unexpected token: '?'" `; exports[`test.js format 1`] = ` diff --git a/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap index c532009d4..4d736530d 100644 --- a/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/pipeline-operator/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`block-comments.js [acorn] format 1`] = ` | ^ 3 | |> foo2 /* comment1 */ 4 | |> foo3 /* comment2 */ - 5 | |> kochabCooieGameOnOboleUnweave" + 5 | |> kochabCooieGameOnOboleUnweave +Cause: Unexpected token (2:1)" `; exports[`block-comments.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`block-comments.js [espree] format 1`] = ` | ^ 3 | |> foo2 /* comment1 */ 4 | |> foo3 /* comment2 */ - 5 | |> kochabCooieGameOnOboleUnweave" + 5 | |> kochabCooieGameOnOboleUnweave +Cause: Unexpected token >" `; exports[`block-comments.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`block-comments.js [meriyah] format 1`] = ` | ^ 3 | |> foo2 /* comment1 */ 4 | |> foo3 /* comment2 */ - 5 | |> kochabCooieGameOnOboleUnweave" + 5 | |> kochabCooieGameOnOboleUnweave +Cause: [2:2]: Unexpected token: '>'" `; exports[`block-comments.js format 1`] = ` @@ -61,7 +64,8 @@ exports[`fsharp_style_pipeline_operator.js [acorn] format 1`] = ` | ^ 3 | |> x => doubleSay(x, ', ') 4 | |> capitalize - 5 | |> x => x + '!'" + 5 | |> x => x + '!' +Cause: Unexpected token (2:3)" `; exports[`fsharp_style_pipeline_operator.js [espree] format 1`] = ` @@ -71,7 +75,8 @@ exports[`fsharp_style_pipeline_operator.js [espree] format 1`] = ` | ^ 3 | |> x => doubleSay(x, ', ') 4 | |> capitalize - 5 | |> x => x + '!'" + 5 | |> x => x + '!' +Cause: Unexpected token >" `; exports[`fsharp_style_pipeline_operator.js [meriyah] format 1`] = ` @@ -81,7 +86,8 @@ exports[`fsharp_style_pipeline_operator.js [meriyah] format 1`] = ` | ^ 3 | |> x => doubleSay(x, ', ') 4 | |> capitalize - 5 | |> x => x + '!'" + 5 | |> x => x + '!' +Cause: [2:4]: Unexpected token: '>'" `; exports[`fsharp_style_pipeline_operator.js format 1`] = ` @@ -185,7 +191,8 @@ exports[`hack_pipeline_operator.js [acorn] format 1`] = ` | ^ 2 | 3 | foo - 4 | |> await %" + 4 | |> await % +Cause: Unexpected token (1:3)" `; exports[`hack_pipeline_operator.js [espree] format 1`] = ` @@ -194,7 +201,8 @@ exports[`hack_pipeline_operator.js [espree] format 1`] = ` | ^ 2 | 3 | foo - 4 | |> await %" + 4 | |> await % +Cause: Unexpected token >" `; exports[`hack_pipeline_operator.js [meriyah] format 1`] = ` @@ -203,7 +211,8 @@ exports[`hack_pipeline_operator.js [meriyah] format 1`] = ` | ^ 2 | 3 | foo - 4 | |> await %" + 4 | |> await % +Cause: [1:4]: Unexpected token: '>'" `; exports[`hack_pipeline_operator.js format 1`] = ` @@ -326,7 +335,8 @@ exports[`minimal_pipeline_operator.js [acorn] format 1`] = ` | ^ 2 | 3 | a |> (b |> c); - 4 |" + 4 | +Cause: Unexpected token (1:3)" `; exports[`minimal_pipeline_operator.js [espree] format 1`] = ` @@ -335,7 +345,8 @@ exports[`minimal_pipeline_operator.js [espree] format 1`] = ` | ^ 2 | 3 | a |> (b |> c); - 4 |" + 4 | +Cause: Unexpected token >" `; exports[`minimal_pipeline_operator.js [meriyah] format 1`] = ` @@ -344,7 +355,8 @@ exports[`minimal_pipeline_operator.js [meriyah] format 1`] = ` | ^ 2 | 3 | a |> (b |> c); - 4 |" + 4 | +Cause: [1:4]: Unexpected token: '>'" `; exports[`minimal_pipeline_operator.js format 1`] = ` diff --git a/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap index 7d384bd0d..a0bd23767 100644 --- a/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/private-in/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`private-in.js [acorn] format 1`] = ` | ^ 2 | } 3 | - 4 | #prop in obj;" + 4 | #prop in obj; +Cause: Unexpected token (1:4)" `; exports[`private-in.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`private-in.js [espree] format 1`] = ` | ^ 2 | } 3 | - 4 | #prop in obj;" + 4 | #prop in obj; +Cause: Unexpected token #prop" `; exports[`private-in.js format 1`] = ` diff --git a/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap index 066838221..a5a3007ea 100644 --- a/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`computed.js [acorn] format 1`] = ` | ^ 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) 4 | - 5 | assert(#{ [true]: 1 } === #{ true: 1 })" + 5 | assert(#{ [true]: 1 } === #{ true: 1 }) +Cause: Unexpected character '{' (2:8)" `; exports[`computed.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`computed.js [espree] format 1`] = ` | ^ 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) 4 | - 5 | assert(#{ [true]: 1 } === #{ true: 1 })" + 5 | assert(#{ [true]: 1 } === #{ true: 1 }) +Cause: Unexpected character '{'" `; exports[`computed.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`computed.js [meriyah] format 1`] = ` | ^ 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) 4 | - 5 | assert(#{ [true]: 1 } === #{ true: 1 })" + 5 | assert(#{ [true]: 1 } === #{ true: 1 }) +Cause: [2:8]: '#' not followed by identifier" `; exports[`computed.js format 1`] = ` @@ -66,7 +69,8 @@ exports[`destructuring.js [acorn] format 1`] = ` | ^ 2 | assert(a === 1); 3 | assert(b === 2); - 4 |" + 4 | +Cause: Unexpected character '{' (1:18)" `; exports[`destructuring.js [espree] format 1`] = ` @@ -75,7 +79,8 @@ exports[`destructuring.js [espree] format 1`] = ` | ^ 2 | assert(a === 1); 3 | assert(b === 2); - 4 |" + 4 | +Cause: Unexpected character '{'" `; exports[`destructuring.js [meriyah] format 1`] = ` @@ -84,7 +89,8 @@ exports[`destructuring.js [meriyah] format 1`] = ` | ^ 2 | assert(a === 1); 3 | assert(b === 2); - 4 |" + 4 | +Cause: [1:18]: '#' not followed by identifier" `; exports[`destructuring.js format 1`] = ` @@ -123,7 +129,8 @@ exports[`record.js [acorn] format 1`] = ` | ^ 2 | a: 1, 3 | b: 2, - 4 | c: 3," + 4 | c: 3, +Cause: Unexpected character '{' (1:17)" `; exports[`record.js [espree] format 1`] = ` @@ -132,7 +139,8 @@ exports[`record.js [espree] format 1`] = ` | ^ 2 | a: 1, 3 | b: 2, - 4 | c: 3," + 4 | c: 3, +Cause: Unexpected character '{'" `; exports[`record.js [meriyah] format 1`] = ` @@ -141,7 +149,8 @@ exports[`record.js [meriyah] format 1`] = ` | ^ 2 | a: 1, 3 | b: 2, - 4 | c: 3," + 4 | c: 3, +Cause: [1:17]: '#' not followed by identifier" `; exports[`record.js format 1`] = ` @@ -194,7 +203,8 @@ exports[`shorthand.js [acorn] format 1`] = ` > 2 | const record = #{ url } | ^ 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple - 4 |" + 4 | +Cause: Unexpected character '{' (2:16)" `; exports[`shorthand.js [espree] format 1`] = ` @@ -203,7 +213,8 @@ exports[`shorthand.js [espree] format 1`] = ` > 2 | const record = #{ url } | ^ 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple - 4 |" + 4 | +Cause: Unexpected character '{'" `; exports[`shorthand.js [meriyah] format 1`] = ` @@ -212,7 +223,8 @@ exports[`shorthand.js [meriyah] format 1`] = ` > 2 | const record = #{ url } | ^ 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple - 4 |" + 4 | +Cause: [2:16]: '#' not followed by identifier" `; exports[`shorthand.js format 1`] = ` @@ -239,7 +251,8 @@ exports[`spread.js [acorn] format 1`] = ` | ^ 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } 3 | const taskLater = #{ ...taskNow, status: "DONE" } - 4 |" + 4 | +Cause: Unexpected character '{' (1:18)" `; exports[`spread.js [espree] format 1`] = ` @@ -248,7 +261,8 @@ exports[`spread.js [espree] format 1`] = ` | ^ 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } 3 | const taskLater = #{ ...taskNow, status: "DONE" } - 4 |" + 4 | +Cause: Unexpected character '{'" `; exports[`spread.js [meriyah] format 1`] = ` @@ -257,7 +271,8 @@ exports[`spread.js [meriyah] format 1`] = ` | ^ 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } 3 | const taskLater = #{ ...taskNow, status: "DONE" } - 4 |" + 4 | +Cause: [1:18]: '#' not followed by identifier" `; exports[`spread.js format 1`] = ` @@ -290,7 +305,8 @@ exports[`syntax.js [acorn] format 1`] = ` | ^ 2 | #{ a: 1, b: 2 } 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } - 4 |" + 4 | +Cause: Unexpected character '{' (1:1)" `; exports[`syntax.js [espree] format 1`] = ` @@ -299,7 +315,8 @@ exports[`syntax.js [espree] format 1`] = ` | ^ 2 | #{ a: 1, b: 2 } 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } - 4 |" + 4 | +Cause: Unexpected character '{'" `; exports[`syntax.js [meriyah] format 1`] = ` @@ -308,7 +325,8 @@ exports[`syntax.js [meriyah] format 1`] = ` | ^ 2 | #{ a: 1, b: 2 } 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } - 4 |" + 4 | +Cause: [1:1]: '#' not followed by identifier" `; exports[`syntax.js format 1`] = ` diff --git a/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap index bd5699df4..fadd9276f 100644 --- a/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/regex/__snapshots__/jsfmt.spec.js.snap @@ -36,7 +36,8 @@ exports[`regexp-modifiers.js [acorn] format 1`] = ` | ^ 2 | /(?-ims:^[a-z].)(^[a-z].)/uims; 3 | /(?ims:^[a-z].1$)/; - 4 |" + 4 | +Cause: Invalid regular expression: /(?ims:^[a-z])/: Invalid group (1:1)" `; exports[`regexp-modifiers.js [espree] format 1`] = ` @@ -45,7 +46,8 @@ exports[`regexp-modifiers.js [espree] format 1`] = ` | ^ 2 | /(?-ims:^[a-z].)(^[a-z].)/uims; 3 | /(?ims:^[a-z].1$)/; - 4 |" + 4 | +Cause: Invalid regular expression: /(?ims:^[a-z])/: Invalid group" `; exports[`regexp-modifiers.js [meriyah] format 1`] = ` @@ -54,7 +56,8 @@ exports[`regexp-modifiers.js [meriyah] format 1`] = ` | ^ 2 | /(?-ims:^[a-z].)(^[a-z].)/uims; 3 | /(?ims:^[a-z].1$)/; - 4 |" + 4 | +Cause: [1:16]: Unterminated regular expression" `; exports[`regexp-modifiers.js format 1`] = ` @@ -100,7 +103,8 @@ exports[`v-flag.js [meriyah] format 1`] = ` "Unexpected regular expression flag (1:3) > 1 | /a/v; | ^ - 2 |" + 2 | +Cause: [1:3]: Unexpected regular expression flag" `; exports[`v-flag.js format 1`] = ` diff --git a/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap index 78a0d596b..0b8385d1b 100644 --- a/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/sloppy-mode/__snapshots__/jsfmt.spec.js.snap @@ -77,14 +77,16 @@ exports[`function-declaration-in-while.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | while (false) function foo(){} | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`function-declaration-in-while.js [espree] format 1`] = ` "Unexpected token function (1:15) > 1 | while (false) function foo(){} | ^ - 2 |" + 2 | +Cause: Unexpected token function" `; exports[`function-declaration-in-while.js [flow] format 1`] = ` @@ -98,7 +100,8 @@ exports[`function-declaration-in-while.js [meriyah] format 1`] = ` "In strict mode code, functions can only be declared at top level or inside a block (1:22) > 1 | while (false) function foo(){} | ^ - 2 |" + 2 | +Cause: [1:22]: In strict mode code, functions can only be declared at top level or inside a block" `; exports[`function-declaration-in-while.js format 1`] = ` diff --git a/tests/format/js/source-phase-imports/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/source-phase-imports/__snapshots__/jsfmt.spec.js.snap index 70cd79bfc..8d5c332b7 100644 --- a/tests/format/js/source-phase-imports/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/source-phase-imports/__snapshots__/jsfmt.spec.js.snap @@ -18,21 +18,24 @@ exports[`import-source.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import source x from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`import-source.js [espree] format 1`] = ` "Unexpected token x (1:15) > 1 | import source x from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token x" `; exports[`import-source.js [meriyah] format 1`] = ` "Import source must be string (1:15) > 1 | import source x from "x"; | ^ - 2 |" + 2 | +Cause: [1:15]: Import source must be string" `; exports[`import-source.js format 1`] = ` @@ -53,21 +56,24 @@ exports[`import-source-attributes-declaration.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import source s from "x" with { attr: "val" }; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`import-source-attributes-declaration.js [espree] format 1`] = ` "Unexpected token s (1:15) > 1 | import source s from "x" with { attr: "val" }; | ^ - 2 |" + 2 | +Cause: Unexpected token s" `; exports[`import-source-attributes-declaration.js [meriyah] format 1`] = ` "Import source must be string (1:15) > 1 | import source s from "x" with { attr: "val" }; | ^ - 2 |" + 2 | +Cause: [1:15]: Import source must be string" `; exports[`import-source-attributes-declaration.js format 1`] = ` @@ -88,21 +94,24 @@ exports[`import-source-attributes-expression.js [acorn] format 1`] = ` "The only valid meta property for import is 'import.meta' (1:8) > 1 | import.source("x", { with: { attr: "val" } }); | ^ - 2 |" + 2 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" `; exports[`import-source-attributes-expression.js [espree] format 1`] = ` "The only valid meta property for import is 'import.meta' (1:8) > 1 | import.source("x", { with: { attr: "val" } }); | ^ - 2 |" + 2 | +Cause: The only valid meta property for import is 'import.meta'" `; exports[`import-source-attributes-expression.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:13) > 1 | import.source("x", { with: { attr: "val" } }); | ^ - 2 |" + 2 | +Cause: [1:13]: Unexpected token: 'identifier'" `; exports[`import-source-attributes-expression.js format 1`] = ` @@ -123,21 +132,24 @@ exports[`import-source-binding-from.js [acorn] format 1`] = ` "Unexpected token (1:20) > 1 | import source from from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:19)" `; exports[`import-source-binding-from.js [espree] format 1`] = ` "Unexpected token from (1:20) > 1 | import source from from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token from" `; exports[`import-source-binding-from.js [meriyah] format 1`] = ` "Import source must be string (1:23) > 1 | import source from from "x"; | ^ - 2 |" + 2 | +Cause: [1:23]: Import source must be string" `; exports[`import-source-binding-from.js format 1`] = ` @@ -158,21 +170,24 @@ exports[`import-source-binding-source.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import source source from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`import-source-binding-source.js [espree] format 1`] = ` "Unexpected token source (1:15) > 1 | import source source from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token source" `; exports[`import-source-binding-source.js [meriyah] format 1`] = ` "Import source must be string (1:20) > 1 | import source source from "x"; | ^ - 2 |" + 2 | +Cause: [1:20]: Import source must be string" `; exports[`import-source-binding-source.js format 1`] = ` @@ -193,21 +208,24 @@ exports[`import-source-dynamic-import.js [acorn] format 1`] = ` "The only valid meta property for import is 'import.meta' (1:8) > 1 | import.source("foo"); | ^ - 2 |" + 2 | +Cause: The only valid meta property for import is 'import.meta' (1:7)" `; exports[`import-source-dynamic-import.js [espree] format 1`] = ` "The only valid meta property for import is 'import.meta' (1:8) > 1 | import.source("foo"); | ^ - 2 |" + 2 | +Cause: The only valid meta property for import is 'import.meta'" `; exports[`import-source-dynamic-import.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:13) > 1 | import.source("foo"); | ^ - 2 |" + 2 | +Cause: [1:13]: Unexpected token: 'identifier'" `; exports[`import-source-dynamic-import.js format 1`] = ` @@ -228,68 +246,78 @@ exports[`no-named.js [__babel_estree] format 1`] = ` "Only \`import source x from "./module"\` is valid. (1:17) > 1 | import source { x } from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:16)" `; exports[`no-named.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import source { x } from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`no-named.js [babel] format 1`] = ` "Only \`import source x from "./module"\` is valid. (1:17) > 1 | import source { x } from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:16)" `; exports[`no-named.js [espree] format 1`] = ` "Unexpected token { (1:15) > 1 | import source { x } from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token {" `; exports[`no-named.js [meriyah] format 1`] = ` "Import source must be string (1:15) > 1 | import source { x } from "x"; | ^ - 2 |" + 2 | +Cause: [1:15]: Import source must be string" `; exports[`no-namespace.js [__babel_estree] format 1`] = ` "Only \`import source x from "./module"\` is valid. (1:15) > 1 | import source * as x from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:14)" `; exports[`no-namespace.js [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | import source * as x from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`no-namespace.js [babel] format 1`] = ` "Only \`import source x from "./module"\` is valid. (1:15) > 1 | import source * as x from "x"; | ^ - 2 |" + 2 | +Cause: Only \`import source x from "./module"\` is valid. (1:14)" `; exports[`no-namespace.js [espree] format 1`] = ` "Unexpected token * (1:15) > 1 | import source * as x from "x"; | ^ - 2 |" + 2 | +Cause: Unexpected token *" `; exports[`no-namespace.js [meriyah] format 1`] = ` "Import source must be string (1:15) > 1 | import source * as x from "x"; | ^ - 2 |" + 2 | +Cause: [1:15]: Import source must be string" `; diff --git a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap index 70ea41b3b..c3a825e87 100644 --- a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap @@ -120,7 +120,8 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1` | ^ 4 | () => { 5 | "use strict"; - 6 | "\\8", "\\9";" + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence (3:2)" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1`] = ` @@ -131,7 +132,8 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1 | ^ 4 | () => { 5 | "use strict"; - 6 | "\\8", "\\9";" + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format 1`] = ` @@ -169,7 +171,8 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [acorn] format 1` | ^ 4 | () => { 5 | "use strict"; - 6 | "\\8", "\\9";" + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence (3:2)" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1`] = ` @@ -180,7 +183,8 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1 | ^ 4 | () => { 5 | "use strict"; - 6 | "\\8", "\\9";" + 6 | "\\8", "\\9"; +Cause: Invalid escape sequence" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format 1`] = ` diff --git a/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap index f1daf3964..a23a08385 100644 --- a/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`throw_expression.js [acorn] format 1`] = ` | ^ 2 | 3 | lint(ast, { - 4 | with: () => throw new Error("avoid using 'with' statements.")" + 4 | with: () => throw new Error("avoid using 'with' statements.") +Cause: Unexpected token (1:25)" `; exports[`throw_expression.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`throw_expression.js [espree] format 1`] = ` | ^ 2 | 3 | lint(ast, { - 4 | with: () => throw new Error("avoid using 'with' statements.")" + 4 | with: () => throw new Error("avoid using 'with' statements.") +Cause: Unexpected token throw" `; exports[`throw_expression.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`throw_expression.js [meriyah] format 1`] = ` | ^ 2 | 3 | lint(ast, { - 4 | with: () => throw new Error("avoid using 'with' statements.")" + 4 | with: () => throw new Error("avoid using 'with' statements.") +Cause: [1:30]: Unexpected token: 'throw'" `; exports[`throw_expression.js format 1`] = ` diff --git a/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap index d1bcea401..0ff3c3842 100644 --- a/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`destructuring.js [acorn] format 1`] = ` | ^ 2 | assert(a === 1); 3 | assert(b === 2); - 4 |" + 4 | +Cause: Unexpected character '[' (1:16)" `; exports[`destructuring.js [espree] format 1`] = ` @@ -15,7 +16,8 @@ exports[`destructuring.js [espree] format 1`] = ` | ^ 2 | assert(a === 1); 3 | assert(b === 2); - 4 |" + 4 | +Cause: Unexpected character '['" `; exports[`destructuring.js [meriyah] format 1`] = ` @@ -24,7 +26,8 @@ exports[`destructuring.js [meriyah] format 1`] = ` | ^ 2 | assert(a === 1); 3 | assert(b === 2); - 4 |" + 4 | +Cause: [1:16]: '#' not followed by identifier" `; exports[`destructuring.js format 1`] = ` @@ -61,35 +64,40 @@ exports[`invalid-tuple-holes.js [__babel_estree] format 1`] = ` "Unexpected token ','. (1:4) > 1 | #[,] | ^ - 2 |" + 2 | +Cause: Unexpected token ','. (1:3)" `; exports[`invalid-tuple-holes.js [acorn] format 1`] = ` "Unexpected character '[' (1:2) > 1 | #[,] | ^ - 2 |" + 2 | +Cause: Unexpected character '[' (1:1)" `; exports[`invalid-tuple-holes.js [babel] format 1`] = ` "Unexpected token ','. (1:4) > 1 | #[,] | ^ - 2 |" + 2 | +Cause: Unexpected token ','. (1:3)" `; exports[`invalid-tuple-holes.js [espree] format 1`] = ` "Unexpected character '[' (1:2) > 1 | #[,] | ^ - 2 |" + 2 | +Cause: Unexpected character '['" `; exports[`invalid-tuple-holes.js [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #[,] | ^ - 2 |" + 2 | +Cause: [1:1]: '#' not followed by identifier" `; exports[`syntax.js [acorn] format 1`] = ` @@ -98,7 +106,8 @@ exports[`syntax.js [acorn] format 1`] = ` | ^ 2 | #[1, 2] 3 | #[1, 2, #{ a: 3 }] - 4 |" + 4 | +Cause: Unexpected character '[' (1:1)" `; exports[`syntax.js [espree] format 1`] = ` @@ -107,7 +116,8 @@ exports[`syntax.js [espree] format 1`] = ` | ^ 2 | #[1, 2] 3 | #[1, 2, #{ a: 3 }] - 4 |" + 4 | +Cause: Unexpected character '['" `; exports[`syntax.js [meriyah] format 1`] = ` @@ -116,7 +126,8 @@ exports[`syntax.js [meriyah] format 1`] = ` | ^ 2 | #[1, 2] 3 | #[1, 2, #{ a: 3 }] - 4 |" + 4 | +Cause: [1:1]: '#' not followed by identifier" `; exports[`syntax.js format 1`] = ` @@ -143,7 +154,8 @@ exports[`tuple.js [acorn] format 1`] = ` | ^ 2 | 3 | assert(tuple1[0] === 1); - 4 |" + 4 | +Cause: Unexpected character '[' (1:16)" `; exports[`tuple.js [espree] format 1`] = ` @@ -152,7 +164,8 @@ exports[`tuple.js [espree] format 1`] = ` | ^ 2 | 3 | assert(tuple1[0] === 1); - 4 |" + 4 | +Cause: Unexpected character '['" `; exports[`tuple.js [meriyah] format 1`] = ` @@ -161,7 +174,8 @@ exports[`tuple.js [meriyah] format 1`] = ` | ^ 2 | 3 | assert(tuple1[0] === 1); - 4 |" + 4 | +Cause: [1:16]: '#' not followed by identifier" `; exports[`tuple.js format 1`] = ` @@ -214,21 +228,24 @@ exports[`tuple-trailing-comma.js [acorn] format 1`] = ` "Unexpected character '[' (1:2) > 1 | #[1,] | ^ - 2 |" + 2 | +Cause: Unexpected character '[' (1:1)" `; exports[`tuple-trailing-comma.js [espree] format 1`] = ` "Unexpected character '[' (1:2) > 1 | #[1,] | ^ - 2 |" + 2 | +Cause: Unexpected character '['" `; exports[`tuple-trailing-comma.js [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #[1,] | ^ - 2 |" + 2 | +Cause: [1:1]: '#' not followed by identifier" `; exports[`tuple-trailing-comma.js format 1`] = ` diff --git a/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap index edd7e8084..bd28b02ea 100644 --- a/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,8 @@ exports[`avoid-conflicts-to-pipeline.js [acorn] format 1`] = ` 1 | // |> > 2 | const status = %GetOptimizationStatus(fn); | ^ - 3 |" + 3 | +Cause: Unexpected token (2:15)" `; exports[`avoid-conflicts-to-pipeline.js [espree] format 1`] = ` @@ -13,7 +14,8 @@ exports[`avoid-conflicts-to-pipeline.js [espree] format 1`] = ` 1 | // |> > 2 | const status = %GetOptimizationStatus(fn); | ^ - 3 |" + 3 | +Cause: Unexpected token %" `; exports[`avoid-conflicts-to-pipeline.js [meriyah] format 1`] = ` @@ -21,7 +23,8 @@ exports[`avoid-conflicts-to-pipeline.js [meriyah] format 1`] = ` 1 | // |> > 2 | const status = %GetOptimizationStatus(fn); | ^ - 3 |" + 3 | +Cause: [2:16]: Unexpected token: '%'" `; exports[`avoid-conflicts-to-pipeline.js format 1`] = ` @@ -47,7 +50,8 @@ exports[`intrinsic_call.js [acorn] format 1`] = ` | ^ 3 | ( 4 | foo ) - 5 | }" + 5 | } +Cause: Unexpected token (2:12)" `; exports[`intrinsic_call.js [espree] format 1`] = ` @@ -57,7 +61,8 @@ exports[`intrinsic_call.js [espree] format 1`] = ` | ^ 3 | ( 4 | foo ) - 5 | }" + 5 | } +Cause: Unexpected token %" `; exports[`intrinsic_call.js [meriyah] format 1`] = ` @@ -67,7 +72,8 @@ exports[`intrinsic_call.js [meriyah] format 1`] = ` | ^ 3 | ( 4 | foo ) - 5 | }" + 5 | } +Cause: [2:13]: Unexpected token: '%'" `; exports[`intrinsic_call.js format 1`] = ` diff --git a/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap index 2a32185d1..339d80baa 100644 --- a/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/jsx/comments/__snapshots__/jsfmt.spec.js.snap @@ -90,7 +90,8 @@ exports[`in-end-tag.js - {"bracketSameLine":true} [meriyah] format 1`] = ` | ^ 3 | /a>; 4 | ;" + 5 | /a>; +Cause: [2:11]: Expected '>'" `; exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = ` @@ -100,7 +101,8 @@ exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = ` | ^ 3 | /a>; 4 | ;" + 5 | /a>; +Cause: Identifier expected." `; exports[`in-end-tag.js - {"bracketSameLine":true} format 1`] = ` diff --git a/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap index 2b9b10722..b81de0a07 100644 --- a/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/jsx/do/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`do.js [acorn] format 1`] = ` | ^ 3 | 1 4 | }} - 5 |
" + 5 |
+Cause: Unexpected token (2:3)" `; exports[`do.js [espree] format 1`] = ` @@ -17,7 +18,8 @@ exports[`do.js [espree] format 1`] = ` | ^ 3 | 1 4 | }} - 5 | " + 5 | +Cause: Unexpected token do" `; exports[`do.js [meriyah] format 1`] = ` @@ -27,7 +29,8 @@ exports[`do.js [meriyah] format 1`] = ` | ^ 3 | 1 4 | }} - 5 | " + 5 | +Cause: [2:5]: Unexpected token: 'do'" `; exports[`do.js format 1`] = ` diff --git a/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap index 46b8cc019..8ed55fbe8 100644 --- a/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/jsx/fragment/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`fragment.js [meriyah] format 1`] = ` | ^ 39 | 40 | - 41 | ;" + 41 | ; +Cause: [38:21]: Unexpected token: '>'" `; exports[`fragment.js format 1`] = ` diff --git a/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap index b3a5b086b..6aaa9bb12 100644 --- a/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/jsx/spread/__snapshots__/jsfmt.spec.js.snap @@ -79,7 +79,8 @@ exports[`child.js [acorn] format 1`] = ` | ^ 2 | 3 |
{...a /* comment */}
; - 4 |" + 4 | +Cause: Unexpected token (1:6)" `; exports[`child.js [espree] format 1`] = ` @@ -88,7 +89,8 @@ exports[`child.js [espree] format 1`] = ` | ^ 2 | 3 |
{...a /* comment */}
; - 4 |" + 4 | +Cause: Unexpected token ..." `; exports[`child.js format 1`] = ` diff --git a/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap index 1e0c8ab9a..c2aa612da 100644 --- a/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/jsx/tuple/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`tuple.js [acorn] format 1`] = ` | ^ 7 |
, 8 |
, - 9 | ]" + 9 | ] +Cause: Unexpected character '[' (6:5)" `; exports[`tuple.js [espree] format 1`] = ` @@ -19,7 +20,8 @@ exports[`tuple.js [espree] format 1`] = ` | ^ 7 |
, 8 |
, - 9 | ]" + 9 | ] +Cause: Unexpected character '['" `; exports[`tuple.js [meriyah] format 1`] = ` @@ -30,7 +32,8 @@ exports[`tuple.js [meriyah] format 1`] = ` | ^ 7 |
, 8 |
, - 9 | ]" + 9 | ] +Cause: [6:5]: '#' not followed by identifier" `; exports[`tuple.js format 1`] = ` diff --git a/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap index a26dfe2ac..215fe64fa 100644 --- a/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/babel-flow/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`async-arrow-invalid.js [babel] format 1`] = ` 2 | > 3 | async () => {} | ^ - 4 |" + 4 | +Cause: Unterminated JSX contents. (3:18)" `; exports[`async-arrow-invalid.js [babel-flow] format 1`] = ` @@ -15,19 +16,22 @@ exports[`async-arrow-invalid.js [babel-flow] format 1`] = ` 2 | > 3 | async () => {} | ^ - 4 |" + 4 | +Cause: Type parameters must come after the async keyword, e.g. instead of \` async () => {}\`, use \`async () => {}\`. (3:0)" `; exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = ` "Unterminated JSX contents. (1:4) > 1 | (a => b); | ^ - 2 |" + 2 | +Cause: Unterminated JSX contents. (1:3)" `; exports[`wrong-arrow-no-parens-jsx.js [babel-flow] format 1`] = ` "Unterminated JSX contents. (1:4) > 1 | (a => b); | ^ - 2 |" + 2 | +Cause: Unterminated JSX contents. (1:3)" `; diff --git a/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap index db1946abe..1898909ae 100644 --- a/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap @@ -4,7 +4,8 @@ exports[`export-declare.ts [babel-ts] format 1`] = ` "'export declare' must be followed by an ambient declaration. (1:16) > 1 | export declare foo; | ^ - 2 |" + 2 | +Cause: 'export declare' must be followed by an ambient declaration. (1:15)" `; exports[`multiline-declaration-abstract-class.ts [babel-ts] format 1`] = ` @@ -12,7 +13,8 @@ exports[`multiline-declaration-abstract-class.ts [babel-ts] format 1`] = ` > 1 | declare abstract | ^ 2 | class A {} - 3 |" + 3 | +Cause: Missing semicolon. (1:7)" `; exports[`multiline-declaration-interface.ts [babel-ts] format 1`] = ` @@ -21,7 +23,8 @@ exports[`multiline-declaration-interface.ts [babel-ts] format 1`] = ` | ^ 2 | I 3 | {} - 4 |" + 4 | +Cause: Missing semicolon. (1:7)" `; exports[`multiline-declaration-module.ts [babel-ts] format 1`] = ` @@ -30,7 +33,8 @@ exports[`multiline-declaration-module.ts [babel-ts] format 1`] = ` | ^ 2 | 'bar' 3 | {} - 4 |" + 4 | +Cause: Missing semicolon. (1:7)" `; exports[`multiline-declaration-type.ts [babel-ts] format 1`] = ` @@ -38,7 +42,8 @@ exports[`multiline-declaration-type.ts [babel-ts] format 1`] = ` > 1 | declare type | ^ 2 | T = number - 3 |" + 3 | +Cause: Missing semicolon. (1:7)" `; exports[`parenthesized-decorators-tagged-template.ts [babel-ts] format 1`] = ` @@ -48,21 +53,24 @@ exports[`parenthesized-decorators-tagged-template.ts [babel-ts] format 1`] = ` | ^ 3 | text: string = "text" 4 | } - 5 |" + 5 | +Cause: Unexpected token (2:6)" `; exports[`type-annotation-expr-statement.ts [babel-ts] format 1`] = ` "Did not expect a type annotation here. (1:3) > 1 | (a: T); | ^ - 2 |" + 2 | +Cause: Did not expect a type annotation here. (1:2)" `; exports[`type-annotation-func.ts [babel-ts] format 1`] = ` "Did not expect a type annotation here. (1:10) > 1 | func(a: T); | ^ - 2 |" + 2 | +Cause: Did not expect a type annotation here. (1:9)" `; exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = ` @@ -73,5 +81,6 @@ exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = ` | ^ 4 | ); 5 | } - 6 |" + 6 | +Cause: Did not expect a type annotation here. (3:21)" `; diff --git a/tests/format/misc/errors/css/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/css/__snapshots__/jsfmt.spec.js.snap index 56ff15174..2e84623a3 100644 --- a/tests/format/misc/errors/css/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/css/__snapshots__/jsfmt.spec.js.snap @@ -4,12 +4,14 @@ exports[`less-syntax.css [css] format 1`] = ` "CssSyntaxError: Unknown word (1:4) > 1 | a {.bordered();} | ^ - 2 |" + 2 | +Cause: :1:4: Unknown word" `; exports[`scss-syntax.css [css] format 1`] = ` "CssSyntaxError: Unknown word (1:15) > 1 | a {content: #{$foo}} | ^ - 2 |" + 2 | +Cause: :1:15: Unknown word" `; diff --git a/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap index 3419dcf57..05d0324ba 100644 --- a/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/flow/interface/__snapshots__/jsfmt.spec.js.snap @@ -3,7 +3,8 @@ exports[`snippet: #0 [babel-flow] format 1`] = ` "\`declare export interface\` is not supported. Use \`export interface\` instead. (1:16) > 1 | declare export interface A {} - | ^" + | ^ +Cause: \`declare export interface\` is not supported. Use \`export interface\` instead. (1:15)" `; exports[`snippet: #0 [flow] format 1`] = ` @@ -15,7 +16,8 @@ exports[`snippet: #0 [flow] format 1`] = ` exports[`snippet: #1 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface A mixins B {} - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #1 [flow] format 1`] = ` @@ -27,7 +29,8 @@ exports[`snippet: #1 [flow] format 1`] = ` exports[`snippet: #2 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface A implements B {} - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #2 [flow] format 1`] = ` @@ -39,7 +42,8 @@ exports[`snippet: #2 [flow] format 1`] = ` exports[`snippet: #3 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:21) > 1 | declare interface A mixins B {} - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:20)" `; exports[`snippet: #3 [flow] format 1`] = ` @@ -51,7 +55,8 @@ exports[`snippet: #3 [flow] format 1`] = ` exports[`snippet: #4 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:21) > 1 | declare interface A implements B {} - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:20)" `; exports[`snippet: #4 [flow] format 1`] = ` diff --git a/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap index 063d84267..6e47153f7 100644 --- a/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap @@ -8,5 +8,6 @@ exports[`type-interfaces.graphql [graphql] format 1`] = ` | ^ 6 | a: a 7 | } - 8 |" + 8 | +Cause: Syntax Error: Unexpected "|"." `; diff --git a/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap index 95df7780e..8eb48d537 100644 --- a/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/handlebars/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,11 @@ exports[`invalid.hbs [glimmer] format 1`] = ` 1 | > 2 | x, {{@name} | ^ - 3 |" + 3 | +Cause: Parse error on line 2: +x, {{@name} +--------------^ +Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID'" `; exports[`invalid-2.hbs [glimmer] format 1`] = ` @@ -14,7 +18,14 @@ exports[`invalid-2.hbs [glimmer] format 1`] = ` 2 | > 3 | <{@name> | ^^^^^^^^ - 4 |" + 4 | +Cause: Unclosed element \`@name\`: + +| +| <{@name> +| + +(error occurred in 'an unknown module' @ line 3 : column 0)" `; exports[`invalid-3.hbs [glimmer] format 1`] = ` @@ -23,187 +34,395 @@ exports[`invalid-3.hbs [glimmer] format 1`] = ` 2 | > 3 | {{}} | ^ - 4 |" + 4 | +Cause: Parse error on line 3: +{{}} +-----^ +Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE'" `; exports[`snippet: IMG [glimmer] format 1`] = ` "Unclosed element \`IMG\` (1:0) > 1 | - | ^^^^^" + | ^^^^^ +Cause: Unclosed element \`IMG\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: INPUT [glimmer] format 1`] = ` "Unclosed element \`INPUT\` (1:0) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: Unclosed element \`INPUT\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: area [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:6) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" `; exports[`snippet: base [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:6) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" `; exports[`snippet: basefont [glimmer] format 1`] = ` "Unclosed element \`basefont\` (1:0) > 1 | - | ^^^^^^^^^^" + | ^^^^^^^^^^ +Cause: Unclosed element \`basefont\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: bgsound [glimmer] format 1`] = ` "Unclosed element \`bgsound\` (1:0) > 1 | - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: Unclosed element \`bgsound\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: br [glimmer] format 1`] = ` "
elements do not need end tags. You should remove it (1:4) > 1 |

- | ^^^^^" + | ^^^^^ +Cause:
elements do not need end tags. You should remove it: + +| +|
+| + +(error occurred in 'an unknown module' @ line 1 : column 4)" `; exports[`snippet: col [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:5) > 1 | - | ^^^^^^" + | ^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 5)" `; exports[`snippet: command [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:9) > 1 | - | ^^^^^^^^^^" + | ^^^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 9)" `; exports[`snippet: div [glimmer] format 1`] = ` "Unclosed element \`div\` (1:0) > 1 |
- | ^^^^^" + | ^^^^^ +Cause: Unclosed element \`div\`: + +| +|
+| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: embed [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:7) > 1 | - | ^^^^^^^^" + | ^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" `; exports[`snippet: frame [glimmer] format 1`] = ` "Unclosed element \`frame\` (1:0) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: Unclosed element \`frame\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: hr [glimmer] format 1`] = ` "
elements do not need end tags. You should remove it (1:4) > 1 |
- | ^^^^^" + | ^^^^^ +Cause:
elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 4)" `; exports[`snippet: imG [glimmer] format 1`] = ` "Unclosed element \`imG\` (1:0) > 1 | - | ^^^^^" + | ^^^^^ +Cause: Unclosed element \`imG\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: image [glimmer] format 1`] = ` "Unclosed element \`image\` (1:0) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: Unclosed element \`image\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: img [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:5) > 1 | - | ^^^^^^" + | ^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 5)" `; exports[`snippet: input [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:7) > 1 | - | ^^^^^^^^" + | ^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" `; exports[`snippet: isindex [glimmer] format 1`] = ` "Unclosed element \`isindex\` (1:0) > 1 | - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: Unclosed element \`isindex\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: keygen [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:8) > 1 | - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 8)" `; exports[`snippet: lINk [glimmer] format 1`] = ` "Unclosed element \`lINk\` (1:0) > 1 | - | ^^^^^^" + | ^^^^^^ +Cause: Unclosed element \`lINk\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: link [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:6) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" `; exports[`snippet: menuitem [glimmer] format 1`] = ` "Unclosed element \`menuitem\` (1:0) > 1 | - | ^^^^^^^^^^" + | ^^^^^^^^^^ +Cause: Unclosed element \`menuitem\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: meta [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:6) > 1 | - | ^^^^^^^" + | ^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 6)" `; exports[`snippet: nextid [glimmer] format 1`] = ` "Unclosed element \`nextid\` (1:0) > 1 | - | ^^^^^^^^" + | ^^^^^^^^ +Cause: Unclosed element \`nextid\`: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 0)" `; exports[`snippet: param [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:7) > 1 | - | ^^^^^^^^" + | ^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" `; exports[`snippet: source [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:8) > 1 | - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 8)" `; exports[`snippet: track [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:7) > 1 | - | ^^^^^^^^" + | ^^^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 7)" `; exports[`snippet: wbr [glimmer] format 1`] = ` " elements do not need end tags. You should remove it (1:5) > 1 | - | ^^^^^^" + | ^^^^^^ +Cause: elements do not need end tags. You should remove it: + +| +| +| + +(error occurred in 'an unknown module' @ line 1 : column 5)" `; exports[`tilde-comments-1.hbs [glimmer] format 1`] = ` "Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) > 1 | {{~}} | ^ - 2 |" + 2 | +Cause: Parse error on line 1: +{{~}} +---^ +Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE'" `; exports[`tilde-comments-2.hbs [glimmer] format 1`] = ` "Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) > 1 | {{~~}} | ^ - 2 |" + 2 | +Cause: Parse error on line 1: +{{~~}} +---^ +Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE'" `; diff --git a/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap index 1c59eee4d..ec4da1188 100644 --- a/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/invalid-typescript-decorators/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`decorator.ts [babel-ts] format 1`] = ` 3 | @dec > 4 | enum E {} | ^ - 5 |" + 5 | +Cause: Leading decorators must be attached to a class declaration. (4:0)" `; exports[`decorator.ts [typescript] format 1`] = ` @@ -16,7 +17,8 @@ exports[`decorator.ts [typescript] format 1`] = ` > 3 | @dec | ^^^^ 4 | enum E {} - 5 |" + 5 | +Cause: Decorators are not valid here." `; exports[`enums.ts [babel-ts] format 1`] = ` @@ -27,7 +29,8 @@ exports[`enums.ts [babel-ts] format 1`] = ` | ^ 5 | Up = 1, 6 | Down, - 7 | Left," + 7 | Left, +Cause: Leading decorators must be attached to a class declaration. (4:0)" `; exports[`enums.ts [typescript] format 1`] = ` @@ -38,7 +41,8 @@ exports[`enums.ts [typescript] format 1`] = ` | ^^^^^^^^^^^^ 4 | enum Direction { 5 | Up = 1, - 6 | Down," + 6 | Down, +Cause: Decorators are not valid here." `; exports[`function.ts [babel-ts] format 1`] = ` @@ -47,7 +51,8 @@ exports[`function.ts [babel-ts] format 1`] = ` 3 | @decorator() > 4 | function foo( ){} | ^ - 5 |" + 5 | +Cause: Leading decorators must be attached to a class declaration. (4:0)" `; exports[`function.ts [typescript] format 1`] = ` @@ -57,7 +62,8 @@ exports[`function.ts [typescript] format 1`] = ` > 3 | @decorator() | ^^^^^^^^^^^^ 4 | function foo( ){} - 5 |" + 5 | +Cause: Decorators are not valid here." `; exports[`interface.ts [babel-ts] format 1`] = ` @@ -67,7 +73,8 @@ exports[`interface.ts [babel-ts] format 1`] = ` > 5 | interface MyInterface {id: string; | ^ 6 | } - 7 |" + 7 | +Cause: Leading decorators must be attached to a class declaration. (5:0)" `; exports[`interface.ts [typescript] format 1`] = ` @@ -78,7 +85,8 @@ exports[`interface.ts [typescript] format 1`] = ` | ^^^^^^^^ 5 | interface MyInterface {id: string; 6 | } - 7 |" + 7 | +Cause: Decorators are not valid here." `; exports[`issue-9102.ts [babel-ts] format 1`] = ` @@ -87,7 +95,8 @@ exports[`issue-9102.ts [babel-ts] format 1`] = ` > 2 | type T = 1; | ^ 3 | class C {} - 4 |" + 4 | +Cause: Leading decorators must be attached to a class declaration. (2:0)" `; exports[`issue-9102.ts [typescript] format 1`] = ` @@ -96,5 +105,6 @@ exports[`issue-9102.ts [typescript] format 1`] = ` | ^^^^^^^^^^^^ 2 | type T = 1; 3 | class C {} - 4 |" + 4 | +Cause: Decorators are not valid here." `; diff --git a/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap index 740efea68..c0d8e1286 100644 --- a/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap @@ -3,49 +3,57 @@ exports[`snippet: #0 [acorn] format 1`] = ` "Unexpected token (1:5) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: Unexpected token (1:4)" `; exports[`snippet: #0 [babel] format 1`] = ` "Unexpected token, expected "(" (1:5) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: Unexpected token, expected "(" (1:4)" `; exports[`snippet: #0 [babel] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a = b) = 1 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #0 [babel-flow] format 1`] = ` "Unexpected token, expected "(" (1:5) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: Unexpected token, expected "(" (1:4)" `; exports[`snippet: #0 [babel-flow] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a = b) = 1 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #0 [babel-ts] format 1`] = ` "Unexpected token, expected "(" (1:5) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: Unexpected token, expected "(" (1:4)" `; exports[`snippet: #0 [babel-ts] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a = b) = 1 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #0 [espree] format 1`] = ` "Unexpected token each (1:5) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: Unexpected token each" `; exports[`snippet: #0 [flow] format 1`] = ` @@ -63,67 +71,78 @@ exports[`snippet: #0 [flow] format 2`] = ` exports[`snippet: #0 [meriyah] format 1`] = ` "Expected '(' (1:8) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: [1:8]: Expected '('" `; exports[`snippet: #0 [meriyah] format 2`] = ` "Invalid left-hand side in assignment (1:9) > 1 | (a = b) = 1 - | ^" + | ^ +Cause: [1:9]: Invalid left-hand side in assignment" `; exports[`snippet: #0 [typescript] format 1`] = ` "'(' expected. (1:5) > 1 | for each (a in b) {} - | ^" + | ^ +Cause: '(' expected." `; exports[`snippet: #1 [acorn] format 1`] = ` "Unexpected token (1:7) > 1 | class switch() {} - | ^" + | ^ +Cause: Unexpected token (1:6)" `; exports[`snippet: #1 [babel] format 1`] = ` "A class name is required. (1:7) > 1 | class switch() {} - | ^" + | ^ +Cause: A class name is required. (1:6)" `; exports[`snippet: #1 [babel] format 2`] = ` "Invalid left-hand side in assignment expression. (1:5) > 1 | a = 1 = 2 - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:4)" `; exports[`snippet: #1 [babel-flow] format 1`] = ` "A class name is required. (1:7) > 1 | class switch() {} - | ^" + | ^ +Cause: A class name is required. (1:6)" `; exports[`snippet: #1 [babel-flow] format 2`] = ` "Invalid left-hand side in assignment expression. (1:5) > 1 | a = 1 = 2 - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:4)" `; exports[`snippet: #1 [babel-ts] format 1`] = ` "A class name is required. (1:7) > 1 | class switch() {} - | ^" + | ^ +Cause: A class name is required. (1:6)" `; exports[`snippet: #1 [babel-ts] format 2`] = ` "Invalid left-hand side in assignment expression. (1:5) > 1 | a = 1 = 2 - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:4)" `; exports[`snippet: #1 [espree] format 1`] = ` "Unexpected token switch (1:7) > 1 | class switch() {} - | ^" + | ^ +Cause: Unexpected token switch" `; exports[`snippet: #1 [flow] format 1`] = ` @@ -141,67 +160,78 @@ exports[`snippet: #1 [flow] format 2`] = ` exports[`snippet: #1 [meriyah] format 1`] = ` "Unexpected strict mode reserved word (1:12) > 1 | class switch() {} - | ^" + | ^ +Cause: [1:12]: Unexpected strict mode reserved word" `; exports[`snippet: #1 [meriyah] format 2`] = ` "Invalid left-hand side in assignment (1:7) > 1 | a = 1 = 2 - | ^" + | ^ +Cause: [1:7]: Invalid left-hand side in assignment" `; exports[`snippet: #1 [typescript] format 1`] = ` "'{' expected. (1:7) > 1 | class switch() {} - | ^" + | ^ +Cause: '{' expected." `; exports[`snippet: #2 [acorn] format 1`] = ` "Unexpected token (1:13) > 1 | ({ method() }) - | ^" + | ^ +Cause: Unexpected token (1:12)" `; exports[`snippet: #2 [babel] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | ({ method() }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #2 [babel] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a = 1) = 2 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #2 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | ({ method() }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #2 [babel-flow] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a = 1) = 2 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #2 [babel-ts] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | ({ method() }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #2 [babel-ts] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a = 1) = 2 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #2 [espree] format 1`] = ` "Unexpected token } (1:13) > 1 | ({ method() }) - | ^" + | ^ +Cause: Unexpected token }" `; exports[`snippet: #2 [flow] format 1`] = ` @@ -219,67 +249,78 @@ exports[`snippet: #2 [flow] format 2`] = ` exports[`snippet: #2 [meriyah] format 1`] = ` "Expected '{' (1:13) > 1 | ({ method() }) - | ^" + | ^ +Cause: [1:13]: Expected '{'" `; exports[`snippet: #2 [meriyah] format 2`] = ` "Invalid left-hand side in assignment (1:9) > 1 | (a = 1) = 2 - | ^" + | ^ +Cause: [1:9]: Invalid left-hand side in assignment" `; exports[`snippet: #2 [typescript] format 1`] = ` "'{' expected. (1:11) > 1 | ({ method() }) - | ^" + | ^ +Cause: '{' expected." `; exports[`snippet: #3 [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: Unexpected token (1:14)" `; exports[`snippet: #3 [babel] format 1`] = ` "Unexpected token, expected "{" (1:15) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:14)" `; exports[`snippet: #3 [babel] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a += b) = 1 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #3 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:15) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:14)" `; exports[`snippet: #3 [babel-flow] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a += b) = 1 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #3 [babel-ts] format 1`] = ` "Unexpected token, expected "{" (1:15) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:14)" `; exports[`snippet: #3 [babel-ts] format 2`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | (a += b) = 1 - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #3 [espree] format 1`] = ` "Unexpected token } (1:15) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: Unexpected token }" `; exports[`snippet: #3 [flow] format 1`] = ` @@ -297,67 +338,78 @@ exports[`snippet: #3 [flow] format 2`] = ` exports[`snippet: #3 [meriyah] format 1`] = ` "Expected '{' (1:15) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: [1:15]: Expected '{'" `; exports[`snippet: #3 [meriyah] format 2`] = ` "Invalid left-hand side in assignment (1:10) > 1 | (a += b) = 1 - | ^" + | ^ +Cause: [1:10]: Invalid left-hand side in assignment" `; exports[`snippet: #3 [typescript] format 1`] = ` "'{' expected. (1:13) > 1 | ({ method({}) }) - | ^" + | ^ +Cause: '{' expected." `; exports[`snippet: #4 [acorn] format 1`] = ` "Unexpected token (1:23) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: Unexpected token (1:22)" `; exports[`snippet: #4 [babel] format 1`] = ` "Unexpected token, expected "{" (1:23) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:22)" `; exports[`snippet: #4 [babel] format 2`] = ` "Invalid left-hand side in assignment expression. (1:2) > 1 | (a = b) += 1 - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:1)" `; exports[`snippet: #4 [babel-flow] format 1`] = ` "Unexpected token, expected "{" (1:23) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:22)" `; exports[`snippet: #4 [babel-flow] format 2`] = ` "Invalid left-hand side in assignment expression. (1:2) > 1 | (a = b) += 1 - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:1)" `; exports[`snippet: #4 [babel-ts] format 1`] = ` "Unexpected token, expected "{" (1:23) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:22)" `; exports[`snippet: #4 [babel-ts] format 2`] = ` "Invalid left-hand side in assignment expression. (1:2) > 1 | (a = b) += 1 - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:1)" `; exports[`snippet: #4 [espree] format 1`] = ` "Unexpected token } (1:23) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: Unexpected token }" `; exports[`snippet: #4 [flow] format 1`] = ` @@ -375,17 +427,20 @@ exports[`snippet: #4 [flow] format 2`] = ` exports[`snippet: #4 [meriyah] format 1`] = ` "Expected '{' (1:23) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: [1:23]: Expected '{'" `; exports[`snippet: #4 [meriyah] format 2`] = ` "Invalid left-hand side in assignment (1:10) > 1 | (a = b) += 1 - | ^" + | ^ +Cause: [1:10]: Invalid left-hand side in assignment" `; exports[`snippet: #4 [typescript] format 1`] = ` "'{' expected. (1:21) > 1 | ({ method(parameter,) }) - | ^" + | ^ +Cause: '{' expected." `; diff --git a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap index 0716d16c6..e96fd2edb 100644 --- a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap @@ -8,35 +8,40 @@ exports[`html-like-comments.js [babel] format 1`] = ` | ^ 4 | 'hello world' 5 | ) - 6 |" + 6 | +Cause: Unexpected token (3:0)" `; exports[`import-assertions-for-export-without-from.js [babel] format 1`] = ` "Missing semicolon. (1:26) > 1 | export { default as foo } assert { type: "json" }; | ^ - 2 |" + 2 | +Cause: Missing semicolon. (1:25)" `; exports[`import-assertions-with-parens.js [babel] format 1`] = ` "Unexpected token, expected "{" (1:19) > 1 | import "x" assert ({type: 'json'}); | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "{" (1:18)" `; exports[`import-attributes-for-export-without-from.js [babel] format 1`] = ` "Unexpected token, expected "(" (1:32) > 1 | export { default as foo } with { type: "json" }; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "(" (1:31)" `; exports[`import-attributes-with-parens.js [babel] format 1`] = ` "Unexpected token, expected "{" (1:17) > 1 | import "x" with ({type: 'json'}); | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "{" (1:16)" `; exports[`invalid-escape-in-identifier.js [babel] format 1`] = ` @@ -44,21 +49,24 @@ exports[`invalid-escape-in-identifier.js [babel] format 1`] = ` > 1 | const \\u{20} = 1 | ^ 2 | const \\u{3000} = 1 - 3 |" + 3 | +Cause: Invalid Unicode escape. (1:6)" `; exports[`invalid-escape-in-identifier-2.js [babel] format 1`] = ` "Expecting Unicode escape sequence \\uXXXX. (1:3) > 1 | a\\ = a | ^ - 2 |" + 2 | +Cause: Expecting Unicode escape sequence \\uXXXX. (1:2)" `; exports[`module-attributes.js [babel] format 1`] = ` "Unexpected token, expected "{" (1:33) > 1 | import foo from "foo.json" with type: "json"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "{" (1:32)" `; exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = ` @@ -67,7 +75,8 @@ exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = ` 2 | > 3 | for (() => x in y;;); | ^ - 4 |" + 4 | +Cause: Unexpected token, expected ")" (3:17)" `; exports[`partial-template-strings.js [babel] format 1`] = ` @@ -78,43 +87,50 @@ exports[`partial-template-strings.js [babel] format 1`] = ` | ^ 7 | name_not_found: \`'\${?}' not found.\` 8 | }; - 9 | Diagnostics.name_not_found("foo"); // "'foo' not found."" + 9 | Diagnostics.name_not_found("foo"); // "'foo' not found." +Cause: Unexpected token (6:41)" `; exports[`snippet: #0 [babel] format 1`] = ` "Binding should be performed on object property. (1:3) > 1 | ::%DebugPrint(null) - | ^" + | ^ +Cause: Binding should be performed on object property. (1:2)" `; exports[`snippet: #1 [babel] format 1`] = ` "Unexpected token (1:3) > 1 | a.%DebugPrint(); - | ^" + | ^ +Cause: Unexpected token (1:2)" `; exports[`snippet: #2 [babel] format 1`] = ` "Unexpected token (1:11) > 1 | const i = %DebugPrint; - | ^" + | ^ +Cause: Unexpected token (1:10)" `; exports[`snippet: #3 [babel] format 1`] = ` "Unexpected token (1:7) > 1 | f(x + ?) - | ^" + | ^ +Cause: Unexpected token (1:6)" `; exports[`snippet: #4 [babel] format 1`] = ` "Unexpected token (1:5) > 1 | x + ? - | ^" + | ^ +Cause: Unexpected token (1:4)" `; exports[`snippet: #5 [babel] format 1`] = ` "Unexpected token (1:1) > 1 | ?.f() - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #6 [babel] format 1`] = ` @@ -124,43 +140,50 @@ exports[`snippet: #6 [babel] format 1`] = ` > 5 | return try obj.#brand; | ^ 6 | } - 7 | }" + 7 | } +Cause: Unexpected token (5:11)" `; exports[`snippet: #7 [babel] format 1`] = ` "Unexpected token (1:7) > 1 | const #{ a, b } = #{ a: 1, b: 2 }; - | ^" + | ^ +Cause: Unexpected token (1:6)" `; exports[`snippet: #8 [babel] format 1`] = ` "Unexpected token (1:7) > 1 | const #[a, b] = #[1, 2]; - | ^" + | ^ +Cause: Unexpected token (1:6)" `; exports[`snippet: #9 [babel] format 1`] = ` "Unexpected token (1:2) > 1 | [| 1 |] - | ^" + | ^ +Cause: Unexpected token (1:1)" `; exports[`snippet: #10 [babel] format 1`] = ` "Invalid decimal. (1:1) > 1 | 0b101011101m; - | ^" + | ^ +Cause: Invalid decimal. (1:0)" `; exports[`snippet: #11 [babel] format 1`] = ` "Invalid decimal. (1:1) > 1 | 0x16432m; - | ^" + | ^ +Cause: Invalid decimal. (1:0)" `; exports[`snippet: #12 [babel] format 1`] = ` "Invalid decimal. (1:1) > 1 | 0o16432m; - | ^" + | ^ +Cause: Invalid decimal. (1:0)" `; exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = ` @@ -169,5 +192,6 @@ exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = 3 | > 4 | import {} from (('a')); | ^ - 5 |" + 5 | +Cause: Unexpected token (4:15)" `; diff --git a/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap index 542a8b53f..b7202ac81 100644 --- a/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap @@ -3,59 +3,69 @@ exports[`snippet: #0 [acorn] format 1`] = ` "Assigning to rvalue (1:1) > 1 | ({}) = x; - | ^" + | ^ +Cause: Assigning to rvalue (1:0)" `; exports[`snippet: #0 [acorn] format 2`] = ` "The keyword 'let' is reserved (1:21) > 1 | class Foo extends ((let)[0] = 1) {} - | ^" + | ^ +Cause: The keyword 'let' is reserved (1:20)" `; exports[`snippet: #0 [babel] format 1`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | ({}) = x; - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #0 [babel-ts] format 1`] = ` "Invalid parenthesized assignment pattern. (1:1) > 1 | ({}) = x; - | ^" + | ^ +Cause: Invalid parenthesized assignment pattern. (1:0)" `; exports[`snippet: #0 [espree] format 1`] = ` "Assigning to rvalue (1:1) > 1 | ({}) = x; - | ^" + | ^ +Cause: Assigning to rvalue" `; exports[`snippet: #0 [espree] format 2`] = ` "The keyword 'let' is reserved (1:21) > 1 | class Foo extends ((let)[0] = 1) {} - | ^" + | ^ +Cause: The keyword 'let' is reserved" `; exports[`snippet: #0 [espree] format 3`] = ` "The keyword 'let' is reserved (1:18) > 1 | export default ((let)[0] = 1); - | ^" + | ^ +Cause: The keyword 'let' is reserved" `; exports[`snippet: #0 [meriyah] format 1`] = ` "Invalid left-hand side in assignment (1:6) > 1 | ({}) = x; - | ^" + | ^ +Cause: [1:6]: Invalid left-hand side in assignment" `; exports[`snippet: #0 [meriyah] format 2`] = ` "The identifier 'let' must not be in expression position in strict mode (1:24) > 1 | class Foo extends ((let)[0] = 1) {} - | ^" + | ^ +Cause: [1:24]: The identifier 'let' must not be in expression position in strict mode" `; exports[`snippet: #0 [meriyah] format 3`] = ` "The identifier 'let' must not be in expression position in strict mode (1:21) > 1 | export default ((let)[0] = 1); - | ^" + | ^ +Cause: [1:21]: The identifier 'let' must not be in expression position in strict mode" `; diff --git a/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap index 53f8b3bfd..624cdefaa 100644 --- a/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap @@ -5,13 +5,15 @@ exports[`snippet: #0 [acorn] format 1`] = ` 1 | async function foo() { > 2 | function bar(x = await 2) {} | ^ - 3 | }" + 3 | } +Cause: Cannot use keyword 'await' outside an async function (2:19)" `; exports[`snippet: #0 [acorn] format 2`] = ` "Await expression cannot be a default value (1:12) > 1 | async (x = await (2)) => {}; - | ^" + | ^ +Cause: Await expression cannot be a default value (1:11)" `; exports[`snippet: #0 [babel] format 1`] = ` @@ -19,13 +21,15 @@ exports[`snippet: #0 [babel] format 1`] = ` 1 | async function foo() { > 2 | function bar(x = await 2) {} | ^ - 3 | }" + 3 | } +Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:19)" `; exports[`snippet: #0 [babel] format 2`] = ` "'await' is not allowed in async function parameters. (1:12) > 1 | async (x = await (2)) => {}; - | ^" + | ^ +Cause: 'await' is not allowed in async function parameters. (1:11)" `; exports[`snippet: #0 [espree] format 1`] = ` @@ -33,13 +37,15 @@ exports[`snippet: #0 [espree] format 1`] = ` 1 | async function foo() { > 2 | function bar(x = await 2) {} | ^ - 3 | }" + 3 | } +Cause: Cannot use keyword 'await' outside an async function" `; exports[`snippet: #0 [espree] format 2`] = ` "Await expression cannot be a default value (1:12) > 1 | async (x = await (2)) => {}; - | ^" + | ^ +Cause: Await expression cannot be a default value" `; exports[`snippet: #0 [flow] format 1`] = ` @@ -61,25 +67,29 @@ exports[`snippet: #0 [meriyah] format 1`] = ` 1 | async function foo() { > 2 | function bar(x = await 2) {} | ^ - 3 | }" + 3 | } +Cause: [2:24]: Await is only valid in async functions" `; exports[`snippet: #1 [acorn] format 1`] = ` "Await expression cannot be a default value (1:12) > 1 | async (x = await 2) => {}; - | ^" + | ^ +Cause: Await expression cannot be a default value (1:11)" `; exports[`snippet: #1 [babel] format 1`] = ` "'await' is not allowed in async function parameters. (1:12) > 1 | async (x = await 2) => {}; - | ^" + | ^ +Cause: 'await' is not allowed in async function parameters. (1:11)" `; exports[`snippet: #1 [espree] format 1`] = ` "Await expression cannot be a default value (1:12) > 1 | async (x = await 2) => {}; - | ^" + | ^ +Cause: Await expression cannot be a default value" `; exports[`snippet: #1 [flow] format 1`] = ` @@ -91,25 +101,29 @@ exports[`snippet: #1 [flow] format 1`] = ` exports[`snippet: #1 [meriyah] format 1`] = ` "Await expression not allowed in formal parameter (1:22) > 1 | async (x = await 2) => {}; - | ^" + | ^ +Cause: [1:22]: Await expression not allowed in formal parameter" `; exports[`snippet: #2 [acorn] format 1`] = ` "Unexpected token (1:25) > 1 | f = async (a) => await a! ** 6; - | ^" + | ^ +Cause: Unexpected token (1:24)" `; exports[`snippet: #2 [babel] format 1`] = ` "Unexpected token (1:27) > 1 | f = async (a) => await a! ** 6; - | ^" + | ^ +Cause: Unexpected token (1:26)" `; exports[`snippet: #2 [espree] format 1`] = ` "Unexpected token ! (1:25) > 1 | f = async (a) => await a! ** 6; - | ^" + | ^ +Cause: Unexpected token !" `; exports[`snippet: #2 [flow] format 1`] = ` @@ -121,25 +135,29 @@ exports[`snippet: #2 [flow] format 1`] = ` exports[`snippet: #2 [meriyah] format 1`] = ` "Unexpected token: '!' (1:25) > 1 | f = async (a) => await a! ** 6; - | ^" + | ^ +Cause: [1:25]: Unexpected token: '!'" `; exports[`snippet: #3 [acorn] format 1`] = ` "Unexpected token (1:14) > 1 | f = (a) => +a! ** 6; - | ^" + | ^ +Cause: Unexpected token (1:13)" `; exports[`snippet: #3 [babel] format 1`] = ` "Unexpected token (1:16) > 1 | f = (a) => +a! ** 6; - | ^" + | ^ +Cause: Unexpected token (1:15)" `; exports[`snippet: #3 [espree] format 1`] = ` "Unexpected token ! (1:14) > 1 | f = (a) => +a! ** 6; - | ^" + | ^ +Cause: Unexpected token !" `; exports[`snippet: #3 [flow] format 1`] = ` @@ -151,25 +169,29 @@ exports[`snippet: #3 [flow] format 1`] = ` exports[`snippet: #3 [meriyah] format 1`] = ` "Unexpected token: '!' (1:14) > 1 | f = (a) => +a! ** 6; - | ^" + | ^ +Cause: [1:14]: Unexpected token: '!'" `; exports[`snippet: #4 [acorn] format 1`] = ` "Unexpected token (1:22) > 1 | async (a) => (await a!) ** 6; - | ^" + | ^ +Cause: Unexpected token (1:21)" `; exports[`snippet: #4 [babel] format 1`] = ` "Unexpected token, expected "," (1:22) > 1 | async (a) => (await a!) ** 6; - | ^" + | ^ +Cause: Unexpected token, expected "," (1:21)" `; exports[`snippet: #4 [espree] format 1`] = ` "Unexpected token ! (1:22) > 1 | async (a) => (await a!) ** 6; - | ^" + | ^ +Cause: Unexpected token !" `; exports[`snippet: #4 [flow] format 1`] = ` @@ -181,25 +203,29 @@ exports[`snippet: #4 [flow] format 1`] = ` exports[`snippet: #4 [meriyah] format 1`] = ` "Expected ')' (1:22) > 1 | async (a) => (await a!) ** 6; - | ^" + | ^ +Cause: [1:22]: Expected ')'" `; exports[`snippet: #5 [acorn] format 1`] = ` "Unexpected token (1:6) > 1 | (-+5 ** 6); - | ^" + | ^ +Cause: Unexpected token (1:5)" `; exports[`snippet: #5 [babel] format 1`] = ` "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:3) > 1 | (-+5 ** 6); - | ^" + | ^ +Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" `; exports[`snippet: #5 [espree] format 1`] = ` "Unexpected token ** (1:6) > 1 | (-+5 ** 6); - | ^" + | ^ +Cause: Unexpected token **" `; exports[`snippet: #5 [flow] format 1`] = ` @@ -211,25 +237,29 @@ exports[`snippet: #5 [flow] format 1`] = ` exports[`snippet: #5 [meriyah] format 1`] = ` "Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:7) > 1 | (-+5 ** 6); - | ^" + | ^ +Cause: [1:7]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses" `; exports[`snippet: #6 [acorn] format 1`] = ` "Unexpected token (1:25) > 1 | f = async () => await 5 ** 6; - | ^" + | ^ +Cause: Unexpected token (1:24)" `; exports[`snippet: #6 [babel] format 1`] = ` "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23) > 1 | f = async () => await 5 ** 6; - | ^" + | ^ +Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)" `; exports[`snippet: #6 [espree] format 1`] = ` "Unexpected token ** (1:25) > 1 | f = async () => await 5 ** 6; - | ^" + | ^ +Cause: Unexpected token **" `; exports[`snippet: #6 [flow] format 1`] = ` @@ -241,25 +271,29 @@ exports[`snippet: #6 [flow] format 1`] = ` exports[`snippet: #6 [meriyah] format 1`] = ` "Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:26) > 1 | f = async () => await 5 ** 6; - | ^" + | ^ +Cause: [1:26]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses" `; exports[`snippet: #7 [acorn] format 1`] = ` "Unexpected token (1:26) > 1 | f = async () => await -5 ** 6; - | ^" + | ^ +Cause: Unexpected token (1:25)" `; exports[`snippet: #7 [babel] format 1`] = ` "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23) > 1 | f = async () => await -5 ** 6; - | ^" + | ^ +Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)" `; exports[`snippet: #7 [espree] format 1`] = ` "Unexpected token ** (1:26) > 1 | f = async () => await -5 ** 6; - | ^" + | ^ +Cause: Unexpected token **" `; exports[`snippet: #7 [flow] format 1`] = ` @@ -271,25 +305,29 @@ exports[`snippet: #7 [flow] format 1`] = ` exports[`snippet: #7 [meriyah] format 1`] = ` "Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:27) > 1 | f = async () => await -5 ** 6; - | ^" + | ^ +Cause: [1:27]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses" `; exports[`snippet: #8 [acorn] format 1`] = ` "Shorthand property assignments are valid only in destructuring patterns (1:15) > 1 | async({ foo33 = 1 }); - | ^" + | ^ +Cause: Shorthand property assignments are valid only in destructuring patterns (1:14)" `; exports[`snippet: #8 [babel] format 1`] = ` "Invalid shorthand property initializer. (1:15) > 1 | async({ foo33 = 1 }); - | ^" + | ^ +Cause: Invalid shorthand property initializer. (1:14)" `; exports[`snippet: #8 [espree] format 1`] = ` "Shorthand property assignments are valid only in destructuring patterns (1:15) > 1 | async({ foo33 = 1 }); - | ^" + | ^ +Cause: Shorthand property assignments are valid only in destructuring patterns" `; exports[`snippet: #8 [flow] format 1`] = ` @@ -301,5 +339,6 @@ exports[`snippet: #8 [flow] format 1`] = ` exports[`snippet: #8 [meriyah] format 1`] = ` "Invalid shorthand property initializer (1:21) > 1 | async({ foo33 = 1 }); - | ^" + | ^ +Cause: [1:21]: Invalid shorthand property initializer" `; diff --git a/tests/format/misc/errors/js/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/decorators/__snapshots__/jsfmt.spec.js.snap index 0fa339322..00d8b7ce4 100644 --- a/tests/format/misc/errors/js/decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/decorators/__snapshots__/jsfmt.spec.js.snap @@ -4,30 +4,35 @@ exports[`snippet: #0 [babel] format 1`] = ` "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:8) 1 | @decorator1 > 2 | export @decorator2 class A{} - | ^" + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:7)" `; exports[`snippet: #1 [babel] format 1`] = ` "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:16) 1 | @decorator1 > 2 | export default @decorator2 class A{} - | ^" + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (2:15)" `; exports[`snippet: #2 [babel] format 1`] = ` "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:20) > 1 | @decorator1 export @decorator2 class A {} - | ^" + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:19)" `; exports[`snippet: #3 [babel] format 1`] = ` "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:28) > 1 | @decorator1 export default @decorator2 class A {} - | ^" + | ^ +Cause: Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time. (1:27)" `; exports[`snippet: #4 [babel] format 1`] = ` "Leading decorators must be attached to a class declaration. (1:20) > 1 | export @decorator2 default class A {} - | ^" + | ^ +Cause: Leading decorators must be attached to a class declaration. (1:19)" `; diff --git a/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap index 83ad1ef04..31287efa1 100644 --- a/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/explicit-resource-management/__snapshots__/jsfmt.spec.js.snap @@ -4,7 +4,8 @@ exports[`invalid-for-await-using-binding-of-of.js [babel] format 1`] = ` "Unexpected token, expected ")" (1:24) > 1 | for await (using of of of); | ^ - 2 |" + 2 | +Cause: Unexpected token, expected ")" (1:23)" `; exports[`invalid-for-await-using-binding-of-of.js [flow] format 1`] = ` @@ -18,7 +19,8 @@ exports[`invalid-for-using-binding-in.js [babel] format 1`] = ` "For-in loop may not start with 'using' declaration. (1:6) > 1 | for (using foo in {}); | ^ - 2 |" + 2 | +Cause: For-in loop may not start with 'using' declaration. (1:5)" `; exports[`invalid-for-using-binding-in.js [flow] format 1`] = ` @@ -32,7 +34,8 @@ exports[`invalid-for-using-binding-of-in.js [babel] format 1`] = ` "Unexpected token (1:15) > 1 | for (using of in []); | ^ - 2 |" + 2 | +Cause: Unexpected token (1:14)" `; exports[`invalid-for-using-binding-of-in.js [flow] format 1`] = ` @@ -46,7 +49,8 @@ exports[`invalid-for-using-binding-of-of.js [babel] format 1`] = ` "Unexpected token, expected ")" (1:18) > 1 | for (using of of of); | ^ - 2 |" + 2 | +Cause: Unexpected token, expected ")" (1:17)" `; exports[`invalid-for-using-binding-of-of.js [flow] format 1`] = ` @@ -62,7 +66,8 @@ exports[`invalid-using-binding-let.js [babel] format 1`] = ` > 2 | using let = h(); | ^ 3 | } - 4 |" + 4 | +Cause: 'let' is disallowed as a lexically bound name. (2:8)" `; exports[`invalid-using-binding-let.js [flow] format 1`] = ` @@ -81,7 +86,8 @@ exports[`invalid-using-binding-pattern.js [babel] format 1`] = ` | ^ 3 | using [ bar ] = g(); 4 | for (using { qux } of h()); - 5 | for (using [ quux ] of i());" + 5 | for (using [ quux ] of i()); +Cause: Unexpected token (2:16)" `; exports[`invalid-using-binding-pattern.js [flow] format 1`] = ` diff --git a/tests/format/misc/errors/js/export-default-from/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/export-default-from/__snapshots__/jsfmt.spec.js.snap index ac4fa8291..b69828272 100644 --- a/tests/format/misc/errors/js/export-default-from/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/export-default-from/__snapshots__/jsfmt.spec.js.snap @@ -3,23 +3,27 @@ exports[`snippet: #0 [babel] format 1`] = ` "Unexpected token (1:9) > 1 | export *, {} from "foo"; - | ^" + | ^ +Cause: Unexpected token (1:8)" `; exports[`snippet: #1 [babel] format 1`] = ` "Unexpected token, expected "from" (1:21) > 1 | export * as foo, {} from "foo"; - | ^" + | ^ +Cause: Unexpected token, expected "from" (1:20)" `; exports[`snippet: #2 [babel] format 1`] = ` "Unexpected token (1:9) > 1 | export *, {bar} from "foo"; - | ^" + | ^ +Cause: Unexpected token (1:8)" `; exports[`snippet: #3 [babel] format 1`] = ` "Unexpected token, expected "from" (1:24) > 1 | export * as foo, {bar} from "foo"; - | ^" + | ^ +Cause: Unexpected token, expected "from" (1:23)" `; diff --git a/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap index d0a996363..e161c2585 100644 --- a/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap @@ -3,55 +3,64 @@ exports[`snippet: #0 [acorn] format 1`] = ` "Unexpected token (1:15) > 1 | for (async of []); - | ^" + | ^ +Cause: Unexpected token (1:14)" `; exports[`snippet: #0 [babel] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let.foo of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #0 [babel] format 2`] = ` "The left-hand side of a for-of loop may not be 'async'. (1:6) > 1 | for (async of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)" `; exports[`snippet: #0 [babel-flow] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let.foo of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #0 [babel-flow] format 2`] = ` "The left-hand side of a for-of loop may not be 'async'. (1:6) > 1 | for (async of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)" `; exports[`snippet: #0 [babel-ts] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let.foo of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #0 [babel-ts] format 2`] = ` "The left-hand side of a for-of loop may not be 'async'. (1:6) > 1 | for (async of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)" `; exports[`snippet: #0 [espree] format 1`] = ` "The keyword 'let' is reserved (1:6) > 1 | for (let.foo of []); - | ^" + | ^ +Cause: The keyword 'let' is reserved" `; exports[`snippet: #0 [espree] format 2`] = ` "Unexpected token [ (1:15) > 1 | for (async of []); - | ^" + | ^ +Cause: Unexpected token [" `; exports[`snippet: #0 [flow] format 1`] = ` @@ -69,37 +78,43 @@ exports[`snippet: #0 [flow] format 2`] = ` exports[`snippet: #0 [meriyah] format 1`] = ` "Identifier "let" disallowed as left-hand side expression in strict mode (1:9) > 1 | for (let.foo of []); - | ^" + | ^ +Cause: [1:9]: Identifier "let" disallowed as left-hand side expression in strict mode" `; exports[`snippet: #0 [typescript] format 1`] = ` "Variable declaration expected. (1:9) > 1 | for (let.foo of []); - | ^" + | ^ +Cause: Variable declaration expected." `; exports[`snippet: #1 [babel] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let().bar of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #1 [babel-flow] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let().bar of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #1 [babel-ts] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let().bar of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #1 [espree] format 1`] = ` "The keyword 'let' is reserved (1:6) > 1 | for (let().bar of []); - | ^" + | ^ +Cause: The keyword 'let' is reserved" `; exports[`snippet: #1 [flow] format 1`] = ` @@ -111,37 +126,43 @@ exports[`snippet: #1 [flow] format 1`] = ` exports[`snippet: #1 [meriyah] format 1`] = ` "Identifier "let" disallowed as left-hand side expression in strict mode (1:9) > 1 | for (let().bar of []); - | ^" + | ^ +Cause: [1:9]: Identifier "let" disallowed as left-hand side expression in strict mode" `; exports[`snippet: #1 [typescript] format 1`] = ` "Variable declaration expected. (1:9) > 1 | for (let().bar of []); - | ^" + | ^ +Cause: Variable declaration expected." `; exports[`snippet: #2 [babel] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let\`\`.bar of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #2 [babel-flow] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let\`\`.bar of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #2 [babel-ts] format 1`] = ` "The left-hand side of a for-of loop may not start with 'let'. (1:6) > 1 | for (let\`\`.bar of []); - | ^" + | ^ +Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)" `; exports[`snippet: #2 [espree] format 1`] = ` "The keyword 'let' is reserved (1:6) > 1 | for (let\`\`.bar of []); - | ^" + | ^ +Cause: The keyword 'let' is reserved" `; exports[`snippet: #2 [flow] format 1`] = ` @@ -153,11 +174,13 @@ exports[`snippet: #2 [flow] format 1`] = ` exports[`snippet: #2 [meriyah] format 1`] = ` "Identifier "let" disallowed as left-hand side expression in strict mode (1:10) > 1 | for (let\`\`.bar of []); - | ^" + | ^ +Cause: [1:10]: Identifier "let" disallowed as left-hand side expression in strict mode" `; exports[`snippet: #2 [typescript] format 1`] = ` "Variable declaration expected. (1:9) > 1 | for (let\`\`.bar of []); - | ^" + | ^ +Cause: Variable declaration expected." `; diff --git a/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap index 37a19667f..a31d04646 100644 --- a/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/hack-pipeline/__snapshots__/jsfmt.spec.js.snap @@ -3,66 +3,77 @@ exports[`snippet: #0 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> (yield y)} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #1 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> (yield)} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #2 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> (await y)} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #3 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> (a?.b)} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #4 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> a?.b} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #5 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> (a.b())} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #6 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> a.b()} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #7 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> (a.b?.())} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #8 [babel] format 1`] = ` "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:39) > 1 | async function * a() { a |> foo(%) |> a.b?.()} - | ^" + | ^ +Cause: Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once. (1:38)" `; exports[`snippet: #9 [babel] format 1`] = ` "Hack-style pipe body cannot be an unparenthesized yield expression; please wrap it in parentheses. (1:39) > 1 | async function * a() { a |> foo(%) |> yield} - | ^" + | ^ +Cause: Hack-style pipe body cannot be an unparenthesized yield expression; please wrap it in parentheses. (1:38)" `; exports[`v8intrinsic.js [babel] format 1`] = ` "Topic reference is unbound; it must be inside a pipe body. (1:16) > 1 | const status = %GetOptimizationStatus(fn) |> console.log(%); | ^ - 2 |" + 2 | +Cause: Topic reference is unbound; it must be inside a pipe body. (1:15)" `; diff --git a/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap index 2d4b1f73a..a79cc5a0e 100644 --- a/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap @@ -4,89 +4,102 @@ exports[`invalid-default-named-import.mjs [babel] format 1`] = ` "Only \`import module x from "./module"\` is valid. (1:15) > 1 | import module foo, {bar} from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Only \`import module x from "./module"\` is valid. (1:14)" `; exports[`invalid-export-from.mjs [babel] format 1`] = ` "Unexpected token, expected "{" (1:8) > 1 | export module x from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "{" (1:7)" `; exports[`invalid-flow-type-import-1.mjs [babel] format 1`] = ` "Unexpected token, expected "from" (1:13) > 1 | import type module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:12)" `; exports[`invalid-flow-type-import-2.mjs [babel] format 1`] = ` "Unexpected token, expected "from" (1:20) > 1 | import module type foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:19)" `; exports[`invalid-flow-typeof-import-1.mjs [babel] format 1`] = ` "Unexpected token, expected "from" (1:15) > 1 | import typeof module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:14)" `; exports[`invalid-flow-typeof-import-2.mjs [babel] format 1`] = ` "Unexpected token, expected "from" (1:22) > 1 | import module typeof foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:21)" `; exports[`invalid-identifier-source.mjs [babel] format 1`] = ` "Unexpected token, expected "from" (1:20) > 1 | import module from foo | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:19)" `; exports[`invalid-module-escape.mjs [babel] format 1`] = ` "Unexpected token, expected "from" (1:20) > 1 | import modul\\u0065 foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:19)" `; exports[`invalid-module-source.mjs [babel] format 1`] = ` "Unexpected token, expected "{" (1:15) > 1 | import module "foo"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "{" (1:14)" `; exports[`invalid-named-import.mjs [babel] format 1`] = ` "Only \`import module x from "./module"\` is valid. (1:17) > 1 | import module { foo } from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Only \`import module x from "./module"\` is valid. (1:16)" `; exports[`invalid-namespace-import.mjs [babel] format 1`] = ` "Only \`import module x from "./module"\` is valid. (1:15) > 1 | import module * as foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Only \`import module x from "./module"\` is valid. (1:14)" `; exports[`invalid-ts-type-import-1.mts [babel] format 1`] = ` "Unexpected token, expected "from" (1:13) > 1 | import type module foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:12)" `; exports[`invalid-ts-type-import-2.mts [babel] format 1`] = ` "Unexpected token, expected "from" (1:20) > 1 | import module type foo from "./module.wasm"; | ^ - 2 |" + 2 | +Cause: Unexpected token, expected "from" (1:19)" `; diff --git a/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap index 73c6d58de..630e22cce 100644 --- a/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/import/__snapshots__/jsfmt.spec.js.snap @@ -3,19 +3,22 @@ exports[`snippet: #0 [babel] format 1`] = ` "Unexpected token (1:8) > 1 | import(); - | ^" + | ^ +Cause: Unexpected token (1:7)" `; exports[`snippet: #0 [babel-flow] format 1`] = ` "Unexpected token (1:8) > 1 | import(); - | ^" + | ^ +Cause: Unexpected token (1:7)" `; exports[`snippet: #0 [babel-ts] format 1`] = ` "Unexpected token (1:8) > 1 | import(); - | ^" + | ^ +Cause: Unexpected token (1:7)" `; exports[`snippet: #0 [flow] format 1`] = ` @@ -27,31 +30,36 @@ exports[`snippet: #0 [flow] format 1`] = ` exports[`snippet: #0 [meriyah] format 1`] = ` "Unexpected token: ')' (1:8) > 1 | import(); - | ^" + | ^ +Cause: [1:8]: Unexpected token: ')'" `; exports[`snippet: #0 [typescript] format 1`] = ` "Dynamic import requires exactly one or two arguments. (1:1) > 1 | import(); - | ^^^^^^^^" + | ^^^^^^^^ +Cause: Dynamic import requires exactly one or two arguments." `; exports[`snippet: #1 [babel] format 1`] = ` "Unexpected token (1:21) > 1 | import(/* comment */); - | ^" + | ^ +Cause: Unexpected token (1:20)" `; exports[`snippet: #1 [babel-flow] format 1`] = ` "Unexpected token (1:21) > 1 | import(/* comment */); - | ^" + | ^ +Cause: Unexpected token (1:20)" `; exports[`snippet: #1 [babel-ts] format 1`] = ` "Unexpected token (1:21) > 1 | import(/* comment */); - | ^" + | ^ +Cause: Unexpected token (1:20)" `; exports[`snippet: #1 [flow] format 1`] = ` @@ -63,31 +71,36 @@ exports[`snippet: #1 [flow] format 1`] = ` exports[`snippet: #1 [meriyah] format 1`] = ` "Unexpected token: ')' (1:21) > 1 | import(/* comment */); - | ^" + | ^ +Cause: [1:21]: Unexpected token: ')'" `; exports[`snippet: #1 [typescript] format 1`] = ` "Dynamic import requires exactly one or two arguments. (1:1) > 1 | import(/* comment */); - | ^^^^^^^^^^^^^^^^^^^^^" + | ^^^^^^^^^^^^^^^^^^^^^ +Cause: Dynamic import requires exactly one or two arguments." `; exports[`snippet: #2 [babel] format 1`] = ` "Cannot use new with import(...). (1:5) > 1 | new import('./a.mjs'); - | ^" + | ^ +Cause: Cannot use new with import(...). (1:4)" `; exports[`snippet: #2 [babel-flow] format 1`] = ` "Cannot use new with import(...). (1:5) > 1 | new import('./a.mjs'); - | ^" + | ^ +Cause: Cannot use new with import(...). (1:4)" `; exports[`snippet: #2 [babel-ts] format 1`] = ` "Cannot use new with import(...). (1:5) > 1 | new import('./a.mjs'); - | ^" + | ^ +Cause: Cannot use new with import(...). (1:4)" `; exports[`snippet: #2 [flow] format 1`] = ` @@ -99,31 +112,36 @@ exports[`snippet: #2 [flow] format 1`] = ` exports[`snippet: #2 [meriyah] format 1`] = ` "Cannot use new with import(...) (1:11) > 1 | new import('./a.mjs'); - | ^" + | ^ +Cause: [1:11]: Cannot use new with import(...)" `; exports[`snippet: #2 [typescript] format 1`] = ` "Expression expected. (1:5) > 1 | new import('./a.mjs'); - | ^" + | ^ +Cause: Expression expected." `; exports[`snippet: #3 [babel] format 1`] = ` "Unexpected token (1:12) > 1 | new import(); - | ^" + | ^ +Cause: Unexpected token (1:11)" `; exports[`snippet: #3 [babel-flow] format 1`] = ` "Unexpected token (1:12) > 1 | new import(); - | ^" + | ^ +Cause: Unexpected token (1:11)" `; exports[`snippet: #3 [babel-ts] format 1`] = ` "Unexpected token (1:12) > 1 | new import(); - | ^" + | ^ +Cause: Unexpected token (1:11)" `; exports[`snippet: #3 [flow] format 1`] = ` @@ -135,11 +153,13 @@ exports[`snippet: #3 [flow] format 1`] = ` exports[`snippet: #3 [meriyah] format 1`] = ` "Cannot use new with import(...) (1:11) > 1 | new import(); - | ^" + | ^ +Cause: [1:11]: Cannot use new with import(...)" `; exports[`snippet: #3 [typescript] format 1`] = ` "Expression expected. (1:5) > 1 | new import(); - | ^" + | ^ +Cause: Expression expected." `; diff --git a/tests/format/misc/errors/js/known-source-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/known-source-type/__snapshots__/jsfmt.spec.js.snap index 79f98bebc..cbc3b998a 100644 --- a/tests/format/misc/errors/js/known-source-type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/known-source-type/__snapshots__/jsfmt.spec.js.snap @@ -3,53 +3,62 @@ exports[`snippet: #0 [acorn] format 1`] = ` "'import' and 'export' may appear only with 'sourceType: module' (1:1) > 1 | import "foo" - | ^" + | ^ +Cause: 'import' and 'export' may appear only with 'sourceType: module' (1:0)" `; exports[`snippet: #0 [espree] format 1`] = ` "'import' and 'export' may appear only with 'sourceType: module' (1:1) > 1 | import "foo" - | ^" + | ^ +Cause: 'import' and 'export' may appear only with 'sourceType: module'" `; exports[`snippet: #0 [meriyah] format 1`] = ` "The import keyword can only be used with the module goal (1:12) > 1 | import "foo" - | ^" + | ^ +Cause: [1:12]: The import keyword can only be used with the module goal" `; exports[`snippet: #1 [acorn] format 1`] = ` "'with' in strict mode (1:1) > 1 | with(foo) {} - | ^" + | ^ +Cause: 'with' in strict mode (1:0)" `; exports[`snippet: #1 [espree] format 1`] = ` "'with' in strict mode (1:1) > 1 | with(foo) {} - | ^" + | ^ +Cause: 'with' in strict mode" `; exports[`snippet: #1 [meriyah] format 1`] = ` "Strict mode code may not include a with statement (1:5) > 1 | with(foo) {} - | ^" + | ^ +Cause: [1:5]: Strict mode code may not include a with statement" `; exports[`snippet: #2 [acorn] format 1`] = ` "Deleting local variable in strict mode (1:1) > 1 | delete foo - | ^" + | ^ +Cause: Deleting local variable in strict mode (1:0)" `; exports[`snippet: #2 [espree] format 1`] = ` "Deleting local variable in strict mode (1:1) > 1 | delete foo - | ^" + | ^ +Cause: Deleting local variable in strict mode" `; exports[`snippet: #2 [meriyah] format 1`] = ` "Calling delete on expression not allowed in strict mode (1:10) > 1 | delete foo - | ^" + | ^ +Cause: [1:10]: Calling delete on expression not allowed in strict mode" `; diff --git a/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap index 5f07adeb0..46deec8e9 100644 --- a/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/literal/__snapshots__/jsfmt.spec.js.snap @@ -4,26 +4,30 @@ exports[`invalid-exponent.js [acorn] format 1`] = ` "Invalid number (1:1) > 1 | 12.3e | ^ - 2 |" + 2 | +Cause: Invalid number (1:0)" `; exports[`invalid-exponent.js [babel] format 1`] = ` "Floating-point numbers require a valid exponent after the 'e'. (1:1) > 1 | 12.3e | ^ - 2 |" + 2 | +Cause: Floating-point numbers require a valid exponent after the 'e'. (1:0)" `; exports[`invalid-exponent.js [espree] format 1`] = ` "Invalid number (1:1) > 1 | 12.3e | ^ - 2 |" + 2 | +Cause: Invalid number" `; exports[`invalid-exponent.js [meriyah] format 1`] = ` "Non-number found after exponent indicator (1:5) > 1 | 12.3e | ^ - 2 |" + 2 | +Cause: [1:5]: Non-number found after exponent indicator" `; diff --git a/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap index 0593494e7..036d52b49 100644 --- a/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/object/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`getter-generator.js [acorn] format 1`] = ` > 2 | get *iterator() { }, | ^ 3 | }); - 4 |" + 4 | +Cause: Unexpected token (2:8)" `; exports[`getter-generator.js [babel] format 1`] = ` @@ -15,7 +16,8 @@ exports[`getter-generator.js [babel] format 1`] = ` > 2 | get *iterator() { }, | ^ 3 | }); - 4 |" + 4 | +Cause: A getter cannot be a generator. (2:9)" `; exports[`getter-generator.js [espree] format 1`] = ` @@ -24,7 +26,8 @@ exports[`getter-generator.js [espree] format 1`] = ` > 2 | get *iterator() { }, | ^ 3 | }); - 4 |" + 4 | +Cause: Unexpected token *" `; exports[`getter-generator.js [meriyah] format 1`] = ` @@ -33,35 +36,40 @@ exports[`getter-generator.js [meriyah] format 1`] = ` > 2 | get *iterator() { }, | ^ 3 | }); - 4 |" + 4 | +Cause: [2:9]: A getter cannot be a generator" `; exports[`getter-with-parameter.js [acorn] format 1`] = ` "getter should have no params (1:9) > 1 | ({ get x(a){} }); | ^ - 2 |" + 2 | +Cause: getter should have no params (1:8)" `; exports[`getter-with-parameter.js [babel] format 1`] = ` "A 'get' accessor must not have any formal parameters. (1:4) > 1 | ({ get x(a){} }); | ^ - 2 |" + 2 | +Cause: A 'get' accessor must not have any formal parameters. (1:3)" `; exports[`getter-with-parameter.js [espree] format 1`] = ` "getter should have no params (1:9) > 1 | ({ get x(a){} }); | ^ - 2 |" + 2 | +Cause: getter should have no params" `; exports[`getter-with-parameter.js [meriyah] format 1`] = ` "Getter functions must have exactly no arguments (1:10) > 1 | ({ get x(a){} }); | ^ - 2 |" + 2 | +Cause: [1:10]: Getter functions must have exactly no arguments" `; exports[`setter-generator.js [acorn] format 1`] = ` @@ -70,7 +78,8 @@ exports[`setter-generator.js [acorn] format 1`] = ` > 2 | set *iterator(iter) { }, | ^ 3 | }); - 4 |" + 4 | +Cause: Unexpected token (2:8)" `; exports[`setter-generator.js [babel] format 1`] = ` @@ -79,7 +88,8 @@ exports[`setter-generator.js [babel] format 1`] = ` > 2 | set *iterator(iter) { }, | ^ 3 | }); - 4 |" + 4 | +Cause: A setter cannot be a generator. (2:9)" `; exports[`setter-generator.js [espree] format 1`] = ` @@ -88,7 +98,8 @@ exports[`setter-generator.js [espree] format 1`] = ` > 2 | set *iterator(iter) { }, | ^ 3 | }); - 4 |" + 4 | +Cause: Unexpected token *" `; exports[`setter-generator.js [meriyah] format 1`] = ` @@ -97,33 +108,38 @@ exports[`setter-generator.js [meriyah] format 1`] = ` > 2 | set *iterator(iter) { }, | ^ 3 | }); - 4 |" + 4 | +Cause: [2:9]: A setter cannot be a generator" `; exports[`setter-without-parameter.js [acorn] format 1`] = ` "setter should have exactly one param (1:9) > 1 | ({ set x(){} }); | ^ - 2 |" + 2 | +Cause: setter should have exactly one param (1:8)" `; exports[`setter-without-parameter.js [babel] format 1`] = ` "A 'set' accessor must have exactly one formal parameter. (1:4) > 1 | ({ set x(){} }); | ^ - 2 |" + 2 | +Cause: A 'set' accessor must have exactly one formal parameter. (1:3)" `; exports[`setter-without-parameter.js [espree] format 1`] = ` "setter should have exactly one param (1:9) > 1 | ({ set x(){} }); | ^ - 2 |" + 2 | +Cause: setter should have exactly one param" `; exports[`setter-without-parameter.js [meriyah] format 1`] = ` "Setter functions must have exactly one argument (1:10) > 1 | ({ set x(){} }); | ^ - 2 |" + 2 | +Cause: [1:10]: Setter functions must have exactly one argument" `; diff --git a/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap index ed0341343..09b0911dd 100644 --- a/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/optional-chaining/__snapshots__/jsfmt.spec.js.snap @@ -3,97 +3,113 @@ exports[`snippet: #0 [acorn] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:21) > 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:20)" `; exports[`snippet: #0 [babel] format 1`] = ` "Constructors in/after an Optional Chain are not allowed. (1:21) > 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:20)" `; exports[`snippet: #0 [espree] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:21) > 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" `; exports[`snippet: #0 [meriyah] format 1`] = ` "Invalid optional chain from new expression (1:22) > 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance - | ^" + | ^ +Cause: [1:22]: Invalid optional chain from new expression" `; exports[`snippet: #1 [acorn] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:22) > 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:21)" `; exports[`snippet: #1 [babel] format 1`] = ` "Constructors in/after an Optional Chain are not allowed. (1:22) > 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:21)" `; exports[`snippet: #1 [espree] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:22) > 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" `; exports[`snippet: #1 [meriyah] format 1`] = ` "Invalid optional chain from new expression (1:23) > 1 | const safe5 = new obj?.qux?.baz(); // undefined - | ^" + | ^ +Cause: [1:23]: Invalid optional chain from new expression" `; exports[`snippet: #2 [acorn] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:22) > 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:21)" `; exports[`snippet: #2 [babel] format 1`] = ` "Constructors in/after an Optional Chain are not allowed. (1:22) > 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:21)" `; exports[`snippet: #2 [espree] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:22) > 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" `; exports[`snippet: #2 [meriyah] format 1`] = ` "Invalid optional chain from new expression (1:23) > 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined - | ^" + | ^ +Cause: [1:23]: Invalid optional chain from new expression" `; exports[`snippet: #3 [acorn] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:26) > 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:25)" `; exports[`snippet: #3 [babel] format 1`] = ` "Constructors in/after an Optional Chain are not allowed. (1:26) > 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:25)" `; exports[`snippet: #3 [espree] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:26) > 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" `; exports[`snippet: #3 [meriyah] format 1`] = ` "Invalid optional chain from new expression (1:27) > 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor - | ^" + | ^ +Cause: [1:27]: Invalid optional chain from new expression" `; exports[`snippet: #4 [acorn] format 1`] = ` @@ -101,7 +117,8 @@ exports[`snippet: #4 [acorn] format 1`] = ` 2 | class Test { 3 | } > 4 | new Test?.(); // test instance - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (4:8)" `; exports[`snippet: #4 [babel] format 1`] = ` @@ -109,7 +126,8 @@ exports[`snippet: #4 [babel] format 1`] = ` 2 | class Test { 3 | } > 4 | new Test?.(); // test instance - | ^" + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (4:8)" `; exports[`snippet: #4 [espree] format 1`] = ` @@ -117,7 +135,8 @@ exports[`snippet: #4 [espree] format 1`] = ` 2 | class Test { 3 | } > 4 | new Test?.(); // test instance - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" `; exports[`snippet: #4 [meriyah] format 1`] = ` @@ -125,29 +144,34 @@ exports[`snippet: #4 [meriyah] format 1`] = ` 2 | class Test { 3 | } > 4 | new Test?.(); // test instance - | ^" + | ^ +Cause: [4:10]: Invalid optional chain from new expression" `; exports[`snippet: #5 [acorn] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:11) > 1 | new exists?.(); // undefined - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions (1:10)" `; exports[`snippet: #5 [babel] format 1`] = ` "Constructors in/after an Optional Chain are not allowed. (1:11) > 1 | new exists?.(); // undefined - | ^" + | ^ +Cause: Constructors in/after an Optional Chain are not allowed. (1:10)" `; exports[`snippet: #5 [espree] format 1`] = ` "Optional chaining cannot appear in the callee of new expressions (1:11) > 1 | new exists?.(); // undefined - | ^" + | ^ +Cause: Optional chaining cannot appear in the callee of new expressions" `; exports[`snippet: #5 [meriyah] format 1`] = ` "Invalid optional chain from new expression (1:12) > 1 | new exists?.(); // undefined - | ^" + | ^ +Cause: [1:12]: Invalid optional chain from new expression" `; diff --git a/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap index 5d84c2f2a..6e8729525 100644 --- a/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/record/__snapshots__/jsfmt.spec.js.snap @@ -3,119 +3,139 @@ exports[`snippet: #0 [acorn] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{a() {}} - | ^" + | ^ +Cause: Unexpected character '{' (1:1)" `; exports[`snippet: #0 [babel] format 1`] = ` "Only properties and spread elements are allowed in record definitions. (1:3) > 1 | #{a() {}} - | ^" + | ^ +Cause: Only properties and spread elements are allowed in record definitions. (1:2)" `; exports[`snippet: #0 [espree] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{a() {}} - | ^" + | ^ +Cause: Unexpected character '{'" `; exports[`snippet: #0 [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #{a() {}} - | ^" + | ^ +Cause: [1:1]: '#' not followed by identifier" `; exports[`snippet: #1 [acorn] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{async b() {}} - | ^" + | ^ +Cause: Unexpected character '{' (1:1)" `; exports[`snippet: #1 [babel] format 1`] = ` "Only properties and spread elements are allowed in record definitions. (1:3) > 1 | #{async b() {}} - | ^" + | ^ +Cause: Only properties and spread elements are allowed in record definitions. (1:2)" `; exports[`snippet: #1 [espree] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{async b() {}} - | ^" + | ^ +Cause: Unexpected character '{'" `; exports[`snippet: #1 [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #{async b() {}} - | ^" + | ^ +Cause: [1:1]: '#' not followed by identifier" `; exports[`snippet: #2 [acorn] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{get c() {}} - | ^" + | ^ +Cause: Unexpected character '{' (1:1)" `; exports[`snippet: #2 [babel] format 1`] = ` "Only properties and spread elements are allowed in record definitions. (1:3) > 1 | #{get c() {}} - | ^" + | ^ +Cause: Only properties and spread elements are allowed in record definitions. (1:2)" `; exports[`snippet: #2 [espree] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{get c() {}} - | ^" + | ^ +Cause: Unexpected character '{'" `; exports[`snippet: #2 [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #{get c() {}} - | ^" + | ^ +Cause: [1:1]: '#' not followed by identifier" `; exports[`snippet: #3 [acorn] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{set d(_) {}} - | ^" + | ^ +Cause: Unexpected character '{' (1:1)" `; exports[`snippet: #3 [babel] format 1`] = ` "Only properties and spread elements are allowed in record definitions. (1:3) > 1 | #{set d(_) {}} - | ^" + | ^ +Cause: Only properties and spread elements are allowed in record definitions. (1:2)" `; exports[`snippet: #3 [espree] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{set d(_) {}} - | ^" + | ^ +Cause: Unexpected character '{'" `; exports[`snippet: #3 [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #{set d(_) {}} - | ^" + | ^ +Cause: [1:1]: '#' not followed by identifier" `; exports[`snippet: #4 [acorn] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{*e() {}} - | ^" + | ^ +Cause: Unexpected character '{' (1:1)" `; exports[`snippet: #4 [babel] format 1`] = ` "Only properties and spread elements are allowed in record definitions. (1:3) > 1 | #{*e() {}} - | ^" + | ^ +Cause: Only properties and spread elements are allowed in record definitions. (1:2)" `; exports[`snippet: #4 [espree] format 1`] = ` "Unexpected character '{' (1:2) > 1 | #{*e() {}} - | ^" + | ^ +Cause: Unexpected character '{'" `; exports[`snippet: #4 [meriyah] format 1`] = ` "'#' not followed by identifier (1:1) > 1 | #{*e() {}} - | ^" + | ^ +Cause: [1:1]: '#' not followed by identifier" `; diff --git a/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap index 525385208..a45b9f54e 100644 --- a/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/regex-v-u-flags/__snapshots__/jsfmt.spec.js.snap @@ -4,54 +4,62 @@ exports[`invalid-flags.js [acorn] format 1`] = ` "Invalid regular expression flag (1:2) > 1 | /a/ugv; | ^ - 2 |" + 2 | +Cause: Invalid regular expression flag (1:1)" `; exports[`invalid-flags.js [babel] format 1`] = ` "The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:7) > 1 | /a/ugv; | ^ - 2 |" + 2 | +Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6)" `; exports[`invalid-flags.js [espree] format 1`] = ` "Invalid regular expression flag (1:2) > 1 | /a/ugv; | ^ - 2 |" + 2 | +Cause: Invalid regular expression flag" `; exports[`invalid-flags.js [meriyah] format 1`] = ` "Unexpected regular expression flag (1:5) > 1 | /a/ugv; | ^ - 2 |" + 2 | +Cause: [1:5]: Unexpected regular expression flag" `; exports[`invalid-flags2.js [acorn] format 1`] = ` "Invalid regular expression flag (1:2) > 1 | /a/vu; | ^ - 2 |" + 2 | +Cause: Invalid regular expression flag (1:1)" `; exports[`invalid-flags2.js [babel] format 1`] = ` "The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6) > 1 | /a/vu; | ^ - 2 |" + 2 | +Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:5)" `; exports[`invalid-flags2.js [espree] format 1`] = ` "Invalid regular expression flag (1:2) > 1 | /a/vu; | ^ - 2 |" + 2 | +Cause: Invalid regular expression flag" `; exports[`invalid-flags2.js [meriyah] format 1`] = ` "Unexpected regular expression flag (1:3) > 1 | /a/vu; | ^ - 2 |" + 2 | +Cause: [1:3]: Unexpected regular expression flag" `; diff --git a/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap index 7ff9239cd..e7984e4f8 100644 --- a/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap @@ -3,23 +3,27 @@ exports[`snippet: #0 [espree] format 1`] = ` "The keyword 'interface' is reserved (1:7) > 1 | class interface {} - | ^" + | ^ +Cause: The keyword 'interface' is reserved" `; exports[`snippet: #0 [meriyah] format 1`] = ` "Unexpected strict mode reserved word (1:15) > 1 | class interface {} - | ^" + | ^ +Cause: [1:15]: Unexpected strict mode reserved word" `; exports[`snippet: #1 [espree] format 1`] = ` "The keyword 'interface' is reserved (1:8) > 1 | import interface from "foo"; - | ^" + | ^ +Cause: The keyword 'interface' is reserved" `; exports[`snippet: #1 [meriyah] format 1`] = ` "Unexpected strict mode reserved word (1:16) > 1 | import interface from "foo"; - | ^" + | ^ +Cause: [1:16]: Unexpected strict mode reserved word" `; diff --git a/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap index 8f52a13b4..7f08e6174 100644 --- a/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/variable-declarator/__snapshots__/jsfmt.spec.js.snap @@ -4,26 +4,30 @@ exports[`invalid-const.js [acorn] format 1`] = ` "Unexpected token (1:10) > 1 | const foo; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:9)" `; exports[`invalid-const.js [babel] format 1`] = ` "Missing initializer in const declaration. (1:10) > 1 | const foo; | ^ - 2 |" + 2 | +Cause: Missing initializer in const declaration. (1:9)" `; exports[`invalid-const.js [espree] format 1`] = ` "Unexpected token ; (1:10) > 1 | const foo; | ^ - 2 |" + 2 | +Cause: Unexpected token ;" `; exports[`invalid-const.js [meriyah] format 1`] = ` "Missing initializer in const declaration (1:10) > 1 | const foo; | ^ - 2 |" + 2 | +Cause: [1:10]: Missing initializer in const declaration" `; diff --git a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap index 79877c22b..a2afc863c 100644 --- a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap @@ -9,7 +9,8 @@ exports[`snippet: #0 [json] format 1`] = ` exports[`snippet: #0 [json] format 2`] = ` "A 'set' accessor must have exactly one formal parameter. (1:9) > 1 | [class {set foo() {}}] - | ^" + | ^ +Cause: A 'set' accessor must have exactly one formal parameter. (1:8)" `; exports[`snippet: #0 [json-stringify] format 1`] = ` @@ -33,7 +34,8 @@ exports[`snippet: #1 [json] format 1`] = ` exports[`snippet: #1 [json] format 2`] = ` "Private name #bar is not defined. (1:21) > 1 | [class {foo() {this.#bar}}] - | ^" + | ^ +Cause: Private name #bar is not defined. (1:20)" `; exports[`snippet: #1 [json-stringify] format 1`] = ` @@ -57,7 +59,8 @@ exports[`snippet: #2 [json] format 1`] = ` exports[`snippet: #2 [json] format 2`] = ` "'await' is only allowed within async functions and at the top levels of modules. (1:14) > 1 | [function(){ await 1 }] - | ^" + | ^ +Cause: 'await' is only allowed within async functions and at the top levels of modules. (1:13)" `; exports[`snippet: #2 [json-stringify] format 1`] = ` @@ -105,7 +108,8 @@ exports[`snippet: #4 [json] format 1`] = ` exports[`snippet: #4 [json] format 2`] = ` "'import' and 'export' may only appear at the top level. (1:14) > 1 | [function() {export a from 'a'}] - | ^" + | ^ +Cause: 'import' and 'export' may only appear at the top level. (1:13)" `; exports[`snippet: #4 [json-stringify] format 1`] = ` @@ -123,25 +127,29 @@ exports[`snippet: #4 [json5] format 1`] = ` exports[`snippet: #5 [json] format 1`] = ` "Expecting Unicode escape sequence \\uXXXX. (1:10) > 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json - | ^" + | ^ +Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)" `; exports[`snippet: #5 [json] format 2`] = ` "Unexpected token (1:1) > 1 | export a from 'a' - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #5 [json-stringify] format 1`] = ` "Expecting Unicode escape sequence \\uXXXX. (1:10) > 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json - | ^" + | ^ +Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)" `; exports[`snippet: #5 [json5] format 1`] = ` "Expecting Unicode escape sequence \\uXXXX. (1:10) > 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json - | ^" + | ^ +Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)" `; exports[`snippet: #6 [json] format 1`] = ` @@ -153,7 +161,8 @@ exports[`snippet: #6 [json] format 1`] = ` exports[`snippet: #6 [json] format 2`] = ` "Unexpected token, expected "," (1:3) > 1 | [a::b] - | ^" + | ^ +Cause: Unexpected token, expected "," (1:2)" `; exports[`snippet: #6 [json-stringify] format 1`] = ` @@ -465,7 +474,8 @@ exports[`snippet: #19 [json] format 1`] = ` exports[`snippet: #19 [json] format 2`] = ` "\`import\` can only be used in \`import()\` or \`import.meta\`. (1:1) > 1 | import module a from 'a' - | ^" + | ^ +Cause: \`import\` can only be used in \`import()\` or \`import.meta\`. (1:0)" `; exports[`snippet: #19 [json-stringify] format 1`] = ` @@ -508,60 +518,69 @@ exports[`snippet: #21 [json] format 1`] = ` "Unexpected token (1:1) > 1 | #!/usr/bin/env node | ^ - 2 | {}" + 2 | {} +Cause: Unexpected token (1:0)" `; exports[`snippet: #21 [json] format 2`] = ` "Unexpected token, expected "," (1:8) > 1 | {using a = b} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:7)" `; exports[`snippet: #21 [json-stringify] format 1`] = ` "Unexpected token (1:1) > 1 | #!/usr/bin/env node | ^ - 2 | {}" + 2 | {} +Cause: Unexpected token (1:0)" `; exports[`snippet: #21 [json5] format 1`] = ` "Unexpected token (1:1) > 1 | #!/usr/bin/env node | ^ - 2 | {}" + 2 | {} +Cause: Unexpected token (1:0)" `; exports[`snippet: #22 [json] format 1`] = ` "Unexpected token (2:1) 1 | "use strict" > 2 | {} - | ^" + | ^ +Cause: Unexpected token (2:0)" `; exports[`snippet: #22 [json] format 2`] = ` "Unexpected token (1:2) > 1 | [#[]] - | ^" + | ^ +Cause: Unexpected token (1:1)" `; exports[`snippet: #22 [json-stringify] format 1`] = ` "Unexpected token (2:1) 1 | "use strict" > 2 | {} - | ^" + | ^ +Cause: Unexpected token (2:0)" `; exports[`snippet: #22 [json5] format 1`] = ` "Unexpected token (2:1) 1 | "use strict" > 2 | {} - | ^" + | ^ +Cause: Unexpected token (2:0)" `; exports[`snippet: #23 [json] format 1`] = ` "Unexpected token (1:14) > 1 | /* comment */ - | ^" + | ^ +Cause: Unexpected token (1:13)" `; exports[`snippet: #23 [json] format 2`] = ` @@ -573,19 +592,22 @@ exports[`snippet: #23 [json] format 2`] = ` exports[`snippet: #23 [json-stringify] format 1`] = ` "Unexpected token (1:14) > 1 | /* comment */ - | ^" + | ^ +Cause: Unexpected token (1:13)" `; exports[`snippet: #23 [json5] format 1`] = ` "Unexpected token (1:14) > 1 | /* comment */ - | ^" + | ^ +Cause: Unexpected token (1:13)" `; exports[`snippet: #24 [json] format 1`] = ` "Unexpected token (1:11) > 1 | // comment - | ^" + | ^ +Cause: Unexpected token (1:10)" `; exports[`snippet: #24 [json] format 2`] = ` @@ -597,13 +619,15 @@ exports[`snippet: #24 [json] format 2`] = ` exports[`snippet: #24 [json-stringify] format 1`] = ` "Unexpected token (1:11) > 1 | // comment - | ^" + | ^ +Cause: Unexpected token (1:10)" `; exports[`snippet: #24 [json5] format 1`] = ` "Unexpected token (1:11) > 1 | // comment - | ^" + | ^ +Cause: Unexpected token (1:10)" `; exports[`snippet: #25 [json] format 1`] = ` @@ -789,17 +813,20 @@ exports[`snippet: #33 [json5] format 1`] = ` exports[`snippet: #34 [json] format 1`] = ` "Invalid left-hand side in prefix operation. (1:5) > 1 | ----123 - | ^" + | ^ +Cause: Invalid left-hand side in prefix operation. (1:4)" `; exports[`snippet: #34 [json-stringify] format 1`] = ` "Invalid left-hand side in prefix operation. (1:5) > 1 | ----123 - | ^" + | ^ +Cause: Invalid left-hand side in prefix operation. (1:4)" `; exports[`snippet: #34 [json5] format 1`] = ` "Invalid left-hand side in prefix operation. (1:5) > 1 | ----123 - | ^" + | ^ +Cause: Invalid left-hand side in prefix operation. (1:4)" `; diff --git a/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap index b8584eab3..c0883cf25 100644 --- a/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap @@ -8,7 +8,8 @@ exports[`inline-comment.less [less] format 1`] = ` | ^ 6 | : 7 | value; - 8 | }" + 8 | } +Cause: :5:4: Unknown word" `; exports[`open-double-quote.less [less] format 1`] = ` @@ -17,7 +18,8 @@ exports[`open-double-quote.less [less] format 1`] = ` > 2 | background: url(" | ^ 3 | } - 4 |" + 4 | +Cause: :2:17: Unclosed string" `; exports[`open-sigle-quote.less [less] format 1`] = ` @@ -26,12 +28,14 @@ exports[`open-sigle-quote.less [less] format 1`] = ` > 2 | background: url(' | ^ 3 | } - 4 |" + 4 | +Cause: :2:17: Unclosed string" `; exports[`scss-syntax.scss [less] format 1`] = ` "CssSyntaxError: Unknown word (1:15) > 1 | a {content: #{$foo}} | ^ - 2 |" + 2 | +Cause: :1:15: Unknown word" `; diff --git a/tests/format/misc/errors/scss/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/scss/__snapshots__/jsfmt.spec.js.snap index 7d4e71ccb..ffad7584a 100644 --- a/tests/format/misc/errors/scss/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/scss/__snapshots__/jsfmt.spec.js.snap @@ -4,5 +4,6 @@ exports[`less-syntax.less [scss] format 1`] = ` "CssSyntaxError: Unknown word (1:4) > 1 | a {.bordered();} | ^ - 2 |" + 2 | +Cause: :1:4: Unknown word" `; diff --git a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap index b30a4923a..fb4a8a9f7 100644 --- a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`declare-getter.ts [typescript] format 1`] = ` > 2 | declare get foo() | ^^^^^^^ 3 | } - 4 |" + 4 | +Cause: 'declare' modifier cannot appear on class elements of this kind." `; exports[`declare-setter.ts [typescript] format 1`] = ` @@ -15,21 +16,24 @@ exports[`declare-setter.ts [typescript] format 1`] = ` > 2 | declare set foo(v) | ^^^^^^^ 3 | } - 4 |" + 4 | +Cause: 'declare' modifier cannot appear on class elements of this kind." `; exports[`default-escaped.ts [typescript] format 1`] = ` "Declaration or statement expected. (1:1) > 1 | export asyn\\u{63} from "async"; | ^ - 2 |" + 2 | +Cause: Declaration or statement expected." `; exports[`export-declare.ts [typescript] format 1`] = ` "Declaration or statement expected. (1:1) > 1 | export declare foo; | ^ - 2 |" + 2 | +Cause: Declaration or statement expected." `; exports[`invalid-jsx-1.tsx [typescript] format 1`] = ` @@ -38,14 +42,16 @@ exports[`invalid-jsx-1.tsx [typescript] format 1`] = ` 2 | > 3 | let directions =
Navigate to: Menu Bar > Tools > Options
| ^ - 4 |" + 4 | +Cause: Unexpected token. Did you mean \`{'>'}\` or \`>\`?" `; exports[`module-attributes-static.ts [typescript] format 1`] = ` "';' expected. (1:28) > 1 | import foo from "foo.json" with type: "json"; | ^ - 2 |" + 2 | +Cause: ';' expected." `; exports[`newline-before-arrow.ts [typescript] format 1`] = ` @@ -53,43 +59,50 @@ exports[`newline-before-arrow.ts [typescript] format 1`] = ` > 1 | async x | ^ 2 | => x - 3 |" + 3 | +Cause: Unexpected keyword or identifier." `; exports[`snippet: #0 [typescript] format 1`] = ` "Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15) > 1 | let x1 =
}
; - | ^" + | ^ +Cause: Unexpected token. Did you mean \`{'}'}\` or \`}\`?" `; exports[`snippet: #1 [typescript] format 1`] = ` "Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15) > 1 | let x2 =
>
; - | ^" + | ^ +Cause: Unexpected token. Did you mean \`{'>'}\` or \`>\`?" `; exports[`snippet: #2 [typescript] format 1`] = ` "':' expected. (1:21) > 1 | let x3 =
{"foo"}}
; - | ^" + | ^ +Cause: ':' expected." `; exports[`snippet: #3 [typescript] format 1`] = ` "':' expected. (1:21) > 1 | let x4 =
{"foo"}>
; - | ^" + | ^ +Cause: ':' expected." `; exports[`snippet: #4 [typescript] format 1`] = ` "Expression expected. (1:15) > 1 | let x5 =
}{"foo"}
; - | ^" + | ^ +Cause: Expression expected." `; exports[`snippet: #5 [typescript] format 1`] = ` "Expression expected. (1:15) > 1 | let x6 =
>{"foo"}
; - | ^" + | ^ +Cause: Expression expected." `; exports[`value-of-abstract-property.ts [typescript] format 1`] = ` @@ -98,5 +111,6 @@ exports[`value-of-abstract-property.ts [typescript] format 1`] = ` > 2 | abstract prop = 3; | ^ 3 | } - 4 |" + 4 | +Cause: Abstract property cannot have an initializer." `; diff --git a/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap index c0cb2df8c..d1bc9fc98 100644 --- a/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/babel-ts/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,8 @@ exports[`abstract.ts [babel-ts] format 1`] = ` 1 | class A { > 2 | abstract foo() {} | ^ - 3 | }" + 3 | } +Cause: Method 'foo' cannot have an implementation because it is marked abstract. (2:4)" `; exports[`classAbstractMethodWithImplementation.ts [babel-ts] format 1`] = ` @@ -13,7 +14,8 @@ exports[`classAbstractMethodWithImplementation.ts [babel-ts] format 1`] = ` 1 | abstract class A { > 2 | abstract foo() {} | ^ - 3 | }" + 3 | } +Cause: Method 'foo' cannot have an implementation because it is marked abstract. (2:4)" `; exports[`declare-accessor.ts [babel-ts] format 1`] = ` @@ -23,23 +25,27 @@ exports[`declare-accessor.ts [babel-ts] format 1`] = ` | ^ 3 | declare set foo(v) 4 | } - 5 |" + 5 | +Cause: 'declare' is not allowed in getters. (2:2)" `; exports[`snippet: #0 [babel-ts] format 1`] = ` "Invalid left-hand side in assignment expression. (1:1) > 1 | foo as any = 10; - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:0)" `; exports[`snippet: #1 [babel-ts] format 1`] = ` "Invalid left-hand side in assignment expression. (1:7) > 1 | ({ a: b as any = 2000 } = x); - | ^" + | ^ +Cause: Invalid left-hand side in assignment expression. (1:6)" `; exports[`snippet: #2 [babel-ts] format 1`] = ` "Unterminated JSX contents. (1:9) > 1 | foo = '100'; - | ^" + | ^ +Cause: Unterminated JSX contents. (1:8)" `; diff --git a/tests/format/misc/errors/typescript/import-reflection/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/import-reflection/__snapshots__/jsfmt.spec.js.snap index 7ce57f134..131c8b830 100644 --- a/tests/format/misc/errors/typescript/import-reflection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/import-reflection/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,8 @@ exports[`valid-flow-default-import.mts [typescript] format 1`] = ` > 1 | import module foo from "./module.wasm"; | ^ 2 | import bar from "./module.wasm"; - 3 |" + 3 | +Cause: '=' expected." `; exports[`valid-ts-default-import.mts [typescript] format 1`] = ` @@ -13,5 +14,6 @@ exports[`valid-ts-default-import.mts [typescript] format 1`] = ` > 1 | import module foo from "./module.wasm"; | ^ 2 | import bar from "./module.wasm"; - 3 |" + 3 | +Cause: '=' expected." `; diff --git a/tests/format/misc/errors/typescript/interface/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/interface/__snapshots__/jsfmt.spec.js.snap index d5c8b3589..57f691b72 100644 --- a/tests/format/misc/errors/typescript/interface/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/interface/__snapshots__/jsfmt.spec.js.snap @@ -3,35 +3,41 @@ exports[`snippet: #0 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:25) > 1 | interface I { x: number = 1;} - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:24)" `; exports[`snippet: #0 [typescript] format 1`] = ` "A property signature cannot have an initializer. (1:27) > 1 | interface I { x: number = 1;} - | ^" + | ^ +Cause: A property signature cannot have an initializer." `; exports[`snippet: #1 [babel-ts] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface A mixins B {} - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #1 [typescript] format 1`] = ` "'{' expected. (1:13) > 1 | interface A mixins B {} - | ^" + | ^ +Cause: '{' expected." `; exports[`snippet: #2 [babel-ts] format 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface A implements B {} - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:12)" `; exports[`snippet: #2 [typescript] format 1`] = ` "Interface declaration cannot have 'implements' clause. (1:13) > 1 | interface A implements B {} - | ^^^^^^^^^^^^" + | ^^^^^^^^^^^^ +Cause: Interface declaration cannot have 'implements' clause." `; diff --git a/tests/format/misc/errors/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap index 61e26fd40..062d335b6 100644 --- a/tests/format/misc/errors/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/mapped-type/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`mapped-type.ts [babel-ts] format 1`] = ` > 3 | extra_member: should_not_allowed | ^ 4 | }; - 5 |" + 5 | +Cause: Unexpected token, expected "}" (3:2)" `; exports[`mapped-type.ts [typescript] format 1`] = ` @@ -17,5 +18,6 @@ exports[`mapped-type.ts [typescript] format 1`] = ` > 3 | extra_member: should_not_allowed | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | }; - 5 |" + 5 | +Cause: A mapped type may not declare properties or methods." `; diff --git a/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap index 0357a2afe..c0cec6283 100644 --- a/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,8 @@ exports[`snippet: #0 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | abstract method(); | ^ - 3 | }" + 3 | } +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #0 [typescript] format 1`] = ` @@ -13,7 +14,8 @@ exports[`snippet: #0 [typescript] format 1`] = ` 1 | interface Foo { > 2 | abstract method(); | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'abstract' modifier cannot appear on a type member" `; exports[`snippet: #1 [babel-ts] format 1`] = ` @@ -21,7 +23,8 @@ exports[`snippet: #1 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | abstract property; | ^ - 3 | }" + 3 | } +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #1 [typescript] format 1`] = ` @@ -29,7 +32,8 @@ exports[`snippet: #1 [typescript] format 1`] = ` 1 | interface Foo { > 2 | abstract property; | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'abstract' modifier cannot appear on a type member" `; exports[`snippet: #2 [babel-ts] format 1`] = ` @@ -37,7 +41,8 @@ exports[`snippet: #2 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | abstract [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #2 [typescript] format 1`] = ` @@ -45,7 +50,8 @@ exports[`snippet: #2 [typescript] format 1`] = ` 1 | interface Foo { > 2 | abstract [index: string]: number | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'abstract' modifier cannot appear on an index signature" `; exports[`snippet: #3 [babel-ts] format 1`] = ` @@ -53,7 +59,8 @@ exports[`snippet: #3 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | abstract [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'abstract' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #3 [typescript] format 1`] = ` @@ -61,7 +68,8 @@ exports[`snippet: #3 [typescript] format 1`] = ` 1 | const foo: { > 2 | abstract [index: string] : string | ^^^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'abstract' modifier cannot appear on an index signature" `; exports[`snippet: #4 [babel-ts] format 1`] = ` @@ -69,7 +77,8 @@ exports[`snippet: #4 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | accessor method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:11)" `; exports[`snippet: #4 [typescript] format 1`] = ` @@ -77,7 +86,8 @@ exports[`snippet: #4 [typescript] format 1`] = ` 1 | interface Foo { > 2 | accessor method(); | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'accessor' modifier cannot appear on a type member" `; exports[`snippet: #5 [babel-ts] format 1`] = ` @@ -85,7 +95,8 @@ exports[`snippet: #5 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | accessor property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:11)" `; exports[`snippet: #5 [typescript] format 1`] = ` @@ -93,7 +104,8 @@ exports[`snippet: #5 [typescript] format 1`] = ` 1 | interface Foo { > 2 | accessor property; | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'accessor' modifier cannot appear on a type member" `; exports[`snippet: #6 [babel-ts] format 1`] = ` @@ -101,7 +113,8 @@ exports[`snippet: #6 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | accessor [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:11)" `; exports[`snippet: #6 [typescript] format 1`] = ` @@ -109,7 +122,8 @@ exports[`snippet: #6 [typescript] format 1`] = ` 1 | interface Foo { > 2 | accessor [index: string]: number | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'accessor' modifier cannot appear on an index signature" `; exports[`snippet: #7 [babel-ts] format 1`] = ` @@ -117,7 +131,8 @@ exports[`snippet: #7 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | accessor [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:11)" `; exports[`snippet: #7 [typescript] format 1`] = ` @@ -125,7 +140,8 @@ exports[`snippet: #7 [typescript] format 1`] = ` 1 | const foo: { > 2 | accessor [index: string] : string | ^^^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'accessor' modifier cannot appear on an index signature" `; exports[`snippet: #8 [babel-ts] format 1`] = ` @@ -133,7 +149,8 @@ exports[`snippet: #8 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | async method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #8 [typescript] format 1`] = ` @@ -141,7 +158,8 @@ exports[`snippet: #8 [typescript] format 1`] = ` 1 | interface Foo { > 2 | async method(); | ^^^^^ - 3 | }" + 3 | } +Cause: 'async' modifier cannot appear on a type member" `; exports[`snippet: #9 [babel-ts] format 1`] = ` @@ -149,7 +167,8 @@ exports[`snippet: #9 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | async property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #9 [typescript] format 1`] = ` @@ -157,7 +176,8 @@ exports[`snippet: #9 [typescript] format 1`] = ` 1 | interface Foo { > 2 | async property; | ^^^^^ - 3 | }" + 3 | } +Cause: 'async' modifier cannot appear on a type member" `; exports[`snippet: #10 [babel-ts] format 1`] = ` @@ -165,7 +185,8 @@ exports[`snippet: #10 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | async [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #10 [typescript] format 1`] = ` @@ -173,7 +194,8 @@ exports[`snippet: #10 [typescript] format 1`] = ` 1 | interface Foo { > 2 | async [index: string]: number | ^^^^^ - 3 | }" + 3 | } +Cause: 'async' modifier cannot appear on an index signature" `; exports[`snippet: #11 [babel-ts] format 1`] = ` @@ -181,7 +203,8 @@ exports[`snippet: #11 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | async [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #11 [typescript] format 1`] = ` @@ -189,7 +212,8 @@ exports[`snippet: #11 [typescript] format 1`] = ` 1 | const foo: { > 2 | async [index: string] : string | ^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'async' modifier cannot appear on an index signature" `; exports[`snippet: #12 [babel-ts] format 1`] = ` @@ -197,7 +221,8 @@ exports[`snippet: #12 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | const method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #12 [typescript] format 1`] = ` @@ -205,7 +230,8 @@ exports[`snippet: #12 [typescript] format 1`] = ` 1 | interface Foo { > 2 | const method(); | ^ - 3 | }" + 3 | } +Cause: ';' expected." `; exports[`snippet: #13 [babel-ts] format 1`] = ` @@ -213,7 +239,8 @@ exports[`snippet: #13 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | const property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #13 [typescript] format 1`] = ` @@ -221,7 +248,8 @@ exports[`snippet: #13 [typescript] format 1`] = ` 1 | interface Foo { > 2 | const property; | ^ - 3 | }" + 3 | } +Cause: ';' expected." `; exports[`snippet: #14 [babel-ts] format 1`] = ` @@ -229,7 +257,8 @@ exports[`snippet: #14 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | const [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #14 [typescript] format 1`] = ` @@ -237,7 +266,8 @@ exports[`snippet: #14 [typescript] format 1`] = ` 1 | interface Foo { > 2 | const [index: string]: number | ^ - 3 | }" + 3 | } +Cause: ';' expected." `; exports[`snippet: #15 [babel-ts] format 1`] = ` @@ -245,7 +275,8 @@ exports[`snippet: #15 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | const [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:8)" `; exports[`snippet: #15 [typescript] format 1`] = ` @@ -253,7 +284,8 @@ exports[`snippet: #15 [typescript] format 1`] = ` 1 | const foo: { > 2 | const [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: ';' expected." `; exports[`snippet: #16 [babel-ts] format 1`] = ` @@ -261,7 +293,8 @@ exports[`snippet: #16 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | declare method(); | ^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #16 [typescript] format 1`] = ` @@ -269,7 +302,8 @@ exports[`snippet: #16 [typescript] format 1`] = ` 1 | interface Foo { > 2 | declare method(); | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on a type member" `; exports[`snippet: #17 [babel-ts] format 1`] = ` @@ -277,7 +311,8 @@ exports[`snippet: #17 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | declare property; | ^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #17 [typescript] format 1`] = ` @@ -285,7 +320,8 @@ exports[`snippet: #17 [typescript] format 1`] = ` 1 | interface Foo { > 2 | declare property; | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on a type member" `; exports[`snippet: #18 [babel-ts] format 1`] = ` @@ -293,7 +329,8 @@ exports[`snippet: #18 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | declare [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #18 [typescript] format 1`] = ` @@ -301,7 +338,8 @@ exports[`snippet: #18 [typescript] format 1`] = ` 1 | interface Foo { > 2 | declare [index: string]: number | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on an index signature" `; exports[`snippet: #19 [babel-ts] format 1`] = ` @@ -309,7 +347,8 @@ exports[`snippet: #19 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | declare [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'declare' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #19 [typescript] format 1`] = ` @@ -317,7 +356,8 @@ exports[`snippet: #19 [typescript] format 1`] = ` 1 | const foo: { > 2 | declare [index: string] : string | ^^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'declare' modifier cannot appear on an index signature" `; exports[`snippet: #20 [babel-ts] format 1`] = ` @@ -325,7 +365,8 @@ exports[`snippet: #20 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | default method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:10)" `; exports[`snippet: #20 [typescript] format 1`] = ` @@ -333,7 +374,8 @@ exports[`snippet: #20 [typescript] format 1`] = ` 1 | interface Foo { > 2 | default method(); | ^ - 3 | }" + 3 | } +Cause: ';' expected." `; exports[`snippet: #21 [babel-ts] format 1`] = ` @@ -341,7 +383,8 @@ exports[`snippet: #21 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | default property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:10)" `; exports[`snippet: #21 [typescript] format 1`] = ` @@ -349,7 +392,8 @@ exports[`snippet: #21 [typescript] format 1`] = ` 1 | interface Foo { > 2 | default property; | ^ - 3 | }" + 3 | } +Cause: ';' expected." `; exports[`snippet: #22 [babel-ts] format 1`] = ` @@ -357,7 +401,8 @@ exports[`snippet: #22 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | default [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:10)" `; exports[`snippet: #22 [typescript] format 1`] = ` @@ -365,7 +410,8 @@ exports[`snippet: #22 [typescript] format 1`] = ` 1 | interface Foo { > 2 | default [index: string]: number | ^ - 3 | }" + 3 | } +Cause: ';' expected." `; exports[`snippet: #23 [babel-ts] format 1`] = ` @@ -373,7 +419,8 @@ exports[`snippet: #23 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | default [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:10)" `; exports[`snippet: #23 [typescript] format 1`] = ` @@ -381,7 +428,8 @@ exports[`snippet: #23 [typescript] format 1`] = ` 1 | const foo: { > 2 | default [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: ';' expected." `; exports[`snippet: #24 [babel-ts] format 1`] = ` @@ -389,7 +437,8 @@ exports[`snippet: #24 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | export method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:9)" `; exports[`snippet: #24 [typescript] format 1`] = ` @@ -397,7 +446,8 @@ exports[`snippet: #24 [typescript] format 1`] = ` 1 | interface Foo { > 2 | export method(); | ^^^^^^ - 3 | }" + 3 | } +Cause: 'export' modifier cannot appear on a type member" `; exports[`snippet: #25 [babel-ts] format 1`] = ` @@ -405,7 +455,8 @@ exports[`snippet: #25 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | export property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:9)" `; exports[`snippet: #25 [typescript] format 1`] = ` @@ -413,7 +464,8 @@ exports[`snippet: #25 [typescript] format 1`] = ` 1 | interface Foo { > 2 | export property; | ^^^^^^ - 3 | }" + 3 | } +Cause: 'export' modifier cannot appear on a type member" `; exports[`snippet: #26 [babel-ts] format 1`] = ` @@ -421,7 +473,8 @@ exports[`snippet: #26 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | export [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:9)" `; exports[`snippet: #26 [typescript] format 1`] = ` @@ -429,7 +482,8 @@ exports[`snippet: #26 [typescript] format 1`] = ` 1 | interface Foo { > 2 | export [index: string]: number | ^^^^^^ - 3 | }" + 3 | } +Cause: 'export' modifier cannot appear on an index signature" `; exports[`snippet: #27 [babel-ts] format 1`] = ` @@ -437,7 +491,8 @@ exports[`snippet: #27 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | export [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:9)" `; exports[`snippet: #27 [typescript] format 1`] = ` @@ -445,7 +500,8 @@ exports[`snippet: #27 [typescript] format 1`] = ` 1 | const foo: { > 2 | export [index: string] : string | ^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'export' modifier cannot appear on an index signature" `; exports[`snippet: #28 [babel-ts] format 1`] = ` @@ -453,7 +509,8 @@ exports[`snippet: #28 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | in method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:5)" `; exports[`snippet: #28 [typescript] format 1`] = ` @@ -461,7 +518,8 @@ exports[`snippet: #28 [typescript] format 1`] = ` 1 | interface Foo { > 2 | in method(); | ^^ - 3 | }" + 3 | } +Cause: 'in' modifier cannot appear on a type member" `; exports[`snippet: #29 [babel-ts] format 1`] = ` @@ -469,7 +527,8 @@ exports[`snippet: #29 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | in property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:5)" `; exports[`snippet: #29 [typescript] format 1`] = ` @@ -477,7 +536,8 @@ exports[`snippet: #29 [typescript] format 1`] = ` 1 | interface Foo { > 2 | in property; | ^^ - 3 | }" + 3 | } +Cause: 'in' modifier cannot appear on a type member" `; exports[`snippet: #30 [babel-ts] format 1`] = ` @@ -485,7 +545,8 @@ exports[`snippet: #30 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | in [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:5)" `; exports[`snippet: #30 [typescript] format 1`] = ` @@ -493,7 +554,8 @@ exports[`snippet: #30 [typescript] format 1`] = ` 1 | interface Foo { > 2 | in [index: string]: number | ^^ - 3 | }" + 3 | } +Cause: 'in' modifier cannot appear on an index signature" `; exports[`snippet: #31 [babel-ts] format 1`] = ` @@ -501,7 +563,8 @@ exports[`snippet: #31 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | in [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:5)" `; exports[`snippet: #31 [typescript] format 1`] = ` @@ -509,7 +572,8 @@ exports[`snippet: #31 [typescript] format 1`] = ` 1 | const foo: { > 2 | in [index: string] : string | ^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'in' modifier cannot appear on an index signature" `; exports[`snippet: #32 [babel-ts] format 1`] = ` @@ -517,7 +581,8 @@ exports[`snippet: #32 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | out method(); | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:6)" `; exports[`snippet: #32 [typescript] format 1`] = ` @@ -525,7 +590,8 @@ exports[`snippet: #32 [typescript] format 1`] = ` 1 | interface Foo { > 2 | out method(); | ^^^ - 3 | }" + 3 | } +Cause: 'out' modifier cannot appear on a type member" `; exports[`snippet: #33 [babel-ts] format 1`] = ` @@ -533,7 +599,8 @@ exports[`snippet: #33 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | out property; | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:6)" `; exports[`snippet: #33 [typescript] format 1`] = ` @@ -541,7 +608,8 @@ exports[`snippet: #33 [typescript] format 1`] = ` 1 | interface Foo { > 2 | out property; | ^^^ - 3 | }" + 3 | } +Cause: 'out' modifier cannot appear on a type member" `; exports[`snippet: #34 [babel-ts] format 1`] = ` @@ -549,7 +617,8 @@ exports[`snippet: #34 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | out [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Unexpected token, expected ";" (2:6)" `; exports[`snippet: #34 [typescript] format 1`] = ` @@ -557,7 +626,8 @@ exports[`snippet: #34 [typescript] format 1`] = ` 1 | interface Foo { > 2 | out [index: string]: number | ^^^ - 3 | }" + 3 | } +Cause: 'out' modifier cannot appear on an index signature" `; exports[`snippet: #35 [babel-ts] format 1`] = ` @@ -565,7 +635,8 @@ exports[`snippet: #35 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | out [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: Unexpected token, expected ";" (2:6)" `; exports[`snippet: #35 [typescript] format 1`] = ` @@ -573,7 +644,8 @@ exports[`snippet: #35 [typescript] format 1`] = ` 1 | const foo: { > 2 | out [index: string] : string | ^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'out' modifier cannot appear on an index signature" `; exports[`snippet: #36 [babel-ts] format 1`] = ` @@ -581,7 +653,8 @@ exports[`snippet: #36 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | override method(); | ^ - 3 | }" + 3 | } +Cause: 'override' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #36 [typescript] format 1`] = ` @@ -589,7 +662,8 @@ exports[`snippet: #36 [typescript] format 1`] = ` 1 | interface Foo { > 2 | override method(); | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'override' modifier cannot appear on a type member" `; exports[`snippet: #37 [babel-ts] format 1`] = ` @@ -597,7 +671,8 @@ exports[`snippet: #37 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | override property; | ^ - 3 | }" + 3 | } +Cause: 'override' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #37 [typescript] format 1`] = ` @@ -605,7 +680,8 @@ exports[`snippet: #37 [typescript] format 1`] = ` 1 | interface Foo { > 2 | override property; | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'override' modifier cannot appear on a type member" `; exports[`snippet: #38 [babel-ts] format 1`] = ` @@ -613,7 +689,8 @@ exports[`snippet: #38 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | override [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'override' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #38 [typescript] format 1`] = ` @@ -621,7 +698,8 @@ exports[`snippet: #38 [typescript] format 1`] = ` 1 | interface Foo { > 2 | override [index: string]: number | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'override' modifier cannot appear on an index signature" `; exports[`snippet: #39 [babel-ts] format 1`] = ` @@ -629,7 +707,8 @@ exports[`snippet: #39 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | override [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'override' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #39 [typescript] format 1`] = ` @@ -637,7 +716,8 @@ exports[`snippet: #39 [typescript] format 1`] = ` 1 | const foo: { > 2 | override [index: string] : string | ^^^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'override' modifier cannot appear on an index signature" `; exports[`snippet: #40 [babel-ts] format 1`] = ` @@ -645,7 +725,8 @@ exports[`snippet: #40 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | private method(); | ^ - 3 | }" + 3 | } +Cause: 'private' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #40 [typescript] format 1`] = ` @@ -653,7 +734,8 @@ exports[`snippet: #40 [typescript] format 1`] = ` 1 | interface Foo { > 2 | private method(); | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'private' modifier cannot appear on a type member" `; exports[`snippet: #41 [babel-ts] format 1`] = ` @@ -661,7 +743,8 @@ exports[`snippet: #41 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | private property; | ^ - 3 | }" + 3 | } +Cause: 'private' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #41 [typescript] format 1`] = ` @@ -669,7 +752,8 @@ exports[`snippet: #41 [typescript] format 1`] = ` 1 | interface Foo { > 2 | private property; | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'private' modifier cannot appear on a type member" `; exports[`snippet: #42 [babel-ts] format 1`] = ` @@ -677,7 +761,8 @@ exports[`snippet: #42 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | private [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'private' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #42 [typescript] format 1`] = ` @@ -685,7 +770,8 @@ exports[`snippet: #42 [typescript] format 1`] = ` 1 | interface Foo { > 2 | private [index: string]: number | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'private' modifier cannot appear on an index signature" `; exports[`snippet: #43 [babel-ts] format 1`] = ` @@ -693,7 +779,8 @@ exports[`snippet: #43 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | private [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'private' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #43 [typescript] format 1`] = ` @@ -701,7 +788,8 @@ exports[`snippet: #43 [typescript] format 1`] = ` 1 | const foo: { > 2 | private [index: string] : string | ^^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'private' modifier cannot appear on an index signature" `; exports[`snippet: #44 [babel-ts] format 1`] = ` @@ -709,7 +797,8 @@ exports[`snippet: #44 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | protected method(); | ^ - 3 | }" + 3 | } +Cause: 'protected' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #44 [typescript] format 1`] = ` @@ -717,7 +806,8 @@ exports[`snippet: #44 [typescript] format 1`] = ` 1 | interface Foo { > 2 | protected method(); | ^^^^^^^^^ - 3 | }" + 3 | } +Cause: 'protected' modifier cannot appear on a type member" `; exports[`snippet: #45 [babel-ts] format 1`] = ` @@ -725,7 +815,8 @@ exports[`snippet: #45 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | protected property; | ^ - 3 | }" + 3 | } +Cause: 'protected' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #45 [typescript] format 1`] = ` @@ -733,7 +824,8 @@ exports[`snippet: #45 [typescript] format 1`] = ` 1 | interface Foo { > 2 | protected property; | ^^^^^^^^^ - 3 | }" + 3 | } +Cause: 'protected' modifier cannot appear on a type member" `; exports[`snippet: #46 [babel-ts] format 1`] = ` @@ -741,7 +833,8 @@ exports[`snippet: #46 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | protected [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'protected' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #46 [typescript] format 1`] = ` @@ -749,7 +842,8 @@ exports[`snippet: #46 [typescript] format 1`] = ` 1 | interface Foo { > 2 | protected [index: string]: number | ^^^^^^^^^ - 3 | }" + 3 | } +Cause: 'protected' modifier cannot appear on an index signature" `; exports[`snippet: #47 [babel-ts] format 1`] = ` @@ -757,7 +851,8 @@ exports[`snippet: #47 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | protected [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'protected' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #47 [typescript] format 1`] = ` @@ -765,7 +860,8 @@ exports[`snippet: #47 [typescript] format 1`] = ` 1 | const foo: { > 2 | protected [index: string] : string | ^^^^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'protected' modifier cannot appear on an index signature" `; exports[`snippet: #48 [babel-ts] format 1`] = ` @@ -773,7 +869,8 @@ exports[`snippet: #48 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | public method(); | ^ - 3 | }" + 3 | } +Cause: 'public' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #48 [typescript] format 1`] = ` @@ -781,7 +878,8 @@ exports[`snippet: #48 [typescript] format 1`] = ` 1 | interface Foo { > 2 | public method(); | ^^^^^^ - 3 | }" + 3 | } +Cause: 'public' modifier cannot appear on a type member" `; exports[`snippet: #49 [babel-ts] format 1`] = ` @@ -789,7 +887,8 @@ exports[`snippet: #49 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | public property; | ^ - 3 | }" + 3 | } +Cause: 'public' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #49 [typescript] format 1`] = ` @@ -797,7 +896,8 @@ exports[`snippet: #49 [typescript] format 1`] = ` 1 | interface Foo { > 2 | public property; | ^^^^^^ - 3 | }" + 3 | } +Cause: 'public' modifier cannot appear on a type member" `; exports[`snippet: #50 [babel-ts] format 1`] = ` @@ -805,7 +905,8 @@ exports[`snippet: #50 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | public [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'public' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #50 [typescript] format 1`] = ` @@ -813,7 +914,8 @@ exports[`snippet: #50 [typescript] format 1`] = ` 1 | interface Foo { > 2 | public [index: string]: number | ^^^^^^ - 3 | }" + 3 | } +Cause: 'public' modifier cannot appear on an index signature" `; exports[`snippet: #51 [babel-ts] format 1`] = ` @@ -821,7 +923,8 @@ exports[`snippet: #51 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | public [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'public' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #51 [typescript] format 1`] = ` @@ -829,7 +932,8 @@ exports[`snippet: #51 [typescript] format 1`] = ` 1 | const foo: { > 2 | public [index: string] : string | ^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'public' modifier cannot appear on an index signature" `; exports[`snippet: #52 [babel-ts] format 1`] = ` @@ -837,7 +941,8 @@ exports[`snippet: #52 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | static method(); | ^ - 3 | }" + 3 | } +Cause: 'static' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #52 [typescript] format 1`] = ` @@ -845,7 +950,8 @@ exports[`snippet: #52 [typescript] format 1`] = ` 1 | interface Foo { > 2 | static method(); | ^^^^^^ - 3 | }" + 3 | } +Cause: 'static' modifier cannot appear on a type member" `; exports[`snippet: #53 [babel-ts] format 1`] = ` @@ -853,7 +959,8 @@ exports[`snippet: #53 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | static property; | ^ - 3 | }" + 3 | } +Cause: 'static' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #53 [typescript] format 1`] = ` @@ -861,7 +968,8 @@ exports[`snippet: #53 [typescript] format 1`] = ` 1 | interface Foo { > 2 | static property; | ^^^^^^ - 3 | }" + 3 | } +Cause: 'static' modifier cannot appear on a type member" `; exports[`snippet: #54 [babel-ts] format 1`] = ` @@ -869,7 +977,8 @@ exports[`snippet: #54 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | static [index: string]: number | ^ - 3 | }" + 3 | } +Cause: 'static' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #54 [typescript] format 1`] = ` @@ -877,7 +986,8 @@ exports[`snippet: #54 [typescript] format 1`] = ` 1 | interface Foo { > 2 | static [index: string]: number | ^^^^^^ - 3 | }" + 3 | } +Cause: 'static' modifier cannot appear on an index signature" `; exports[`snippet: #55 [babel-ts] format 1`] = ` @@ -885,7 +995,8 @@ exports[`snippet: #55 [babel-ts] format 1`] = ` 1 | const foo: { > 2 | static [index: string] : string | ^ - 3 | } = {};" + 3 | } = {}; +Cause: 'static' modifier cannot appear on a type member. (2:2)" `; exports[`snippet: #55 [typescript] format 1`] = ` @@ -893,7 +1004,8 @@ exports[`snippet: #55 [typescript] format 1`] = ` 1 | const foo: { > 2 | static [index: string] : string | ^^^^^^ - 3 | } = {};" + 3 | } = {}; +Cause: 'static' modifier cannot appear on an index signature" `; exports[`snippet: #56 [babel-ts] format 1`] = ` @@ -901,7 +1013,8 @@ exports[`snippet: #56 [babel-ts] format 1`] = ` 1 | interface Foo { > 2 | readonly method(); | ^ - 3 | }" + 3 | } +Cause: 'readonly' modifier can only appear on a property declaration or index signature. (2:2)" `; exports[`snippet: #56 [typescript] format 1`] = ` @@ -909,307 +1022,358 @@ exports[`snippet: #56 [typescript] format 1`] = ` 1 | interface Foo { > 2 | readonly method(); | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; exports[`snippet: #57 [babel-ts] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:1) > 1 | abstract interface Foo {} - | ^" + | ^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration. (1:0)" `; exports[`snippet: #57 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:1) > 1 | abstract interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #58 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | accessor interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #58 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:1) > 1 | accessor interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #59 [babel-ts] format 1`] = ` "Missing semicolon. (1:6) > 1 | async interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:5)" `; exports[`snippet: #59 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:1) > 1 | async interface Foo {} - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #60 [babel-ts] format 1`] = ` "Missing initializer in const declaration. (1:16) > 1 | const interface Foo {} - | ^" + | ^ +Cause: Missing initializer in const declaration. (1:15)" `; exports[`snippet: #60 [typescript] format 1`] = ` "',' expected. (1:17) > 1 | const interface Foo {} - | ^" + | ^ +Cause: ',' expected." `; exports[`snippet: #61 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | default interface Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #61 [typescript] format 1`] = ` "'export' expected. (1:1) > 1 | default interface Foo {} - | ^" + | ^ +Cause: 'export' expected." `; exports[`snippet: #62 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | in interface Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #62 [typescript] format 1`] = ` "Expression expected. (1:1) > 1 | in interface Foo {} - | ^" + | ^ +Cause: Expression expected." `; exports[`snippet: #63 [babel-ts] format 1`] = ` "Missing semicolon. (1:4) > 1 | out interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:3)" `; exports[`snippet: #63 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | out interface Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #64 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | override interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #64 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | override interface Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #65 [babel-ts] format 1`] = ` "Missing semicolon. (1:8) > 1 | private interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:7)" `; exports[`snippet: #65 [typescript] format 1`] = ` "'private' modifier cannot appear on a module or namespace element. (1:1) > 1 | private interface Foo {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." `; exports[`snippet: #66 [babel-ts] format 1`] = ` "Missing semicolon. (1:10) > 1 | protected interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:9)" `; exports[`snippet: #66 [typescript] format 1`] = ` "'protected' modifier cannot appear on a module or namespace element. (1:1) > 1 | protected interface Foo {} - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." `; exports[`snippet: #67 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | public interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #67 [typescript] format 1`] = ` "'public' modifier cannot appear on a module or namespace element. (1:1) > 1 | public interface Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." `; exports[`snippet: #68 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | readonly interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #68 [typescript] format 1`] = ` "'readonly' modifier can only appear on a property declaration or index signature. (1:1) > 1 | readonly interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; exports[`snippet: #69 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | static interface Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #69 [typescript] format 1`] = ` "'static' modifier cannot appear on a module or namespace element. (1:1) > 1 | static interface Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." `; exports[`snippet: #70 [babel-ts] format 1`] = ` "'abstract' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'abstract' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #70 [typescript] format 1`] = ` "'abstract' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier cannot appear on a type parameter" `; exports[`snippet: #71 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:24) > 1 | interface Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:23)" `; exports[`snippet: #71 [typescript] format 1`] = ` "'accessor' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier cannot appear on a type parameter" `; exports[`snippet: #72 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:21) > 1 | interface Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:20)" `; exports[`snippet: #72 [typescript] format 1`] = ` "'async' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot appear on a type parameter" `; exports[`snippet: #73 [babel-ts] format 1`] = ` "'declare' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'declare' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #73 [typescript] format 1`] = ` "'declare' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a type parameter" `; exports[`snippet: #74 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:23) > 1 | interface Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:22)" `; exports[`snippet: #74 [typescript] format 1`] = ` "Type parameter declaration expected. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: Type parameter declaration expected." `; exports[`snippet: #75 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:22) > 1 | interface Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:21)" `; exports[`snippet: #75 [typescript] format 1`] = ` "Type parameter declaration expected. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: Type parameter declaration expected." `; exports[`snippet: #76 [babel-ts] format 1`] = ` "'override' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'override' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #76 [typescript] format 1`] = ` "'override' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'override' modifier cannot appear on a type parameter" `; exports[`snippet: #77 [babel-ts] format 1`] = ` "'private' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'private' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #77 [typescript] format 1`] = ` "'private' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a type parameter" `; exports[`snippet: #78 [babel-ts] format 1`] = ` "'protected' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'protected' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #78 [typescript] format 1`] = ` "'protected' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a type parameter" `; exports[`snippet: #79 [babel-ts] format 1`] = ` "'public' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'public' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #79 [typescript] format 1`] = ` "'public' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'public' modifier cannot appear on a type parameter" `; exports[`snippet: #80 [babel-ts] format 1`] = ` "'readonly' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} - | ^" + | ^ +Cause: 'readonly' modifier cannot appear on a type parameter. (1:14)" `; exports[`snippet: #80 [typescript] format 1`] = ` "'readonly' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'readonly' modifier cannot appear on a type parameter" `; exports[`snippet: #81 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:22) > 1 | interface Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:21)" `; exports[`snippet: #81 [typescript] format 1`] = ` "'static' modifier cannot appear on a type parameter (1:15) > 1 | interface Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a type parameter" `; exports[`snippet: #82 [babel-ts] format 1`] = ` @@ -1217,7 +1381,8 @@ exports[`snippet: #82 [babel-ts] format 1`] = ` 1 | class Foo { > 2 | declare method() {} | ^ - 3 | }" + 3 | } +Cause: Class methods cannot have the 'declare' modifier. (2:2)" `; exports[`snippet: #82 [typescript] format 1`] = ` @@ -1225,7 +1390,8 @@ exports[`snippet: #82 [typescript] format 1`] = ` 1 | class Foo { > 2 | declare method() {} | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on class elements of this kind." `; exports[`snippet: #83 [babel-ts] format 1`] = ` @@ -1233,7 +1399,8 @@ exports[`snippet: #83 [babel-ts] format 1`] = ` 1 | class Foo { > 2 | readonly method() {} | ^ - 3 | }" + 3 | } +Cause: Class methods cannot have the 'readonly' modifier. (2:2)" `; exports[`snippet: #83 [typescript] format 1`] = ` @@ -1241,7 +1408,8 @@ exports[`snippet: #83 [typescript] format 1`] = ` 1 | class Foo { > 2 | readonly method() {} | ^^^^^^^^ - 3 | }" + 3 | } +Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; exports[`snippet: #84 [babel-ts] format 1`] = ` @@ -1249,7 +1417,8 @@ exports[`snippet: #84 [babel-ts] format 1`] = ` 1 | class Foo { > 2 | declare get getter() {} | ^ - 3 | }" + 3 | } +Cause: 'declare' is not allowed in getters. (2:2)" `; exports[`snippet: #84 [typescript] format 1`] = ` @@ -1257,7 +1426,8 @@ exports[`snippet: #84 [typescript] format 1`] = ` 1 | class Foo { > 2 | declare get getter() {} | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on class elements of this kind." `; exports[`snippet: #85 [babel-ts] format 1`] = ` @@ -1265,7 +1435,8 @@ exports[`snippet: #85 [babel-ts] format 1`] = ` 1 | class Foo { > 2 | declare set setter(v) {} | ^ - 3 | }" + 3 | } +Cause: 'declare' is not allowed in setters. (2:2)" `; exports[`snippet: #85 [typescript] format 1`] = ` @@ -1273,1159 +1444,1352 @@ exports[`snippet: #85 [typescript] format 1`] = ` 1 | class Foo { > 2 | declare set setter(v) {} | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on class elements of this kind." `; exports[`snippet: #86 [babel-ts] format 1`] = ` "Unexpected token, expected "class" (1:10) > 1 | abstract module Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "class" (1:9)" `; exports[`snippet: #86 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:1) > 1 | abstract module Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #87 [babel-ts] format 1`] = ` "Unexpected token, expected "class" (1:10) > 1 | abstract namespace Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "class" (1:9)" `; exports[`snippet: #87 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:1) > 1 | abstract namespace Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #88 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | accessor module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #88 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:1) > 1 | accessor module Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #89 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | accessor namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #89 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:1) > 1 | accessor namespace Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #90 [babel-ts] format 1`] = ` "Missing semicolon. (1:6) > 1 | async module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:5)" `; exports[`snippet: #90 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:1) > 1 | async module Foo {} - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #91 [babel-ts] format 1`] = ` "Missing semicolon. (1:6) > 1 | async namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:5)" `; exports[`snippet: #91 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:1) > 1 | async namespace Foo {} - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #92 [babel-ts] format 1`] = ` "Missing initializer in const declaration. (1:13) > 1 | const module Foo {} - | ^" + | ^ +Cause: Missing initializer in const declaration. (1:12)" `; exports[`snippet: #92 [typescript] format 1`] = ` "',' expected. (1:14) > 1 | const module Foo {} - | ^" + | ^ +Cause: ',' expected." `; exports[`snippet: #93 [babel-ts] format 1`] = ` "Missing initializer in const declaration. (1:16) > 1 | const namespace Foo {} - | ^" + | ^ +Cause: Missing initializer in const declaration. (1:15)" `; exports[`snippet: #93 [typescript] format 1`] = ` "',' expected. (1:17) > 1 | const namespace Foo {} - | ^" + | ^ +Cause: ',' expected." `; exports[`snippet: #94 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | default module Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #94 [typescript] format 1`] = ` "'export' expected. (1:1) > 1 | default module Foo {} - | ^" + | ^ +Cause: 'export' expected." `; exports[`snippet: #95 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | default namespace Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #95 [typescript] format 1`] = ` "'export' expected. (1:1) > 1 | default namespace Foo {} - | ^" + | ^ +Cause: 'export' expected." `; exports[`snippet: #96 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | in module Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #96 [typescript] format 1`] = ` "Expression expected. (1:1) > 1 | in module Foo {} - | ^" + | ^ +Cause: Expression expected." `; exports[`snippet: #97 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | in namespace Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #97 [typescript] format 1`] = ` "Expression expected. (1:1) > 1 | in namespace Foo {} - | ^" + | ^ +Cause: Expression expected." `; exports[`snippet: #98 [babel-ts] format 1`] = ` "Missing semicolon. (1:4) > 1 | out module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:3)" `; exports[`snippet: #98 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | out module Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #99 [babel-ts] format 1`] = ` "Missing semicolon. (1:4) > 1 | out namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:3)" `; exports[`snippet: #99 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | out namespace Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #100 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | override module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #100 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | override module Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #101 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | override namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #101 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | override namespace Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #102 [babel-ts] format 1`] = ` "Missing semicolon. (1:8) > 1 | private module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:7)" `; exports[`snippet: #102 [typescript] format 1`] = ` "'private' modifier cannot appear on a module or namespace element. (1:1) > 1 | private module Foo {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." `; exports[`snippet: #103 [babel-ts] format 1`] = ` "Missing semicolon. (1:8) > 1 | private namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:7)" `; exports[`snippet: #103 [typescript] format 1`] = ` "'private' modifier cannot appear on a module or namespace element. (1:1) > 1 | private namespace Foo {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." `; exports[`snippet: #104 [babel-ts] format 1`] = ` "Missing semicolon. (1:10) > 1 | protected module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:9)" `; exports[`snippet: #104 [typescript] format 1`] = ` "'protected' modifier cannot appear on a module or namespace element. (1:1) > 1 | protected module Foo {} - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." `; exports[`snippet: #105 [babel-ts] format 1`] = ` "Missing semicolon. (1:10) > 1 | protected namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:9)" `; exports[`snippet: #105 [typescript] format 1`] = ` "'protected' modifier cannot appear on a module or namespace element. (1:1) > 1 | protected namespace Foo {} - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." `; exports[`snippet: #106 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | public module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #106 [typescript] format 1`] = ` "'public' modifier cannot appear on a module or namespace element. (1:1) > 1 | public module Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." `; exports[`snippet: #107 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | public namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #107 [typescript] format 1`] = ` "'public' modifier cannot appear on a module or namespace element. (1:1) > 1 | public namespace Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." `; exports[`snippet: #108 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | readonly module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #108 [typescript] format 1`] = ` "'readonly' modifier can only appear on a property declaration or index signature. (1:1) > 1 | readonly module Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; exports[`snippet: #109 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | readonly namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #109 [typescript] format 1`] = ` "'readonly' modifier can only appear on a property declaration or index signature. (1:1) > 1 | readonly namespace Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; exports[`snippet: #110 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | static module Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #110 [typescript] format 1`] = ` "'static' modifier cannot appear on a module or namespace element. (1:1) > 1 | static module Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." `; exports[`snippet: #111 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | static namespace Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #111 [typescript] format 1`] = ` "'static' modifier cannot appear on a module or namespace element. (1:1) > 1 | static namespace Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." `; exports[`snippet: #112 [babel-ts] format 1`] = ` "Unexpected token, expected "class" (1:10) > 1 | abstract enum Foo {} - | ^" + | ^ +Cause: Unexpected token, expected "class" (1:9)" `; exports[`snippet: #112 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:1) > 1 | abstract enum Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #113 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | accessor enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #113 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:1) > 1 | accessor enum Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #114 [babel-ts] format 1`] = ` "Missing semicolon. (1:6) > 1 | async enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:5)" `; exports[`snippet: #114 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:1) > 1 | async enum Foo {} - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #115 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | default enum Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #115 [typescript] format 1`] = ` "'export' expected. (1:1) > 1 | default enum Foo {} - | ^" + | ^ +Cause: 'export' expected." `; exports[`snippet: #116 [babel-ts] format 1`] = ` "Unexpected token (1:1) > 1 | in enum Foo {} - | ^" + | ^ +Cause: Unexpected token (1:0)" `; exports[`snippet: #116 [typescript] format 1`] = ` "Expression expected. (1:1) > 1 | in enum Foo {} - | ^" + | ^ +Cause: Expression expected." `; exports[`snippet: #117 [babel-ts] format 1`] = ` "Missing semicolon. (1:4) > 1 | out enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:3)" `; exports[`snippet: #117 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | out enum Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #118 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | override enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #118 [typescript] format 1`] = ` "Unexpected keyword or identifier. (1:1) > 1 | override enum Foo {} - | ^" + | ^ +Cause: Unexpected keyword or identifier." `; exports[`snippet: #119 [babel-ts] format 1`] = ` "Missing semicolon. (1:8) > 1 | private enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:7)" `; exports[`snippet: #119 [typescript] format 1`] = ` "'private' modifier cannot appear on a module or namespace element. (1:1) > 1 | private enum Foo {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a module or namespace element." `; exports[`snippet: #120 [babel-ts] format 1`] = ` "Missing semicolon. (1:10) > 1 | protected enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:9)" `; exports[`snippet: #120 [typescript] format 1`] = ` "'protected' modifier cannot appear on a module or namespace element. (1:1) > 1 | protected enum Foo {} - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a module or namespace element." `; exports[`snippet: #121 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | public enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #121 [typescript] format 1`] = ` "'public' modifier cannot appear on a module or namespace element. (1:1) > 1 | public enum Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'public' modifier cannot appear on a module or namespace element." `; exports[`snippet: #122 [babel-ts] format 1`] = ` "Missing semicolon. (1:9) > 1 | readonly enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:8)" `; exports[`snippet: #122 [typescript] format 1`] = ` "'readonly' modifier can only appear on a property declaration or index signature. (1:1) > 1 | readonly enum Foo {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; exports[`snippet: #123 [babel-ts] format 1`] = ` "Missing semicolon. (1:7) > 1 | static enum Foo {} - | ^" + | ^ +Cause: Missing semicolon. (1:6)" `; exports[`snippet: #123 [typescript] format 1`] = ` "'static' modifier cannot appear on a module or namespace element. (1:1) > 1 | static enum Foo {} - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a module or namespace element." `; exports[`snippet: #124 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:23) > 1 | function foo(abstract parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:22)" `; exports[`snippet: #124 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:14) > 1 | function foo(abstract parameter) {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #125 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class Foo { method(abstract parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:28)" `; exports[`snippet: #125 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:20) > 1 | class Foo { method(abstract parameter) {} } - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #126 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:23) > 1 | function foo(accessor parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:22)" `; exports[`snippet: #126 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:14) > 1 | function foo(accessor parameter) {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #127 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class Foo { method(accessor parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:28)" `; exports[`snippet: #127 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:20) > 1 | class Foo { method(accessor parameter) {} } - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #128 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:20) > 1 | function foo(async parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:19)" `; exports[`snippet: #128 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:14) > 1 | function foo(async parameter) {} - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #129 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class Foo { method(async parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:25)" `; exports[`snippet: #129 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:20) > 1 | class Foo { method(async parameter) {} } - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #130 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:20) > 1 | function foo(const parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:19)" `; exports[`snippet: #130 [typescript] format 1`] = ` "Identifier expected. 'const' is a reserved word that cannot be used here. (1:14) > 1 | function foo(const parameter) {} - | ^" + | ^ +Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; exports[`snippet: #131 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class Foo { method(const parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:25)" `; exports[`snippet: #131 [typescript] format 1`] = ` "Identifier expected. 'const' is a reserved word that cannot be used here. (1:20) > 1 | class Foo { method(const parameter) {} } - | ^" + | ^ +Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; exports[`snippet: #132 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:22) > 1 | function foo(declare parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:21)" `; exports[`snippet: #132 [typescript] format 1`] = ` "'declare' modifier cannot appear on a parameter. (1:14) > 1 | function foo(declare parameter) {} - | ^^^^^^^" + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a parameter." `; exports[`snippet: #133 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class Foo { method(declare parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:27)" `; exports[`snippet: #133 [typescript] format 1`] = ` "'declare' modifier cannot appear on a parameter. (1:20) > 1 | class Foo { method(declare parameter) {} } - | ^^^^^^^" + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a parameter." `; exports[`snippet: #134 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:22) > 1 | function foo(default parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:21)" `; exports[`snippet: #134 [typescript] format 1`] = ` "Identifier expected. 'default' is a reserved word that cannot be used here. (1:14) > 1 | function foo(default parameter) {} - | ^" + | ^ +Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; exports[`snippet: #135 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class Foo { method(default parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:27)" `; exports[`snippet: #135 [typescript] format 1`] = ` "Identifier expected. 'default' is a reserved word that cannot be used here. (1:20) > 1 | class Foo { method(default parameter) {} } - | ^" + | ^ +Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; exports[`snippet: #136 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:21) > 1 | function foo(export parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:20)" `; exports[`snippet: #136 [typescript] format 1`] = ` "'export' modifier cannot appear on a parameter. (1:14) > 1 | function foo(export parameter) {} - | ^^^^^^" + | ^^^^^^ +Cause: 'export' modifier cannot appear on a parameter." `; exports[`snippet: #137 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:27) > 1 | class Foo { method(export parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:26)" `; exports[`snippet: #137 [typescript] format 1`] = ` "'export' modifier cannot appear on a parameter. (1:20) > 1 | class Foo { method(export parameter) {} } - | ^^^^^^" + | ^^^^^^ +Cause: 'export' modifier cannot appear on a parameter." `; exports[`snippet: #138 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:17) > 1 | function foo(in parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:16)" `; exports[`snippet: #138 [typescript] format 1`] = ` "'in' modifier can only appear on a type parameter of a class, interface or type alias (1:14) > 1 | function foo(in parameter) {} - | ^^" + | ^^ +Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; exports[`snippet: #139 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:23) > 1 | class Foo { method(in parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:22)" `; exports[`snippet: #139 [typescript] format 1`] = ` "'in' modifier can only appear on a type parameter of a class, interface or type alias (1:20) > 1 | class Foo { method(in parameter) {} } - | ^^" + | ^^ +Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; exports[`snippet: #140 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:18) > 1 | function foo(out parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:17)" `; exports[`snippet: #140 [typescript] format 1`] = ` "'out' modifier can only appear on a type parameter of a class, interface or type alias (1:14) > 1 | function foo(out parameter) {} - | ^^^" + | ^^^ +Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; exports[`snippet: #141 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:24) > 1 | class Foo { method(out parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:23)" `; exports[`snippet: #141 [typescript] format 1`] = ` "'out' modifier can only appear on a type parameter of a class, interface or type alias (1:20) > 1 | class Foo { method(out parameter) {} } - | ^^^" + | ^^^ +Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; exports[`snippet: #142 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(override parameter) {} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" `; exports[`snippet: #142 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(override parameter) {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #143 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(override parameter) {} } - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" `; exports[`snippet: #143 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(override parameter) {} } - | ^^^^^^^^" + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #144 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(private parameter) {} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" `; exports[`snippet: #144 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(private parameter) {} - | ^^^^^^^" + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #145 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(private parameter) {} } - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" `; exports[`snippet: #145 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(private parameter) {} } - | ^^^^^^^" + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #146 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(protected parameter) {} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" `; exports[`snippet: #146 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(protected parameter) {} - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #147 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(protected parameter) {} } - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" `; exports[`snippet: #147 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(protected parameter) {} } - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #148 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(public parameter) {} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" `; exports[`snippet: #148 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(public parameter) {} - | ^^^^^^" + | ^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #149 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(public parameter) {} } - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" `; exports[`snippet: #149 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(public parameter) {} } - | ^^^^^^" + | ^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #150 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(readonly parameter) {} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:13)" `; exports[`snippet: #150 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(readonly parameter) {} - | ^^^^^^^^" + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #151 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(readonly parameter) {} } - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:19)" `; exports[`snippet: #151 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(readonly parameter) {} } - | ^^^^^^^^" + | ^^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #152 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:21) > 1 | function foo(static parameter) {} - | ^" + | ^ +Cause: Unexpected token, expected "," (1:20)" `; exports[`snippet: #152 [typescript] format 1`] = ` "'static' modifier cannot appear on a parameter. (1:14) > 1 | function foo(static parameter) {} - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a parameter." `; exports[`snippet: #153 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:27) > 1 | class Foo { method(static parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:26)" `; exports[`snippet: #153 [typescript] format 1`] = ` "'static' modifier cannot appear on a parameter. (1:20) > 1 | class Foo { method(static parameter) {} } - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a parameter." `; exports[`snippet: #154 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:34) > 1 | class Foo { constructor(abstract parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:33)" `; exports[`snippet: #154 [typescript] format 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:25) > 1 | class Foo { constructor(abstract parameter) {} } - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; exports[`snippet: #155 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:34) > 1 | class Foo { constructor(accessor parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:33)" `; exports[`snippet: #155 [typescript] format 1`] = ` "'accessor' modifier can only appear on a property declaration. (1:25) > 1 | class Foo { constructor(accessor parameter) {} } - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier can only appear on a property declaration." `; exports[`snippet: #156 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class Foo { constructor(async parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:30)" `; exports[`snippet: #156 [typescript] format 1`] = ` "'async' modifier cannot be used here. (1:25) > 1 | class Foo { constructor(async parameter) {} } - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot be used here." `; exports[`snippet: #157 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class Foo { constructor(const parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:30)" `; exports[`snippet: #157 [typescript] format 1`] = ` "Identifier expected. 'const' is a reserved word that cannot be used here. (1:25) > 1 | class Foo { constructor(const parameter) {} } - | ^" + | ^ +Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; exports[`snippet: #158 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:33) > 1 | class Foo { constructor(declare parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:32)" `; exports[`snippet: #158 [typescript] format 1`] = ` "'declare' modifier cannot appear on a parameter. (1:25) > 1 | class Foo { constructor(declare parameter) {} } - | ^^^^^^^" + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a parameter." `; exports[`snippet: #159 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:33) > 1 | class Foo { constructor(default parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:32)" `; exports[`snippet: #159 [typescript] format 1`] = ` "Identifier expected. 'default' is a reserved word that cannot be used here. (1:25) > 1 | class Foo { constructor(default parameter) {} } - | ^" + | ^ +Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; exports[`snippet: #160 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:32) > 1 | class Foo { constructor(export parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:31)" `; exports[`snippet: #160 [typescript] format 1`] = ` "'export' modifier cannot appear on a parameter. (1:25) > 1 | class Foo { constructor(export parameter) {} } - | ^^^^^^" + | ^^^^^^ +Cause: 'export' modifier cannot appear on a parameter." `; exports[`snippet: #161 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class Foo { constructor(in parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:27)" `; exports[`snippet: #161 [typescript] format 1`] = ` "'in' modifier can only appear on a type parameter of a class, interface or type alias (1:25) > 1 | class Foo { constructor(in parameter) {} } - | ^^" + | ^^ +Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; exports[`snippet: #162 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class Foo { constructor(out parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:28)" `; exports[`snippet: #162 [typescript] format 1`] = ` "'out' modifier can only appear on a type parameter of a class, interface or type alias (1:25) > 1 | class Foo { constructor(out parameter) {} } - | ^^^" + | ^^^ +Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; exports[`snippet: #163 [babel-ts] format 1`] = ` "Unexpected token, expected "," (1:32) > 1 | class Foo { constructor(static parameter) {} } - | ^" + | ^ +Cause: Unexpected token, expected "," (1:31)" `; exports[`snippet: #163 [typescript] format 1`] = ` "'static' modifier cannot appear on a parameter. (1:25) > 1 | class Foo { constructor(static parameter) {} } - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a parameter." `; exports[`snippet: #164 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {["constructor"](private parameter) {}} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:27)" `; exports[`snippet: #164 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {["constructor"](private parameter) {}} - | ^^^^^^^" + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #165 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {['constructor'](private parameter) {}} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:27)" `; exports[`snippet: #165 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {['constructor'](private parameter) {}} - | ^^^^^^^" + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #166 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {[\`constructor\`](private parameter) {}} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:27)" `; exports[`snippet: #166 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {[\`constructor\`](private parameter) {}} - | ^^^^^^^" + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #167 [babel-ts] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:33) > 1 | class Foo {['const' + 'ructor'](private parameter) {}} - | ^" + | ^ +Cause: A parameter property is only allowed in a constructor implementation. (1:32)" `; exports[`snippet: #167 [typescript] format 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:33) > 1 | class Foo {['const' + 'ructor'](private parameter) {}} - | ^^^^^^^" + | ^^^^^^^ +Cause: A parameter property is only allowed in a constructor implementation." `; exports[`snippet: #168 [babel-ts] format 1`] = ` "'abstract' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {abstract bar}; - | ^" + | ^ +Cause: 'abstract' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #168 [typescript] format 1`] = ` "'abstract' modifier cannot appear on a type member (1:13) > 1 | type Foo = {abstract bar}; - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'abstract' modifier cannot appear on a type member" `; exports[`snippet: #169 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:22) > 1 | type Foo = {accessor bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:21)" `; exports[`snippet: #169 [typescript] format 1`] = ` "'accessor' modifier cannot appear on a type member (1:13) > 1 | type Foo = {accessor bar}; - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'accessor' modifier cannot appear on a type member" `; exports[`snippet: #170 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:19) > 1 | type Foo = {async bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:18)" `; exports[`snippet: #170 [typescript] format 1`] = ` "'async' modifier cannot appear on a type member (1:13) > 1 | type Foo = {async bar}; - | ^^^^^" + | ^^^^^ +Cause: 'async' modifier cannot appear on a type member" `; exports[`snippet: #171 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:19) > 1 | type Foo = {const bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:18)" `; exports[`snippet: #171 [typescript] format 1`] = ` "';' expected. (1:19) > 1 | type Foo = {const bar}; - | ^" + | ^ +Cause: ';' expected." `; exports[`snippet: #172 [babel-ts] format 1`] = ` "'declare' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {declare bar}; - | ^" + | ^ +Cause: 'declare' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #172 [typescript] format 1`] = ` "'declare' modifier cannot appear on a type member (1:13) > 1 | type Foo = {declare bar}; - | ^^^^^^^" + | ^^^^^^^ +Cause: 'declare' modifier cannot appear on a type member" `; exports[`snippet: #173 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:21) > 1 | type Foo = {default bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:20)" `; exports[`snippet: #173 [typescript] format 1`] = ` "';' expected. (1:21) > 1 | type Foo = {default bar}; - | ^" + | ^ +Cause: ';' expected." `; exports[`snippet: #174 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:20) > 1 | type Foo = {export bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:19)" `; exports[`snippet: #174 [typescript] format 1`] = ` "'export' modifier cannot appear on a type member (1:13) > 1 | type Foo = {export bar}; - | ^^^^^^" + | ^^^^^^ +Cause: 'export' modifier cannot appear on a type member" `; exports[`snippet: #175 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:16) > 1 | type Foo = {in bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:15)" `; exports[`snippet: #175 [typescript] format 1`] = ` "'in' modifier cannot appear on a type member (1:13) > 1 | type Foo = {in bar}; - | ^^" + | ^^ +Cause: 'in' modifier cannot appear on a type member" `; exports[`snippet: #176 [babel-ts] format 1`] = ` "Unexpected token, expected ";" (1:17) > 1 | type Foo = {out bar}; - | ^" + | ^ +Cause: Unexpected token, expected ";" (1:16)" `; exports[`snippet: #176 [typescript] format 1`] = ` "'out' modifier cannot appear on a type member (1:13) > 1 | type Foo = {out bar}; - | ^^^" + | ^^^ +Cause: 'out' modifier cannot appear on a type member" `; exports[`snippet: #177 [babel-ts] format 1`] = ` "'override' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {override bar}; - | ^" + | ^ +Cause: 'override' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #177 [typescript] format 1`] = ` "'override' modifier cannot appear on a type member (1:13) > 1 | type Foo = {override bar}; - | ^^^^^^^^" + | ^^^^^^^^ +Cause: 'override' modifier cannot appear on a type member" `; exports[`snippet: #178 [babel-ts] format 1`] = ` "'private' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {private bar}; - | ^" + | ^ +Cause: 'private' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #178 [typescript] format 1`] = ` "'private' modifier cannot appear on a type member (1:13) > 1 | type Foo = {private bar}; - | ^^^^^^^" + | ^^^^^^^ +Cause: 'private' modifier cannot appear on a type member" `; exports[`snippet: #179 [babel-ts] format 1`] = ` "'protected' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {protected bar}; - | ^" + | ^ +Cause: 'protected' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #179 [typescript] format 1`] = ` "'protected' modifier cannot appear on a type member (1:13) > 1 | type Foo = {protected bar}; - | ^^^^^^^^^" + | ^^^^^^^^^ +Cause: 'protected' modifier cannot appear on a type member" `; exports[`snippet: #180 [babel-ts] format 1`] = ` "'public' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {public bar}; - | ^" + | ^ +Cause: 'public' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #180 [typescript] format 1`] = ` "'public' modifier cannot appear on a type member (1:13) > 1 | type Foo = {public bar}; - | ^^^^^^" + | ^^^^^^ +Cause: 'public' modifier cannot appear on a type member" `; exports[`snippet: #181 [babel-ts] format 1`] = ` "'static' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {static bar}; - | ^" + | ^ +Cause: 'static' modifier cannot appear on a type member. (1:12)" `; exports[`snippet: #181 [typescript] format 1`] = ` "'static' modifier cannot appear on a type member (1:13) > 1 | type Foo = {static bar}; - | ^^^^^^" + | ^^^^^^ +Cause: 'static' modifier cannot appear on a type member" `; exports[`snippet: #182 [babel-ts] format 1`] = ` @@ -2433,7 +2797,8 @@ exports[`snippet: #182 [babel-ts] format 1`] = ` 1 | class Foo { > 2 | declare [index: string]: number | ^ - 3 | }" + 3 | } +Cause: Index signatures cannot have the 'declare' modifier. (2:2)" `; exports[`snippet: #182 [typescript] format 1`] = ` @@ -2441,5 +2806,6 @@ exports[`snippet: #182 [typescript] format 1`] = ` 1 | class Foo { > 2 | declare [index: string]: number | ^^^^^^^ - 3 | }" + 3 | } +Cause: 'declare' modifier cannot appear on an index signature" `; diff --git a/tests/format/misc/errors/typescript/module-declaration/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/module-declaration/__snapshots__/jsfmt.spec.js.snap index 2fb433337..e142ec42f 100644 --- a/tests/format/misc/errors/typescript/module-declaration/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/module-declaration/__snapshots__/jsfmt.spec.js.snap @@ -3,35 +3,41 @@ exports[`snippet: #0 [babel-ts] format 1`] = ` "Missing semicolon. (1:10) > 1 | namespace "a" {} - | ^" + | ^ +Cause: Missing semicolon. (1:9)" `; exports[`snippet: #0 [typescript] format 1`] = ` "Identifier expected. (1:11) > 1 | namespace "a" {} - | ^" + | ^ +Cause: Identifier expected." `; exports[`snippet: #1 [babel-ts] format 1`] = ` "Missing semicolon. (1:10) > 1 | namespace "a"; - | ^" + | ^ +Cause: Missing semicolon. (1:9)" `; exports[`snippet: #1 [typescript] format 1`] = ` "Identifier expected. (1:11) > 1 | namespace "a"; - | ^" + | ^ +Cause: Identifier expected." `; exports[`snippet: #2 [babel-ts] format 1`] = ` "Unexpected token, expected "{" (1:12) > 1 | namespace a; - | ^" + | ^ +Cause: Unexpected token, expected "{" (1:11)" `; exports[`snippet: #2 [typescript] format 1`] = ` "'{' expected. (1:12) > 1 | namespace a; - | ^" + | ^ +Cause: '{' expected." `; diff --git a/tests/format/misc/errors/typescript/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/tuple/__snapshots__/jsfmt.spec.js.snap index 6a3a77256..7afdb82c2 100644 --- a/tests/format/misc/errors/typescript/tuple/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/tuple/__snapshots__/jsfmt.spec.js.snap @@ -3,23 +3,27 @@ exports[`snippet: #0 [babel-ts] format 1`] = ` "Tuple members must be labeled with a simple identifier. (1:11) > 1 | type T = [x.y: A]; - | ^" + | ^ +Cause: Tuple members must be labeled with a simple identifier. (1:10)" `; exports[`snippet: #0 [typescript] format 1`] = ` "',' expected. (1:14) > 1 | type T = [x.y: A]; - | ^" + | ^ +Cause: ',' expected." `; exports[`snippet: #1 [babel-ts] format 1`] = ` "Tuple members must be labeled with a simple identifier. (1:11) > 1 | type T = [x: A]; - | ^" + | ^ +Cause: Tuple members must be labeled with a simple identifier. (1:10)" `; exports[`snippet: #1 [typescript] format 1`] = ` "',' expected. (1:15) > 1 | type T = [x: A]; - | ^" + | ^ +Cause: ',' expected." `; diff --git a/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap index 12fcb7cae..8466b92a6 100644 --- a/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/yaml/__snapshots__/jsfmt.spec.js.snap @@ -13,5 +13,6 @@ exports[`block-scalar-with-spaces-only.yml [yaml] format 1`] = ` > 5 | # comment | ^ > 6 | - | ^" + | ^ +Cause: Block scalars with more-indented leading empty lines must use an explicit indentation indicator" `; diff --git a/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap index e5fcbb71d..19b789bd9 100644 --- a/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/cast/__snapshots__/jsfmt.spec.js.snap @@ -375,7 +375,8 @@ exports[`tuple-and-record.ts [typescript] format 1`] = ` | ^ 3 | 4 | testObjLiteral = | undefined>{ prop1: "myPropVal" }; - 5 | testObjLiteral = | undefined>#{ prop1: "myPropVal" };" + 5 | testObjLiteral = | undefined>#{ prop1: "myPropVal" }; +Cause: Invalid character." `; exports[`tuple-and-record.ts format 1`] = ` diff --git a/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap index be03db9f1..7ed63c381 100644 --- a/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap @@ -333,7 +333,8 @@ exports[`decrementAndIncrementOperators.ts [babel-ts] format 1`] = ` | ^ 5 | 6 | (1)++; - 7 | (1)--;" + 7 | (1)--; +Cause: Invalid left-hand side in postfix operation. (4:0)" `; exports[`decrementAndIncrementOperators.ts format 1`] = ` diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap index 2f9df8adc..aab570f76 100644 --- a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/jsfmt.spec.js.snap @@ -610,7 +610,8 @@ exports[`classAbstractMixedWithModifiers.ts [babel-ts] format 1`] = ` | ^ 13 | 14 | static abstract foo_e(); - 15 | }" + 15 | } +Cause: 'static' modifier cannot be used with 'abstract' modifier. (12:13)" `; exports[`classAbstractMixedWithModifiers.ts format 1`] = ` diff --git a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap index 70ae1ed0d..82b0fe29c 100644 --- a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/jsfmt.spec.js.snap @@ -458,7 +458,8 @@ exports[`readonlyInConstructorParameters.ts [babel-ts] format 1`] = ` | ^ 8 | } 9 | - 10 | class F {" + 10 | class F { +Cause: 'public' modifier must precede 'readonly' modifier. (7:25)" `; exports[`readonlyInConstructorParameters.ts format 1`] = ` @@ -504,7 +505,8 @@ exports[`readonlyReadonly.ts [babel-ts] format 1`] = ` > 2 | readonly readonly x: number; | ^ 3 | constructor(readonly readonly y: number) {} - 4 | }" + 4 | } +Cause: Duplicate modifier: 'readonly'. (2:13)" `; exports[`readonlyReadonly.ts format 1`] = ` diff --git a/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap index 5109b5905..3b2a54f05 100644 --- a/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/conformance/parser/ecmascript5/Statements/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`parserES5ForOfStatement2.ts [babel-ts] format 1`] = ` > 2 | for (var of X) { | ^ 3 | } - 4 |" + 4 | +Cause: Missing semicolon. (2:11)" `; exports[`parserES5ForOfStatement2.ts format 1`] = ` @@ -32,7 +33,8 @@ exports[`parserES5ForOfStatement21.ts [babel-ts] format 1`] = ` 1 | //@target: ES5 > 2 | for (var of of) { } | ^ - 3 |" + 3 | +Cause: Unexpected token (2:14)" `; exports[`parserES5ForOfStatement21.ts format 1`] = ` @@ -57,7 +59,8 @@ exports[`parserForInStatement2.ts [babel-ts] format 1`] = ` > 1 | for (var in X) { | ^ 2 | } - 3 |" + 3 | +Cause: Unexpected keyword 'in'. (1:9)" `; exports[`parserForInStatement2.ts format 1`] = ` diff --git a/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap index f1b5baee6..d2d346d99 100644 --- a/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap @@ -599,7 +599,8 @@ exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = ` > 9 | function fn5(x: string, ...y: any[], z: string); | ^ 10 | function fn5() { } - 11 |" + 11 | +Cause: Rest element must be last element. (9:35)" `; exports[`functionOverloadErrorsSyntax.ts format 1`] = ` diff --git a/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap index 9fdf6fd07..db1c5f28a 100644 --- a/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/custom/abstract/__snapshots__/jsfmt.spec.js.snap @@ -46,7 +46,8 @@ exports[`abstractProperties.ts [babel-ts] format 1`] = ` | ^ 5 | abstract private ['g']; 6 | private abstract ['h']; - 7 | static abstract ['i'];" + 7 | static abstract ['i']; +Cause: 'static' modifier cannot be used with 'abstract' modifier. (4:11)" `; exports[`abstractProperties.ts format 1`] = ` diff --git a/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap index 4fa30bc89..ae26eb8b1 100644 --- a/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/decorators/__snapshots__/jsfmt.spec.js.snap @@ -27,7 +27,8 @@ exports[`abstract-method.ts [typescript] format 1`] = ` | ^^^^^^^^^^^^ 3 | abstract method(): Array 4 | } - 5 |" + 5 | +Cause: A decorator can only decorate a method implementation, not an overload." `; exports[`accessor.ts format 1`] = ` diff --git a/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap index 0a37faedb..7433ffba4 100644 --- a/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,8 @@ exports[`computed-members.ts [babel-ts] format 1`] = ` | ^ 3 | } 4 | - 5 | const bar = "bar"" + 5 | const bar = "bar" +Cause: Unexpected token (2:2)" `; exports[`computed-members.ts format 1`] = ` diff --git a/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap index b6d8a92f9..f2b57844a 100644 --- a/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap @@ -160,7 +160,8 @@ exports[`index-signature.ts [babel-ts] format 1`] = ` | ^ 5 | }; 6 | type ThreeParams = { - 7 | [a: string, b: string, c: string]: string;" + 7 | [a: string, b: string, c: string]: string; +Cause: Unexpected token, expected "]" (4:12)" `; exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` @@ -171,7 +172,8 @@ exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` | ^ 5 | }; 6 | type ThreeParams = { - 7 | [a: string, b: string, c: string]: string;" + 7 | [a: string, b: string, c: string]: string; +Cause: Unexpected token, expected "]" (4:12)" `; exports[`index-signature.ts - {"trailingComma":"all"} format 1`] = ` @@ -245,7 +247,8 @@ exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` | ^ 5 | }; 6 | type ThreeParams = { - 7 | [a: string, b: string, c: string]: string;" + 7 | [a: string, b: string, c: string]: string; +Cause: Unexpected token, expected "]" (4:12)" `; exports[`index-signature.ts - {"trailingComma":"es5"} format 1`] = ` @@ -379,7 +382,8 @@ exports[`jsdoc_only_types.ts [babel-ts] format 1`] = ` | ^ 2 | function b(x: ?) {} 3 | let c: ?string; - 4 | let d: string?;" + 4 | let d: string?; +Cause: Unexpected token (1:7)" `; exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` @@ -388,7 +392,8 @@ exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` | ^ 2 | function b(x: ?) {} 3 | let c: ?string; - 4 | let d: string?;" + 4 | let d: string?; +Cause: Unexpected token (1:7)" `; exports[`jsdoc_only_types.ts - {"trailingComma":"all"} format 1`] = ` @@ -426,7 +431,8 @@ exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` | ^ 2 | function b(x: ?) {} 3 | let c: ?string; - 4 | let d: string?;" + 4 | let d: string?; +Cause: Unexpected token (1:7)" `; exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} format 1`] = ` diff --git a/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap index f71a5c3bc..cc62d1ffb 100644 --- a/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/export/__snapshots__/jsfmt.spec.js.snap @@ -134,5 +134,6 @@ exports[`export-type-star-from-2.ts [typescript] format 1`] = ` 2 | // but it's easier for us to support them than not. > 3 | export type * as "ns2" from './mod'; | ^ - 4 |" + 4 | +Cause: Identifier expected." `; diff --git a/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap index 4138f8288..169b88984 100644 --- a/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/namespace/__snapshots__/jsfmt.spec.js.snap @@ -6,7 +6,8 @@ exports[`invalid-await.ts [babel-ts] format 1`] = ` > 2 | const x = await 42; | ^ 3 | } - 4 |" + 4 | +Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:12)" `; exports[`invalid-await.ts format 1`] = ` diff --git a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap index 409110a22..e874eec0c 100644 --- a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap @@ -46,7 +46,8 @@ exports[`3.ts [typescript] format 1`] = ` "',' expected. (1:17) > 1 | (class extends f<(v: T) => void> {}); | ^ - 2 |" + 2 | +Cause: ',' expected." `; exports[`4.ts format 1`] = ` @@ -84,7 +85,8 @@ exports[`5.tsx [typescript] format 1`] = ` "Identifier expected. (1:11) > 1 | (v: T) => void> /> | ^ - 2 |" + 2 | +Cause: Identifier expected." `; exports[`6.ts format 1`] = ` diff --git a/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap index df56e15d0..4ba6f857c 100644 --- a/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/typeparams/consistent/__snapshots__/jsfmt.spec.js.snap @@ -88,7 +88,8 @@ exports[`template-literal-types.ts [babel-flow] format 1`] = ` "Unexpected token (1:84) > 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; | ^ - 2 |" + 2 | +Cause: Unexpected token (1:83)" `; exports[`template-literal-types.ts [flow] format 1`] = ` diff --git a/tests/integration/__tests__/__snapshots__/format.js.snap b/tests/integration/__tests__/__snapshots__/format.js.snap index fc7cb935d..5446f531d 100644 --- a/tests/integration/__tests__/__snapshots__/format.js.snap +++ b/tests/integration/__tests__/__snapshots__/format.js.snap @@ -4,7 +4,8 @@ exports[`'Adjacent JSX' error should not be swallowed by Babel's error recovery "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...? (2:1) 1 |
> 2 | - | ^" + | ^ +Cause: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...? (2:0)" `; exports[`html parser should handle CRLF correctly 1`] = `""\\r\\n""`; @@ -16,7 +17,8 @@ exports[`typescript parser should throw the first error when both JSX and non-JS 6 | ); 7 | > 8 | label: - | ^" + | ^ +Cause: Expression expected." `; exports[`yaml parser should handle CRLF correctly 1`] = `""a: 123\\r\\n""`; diff --git a/tests/integration/__tests__/cache.js b/tests/integration/__tests__/cache.js index 34363b096..e15f00469 100644 --- a/tests/integration/__tests__/cache.js +++ b/tests/integration/__tests__/cache.js @@ -119,7 +119,7 @@ describe("--cache option", () => { "metadata", "*.js", ]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); }); it("doesn't format when cache is available", async () => { @@ -358,9 +358,9 @@ describe("--cache option", () => { "metadata", "*.js", ]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); await runCliWithoutGitignore(dir, ["--write", "*.js"]); - await expect(fs.stat(defaultCacheFile)).rejects.toThrowError(); + await expect(fs.stat(defaultCacheFile)).rejects.toThrow(); }); }); @@ -376,7 +376,7 @@ describe("--cache option", () => { "content", "*.js", ]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); }); it("doesn't format when cache is available", async () => { @@ -609,9 +609,9 @@ describe("--cache option", () => { it("removes cache file when run Prettier without `--cache` option", async () => { await runCliWithoutGitignore(dir, ["--cache", "--write", "*.js"]); - await expect(fs.stat(defaultCacheFile)).resolves.not.toThrowError(); + await expect(fs.stat(defaultCacheFile)).resolves.not.toThrow(); await runCliWithoutGitignore(dir, ["--write", "*.js"]); - await expect(fs.stat(defaultCacheFile)).rejects.toThrowError(); + await expect(fs.stat(defaultCacheFile)).rejects.toThrow(); }); }); @@ -657,9 +657,7 @@ describe("--cache option", () => { nonDefaultCacheFileName, "*.js", ]); - await expect( - fs.stat(nonDefaultCacheFilePath), - ).resolves.not.toThrowError(); + await expect(fs.stat(nonDefaultCacheFilePath)).resolves.not.toThrow(); }); it("does'nt format when cache is available", async () => { diff --git a/tests/integration/__tests__/config-resolution.js b/tests/integration/__tests__/config-resolution.js index 72a2203a3..ac082a17a 100644 --- a/tests/integration/__tests__/config-resolution.js +++ b/tests/integration/__tests__/config-resolution.js @@ -163,7 +163,7 @@ test("API resolveConfig with nested file arg and .editorconfig and indent_size = }); test("API clearConfigCache", () => { - expect(() => prettier.clearConfigCache()).not.toThrowError(); + expect(() => prettier.clearConfigCache()).not.toThrow(); }); test("API resolveConfig overrides work with dotfiles", async () => { diff --git a/yarn.lock b/yarn.lock index 983d285b6..a1da0ce61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1284,6 +1284,20 @@ __metadata: languageName: node linkType: hard +"@jest/console@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/console@npm:30.0.0-alpha.2" + dependencies: + "@jest/types": 30.0.0-alpha.2 + "@types/node": "*" + chalk: ^4.0.0 + jest-message-util: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + slash: ^3.0.0 + checksum: b24da746c5ff9c0b2581db125836d91b3f3e039f8977ebd5500f1e0a37c7cdfe5622e0912969fef8fc278962c0172b4b23dbef23f5458893e42e81bf87565243 + languageName: node + linkType: hard + "@jest/console@npm:^29.7.0": version: 29.7.0 resolution: "@jest/console@npm:29.7.0" @@ -1298,36 +1312,36 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/core@npm:29.7.0" +"@jest/core@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/core@npm:30.0.0-alpha.2" dependencies: - "@jest/console": ^29.7.0 - "@jest/reporters": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/console": 30.0.0-alpha.2 + "@jest/reporters": 30.0.0-alpha.2 + "@jest/test-result": 30.0.0-alpha.2 + "@jest/transform": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 - ci-info: ^3.2.0 + ci-info: ^4.0.0 exit: ^0.1.2 graceful-fs: ^4.2.9 - jest-changed-files: ^29.7.0 - jest-config: ^29.7.0 - jest-haste-map: ^29.7.0 - jest-message-util: ^29.7.0 - jest-regex-util: ^29.6.3 - jest-resolve: ^29.7.0 - jest-resolve-dependencies: ^29.7.0 - jest-runner: ^29.7.0 - jest-runtime: ^29.7.0 - jest-snapshot: ^29.7.0 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 - jest-watcher: ^29.7.0 + jest-changed-files: 30.0.0-alpha.2 + jest-config: 30.0.0-alpha.2 + jest-haste-map: 30.0.0-alpha.2 + jest-message-util: 30.0.0-alpha.2 + jest-regex-util: 30.0.0-alpha.2 + jest-resolve: 30.0.0-alpha.2 + jest-resolve-dependencies: 30.0.0-alpha.2 + jest-runner: 30.0.0-alpha.2 + jest-runtime: 30.0.0-alpha.2 + jest-snapshot: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + jest-validate: 30.0.0-alpha.2 + jest-watcher: 30.0.0-alpha.2 micromatch: ^4.0.4 - pretty-format: ^29.7.0 + pretty-format: 30.0.0-alpha.2 slash: ^3.0.0 strip-ansi: ^6.0.0 peerDependencies: @@ -1335,19 +1349,28 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: af759c9781cfc914553320446ce4e47775ae42779e73621c438feb1e4231a5d4862f84b1d8565926f2d1aab29b3ec3dcfdc84db28608bdf5f29867124ebcfc0d + checksum: 7396e26b437f7fb3398b705a63f9d715194b86178e048c8527b518fad449a36f927a3e975f13daefa7dd5c84a24a5899e6a02af1b40f61d2b30603bdb8bfa918 languageName: node linkType: hard -"@jest/environment@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/environment@npm:29.7.0" +"@jest/environment@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/environment@npm:30.0.0-alpha.2" dependencies: - "@jest/fake-timers": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/fake-timers": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" - jest-mock: ^29.7.0 - checksum: 6fb398143b2543d4b9b8d1c6dbce83fa5247f84f550330604be744e24c2bd2178bb893657d62d1b97cf2f24baf85c450223f8237cccb71192c36a38ea2272934 + jest-mock: 30.0.0-alpha.2 + checksum: dab9716543d9e55a74e6992a249e54311ef9bb16ef58496c8e526a1e5e0610a05f6d5471c65ce7e8c71e22484684dd31d9534b39ab36958f73adac829c16475e + languageName: node + linkType: hard + +"@jest/expect-utils@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/expect-utils@npm:30.0.0-alpha.2" + dependencies: + jest-get-type: 30.0.0-alpha.2 + checksum: add949da5d0e6421c3795aae2894c54c6eb94e0e6623a21b3816a69371cfb50beedf3496e46ef5f34c51192e6e2802b35a6bb57a9f38c0d2db1cb034446680d6 languageName: node linkType: hard @@ -1360,51 +1383,51 @@ __metadata: languageName: node linkType: hard -"@jest/expect@npm:^29.0.1, @jest/expect@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect@npm:29.7.0" +"@jest/expect@npm:30.0.0-alpha.2, @jest/expect@npm:^30.0.0-alpha.1": + version: 30.0.0-alpha.2 + resolution: "@jest/expect@npm:30.0.0-alpha.2" dependencies: - expect: ^29.7.0 - jest-snapshot: ^29.7.0 - checksum: a01cb85fd9401bab3370618f4b9013b90c93536562222d920e702a0b575d239d74cecfe98010aaec7ad464f67cf534a353d92d181646a4b792acaa7e912ae55e + expect: 30.0.0-alpha.2 + jest-snapshot: 30.0.0-alpha.2 + checksum: 2e4fb39ff177f42123db657d5c13c17c2db28686c2f797f80e0947bf9138f05fa4b82aa739103b33668d64748c535fff4b5ee1464d1d7ae28f5d0e15a770fad6 languageName: node linkType: hard -"@jest/fake-timers@npm:^29.2.2, @jest/fake-timers@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/fake-timers@npm:29.7.0" +"@jest/fake-timers@npm:30.0.0-alpha.2, @jest/fake-timers@npm:^30.0.0-alpha.1": + version: 30.0.0-alpha.2 + resolution: "@jest/fake-timers@npm:30.0.0-alpha.2" dependencies: - "@jest/types": ^29.6.3 - "@sinonjs/fake-timers": ^10.0.2 + "@jest/types": 30.0.0-alpha.2 + "@sinonjs/fake-timers": ^11.1.0 "@types/node": "*" - jest-message-util: ^29.7.0 - jest-mock: ^29.7.0 - jest-util: ^29.7.0 - checksum: caf2bbd11f71c9241b458d1b5a66cbe95debc5a15d96442444b5d5c7ba774f523c76627c6931cca5e10e76f0d08761f6f1f01a608898f4751a0eee54fc3d8d00 + jest-message-util: 30.0.0-alpha.2 + jest-mock: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + checksum: b2f9c551a8be0db50eb78c245eeb8831050bcb3edba765cd7557a116eeab701593aef6939e814d7fa0d53bd6fad839a1f49b5aa46defebbcd7775f3d4921e1c5 languageName: node linkType: hard -"@jest/globals@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/globals@npm:29.7.0" +"@jest/globals@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/globals@npm:30.0.0-alpha.2" dependencies: - "@jest/environment": ^29.7.0 - "@jest/expect": ^29.7.0 - "@jest/types": ^29.6.3 - jest-mock: ^29.7.0 - checksum: 97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 + "@jest/environment": 30.0.0-alpha.2 + "@jest/expect": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 + jest-mock: 30.0.0-alpha.2 + checksum: 31cbff192b6dfe793818585d53dee77621f9635ee2fd0ea2c2b5227bbc82f8cea6bd69ba45fee71a8ee5aa9adc88393f1e2eb87351ad5e308e5fe21dfcc381a4 languageName: node linkType: hard -"@jest/reporters@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/reporters@npm:29.7.0" +"@jest/reporters@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/reporters@npm:30.0.0-alpha.2" dependencies: "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/console": 30.0.0-alpha.2 + "@jest/test-result": 30.0.0-alpha.2 + "@jest/transform": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@jridgewell/trace-mapping": ^0.3.18 "@types/node": "*" chalk: ^4.0.0 @@ -1417,9 +1440,9 @@ __metadata: istanbul-lib-report: ^3.0.0 istanbul-lib-source-maps: ^4.0.0 istanbul-reports: ^3.1.3 - jest-message-util: ^29.7.0 - jest-util: ^29.7.0 - jest-worker: ^29.7.0 + jest-message-util: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + jest-worker: 30.0.0-alpha.2 slash: ^3.0.0 string-length: ^4.0.1 strip-ansi: ^6.0.0 @@ -1429,7 +1452,16 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 7eadabd62cc344f629024b8a268ecc8367dba756152b761bdcb7b7e570a3864fc51b2a9810cd310d85e0a0173ef002ba4528d5ea0329fbf66ee2a3ada9c40455 + checksum: 7a4b095383f674a6a8925e62093cd1cbf8ea9057784caa9dc74e74d5e66d8c5af5d24e52820d3a691690c8c79680c616ff50908ef5b8ece5d1a50454a942a4d2 + languageName: node + linkType: hard + +"@jest/schemas@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/schemas@npm:30.0.0-alpha.2" + dependencies: + "@sinclair/typebox": ^0.31.0 + checksum: cb99a995c55554db30f2f397eb9fae3fb61ad5250411f9de21a5ee87ee06a9704544bcc8415a70f2c0c2398ab8195c2a7f0f0d8c029d847e91b67dea7d34b32e languageName: node linkType: hard @@ -1442,14 +1474,26 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/source-map@npm:29.6.3" +"@jest/source-map@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/source-map@npm:30.0.0-alpha.2" dependencies: "@jridgewell/trace-mapping": ^0.3.18 callsites: ^3.0.0 graceful-fs: ^4.2.9 - checksum: bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb + checksum: f2fbd7ce0cdfb29817cb97eddedbf71f56acd51cc8c3fc3cf03ccfc1264ab3a63bce264a61654228390851e2bfe6bfb9879fead05ee9ecac7a6ad9bbce9fd90c + languageName: node + linkType: hard + +"@jest/test-result@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/test-result@npm:30.0.0-alpha.2" + dependencies: + "@jest/console": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 + "@types/istanbul-lib-coverage": ^2.0.0 + collect-v8-coverage: ^1.0.0 + checksum: dbb673a12036809c03f28a70c02b563c8e23ec9af243dd09d54dcb444445cfd1ed1270aae0262fdd42aa3167bd5c67121ec49c7b92b4f353be29ad3b19bf1762 languageName: node linkType: hard @@ -1465,15 +1509,38 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-sequencer@npm:29.7.0" +"@jest/test-sequencer@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/test-sequencer@npm:30.0.0-alpha.2" dependencies: - "@jest/test-result": ^29.7.0 + "@jest/test-result": 30.0.0-alpha.2 graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 + jest-haste-map: 30.0.0-alpha.2 slash: ^3.0.0 - checksum: 73f43599017946be85c0b6357993b038f875b796e2f0950487a82f4ebcb115fa12131932dd9904026b4ad8be131fe6e28bd8d0aa93b1563705185f9804bff8bd + checksum: 8d4545c3e5603bfef9664fb64d08f1bc00b9803f85ac2b2221cb7738d7afd0ff317338cadd28ff170bd1071081462341aaff81a2f7dd8586fb3943ab629cc7bd + languageName: node + linkType: hard + +"@jest/transform@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/transform@npm:30.0.0-alpha.2" + dependencies: + "@babel/core": ^7.11.6 + "@jest/types": 30.0.0-alpha.2 + "@jridgewell/trace-mapping": ^0.3.18 + babel-plugin-istanbul: ^6.1.1 + chalk: ^4.0.0 + convert-source-map: ^2.0.0 + fast-json-stable-stringify: ^2.1.0 + graceful-fs: ^4.2.9 + jest-haste-map: 30.0.0-alpha.2 + jest-regex-util: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + micromatch: ^4.0.4 + pirates: ^4.0.4 + slash: ^3.0.0 + write-file-atomic: ^5.0.0 + checksum: 79e57690a50fdbf60f143e15ab778b2b57b923ea5703aa4249abf22c8c62c232344d3eecc3892a233ced1d55318cec041ea5074100e86de1affcd6a141889e86 languageName: node linkType: hard @@ -1500,6 +1567,20 @@ __metadata: languageName: node linkType: hard +"@jest/types@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "@jest/types@npm:30.0.0-alpha.2" + dependencies: + "@jest/schemas": 30.0.0-alpha.2 + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^17.0.8 + chalk: ^4.0.0 + checksum: 2f4ca638e89326ee0a4bd5c2a4a95319b7d740701edb3b15fea1f9bc06276d1d41b7bc9a988f11420189120cdda4052759b417433a9feb08b33d31fd881b5b5b + languageName: node + linkType: hard + "@jest/types@npm:^29.6.3": version: 29.6.3 resolution: "@jest/types@npm:29.6.3" @@ -1564,9 +1645,9 @@ __metadata: linkType: hard "@mdn/browser-compat-data@npm:^5.2.34, @mdn/browser-compat-data@npm:^5.3.13": - version: 5.4.0 - resolution: "@mdn/browser-compat-data@npm:5.4.0" - checksum: 26ddba4ad8de30a5993159c7508404737f07a681f65a76bb336585b77227e6f615ba33d5a606f800ecde3fb9a97c2ab406e1452acfe8c6c0501e46ff5aa2816a + version: 5.4.1 + resolution: "@mdn/browser-compat-data@npm:5.4.1" + checksum: 22ece113d4e4167b7dfcfaf2bdc304a4b2c2579c2d6074c7ad0378f034a48b23e592049e50190b896ace3cc8715465c8a53a43a00a052e0efd76b11b3d025c4a languageName: node linkType: hard @@ -1626,6 +1707,20 @@ __metadata: languageName: node linkType: hard +"@pkgr/utils@npm:^2.3.1": + version: 2.4.2 + resolution: "@pkgr/utils@npm:2.4.2" + dependencies: + cross-spawn: ^7.0.3 + fast-glob: ^3.3.0 + is-glob: ^4.0.3 + open: ^9.1.0 + picocolors: ^1.0.0 + tslib: ^2.6.0 + checksum: 24e04c121269317d259614cd32beea3af38277151c4002df5883c4be920b8e3490bb897748e844f9d46bf68230f86dabd4e8f093773130e7e60529a769a132fc + languageName: node + linkType: hard + "@prettier/is-es5-identifier-name@npm:0.2.0": version: 0.2.0 resolution: "@prettier/is-es5-identifier-name@npm:0.2.0" @@ -1654,6 +1749,13 @@ __metadata: languageName: node linkType: hard +"@sinclair/typebox@npm:^0.31.0": + version: 0.31.28 + resolution: "@sinclair/typebox@npm:0.31.28" + checksum: 0dd8e11bb608a28f8db6aa6166a354453126249e5bbf4442654ba1c520bd10a55d0beb4cb294f4834a7619efa833a870a31902933a46548bfc24d0e0710576d2 + languageName: node + linkType: hard + "@sinonjs/commons@npm:^3.0.0": version: 3.0.0 resolution: "@sinonjs/commons@npm:3.0.0" @@ -1663,12 +1765,12 @@ __metadata: languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^10.0.2": - version: 10.3.0 - resolution: "@sinonjs/fake-timers@npm:10.3.0" +"@sinonjs/fake-timers@npm:^11.1.0": + version: 11.2.2 + resolution: "@sinonjs/fake-timers@npm:11.2.2" dependencies: "@sinonjs/commons": ^3.0.0 - checksum: 614d30cb4d5201550c940945d44c9e0b6d64a888ff2cd5b357f95ad6721070d6b8839cd10e15b76bf5e14af0bcc1d8f9ec00d49a46318f1f669a4bec1d7f3148 + checksum: 68c29b0e1856fdc280df03ddbf57c726420b78e9f943a241b471edc018fb14ff36fdc1daafd6026cba08c3c7f50c976fb7ae11b88ff44cd7f609692ca7d25158 languageName: node linkType: hard @@ -1795,11 +1897,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.9.4 - resolution: "@types/node@npm:20.9.4" + version: 20.10.0 + resolution: "@types/node@npm:20.10.0" dependencies: undici-types: ~5.26.4 - checksum: 619144cfee8235f692009e4268a8b80ef4ec496670273ab1cef04e4a053b471f391af6701e65f2f91a107256933d902b6caec079d551b109e981b0b706624815 + checksum: face395140d6f2f1755b91fdd3b697cf56aeb9e2514529ce88d56e56f261ad65be7269d863520a9406d73c338699ea68b418e8677584de0c1efeed09539b6f97 languageName: node linkType: hard @@ -2335,20 +2437,20 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "babel-jest@npm:29.7.0" +"babel-jest@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "babel-jest@npm:30.0.0-alpha.2" dependencies: - "@jest/transform": ^29.7.0 + "@jest/transform": 30.0.0-alpha.2 "@types/babel__core": ^7.1.14 babel-plugin-istanbul: ^6.1.1 - babel-preset-jest: ^29.6.3 + babel-preset-jest: 30.0.0-alpha.2 chalk: ^4.0.0 graceful-fs: ^4.2.9 slash: ^3.0.0 peerDependencies: - "@babel/core": ^7.8.0 - checksum: ee6f8e0495afee07cac5e4ee167be705c711a8cc8a737e05a587a131fdae2b3c8f9aa55dfd4d9c03009ac2d27f2de63d8ba96d3e8460da4d00e8af19ef9a83f7 + "@babel/core": ^7.11.0 + checksum: 53cd53f510448e069471b50ba4ad8cec4973f3719afcc2e0ed36435afd15e45bf5bc67246337ad46da12a27602cdbcdab47ec10a49a5042982a594c17fdb34f1 languageName: node linkType: hard @@ -2365,15 +2467,15 @@ __metadata: languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-plugin-jest-hoist@npm:29.6.3" +"babel-plugin-jest-hoist@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "babel-plugin-jest-hoist@npm:30.0.0-alpha.2" dependencies: "@babel/template": ^7.3.3 "@babel/types": ^7.3.3 "@types/babel__core": ^7.1.14 "@types/babel__traverse": ^7.0.6 - checksum: 51250f22815a7318f17214a9d44650ba89551e6d4f47a2dc259128428324b52f5a73979d010cefd921fd5a720d8c1d55ad74ff601cd94c7bd44d5f6292fde2d1 + checksum: 8b9d099a7cd87235ddf0c863ab01203cf86a0372d6a4a92ee8ca6006a7aeed73c8218e69a4acd7e4ed0eb291858870077358cb28e81e03f8efd8eb2b76b981b5 languageName: node linkType: hard @@ -2399,15 +2501,15 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-preset-jest@npm:29.6.3" +"babel-preset-jest@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "babel-preset-jest@npm:30.0.0-alpha.2" dependencies: - babel-plugin-jest-hoist: ^29.6.3 + babel-plugin-jest-hoist: 30.0.0-alpha.2 babel-preset-current-node-syntax: ^1.0.0 peerDependencies: - "@babel/core": ^7.0.0 - checksum: aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb + "@babel/core": ^7.11.0 + checksum: 2ea53710b330ec0117a29e0ba519df46b6f37fed1418fe7d64f2c5e10c87bce0a0127a6b06d60a62c2a35bb0a4ca55637276700744b898c7565277fa8a8b833d languageName: node linkType: hard @@ -2442,6 +2544,22 @@ __metadata: languageName: node linkType: hard +"big-integer@npm:^1.6.44": + version: 1.6.52 + resolution: "big-integer@npm:1.6.52" + checksum: 6e86885787a20fed96521958ae9086960e4e4b5e74d04f3ef7513d4d0ad631a9f3bde2730fc8aaa4b00419fc865f6ec573e5320234531ef37505da7da192c40b + languageName: node + linkType: hard + +"bplist-parser@npm:^0.2.0": + version: 0.2.0 + resolution: "bplist-parser@npm:0.2.0" + dependencies: + big-integer: ^1.6.44 + checksum: d5339dd16afc51de6c88f88f58a45b72ed6a06aa31f5557d09877575f220b7c1d3fbe375da0b62e6a10d4b8ed80523567e351f24014f5bc886ad523758142cdd + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -2525,6 +2643,15 @@ __metadata: languageName: node linkType: hard +"bundle-name@npm:^3.0.0": + version: 3.0.0 + resolution: "bundle-name@npm:3.0.0" + dependencies: + run-applescript: ^5.0.0 + checksum: edf2b1fbe6096ed32e7566947ace2ea937ee427391744d7510a2880c4b9a5b3543d3f6c551236a29e5c87d3195f8e2912516290e638c15bcbede7b37cc375615 + languageName: node + linkType: hard + "c8@npm:8.0.1": version: 8.0.1 resolution: "c8@npm:8.0.1" @@ -2607,9 +2734,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001524, caniuse-lite@npm:^1.0.30001541": - version: 1.0.30001564 - resolution: "caniuse-lite@npm:1.0.30001564" - checksum: 5b53749a2e9057e74c5a129fc214fa4434d3f0c3faadbec176efa03b44e40f9c1ef8ceec979f0dd186f7a142476713129df9263e012a178351ba7807217f157a + version: 1.0.30001565 + resolution: "caniuse-lite@npm:1.0.30001565" + checksum: 7621f358d0e1158557430a111ca5506008ae0b2c796039ef53aeebf4e2ba15e5241cb89def21ea3a633b6a609273085835b44a522165d871fa44067cdf29cccd languageName: node linkType: hard @@ -2699,7 +2826,7 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:4.0.0": +"ci-info@npm:4.0.0, ci-info@npm:^4.0.0": version: 4.0.0 resolution: "ci-info@npm:4.0.0" checksum: 122fe41c5eb8d0b5fa0ab6fd674c5ddcf2dc59766528b062a0144ff0d913cfb210ef925ec52110e7c2a7f4e603d5f0e8b91cfe68867e196e9212fa0b94d0a08a @@ -2921,23 +3048,6 @@ __metadata: languageName: node linkType: hard -"create-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "create-jest@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - chalk: ^4.0.0 - exit: ^0.1.2 - graceful-fs: ^4.2.9 - jest-config: ^29.7.0 - jest-util: ^29.7.0 - prompts: ^2.0.1 - bin: - create-jest: bin/create-jest.js - checksum: 1427d49458adcd88547ef6fa39041e1fe9033a661293aa8d2c3aa1b4967cb5bf4f0c00436c7a61816558f28ba2ba81a94d5c962e8022ea9a883978fc8e1f2945 - languageName: node - linkType: hard - "cross-env@npm:7.0.3": version: 7.0.3 resolution: "cross-env@npm:7.0.3" @@ -3156,6 +3266,28 @@ __metadata: languageName: node linkType: hard +"default-browser-id@npm:^3.0.0": + version: 3.0.0 + resolution: "default-browser-id@npm:3.0.0" + dependencies: + bplist-parser: ^0.2.0 + untildify: ^4.0.0 + checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 + languageName: node + linkType: hard + +"default-browser@npm:^4.0.0": + version: 4.0.0 + resolution: "default-browser@npm:4.0.0" + dependencies: + bundle-name: ^3.0.0 + default-browser-id: ^3.0.0 + execa: ^7.1.1 + titleize: ^3.0.0 + checksum: 40c5af984799042b140300be5639c9742599bda76dc9eba5ac9ad5943c83dd36cebc4471eafcfddf8e0ec817166d5ba89d56f08e66a126c7c7908a179cead1a7 + languageName: node + linkType: hard + "defaults@npm:^1.0.3": version: 1.0.4 resolution: "defaults@npm:1.0.4" @@ -3183,6 +3315,13 @@ __metadata: languageName: node linkType: hard +"define-lazy-prop@npm:^3.0.0": + version: 3.0.0 + resolution: "define-lazy-prop@npm:3.0.0" + checksum: 54884f94caac0791bf6395a3ec530ce901cf71c47b0196b8754f3fd17edb6c0e80149c1214429d851873bb0d689dbe08dcedbb2306dc45c8534a5934723851b6 + languageName: node + linkType: hard + "define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" @@ -3201,6 +3340,13 @@ __metadata: languageName: node linkType: hard +"diff-sequences@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "diff-sequences@npm:30.0.0-alpha.2" + checksum: 63c9fd007637645a68158a926aae7086fcb2692cad9c56f1c03e3461ceba9e70a0e8782cd54cbe99112e4c9ac233ab093165b91a42510cb80bfdcc7db21f7451 + languageName: node + linkType: hard + "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" @@ -3273,9 +3419,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.535": - version: 1.4.590 - resolution: "electron-to-chromium@npm:1.4.590" - checksum: 3165a64819ad385e4c732004ceebd9ed2115cbc0e1e311dbfb36cb2809541ab7ea12e58cd1a55a290896a634c58c1a71eeaac203c228aa31e2ec385cdc6b82ee + version: 1.4.594 + resolution: "electron-to-chromium@npm:1.4.594" + checksum: 7bda826be726f789489538d2e5b0355d84ceeb7f5e600d43edfae25ecca13e10b9cd566e4accfa2eb9919bdc410ba6c0a772174f1cbbc4b31b1f5cbb99e01eaf languageName: node linkType: hard @@ -3963,7 +4109,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:7.2.0": +"execa@npm:7.2.0, execa@npm:^7.1.1": version: 7.2.0 resolution: "execa@npm:7.2.0" dependencies: @@ -4004,6 +4150,19 @@ __metadata: languageName: node linkType: hard +"expect@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "expect@npm:30.0.0-alpha.2" + dependencies: + "@jest/expect-utils": 30.0.0-alpha.2 + jest-get-type: 30.0.0-alpha.2 + jest-matcher-utils: 30.0.0-alpha.2 + jest-message-util: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + checksum: 8becd88bb80abfa8ad91228e447d85e00f792a635df5f1aa0ecc0bca542b5b6e338dffba5831825d2869458198108583453c897fda36c8a34bc998d697466fa0 + languageName: node + linkType: hard + "expect@npm:^29.0.0, expect@npm:^29.7.0": version: 29.7.0 resolution: "expect@npm:29.7.0" @@ -4052,7 +4211,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:3.3.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": +"fast-glob@npm:3.3.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -4939,6 +5098,15 @@ __metadata: languageName: node linkType: hard +"is-docker@npm:^3.0.0": + version: 3.0.0 + resolution: "is-docker@npm:3.0.0" + bin: + is-docker: cli.js + checksum: b698118f04feb7eaf3338922bd79cba064ea54a1c3db6ec8c0c8d8ee7613e7e5854d802d3ef646812a8a3ace81182a085dfa0a71cc68b06f3fa794b9783b3c90 + languageName: node + linkType: hard + "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -4994,6 +5162,17 @@ __metadata: languageName: node linkType: hard +"is-inside-container@npm:^1.0.0": + version: 1.0.0 + resolution: "is-inside-container@npm:1.0.0" + dependencies: + is-docker: ^3.0.0 + bin: + is-inside-container: cli.js + checksum: c50b75a2ab66ab3e8b92b3bc534e1ea72ca25766832c0623ac22d134116a98bcf012197d1caabe1d1c4bd5f84363d4aa5c36bb4b585fbcaf57be172cd10a1a03 + languageName: node + linkType: hard + "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -5296,59 +5475,58 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-changed-files@npm:29.7.0" +"jest-changed-files@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-changed-files@npm:30.0.0-alpha.2" dependencies: execa: ^5.0.0 - jest-util: ^29.7.0 + jest-util: 30.0.0-alpha.2 p-limit: ^3.1.0 - checksum: 963e203893c396c5dfc75e00a49426688efea7361b0f0e040035809cecd2d46b3c01c02be2d9e8d38b1138357d2de7719ea5b5be21f66c10f2e9685a5a73bb99 + checksum: 27cb7d196ec583b19dcf0bd6a642b5e76a090fbcbab83e93115c8e4f3a23c626662fb99eea240c4ed700b6aca2b37e6cd81d4250a5c8131e39bf4c09c5993d56 languageName: node linkType: hard -"jest-circus@npm:^29.0.1, jest-circus@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-circus@npm:29.7.0" +"jest-circus@npm:30.0.0-alpha.2, jest-circus@npm:^30.0.0-alpha.1": + version: 30.0.0-alpha.2 + resolution: "jest-circus@npm:30.0.0-alpha.2" dependencies: - "@jest/environment": ^29.7.0 - "@jest/expect": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/environment": 30.0.0-alpha.2 + "@jest/expect": 30.0.0-alpha.2 + "@jest/test-result": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" chalk: ^4.0.0 co: ^4.6.0 dedent: ^1.0.0 is-generator-fn: ^2.0.0 - jest-each: ^29.7.0 - jest-matcher-utils: ^29.7.0 - jest-message-util: ^29.7.0 - jest-runtime: ^29.7.0 - jest-snapshot: ^29.7.0 - jest-util: ^29.7.0 + jest-each: 30.0.0-alpha.2 + jest-matcher-utils: 30.0.0-alpha.2 + jest-message-util: 30.0.0-alpha.2 + jest-runtime: 30.0.0-alpha.2 + jest-snapshot: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 p-limit: ^3.1.0 - pretty-format: ^29.7.0 + pretty-format: 30.0.0-alpha.2 pure-rand: ^6.0.0 slash: ^3.0.0 stack-utils: ^2.0.3 - checksum: 349437148924a5a109c9b8aad6d393a9591b4dac1918fc97d81b7fc515bc905af9918495055071404af1fab4e48e4b04ac3593477b1d5dcf48c4e71b527c70a7 + checksum: 5ae7a5f0c95c07ba35d56c47749dcb4975464d5eec1384a7c66d41f456f2e3746c1da48b56dd335c903039785fe964f10e7a7941d3a5569df803c46104cc839b languageName: node linkType: hard -"jest-cli@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-cli@npm:29.7.0" +"jest-cli@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-cli@npm:30.0.0-alpha.2" dependencies: - "@jest/core": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/core": 30.0.0-alpha.2 + "@jest/test-result": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 chalk: ^4.0.0 - create-jest: ^29.7.0 exit: ^0.1.2 import-local: ^3.0.2 - jest-config: ^29.7.0 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 + jest-config: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + jest-validate: 30.0.0-alpha.2 yargs: ^17.3.1 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -5357,34 +5535,34 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 664901277a3f5007ea4870632ed6e7889db9da35b2434e7cb488443e6bf5513889b344b7fddf15112135495b9875892b156faeb2d7391ddb9e2a849dcb7b6c36 + checksum: b553b409763ac59e7db500961052155b1db634c9a86af0cebefe0e3f3be4cf23dcf253a1a8e0100249059df606b651734d643296b82e70813d35b67d0324360a languageName: node linkType: hard -"jest-config@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-config@npm:29.7.0" +"jest-config@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-config@npm:30.0.0-alpha.2" dependencies: "@babel/core": ^7.11.6 - "@jest/test-sequencer": ^29.7.0 - "@jest/types": ^29.6.3 - babel-jest: ^29.7.0 + "@jest/test-sequencer": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 + babel-jest: 30.0.0-alpha.2 chalk: ^4.0.0 - ci-info: ^3.2.0 + ci-info: ^4.0.0 deepmerge: ^4.2.2 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-circus: ^29.7.0 - jest-environment-node: ^29.7.0 - jest-get-type: ^29.6.3 - jest-regex-util: ^29.6.3 - jest-resolve: ^29.7.0 - jest-runner: ^29.7.0 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 + jest-circus: 30.0.0-alpha.2 + jest-environment-node: 30.0.0-alpha.2 + jest-get-type: 30.0.0-alpha.2 + jest-regex-util: 30.0.0-alpha.2 + jest-resolve: 30.0.0-alpha.2 + jest-runner: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + jest-validate: 30.0.0-alpha.2 micromatch: ^4.0.4 parse-json: ^5.2.0 - pretty-format: ^29.7.0 + pretty-format: 30.0.0-alpha.2 slash: ^3.0.0 strip-json-comments: ^3.1.1 peerDependencies: @@ -5395,7 +5573,19 @@ __metadata: optional: true ts-node: optional: true - checksum: 4cabf8f894c180cac80b7df1038912a3fc88f96f2622de33832f4b3314f83e22b08fb751da570c0ab2b7988f21604bdabade95e3c0c041068ac578c085cf7dff + checksum: 94c75e74703358252e5cd7968e2dbbb179aa56ebfae42128d6f54f402a592cf8b23c8a39790958b6fb5bb06587dabcbe45f4c9884c3ab8861442468c81c38b55 + languageName: node + linkType: hard + +"jest-diff@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-diff@npm:30.0.0-alpha.2" + dependencies: + chalk: ^4.0.0 + diff-sequences: 30.0.0-alpha.2 + jest-get-type: 30.0.0-alpha.2 + pretty-format: 30.0.0-alpha.2 + checksum: 46422f77d9a0f7b4f593358e59fbfe3518afdec312e7148ae496a27a88d06c79c287ad3e79101b0b992aceb2487e4cf9a4d762f8f6d6e5fec337fb8872de9667 languageName: node linkType: hard @@ -5411,7 +5601,7 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:29.7.0, jest-docblock@npm:^29.7.0": +"jest-docblock@npm:29.7.0": version: 29.7.0 resolution: "jest-docblock@npm:29.7.0" dependencies: @@ -5420,30 +5610,46 @@ __metadata: languageName: node linkType: hard -"jest-each@npm:^29.0.1, jest-each@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-each@npm:29.7.0" +"jest-docblock@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-docblock@npm:30.0.0-alpha.2" dependencies: - "@jest/types": ^29.6.3 - chalk: ^4.0.0 - jest-get-type: ^29.6.3 - jest-util: ^29.7.0 - pretty-format: ^29.7.0 - checksum: e88f99f0184000fc8813f2a0aa79e29deeb63700a3b9b7928b8a418d7d93cd24933608591dbbdea732b473eb2021c72991b5cc51a17966842841c6e28e6f691c + detect-newline: ^3.0.0 + checksum: 15e73a3749c91a12f0b9c35391c03ac75b9ce9573f4c680c09395a4b865411c2299f96f690fec7e412564f591a2b0e92060fa92efd16629048e6b9dd76e84ddc languageName: node linkType: hard -"jest-environment-node@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-environment-node@npm:29.7.0" +"jest-each@npm:30.0.0-alpha.2, jest-each@npm:^30.0.0-alpha.1": + version: 30.0.0-alpha.2 + resolution: "jest-each@npm:30.0.0-alpha.2" dependencies: - "@jest/environment": ^29.7.0 - "@jest/fake-timers": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/types": 30.0.0-alpha.2 + chalk: ^4.0.0 + jest-get-type: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + pretty-format: 30.0.0-alpha.2 + checksum: 7ff211bcd6ef1844c8d214fc6be192dcae18e50a00b422709f7d78f8303a5dad94dd2d90881c8c7953efbc1fd81fb8e03c4d1446ce521d9a9b3df6dca34bc74f + languageName: node + linkType: hard + +"jest-environment-node@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-environment-node@npm:30.0.0-alpha.2" + dependencies: + "@jest/environment": 30.0.0-alpha.2 + "@jest/fake-timers": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" - jest-mock: ^29.7.0 - jest-util: ^29.7.0 - checksum: 501a9966292cbe0ca3f40057a37587cb6def25e1e0c5e39ac6c650fe78d3c70a2428304341d084ac0cced5041483acef41c477abac47e9a290d5545fd2f15646 + jest-mock: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + checksum: f62036459b2466729baef2c28f3430fedf509aaf31e265a5736795aa1756d0edf63c35906ad3681c7c77503825777c8e79bde8f450e18b2fa6cd1590df872bc2 + languageName: node + linkType: hard + +"jest-get-type@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-get-type@npm:30.0.0-alpha.2" + checksum: 327a7cf615206854f8f3bde0295a93965a4eb7a1760078eee21096f9fe5a3111024c10244c6058c4ed3d538f441b4b8abaf21b1a9b706abef3929b9dcbe98b58 languageName: node linkType: hard @@ -5454,6 +5660,28 @@ __metadata: languageName: node linkType: hard +"jest-haste-map@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-haste-map@npm:30.0.0-alpha.2" + dependencies: + "@jest/types": 30.0.0-alpha.2 + "@types/node": "*" + anymatch: ^3.0.3 + fb-watchman: ^2.0.0 + fsevents: ^2.3.2 + graceful-fs: ^4.2.9 + jest-regex-util: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + jest-worker: 30.0.0-alpha.2 + micromatch: ^4.0.4 + walker: ^1.0.8 + dependenciesMeta: + fsevents: + optional: true + checksum: d8dee5b193043f03addae33e26c46f824267708de9ce94b1206f4bde0dc2105f0ddaaae45c28acdbeb27110593dccc58947eaa4aab31bd4af3020a0cafab1300 + languageName: node + linkType: hard + "jest-haste-map@npm:^29.7.0": version: 29.7.0 resolution: "jest-haste-map@npm:29.7.0" @@ -5477,31 +5705,43 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-leak-detector@npm:29.7.0" +"jest-leak-detector@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-leak-detector@npm:30.0.0-alpha.2" dependencies: - jest-get-type: ^29.6.3 - pretty-format: ^29.7.0 - checksum: e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 + jest-get-type: 30.0.0-alpha.2 + pretty-format: 30.0.0-alpha.2 + checksum: e8589191da06b0379ce749bbf00c05b9ed50f0c9fa99734d8a6ebfb40772a9eba5035ac06a4e7a95d926d6ae75cdbbc7f42c88dba6f8daf1d2a389e0e800ea70 languageName: node linkType: hard -"jest-light-runner@npm:0.5.1": - version: 0.5.1 - resolution: "jest-light-runner@npm:0.5.1" +"jest-light-runner@npm:0.6.0-alpha.1": + version: 0.6.0-alpha.1 + resolution: "jest-light-runner@npm:0.6.0-alpha.1" dependencies: - "@jest/expect": ^29.0.1 - "@jest/fake-timers": ^29.2.2 - jest-circus: ^29.0.1 - jest-each: ^29.0.1 - jest-mock: ^29.0.1 - jest-snapshot: ^29.0.1 + "@jest/expect": ^30.0.0-alpha.1 + "@jest/fake-timers": ^30.0.0-alpha.1 + jest-circus: ^30.0.0-alpha.1 + jest-each: ^30.0.0-alpha.1 + jest-mock: ^30.0.0-alpha.1 + jest-snapshot: ^30.0.0-alpha.1 piscina: ^3.1.0 supports-color: ^9.2.1 peerDependencies: - jest: ^27.5.0 || ^28.0.0 || ^29.0.0 - checksum: ef7ce093835f51396308ce488401fc0cce4fa2f278b0420bf4b2f6bedd469d97264db53f3a5fca3df28ff4f72714782406a0bc425b0fa473e8572bf83b738ed2 + jest: ^27.5.0 || ^28.0.0 || ^29.0.0|| ^30.0.0-0 + checksum: ce18c3531d9083873832bbc6a8058bc8669a05e3bc278a3539a0edbc2233103cdfcdb3f73a5c5addcc193173801ba08ececf12f05dac6a27c2721306d7ea4a79 + languageName: node + linkType: hard + +"jest-matcher-utils@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-matcher-utils@npm:30.0.0-alpha.2" + dependencies: + chalk: ^4.0.0 + jest-diff: 30.0.0-alpha.2 + jest-get-type: 30.0.0-alpha.2 + pretty-format: 30.0.0-alpha.2 + checksum: 55ff36aab973119ac51b548cfe1eb6a6764784db324f326f5c728eb288ff00a7bfe301b46b72ca8058c48f308aa235e8360792c252dcfe0e418ca293f2418cf3 languageName: node linkType: hard @@ -5517,6 +5757,23 @@ __metadata: languageName: node linkType: hard +"jest-message-util@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-message-util@npm:30.0.0-alpha.2" + dependencies: + "@babel/code-frame": ^7.12.13 + "@jest/types": 30.0.0-alpha.2 + "@types/stack-utils": ^2.0.0 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + micromatch: ^4.0.4 + pretty-format: 30.0.0-alpha.2 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: 96dbd62f09e6140909acc72e2d9e14bed0bf72bdbc4af988de385e99975c4606ae4b3eac17428b509b04a0383794f55b89b50e1b51865b9b3147fbaecc625016 + languageName: node + linkType: hard + "jest-message-util@npm:^29.7.0": version: 29.7.0 resolution: "jest-message-util@npm:29.7.0" @@ -5534,14 +5791,14 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^29.0.1, jest-mock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-mock@npm:29.7.0" +"jest-mock@npm:30.0.0-alpha.2, jest-mock@npm:^30.0.0-alpha.1": + version: 30.0.0-alpha.2 + resolution: "jest-mock@npm:30.0.0-alpha.2" dependencies: - "@jest/types": ^29.6.3 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" - jest-util: ^29.7.0 - checksum: 81ba9b68689a60be1482212878973700347cb72833c5e5af09895882b9eb5c4e02843a1bbdf23f94c52d42708bab53a30c45a3482952c9eec173d1eaac5b86c5 + jest-util: 30.0.0-alpha.2 + checksum: dcee248abf3c71f763724b4efcffe57ff00e774db594526f96bf8917fa3767044bc129a26dfa13f7bb35e3ff755e14591b8c31673f6f0b36b6eb2938c6c9a28a languageName: node linkType: hard @@ -5557,6 +5814,13 @@ __metadata: languageName: node linkType: hard +"jest-regex-util@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-regex-util@npm:30.0.0-alpha.2" + checksum: edfd975eeb63d6fc4907ccffa4df3afdc2d3dcf97f0ec738661bad76dc3319c192574bc56c17567916f8e6becd983c95e0d41f54d59db3bd746af0c0083fb8b4 + languageName: node + linkType: hard + "jest-regex-util@npm:^29.0.0, jest-regex-util@npm:^29.6.3": version: 29.6.3 resolution: "jest-regex-util@npm:29.6.3" @@ -5564,89 +5828,89 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve-dependencies@npm:29.7.0" +"jest-resolve-dependencies@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-resolve-dependencies@npm:30.0.0-alpha.2" dependencies: - jest-regex-util: ^29.6.3 - jest-snapshot: ^29.7.0 - checksum: aeb75d8150aaae60ca2bb345a0d198f23496494677cd6aefa26fc005faf354061f073982175daaf32b4b9d86b26ca928586344516e3e6969aa614cb13b883984 + jest-regex-util: 30.0.0-alpha.2 + jest-snapshot: 30.0.0-alpha.2 + checksum: 398a9433396641e6a89bda916d8e779a3766f8f80bbe776e3e711dcc6792ad24ad5278ad21735de6751aa403d75e4bbf961195a931fe407b1ff76b965e048a85 languageName: node linkType: hard -"jest-resolve@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve@npm:29.7.0" +"jest-resolve@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-resolve@npm:30.0.0-alpha.2" dependencies: chalk: ^4.0.0 graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 + jest-haste-map: 30.0.0-alpha.2 jest-pnp-resolver: ^1.2.2 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 + jest-util: 30.0.0-alpha.2 + jest-validate: 30.0.0-alpha.2 resolve: ^1.20.0 resolve.exports: ^2.0.0 slash: ^3.0.0 - checksum: 0ca218e10731aa17920526ec39deaec59ab9b966237905ffc4545444481112cd422f01581230eceb7e82d86f44a543d520a71391ec66e1b4ef1a578bd5c73487 + checksum: b44ea09e172bb51ce6909a5b53f478d68d4c7f43b39b7cee6c752073d29aaf829f64a07e7fc2e3bfa6687cb7fc0c61ed6086230bd89f581d40eabc25ee4cb8b3 languageName: node linkType: hard -"jest-runner@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runner@npm:29.7.0" +"jest-runner@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-runner@npm:30.0.0-alpha.2" dependencies: - "@jest/console": ^29.7.0 - "@jest/environment": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/console": 30.0.0-alpha.2 + "@jest/environment": 30.0.0-alpha.2 + "@jest/test-result": 30.0.0-alpha.2 + "@jest/transform": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" chalk: ^4.0.0 emittery: ^0.13.1 graceful-fs: ^4.2.9 - jest-docblock: ^29.7.0 - jest-environment-node: ^29.7.0 - jest-haste-map: ^29.7.0 - jest-leak-detector: ^29.7.0 - jest-message-util: ^29.7.0 - jest-resolve: ^29.7.0 - jest-runtime: ^29.7.0 - jest-util: ^29.7.0 - jest-watcher: ^29.7.0 - jest-worker: ^29.7.0 + jest-docblock: 30.0.0-alpha.2 + jest-environment-node: 30.0.0-alpha.2 + jest-haste-map: 30.0.0-alpha.2 + jest-leak-detector: 30.0.0-alpha.2 + jest-message-util: 30.0.0-alpha.2 + jest-resolve: 30.0.0-alpha.2 + jest-runtime: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + jest-watcher: 30.0.0-alpha.2 + jest-worker: 30.0.0-alpha.2 p-limit: ^3.1.0 source-map-support: 0.5.13 - checksum: f0405778ea64812bf9b5c50b598850d94ccf95d7ba21f090c64827b41decd680ee19fcbb494007cdd7f5d0d8906bfc9eceddd8fa583e753e736ecd462d4682fb + checksum: 5041ae012d4e9eae834ed5b078567cd1297b4e486db5f4ec5c1cb8f26ec58257cc90f8a0e4530b3373f3adacda3f8ddd0f7cf6f8664541012f7b978c6c33f01a languageName: node linkType: hard -"jest-runtime@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runtime@npm:29.7.0" +"jest-runtime@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-runtime@npm:30.0.0-alpha.2" dependencies: - "@jest/environment": ^29.7.0 - "@jest/fake-timers": ^29.7.0 - "@jest/globals": ^29.7.0 - "@jest/source-map": ^29.6.3 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/environment": 30.0.0-alpha.2 + "@jest/fake-timers": 30.0.0-alpha.2 + "@jest/globals": 30.0.0-alpha.2 + "@jest/source-map": 30.0.0-alpha.2 + "@jest/test-result": 30.0.0-alpha.2 + "@jest/transform": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 "@types/node": "*" chalk: ^4.0.0 cjs-module-lexer: ^1.0.0 collect-v8-coverage: ^1.0.0 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 - jest-message-util: ^29.7.0 - jest-mock: ^29.7.0 - jest-regex-util: ^29.6.3 - jest-resolve: ^29.7.0 - jest-snapshot: ^29.7.0 - jest-util: ^29.7.0 + jest-haste-map: 30.0.0-alpha.2 + jest-message-util: 30.0.0-alpha.2 + jest-mock: 30.0.0-alpha.2 + jest-regex-util: 30.0.0-alpha.2 + jest-resolve: 30.0.0-alpha.2 + jest-snapshot: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 slash: ^3.0.0 strip-bom: ^4.0.0 - checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e + checksum: 75642ff9b1d183ba1be0a5ccbd8de074e7cc7abe46f511d271482fee741c6c141e55900321d444c5b2f79311a0d0f3ca0fcec54b178e716c7a86e45d1bd401a7 languageName: node linkType: hard @@ -5667,7 +5931,36 @@ __metadata: languageName: node linkType: hard -"jest-snapshot@npm:^29.0.0, jest-snapshot@npm:^29.0.1, jest-snapshot@npm:^29.7.0": +"jest-snapshot@npm:30.0.0-alpha.2, jest-snapshot@npm:^30.0.0-alpha.1": + version: 30.0.0-alpha.2 + resolution: "jest-snapshot@npm:30.0.0-alpha.2" + dependencies: + "@babel/core": ^7.11.6 + "@babel/generator": ^7.7.2 + "@babel/plugin-syntax-jsx": ^7.7.2 + "@babel/plugin-syntax-typescript": ^7.7.2 + "@babel/types": ^7.3.3 + "@jest/expect-utils": 30.0.0-alpha.2 + "@jest/transform": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 + babel-preset-current-node-syntax: ^1.0.0 + chalk: ^4.0.0 + expect: 30.0.0-alpha.2 + graceful-fs: ^4.2.9 + jest-diff: 30.0.0-alpha.2 + jest-get-type: 30.0.0-alpha.2 + jest-matcher-utils: 30.0.0-alpha.2 + jest-message-util: 30.0.0-alpha.2 + jest-util: 30.0.0-alpha.2 + natural-compare: ^1.4.0 + pretty-format: 30.0.0-alpha.2 + semver: ^7.5.3 + synckit: ^0.8.5 + checksum: f8a37944f041b0ca5096edb158fdd357bc512ad40a5aac8f7a9f1a057d1ee4e178647851d057b05ba10d07320f844a639267d1d60be314cd9bdf827e314ba19d + languageName: node + linkType: hard + +"jest-snapshot@npm:^29.0.0": version: 29.7.0 resolution: "jest-snapshot@npm:29.7.0" dependencies: @@ -5695,6 +5988,20 @@ __metadata: languageName: node linkType: hard +"jest-util@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-util@npm:30.0.0-alpha.2" + dependencies: + "@jest/types": 30.0.0-alpha.2 + "@types/node": "*" + chalk: ^4.0.0 + ci-info: ^4.0.0 + graceful-fs: ^4.2.9 + picomatch: ^3.0.0 + checksum: 0f1c2a87fe7f04c42a16ed4ede3cd4274830b6d5aa07e7e04512a3a47fee692a45a8f7b56a4deea928efd2f8894f51217c4bd292d5777ad7c48962fe5922313d + languageName: node + linkType: hard + "jest-util@npm:^29.7.0": version: 29.7.0 resolution: "jest-util@npm:29.7.0" @@ -5709,17 +6016,17 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-validate@npm:29.7.0" +"jest-validate@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-validate@npm:30.0.0-alpha.2" dependencies: - "@jest/types": ^29.6.3 + "@jest/types": 30.0.0-alpha.2 camelcase: ^6.2.0 chalk: ^4.0.0 - jest-get-type: ^29.6.3 + jest-get-type: 30.0.0-alpha.2 leven: ^3.1.0 - pretty-format: ^29.7.0 - checksum: 191fcdc980f8a0de4dbdd879fa276435d00eb157a48683af7b3b1b98b0f7d9de7ffe12689b617779097ff1ed77601b9f7126b0871bba4f776e222c40f62e9dae + pretty-format: 30.0.0-alpha.2 + checksum: 77130b0b590ff8df0de206942033544bd84ccf9bd90e91529ae41a7796887e0221f77cadb4d86a32ce7ee13891b59997f4d08b3269db68ab92c65dbcbf07ccd4 languageName: node linkType: hard @@ -5740,7 +6047,23 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^29.0.0, jest-watcher@npm:^29.7.0": +"jest-watcher@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-watcher@npm:30.0.0-alpha.2" + dependencies: + "@jest/test-result": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 + "@types/node": "*" + ansi-escapes: ^4.2.1 + chalk: ^4.0.0 + emittery: ^0.13.1 + jest-util: 30.0.0-alpha.2 + string-length: ^4.0.1 + checksum: a9ab1295a6789283bd704e85b7f0b9816f0780b21f53f49b21b521d33ae90905c7b6d818fbf0dc0a28464a025cb792ed0d0f599712772592d931d959097492d6 + languageName: node + linkType: hard + +"jest-watcher@npm:^29.0.0": version: 29.7.0 resolution: "jest-watcher@npm:29.7.0" dependencies: @@ -5756,6 +6079,18 @@ __metadata: languageName: node linkType: hard +"jest-worker@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest-worker@npm:30.0.0-alpha.2" + dependencies: + "@types/node": "*" + jest-util: 30.0.0-alpha.2 + merge-stream: ^2.0.0 + supports-color: ^8.0.0 + checksum: 760101a8f84a42e07fd0a1f6503c415f1be1d5259c405f2616be343fdbb11e0868a0b7b254d2e9c5effb305e349fe5cd7e2ee7ed470bcf87a435ffb0390ab2f2 + languageName: node + linkType: hard + "jest-worker@npm:^29.7.0": version: 29.7.0 resolution: "jest-worker@npm:29.7.0" @@ -5768,14 +6103,14 @@ __metadata: languageName: node linkType: hard -"jest@npm:29.7.0": - version: 29.7.0 - resolution: "jest@npm:29.7.0" +"jest@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "jest@npm:30.0.0-alpha.2" dependencies: - "@jest/core": ^29.7.0 - "@jest/types": ^29.6.3 + "@jest/core": 30.0.0-alpha.2 + "@jest/types": 30.0.0-alpha.2 import-local: ^3.0.2 - jest-cli: ^29.7.0 + jest-cli: 30.0.0-alpha.2 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -5783,7 +6118,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 17ca8d67504a7dbb1998cf3c3077ec9031ba3eb512da8d71cb91bcabb2b8995c4e4b292b740cb9bf1cbff5ce3e110b3f7c777b0cefb6f41ab05445f248d0ee0b + checksum: 07e29c6cafa50978335fd62fec931a701aaa75b81816d10a3484d2174d8ec64883b2dd69cbc0e164fcc5750585a3a1403155457b171f9165925d4b1a275d43d8 languageName: node linkType: hard @@ -5927,13 +6262,6 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^3.0.3": - version: 3.0.3 - resolution: "kleur@npm:3.0.3" - checksum: df82cd1e172f957bae9c536286265a5cdbd5eeca487cb0a3b2a7b41ef959fc61f8e7c0e9aeea9c114ccf2c166b6a8dd45a46fd619c1c569d210ecd2765ad5169 - languageName: node - linkType: hard - "leven@npm:4.0.0, leven@npm:^4.0.0": version: 4.0.0 resolution: "leven@npm:4.0.0" @@ -6053,9 +6381,9 @@ __metadata: linkType: hard "lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.3 - resolution: "lru-cache@npm:10.0.3" - checksum: e4b100c5a6b2ac778c0f63711499b5098686205c57907d8c04a413270d37089112d9bd0192dfa36940eb5d94b88c7db54fdb6fd23319c8f89903cfd4323ea06c + version: 10.1.0 + resolution: "lru-cache@npm:10.1.0" + checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab languageName: node linkType: hard @@ -6417,13 +6745,13 @@ __metadata: linkType: hard "node-gyp-build@npm:^4.2.2": - version: 4.7.0 - resolution: "node-gyp-build@npm:4.7.0" + version: 4.7.1 + resolution: "node-gyp-build@npm:4.7.1" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: 5b0417487c8b30c36e23974f968fe4c166dc9ee0707ec17a74ff6c8265af9ec9e2bab9ca36c5113b828fdb384f405fcd546231c215c721559a776a07b5c0b98b + checksum: 2ef8248021489db03be3e8098977cdc797b80a9b12b77c6dcb89b0dc89b8c62e6a482672ee298f61021740ae7f080fb33154cfec8fb158cec620f57b0fae87c0 languageName: node linkType: hard @@ -6667,6 +6995,18 @@ __metadata: languageName: node linkType: hard +"open@npm:^9.1.0": + version: 9.1.0 + resolution: "open@npm:9.1.0" + dependencies: + default-browser: ^4.0.0 + define-lazy-prop: ^3.0.0 + is-inside-container: ^1.0.0 + is-wsl: ^2.2.0 + checksum: 3993c0f61d51fed8ac290e99c9c3cf45d3b6cfb3e2aa2b74cafd312c3486c22fd81df16ac8f3ab91dd8a4e3e729a16fc2480cfc406c4833416cf908acf1ae7c9 + languageName: node + linkType: hard + "optionator@npm:^0.9.3": version: 0.9.3 resolution: "optionator@npm:0.9.3" @@ -6920,6 +7260,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^3.0.0": + version: 3.0.1 + resolution: "picomatch@npm:3.0.1" + checksum: b7fe18174bcc05bbf0ea09cc85623ae395676b3e6bc25636d4c20db79a948586237e429905453bf1ba385bc7a7aa5b56f1b351680e650d2b5c305ceb98dfc914 + languageName: node + linkType: hard + "pidtree@npm:^0.6.0": version: 0.6.0 resolution: "pidtree@npm:0.6.0" @@ -7140,9 +7487,9 @@ __metadata: ignore: 5.3.0 import-meta-resolve: 4.0.0 iterate-directory-up: 1.1.1 - jest: 29.7.0 + jest: 30.0.0-alpha.2 jest-docblock: 29.7.0 - jest-light-runner: 0.5.1 + jest-light-runner: 0.6.0-alpha.1 jest-snapshot-serializer-ansi: 2.1.0 jest-snapshot-serializer-raw: 2.0.0 jest-watch-typeahead: 2.2.2 @@ -7202,6 +7549,17 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:30.0.0-alpha.2": + version: 30.0.0-alpha.2 + resolution: "pretty-format@npm:30.0.0-alpha.2" + dependencies: + "@jest/schemas": 30.0.0-alpha.2 + ansi-styles: ^5.0.0 + react-is: ^18.0.0 + checksum: a3222d1bc33e0e7ae32baabd27fd87946358c0d4d75be4ae709a23e3044ca0cabc3fa4adf338429240c3004fd8c63c7393a6adfe740d07766b1da30092da1560 + languageName: node + linkType: hard + "pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" @@ -7230,16 +7588,6 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1": - version: 2.4.2 - resolution: "prompts@npm:2.4.2" - dependencies: - kleur: ^3.0.3 - sisteransi: ^1.0.5 - checksum: d8fd1fe63820be2412c13bfc5d0a01909acc1f0367e32396962e737cb2fc52d004f3302475d5ce7d18a1e8a79985f93ff04ee03007d091029c3f9104bffc007d - languageName: node - linkType: hard - "prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" @@ -7595,6 +7943,15 @@ __metadata: languageName: node linkType: hard +"run-applescript@npm:^5.0.0": + version: 5.0.0 + resolution: "run-applescript@npm:5.0.0" + dependencies: + execa: ^5.0.0 + checksum: d00c2dbfa5b2d774de7451194b8b125f40f65fc183de7d9dcae97f57f59433586d3c39b9001e111c38bfa24c3436c99df1bb4066a2a0c90d39a8c4cd6889af77 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -7789,13 +8146,6 @@ __metadata: languageName: node linkType: hard -"sisteransi@npm:^1.0.5": - version: 1.0.5 - resolution: "sisteransi@npm:1.0.5" - checksum: aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 - languageName: node - linkType: hard - "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -8183,6 +8533,16 @@ __metadata: languageName: node linkType: hard +"synckit@npm:^0.8.5": + version: 0.8.5 + resolution: "synckit@npm:0.8.5" + dependencies: + "@pkgr/utils": ^2.3.1 + tslib: ^2.5.0 + checksum: 8a9560e5d8f3d94dc3cf5f7b9c83490ffa30d320093560a37b88f59483040771fd1750e76b9939abfbb1b5a23fd6dfbae77f6b338abffe7cae7329cd9b9bb86b + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.2.0 resolution: "tar@npm:6.2.0" @@ -8234,6 +8594,13 @@ __metadata: languageName: node linkType: hard +"titleize@npm:^3.0.0": + version: 3.0.0 + resolution: "titleize@npm:3.0.0" + checksum: 71fbbeabbfb36ccd840559f67f21e356e1d03da2915b32d2ae1a60ddcc13a124be2739f696d2feb884983441d159a18649e8d956648d591bdad35c430a6b6d28 + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -8320,7 +8687,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.3.0, tslib@npm:^2.4.0, tslib@npm:^2.6.0, tslib@npm:^2.6.2": +"tslib@npm:^2.3.0, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.0, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad @@ -8618,6 +8985,13 @@ __metadata: languageName: node linkType: hard +"untildify@npm:^4.0.0": + version: 4.0.0 + resolution: "untildify@npm:4.0.0" + checksum: 39ced9c418a74f73f0a56e1ba4634b4d959422dff61f4c72a8e39f60b99380c1b45ed776fbaa0a4101b157e4310d873ad7d114e8534ca02609b4916bb4187fb9 + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.0.13": version: 1.0.13 resolution: "update-browserslist-db@npm:1.0.13" @@ -8872,6 +9246,16 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^5.0.0": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: ^0.1.4 + signal-exit: ^4.0.1 + checksum: 8dbb0e2512c2f72ccc20ccedab9986c7d02d04039ed6e8780c987dc4940b793339c50172a1008eed7747001bfacc0ca47562668a069a7506c46c77d7ba3926a9 + languageName: node + linkType: hard + "xdg-basedir@npm:^5.0.1": version: 5.1.0 resolution: "xdg-basedir@npm:5.1.0"