Build(deps): Bump @babel/code-frame from 7.12.11 to 7.12.13 (#10226)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
dependabot[bot]andfisker Cheung authored and GitHub committed 2021-02-04 09:42:00 +08:00
1 parent 30f9e1adbc
commit d0942b8fae
72 files changed
+466 -472

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@
], ],
"dependencies": { "dependencies": {
"@angular/compiler": "11.1.1", "@angular/compiler": "11.1.1",
"@babel/code-frame": "7.12.11", "@babel/code-frame": "7.12.13",
"@babel/parser": "7.12.11", "@babel/parser": "7.12.11",
"@glimmer/syntax": "0.74.2", "@glimmer/syntax": "0.74.2",
"@iarna/toml": "2.2.5", "@iarna/toml": "2.2.5",
@@ -9,7 +9,7 @@ rangeEnd: 4
=====================================input====================================== =====================================input======================================
> 1 | .x{} > 1 | .x{}
| ^^^^ | ^^^^
2 | 2 |
=====================================output===================================== =====================================output=====================================
.x{} .x{}
@@ -57,12 +57,12 @@ function baz(this: number, ...a) {}
exports[`function_type.js - {"trailingComma":"all"} [babel-flow] format 1`] = ` exports[`function_type.js - {"trailingComma":"all"} [babel-flow] format 1`] = `
"Unexpected token, expected \\")\\" (3:16) "Unexpected token, expected \\")\\" (3:16)
1 | // @flow 1 | // @flow
2 | 2 |
> 3 | type T = (this : number, a : string, b : number) => void > 3 | type T = (this : number, a : string, b : number) => void
| ^ | ^
4 | 4 |
5 | type U = (this : number, ...c : any) => void 5 | type U = (this : number, ...c : any) => void
6 | " 6 |"
`; `;
exports[`function_type.js - {"trailingComma":"all"} format 1`] = ` exports[`function_type.js - {"trailingComma":"all"} format 1`] = `
@@ -95,11 +95,11 @@ type V = (this: number) => void;
exports[`line_break.js - {"trailingComma":"all"} [babel-flow] format 1`] = ` exports[`line_break.js - {"trailingComma":"all"} [babel-flow] format 1`] = `
"Unexpected token, expected \\")\\" (3:15) "Unexpected token, expected \\")\\" (3:15)
1 | // @flow 1 | // @flow
2 | 2 |
> 3 | type T = (this: boolean, > 3 | type T = (this: boolean,
| ^ | ^
4 | a: number, 4 | a: number,
5 | 5 |
6 | b: number," 6 | b: number,"
`; `;
@@ -197,13 +197,13 @@ class A {
exports[`union_type.js - {"trailingComma":"all"} [babel-flow] format 1`] = ` exports[`union_type.js - {"trailingComma":"all"} [babel-flow] format 1`] = `
"Unexpected token, expected \\")\\" (4:7) "Unexpected token, expected \\")\\" (4:7)
2 | 2 |
3 | type A = ( 3 | type A = (
> 4 | this: | SupperLongLongLongLongLongLongLongLongLongLongLongType | FooBarBazLorem12345, > 4 | this: | SupperLongLongLongLongLongLongLongLongLongLongLongType | FooBarBazLorem12345,
| ^ | ^
5 | b: number, 5 | b: number,
6 | ) => boolean; 6 | ) => boolean;
7 | " 7 |"
`; `;
exports[`union_type.js - {"trailingComma":"all"} format 1`] = ` exports[`union_type.js - {"trailingComma":"all"} format 1`] = `
@@ -9,7 +9,7 @@ rangeEnd: 3
=====================================input====================================== =====================================input======================================
> 1 | {NPC{life}} > 1 | {NPC{life}}
| ^^^ | ^^^
2 | 2 |
=====================================output===================================== =====================================output=====================================
{ {
NPC { NPC {
@@ -309,7 +309,7 @@ exports[`class-property.js [espree] format 1`] = `
> 3 | static propTypes = {}; > 3 | static propTypes = {};
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`class-property.js - {"arrowParens":"always"} [espree] format 1`] = ` exports[`class-property.js - {"arrowParens":"always"} [espree] format 1`] = `
@@ -319,7 +319,7 @@ exports[`class-property.js - {"arrowParens":"always"} [espree] format 1`] = `
> 3 | static propTypes = {}; > 3 | static propTypes = {};
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`class-property.js - {"arrowParens":"always"} format 1`] = ` exports[`class-property.js - {"arrowParens":"always"} format 1`] = `
@@ -350,7 +350,7 @@ exports[`class-property.js - {"trailingComma":"all"} [espree] format 1`] = `
> 3 | static propTypes = {}; > 3 | static propTypes = {};
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`class-property.js - {"trailingComma":"all"} format 1`] = ` exports[`class-property.js - {"trailingComma":"all"} format 1`] = `
@@ -6,7 +6,7 @@ exports[`arrows-bind.js [espree] format 1`] = `
| ^ | ^
2 | (a => b)::c; 2 | (a => b)::c;
3 | a::(b => c); 3 | a::(b => c);
4 | " 4 |"
`; `;
exports[`arrows-bind.js [meriyah] format 1`] = ` exports[`arrows-bind.js [meriyah] format 1`] = `
@@ -15,7 +15,7 @@ exports[`arrows-bind.js [meriyah] format 1`] = `
| ^ | ^
2 | (a => b)::c; 2 | (a => b)::c;
3 | a::(b => c); 3 | a::(b => c);
4 | " 4 |"
`; `;
exports[`arrows-bind.js format 1`] = ` exports[`arrows-bind.js format 1`] = `
@@ -5,7 +5,7 @@ exports[`newline-before-arrow.js [espree] format 1`] = `
1 | async x 1 | async x
> 2 | => x > 2 | => x
| ^ | ^
3 | " 3 |"
`; `;
exports[`newline-before-arrow.js [meriyah] format 1`] = ` exports[`newline-before-arrow.js [meriyah] format 1`] = `
@@ -13,7 +13,7 @@ exports[`newline-before-arrow.js [meriyah] format 1`] = `
1 | async x 1 | async x
> 2 | => x > 2 | => x
| ^ | ^
3 | " 3 |"
`; `;
exports[`newline-before-arrow.js format 1`] = ` exports[`newline-before-arrow.js format 1`] = `
@@ -425,7 +425,7 @@ class C {
exports[`decimal.js [espree] format 1`] = ` exports[`decimal.js [espree] format 1`] = `
"Identifier directly after number (3:4) "Identifier directly after number (3:4)
1 | // https://github.com/babel/babel/pull/11640 1 | // https://github.com/babel/babel/pull/11640
2 | 2 |
> 3 | 100m; > 3 | 100m;
| ^ | ^
4 | 9223372036854775807m; 4 | 9223372036854775807m;
@@ -436,7 +436,7 @@ exports[`decimal.js [espree] format 1`] = `
exports[`decimal.js [meriyah] format 1`] = ` exports[`decimal.js [meriyah] format 1`] = `
"[3:3]: No identifiers allowed directly after numeric literal (3:3) "[3:3]: No identifiers allowed directly after numeric literal (3:3)
1 | // https://github.com/babel/babel/pull/11640 1 | // https://github.com/babel/babel/pull/11640
2 | 2 |
> 3 | 100m; > 3 | 100m;
| ^ | ^
4 | 9223372036854775807m; 4 | 9223372036854775807m;
@@ -510,11 +510,11 @@ typeof 1m === "decimal128";
exports[`decorators.js [espree] format 1`] = ` exports[`decorators.js [espree] format 1`] = `
"Unexpected character '@' (3:1) "Unexpected character '@' (3:1)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-decorators 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-decorators
2 | 2 |
> 3 | @annotation > 3 | @annotation
| ^ | ^
4 | class MyClass { } 4 | class MyClass { }
5 | 5 |
6 | function annotation(target) {" 6 | function annotation(target) {"
`; `;
@@ -591,7 +591,7 @@ function enumerable(value) {
exports[`do-expressions.js [espree] format 1`] = ` exports[`do-expressions.js [espree] format 1`] = `
"Unexpected token do (3:9) "Unexpected token do (3:9)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions
2 | 2 |
> 3 | let a = do { > 3 | let a = do {
| ^ | ^
4 | if(x > 10) { 4 | if(x > 10) {
@@ -602,7 +602,7 @@ exports[`do-expressions.js [espree] format 1`] = `
exports[`do-expressions.js [meriyah] format 1`] = ` exports[`do-expressions.js [meriyah] format 1`] = `
"[3:10]: Unexpected token: 'do' (3:10) "[3:10]: Unexpected token: 'do' (3:10)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-do-expressions
2 | 2 |
> 3 | let a = do { > 3 | let a = do {
| ^ | ^
4 | if(x > 10) { 4 | if(x > 10) {
@@ -674,20 +674,20 @@ import(prettier).then((module) => console.log(module));
exports[`export-default-from.js [espree] format 1`] = ` exports[`export-default-from.js [espree] format 1`] = `
"Unexpected token v (4:8) "Unexpected token v (4:8)
2 | 2 |
3 | 3 |
> 4 | export v from 'mod'; > 4 | export v from 'mod';
| ^ | ^
5 | " 5 |"
`; `;
exports[`export-default-from.js [meriyah] format 1`] = ` exports[`export-default-from.js [meriyah] format 1`] = `
"[4:8]: Unexpected token: 'identifier' (4:8) "[4:8]: Unexpected token: 'identifier' (4:8)
2 | 2 |
3 | 3 |
> 4 | export v from 'mod'; > 4 | export v from 'mod';
| ^ | ^
5 | " 5 |"
`; `;
exports[`export-default-from.js format 1`] = ` exports[`export-default-from.js format 1`] = `
@@ -730,19 +730,19 @@ export * as ns from "mod";
exports[`flow.js [espree] format 1`] = ` exports[`flow.js [espree] format 1`] = `
"Unexpected token : (3:17) "Unexpected token : (3:17)
1 | // https://babeljs.io/docs/en/babel-preset-flow 1 | // https://babeljs.io/docs/en/babel-preset-flow
2 | 2 |
> 3 | function foo(one: any, two: number, three?): string {} > 3 | function foo(one: any, two: number, three?): string {}
| ^ | ^
4 | " 4 |"
`; `;
exports[`flow.js [meriyah] format 1`] = ` exports[`flow.js [meriyah] format 1`] = `
"[3:17]: Expected ')' (3:17) "[3:17]: Expected ')' (3:17)
1 | // https://babeljs.io/docs/en/babel-preset-flow 1 | // https://babeljs.io/docs/en/babel-preset-flow
2 | 2 |
> 3 | function foo(one: any, two: number, three?): string {} > 3 | function foo(one: any, two: number, three?): string {}
| ^ | ^
4 | " 4 |"
`; `;
exports[`flow.js format 1`] = ` exports[`flow.js format 1`] = `
@@ -766,23 +766,23 @@ function foo(one: any, two: number, three?): string {}
exports[`function-bind.js [espree] format 1`] = ` exports[`function-bind.js [espree] format 1`] = `
"Unexpected token : (3:5) "Unexpected token : (3:5)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind
2 | 2 |
> 3 | obj::func > 3 | obj::func
| ^ | ^
4 | // is equivalent to: 4 | // is equivalent to:
5 | func.bind(obj) 5 | func.bind(obj)
6 | " 6 |"
`; `;
exports[`function-bind.js [meriyah] format 1`] = ` exports[`function-bind.js [meriyah] format 1`] = `
"[3:5]: Unexpected token: ':' (3:5) "[3:5]: Unexpected token: ':' (3:5)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-function-bind
2 | 2 |
> 3 | obj::func > 3 | obj::func
| ^ | ^
4 | // is equivalent to: 4 | // is equivalent to:
5 | func.bind(obj) 5 | func.bind(obj)
6 | " 6 |"
`; `;
exports[`function-bind.js format 1`] = ` exports[`function-bind.js format 1`] = `
@@ -832,24 +832,24 @@ obj.func.call(obj, val);
exports[`function-sent.js [espree] format 1`] = ` exports[`function-sent.js [espree] format 1`] = `
"Unexpected token . (4:33) "Unexpected token . (4:33)
2 | 2 |
3 | function* generator() { 3 | function* generator() {
> 4 | console.log(\\"Sent\\", function.sent); > 4 | console.log(\\"Sent\\", function.sent);
| ^ | ^
5 | console.log(\\"Yield\\", yield); 5 | console.log(\\"Yield\\", yield);
6 | } 6 | }
7 | " 7 |"
`; `;
exports[`function-sent.js [meriyah] format 1`] = ` exports[`function-sent.js [meriyah] format 1`] = `
"[4:33]: Expected '(' (4:33) "[4:33]: Expected '(' (4:33)
2 | 2 |
3 | function* generator() { 3 | function* generator() {
> 4 | console.log(\\"Sent\\", function.sent); > 4 | console.log(\\"Sent\\", function.sent);
| ^ | ^
5 | console.log(\\"Yield\\", yield); 5 | console.log(\\"Yield\\", yield);
6 | } 6 | }
7 | " 7 |"
`; `;
exports[`function-sent.js format 1`] = ` exports[`function-sent.js format 1`] = `
@@ -888,14 +888,14 @@ exports[`import-assertions-dynamic.js [espree] format 1`] = `
"Unexpected token , (1:20) "Unexpected token , (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`import-assertions-dynamic.js [meriyah] format 1`] = ` exports[`import-assertions-dynamic.js [meriyah] format 1`] = `
"[1:20]: Expected ')' (1:20) "[1:20]: Expected ')' (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`import-assertions-dynamic.js format 1`] = ` exports[`import-assertions-dynamic.js format 1`] = `
@@ -916,14 +916,14 @@ exports[`import-assertions-static.js [espree] format 1`] = `
"Unexpected token assert (1:31) "Unexpected token assert (1:31)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`import-assertions-static.js [meriyah] format 1`] = ` exports[`import-assertions-static.js [meriyah] format 1`] = `
"[1:36]: Unexpected token: 'identifier' (1:36) "[1:36]: Unexpected token: 'identifier' (1:36)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`import-assertions-static.js format 1`] = ` exports[`import-assertions-static.js format 1`] = `
@@ -1017,11 +1017,11 @@ var profile = (
exports[`logical-assignment-operators.js [meriyah] format 1`] = ` exports[`logical-assignment-operators.js [meriyah] format 1`] = `
"[3:5]: Unexpected token: '=' (3:5) "[3:5]: Unexpected token: '=' (3:5)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators
2 | 2 |
> 3 | a ||= b; > 3 | a ||= b;
| ^ | ^
4 | obj.a.b ||= c; 4 | obj.a.b ||= c;
5 | 5 |
6 | a &&= b;" 6 | a &&= b;"
`; `;
@@ -1056,7 +1056,7 @@ exports[`module-string-names.js [espree] format 1`] = `
> 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\"; > 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\";
| ^ | ^
2 | export { smile as \\"😄\\" } from \\"./emojis.js\\"; 2 | export { smile as \\"😄\\" } from \\"./emojis.js\\";
3 | " 3 |"
`; `;
exports[`module-string-names.js [meriyah] format 1`] = ` exports[`module-string-names.js [meriyah] format 1`] = `
@@ -1064,7 +1064,7 @@ exports[`module-string-names.js [meriyah] format 1`] = `
> 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\"; > 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\";
| ^ | ^
2 | export { smile as \\"😄\\" } from \\"./emojis.js\\"; 2 | export { smile as \\"😄\\" } from \\"./emojis.js\\";
3 | " 3 |"
`; `;
exports[`module-string-names.js format 1`] = ` exports[`module-string-names.js format 1`] = `
@@ -1260,10 +1260,10 @@ try {
exports[`optional-chaining.js [espree] format 1`] = ` exports[`optional-chaining.js [espree] format 1`] = `
"Optional chaining cannot appear in the callee of new expressions (56:21) "Optional chaining cannot appear in the callee of new expressions (56:21)
54 | }; 54 | };
55 | 55 |
> 56 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance > 56 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
| ^ | ^
57 | 57 |
58 | const safe5 = new obj?.qux?.baz(); // undefined 58 | const safe5 = new obj?.qux?.baz(); // undefined
59 | const safe6 = new obj?.foo.bar.qux?.(); // undefined" 59 | const safe6 = new obj?.foo.bar.qux?.(); // undefined"
`; `;
@@ -1271,10 +1271,10 @@ exports[`optional-chaining.js [espree] format 1`] = `
exports[`optional-chaining.js [meriyah] format 1`] = ` exports[`optional-chaining.js [meriyah] format 1`] = `
"[56:22]: Invalid optional chain from new expression (56:22) "[56:22]: Invalid optional chain from new expression (56:22)
54 | }; 54 | };
55 | 55 |
> 56 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance > 56 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
| ^ | ^
57 | 57 |
58 | const safe5 = new obj?.qux?.baz(); // undefined 58 | const safe5 = new obj?.qux?.baz(); // undefined
59 | const safe6 = new obj?.foo.bar.qux?.(); // undefined" 59 | const safe6 = new obj?.foo.bar.qux?.(); // undefined"
`; `;
@@ -1444,22 +1444,22 @@ const ret = delete obj?.foo?.bar?.baz; // true
exports[`partial-application.js [espree] format 1`] = ` exports[`partial-application.js [espree] format 1`] = `
"Unexpected token ? (5:23) "Unexpected token ? (5:23)
3 | function add(x, y) { return x + y; } 3 | function add(x, y) { return x + y; }
4 | 4 |
> 5 | const addOne = add(1, ?); // apply from the left > 5 | const addOne = add(1, ?); // apply from the left
| ^ | ^
6 | addOne(2); // 3 6 | addOne(2); // 3
7 | 7 |
8 | const addTen = add(?, 10); // apply from the right" 8 | const addTen = add(?, 10); // apply from the right"
`; `;
exports[`partial-application.js [meriyah] format 1`] = ` exports[`partial-application.js [meriyah] format 1`] = `
"[5:23]: Unexpected token: '?' (5:23) "[5:23]: Unexpected token: '?' (5:23)
3 | function add(x, y) { return x + y; } 3 | function add(x, y) { return x + y; }
4 | 4 |
> 5 | const addOne = add(1, ?); // apply from the left > 5 | const addOne = add(1, ?); // apply from the left
| ^ | ^
6 | addOne(2); // 3 6 | addOne(2); // 3
7 | 7 |
8 | const addTen = add(?, 10); // apply from the right" 8 | const addTen = add(?, 10); // apply from the right"
`; `;
@@ -1519,7 +1519,7 @@ super.f(?); // partial application allowed for call on |SuperProperty|
exports[`pipeline-operator-fsharp.js [espree] format 1`] = ` exports[`pipeline-operator-fsharp.js [espree] format 1`] = `
"Unexpected token > (5:4) "Unexpected token > (5:4)
3 | 3 |
4 | promise 4 | promise
> 5 | |> await > 5 | |> await
| ^ | ^
@@ -1530,7 +1530,7 @@ exports[`pipeline-operator-fsharp.js [espree] format 1`] = `
exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = ` exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = `
"[5:4]: Unexpected token: '>' (5:4) "[5:4]: Unexpected token: '>' (5:4)
3 | 3 |
4 | promise 4 | promise
> 5 | |> await > 5 | |> await
| ^ | ^
@@ -1617,7 +1617,7 @@ let newScore = boundScore(0, 100, add(7, double(person.score)));
exports[`pipeline-operator-minimal.js [espree] format 1`] = ` exports[`pipeline-operator-minimal.js [espree] format 1`] = `
"Identifier 'result' has already been declared (7:5) "Identifier 'result' has already been declared (7:5)
5 | result //=> \\"Hello, hello!\\" 5 | result //=> \\"Hello, hello!\\"
6 | 6 |
> 7 | let result = \\"hello\\" > 7 | let result = \\"hello\\"
| ^ | ^
8 | |> doubleSay 8 | |> doubleSay
@@ -1627,13 +1627,13 @@ exports[`pipeline-operator-minimal.js [espree] format 1`] = `
exports[`pipeline-operator-minimal.js [meriyah] format 1`] = ` exports[`pipeline-operator-minimal.js [meriyah] format 1`] = `
"[8:4]: Unexpected token: '>' (8:4) "[8:4]: Unexpected token: '>' (8:4)
6 | 6 |
7 | let result = \\"hello\\" 7 | let result = \\"hello\\"
> 8 | |> doubleSay > 8 | |> doubleSay
| ^ | ^
9 | |> capitalize 9 | |> capitalize
10 | |> exclaim; 10 | |> exclaim;
11 | " 11 |"
`; `;
exports[`pipeline-operator-minimal.js format 1`] = ` exports[`pipeline-operator-minimal.js format 1`] = `
@@ -1671,7 +1671,7 @@ result; //=> "Hello, hello!"
exports[`pipeline-operator-smart.js [espree] format 1`] = ` exports[`pipeline-operator-smart.js [espree] format 1`] = `
"Unexpected token > (5:2) "Unexpected token > (5:2)
3 | 3 |
4 | value 4 | value
> 5 | |> await # > 5 | |> await #
| ^ | ^
@@ -1682,7 +1682,7 @@ exports[`pipeline-operator-smart.js [espree] format 1`] = `
exports[`pipeline-operator-smart.js [meriyah] format 1`] = ` exports[`pipeline-operator-smart.js [meriyah] format 1`] = `
"[5:2]: Unexpected token: '>' (5:2) "[5:2]: Unexpected token: '>' (5:2)
3 | 3 |
4 | value 4 | value
> 5 | |> await # > 5 | |> await #
| ^ | ^
@@ -1731,11 +1731,11 @@ value
exports[`private-fields-in-in.js [espree] format 1`] = ` exports[`private-fields-in-in.js [espree] format 1`] = `
"Unexpected character '#' (4:3) "Unexpected character '#' (4:3)
2 | 2 |
3 | class C { 3 | class C {
> 4 | #brand; > 4 | #brand;
| ^ | ^
5 | 5 |
6 | static isC(obj) { 6 | static isC(obj) {
7 | try {" 7 | try {"
`; `;
@@ -1864,11 +1864,11 @@ class C {
exports[`private-methods.js [espree] format 1`] = ` exports[`private-methods.js [espree] format 1`] = `
"Unexpected character '#' (6:3) "Unexpected character '#' (6:3)
4 | 4 |
5 | class Counter extends HTMLElement { 5 | class Counter extends HTMLElement {
> 6 | #xValue = 0; > 6 | #xValue = 0;
| ^ | ^
7 | 7 |
8 | get #x() { return this.#xValue; } 8 | get #x() { return this.#xValue; }
9 | set #x(value) {" 9 | set #x(value) {"
`; `;
@@ -1970,14 +1970,14 @@ exports[`record-tuple-tuple.js [espree] format 1`] = `
"Unexpected character '#' (1:16) "Unexpected character '#' (1:16)
> 1 | const tuple1 = #[1, 2, 3]; > 1 | const tuple1 = #[1, 2, 3];
| ^ | ^
2 | " 2 |"
`; `;
exports[`record-tuple-tuple.js [meriyah] format 1`] = ` exports[`record-tuple-tuple.js [meriyah] format 1`] = `
"[1:16]: '#' not followed by identifier (1:16) "[1:16]: '#' not followed by identifier (1:16)
> 1 | const tuple1 = #[1, 2, 3]; > 1 | const tuple1 = #[1, 2, 3];
| ^ | ^
2 | " 2 |"
`; `;
exports[`record-tuple-tuple.js format 1`] = ` exports[`record-tuple-tuple.js format 1`] = `
@@ -1997,23 +1997,23 @@ const tuple1 = #[1, 2, 3];
exports[`throw-expressions.js [espree] format 1`] = ` exports[`throw-expressions.js [espree] format 1`] = `
"Unexpected token throw (3:23) "Unexpected token throw (3:23)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions
2 | 2 |
> 3 | function test(param = throw new Error('required!')) { > 3 | function test(param = throw new Error('required!')) {
| ^ | ^
4 | const test = param === true || throw new Error('Falsy!'); 4 | const test = param === true || throw new Error('Falsy!');
5 | } 5 | }
6 | " 6 |"
`; `;
exports[`throw-expressions.js [meriyah] format 1`] = ` exports[`throw-expressions.js [meriyah] format 1`] = `
"[3:27]: Unexpected token: 'throw' (3:27) "[3:27]: Unexpected token: 'throw' (3:27)
1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions 1 | // https://babeljs.io/docs/en/babel-plugin-proposal-throw-expressions
2 | 2 |
> 3 | function test(param = throw new Error('required!')) { > 3 | function test(param = throw new Error('required!')) {
| ^ | ^
4 | const test = param === true || throw new Error('Falsy!'); 4 | const test = param === true || throw new Error('Falsy!');
5 | } 5 | }
6 | " 6 |"
`; `;
exports[`throw-expressions.js format 1`] = ` exports[`throw-expressions.js format 1`] = `
@@ -2041,19 +2041,19 @@ function test(param = throw new Error("required!")) {
exports[`typescript.js [espree] format 1`] = ` exports[`typescript.js [espree] format 1`] = `
"Unexpected token : (3:8) "Unexpected token : (3:8)
1 | // https://babeljs.io/docs/en/babel-preset-typescript 1 | // https://babeljs.io/docs/en/babel-preset-typescript
2 | 2 |
> 3 | const x: number = 0; > 3 | const x: number = 0;
| ^ | ^
4 | " 4 |"
`; `;
exports[`typescript.js [meriyah] format 1`] = ` exports[`typescript.js [meriyah] format 1`] = `
"[3:8]: Missing initializer in const declaration (3:8) "[3:8]: Missing initializer in const declaration (3:8)
1 | // https://babeljs.io/docs/en/babel-preset-typescript 1 | // https://babeljs.io/docs/en/babel-preset-typescript
2 | 2 |
> 3 | const x: number = 0; > 3 | const x: number = 0;
| ^ | ^
4 | " 4 |"
`; `;
exports[`typescript.js format 1`] = ` exports[`typescript.js format 1`] = `
@@ -2077,22 +2077,22 @@ const x: number = 0;
exports[`v8intrinsic.js [espree] format 1`] = ` exports[`v8intrinsic.js [espree] format 1`] = `
"Unexpected token % (3:1) "Unexpected token % (3:1)
1 | // https://github.com/babel/babel/pull/10148 1 | // https://github.com/babel/babel/pull/10148
2 | 2 |
> 3 | %DebugPrint(foo); > 3 | %DebugPrint(foo);
| ^ | ^
4 | 4 |
5 | 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"
`; `;
exports[`v8intrinsic.js [meriyah] format 1`] = ` exports[`v8intrinsic.js [meriyah] format 1`] = `
"[3:1]: Unexpected token: '%' (3:1) "[3:1]: Unexpected token: '%' (3:1)
1 | // https://github.com/babel/babel/pull/10148 1 | // https://github.com/babel/babel/pull/10148
2 | 2 |
> 3 | %DebugPrint(foo); > 3 | %DebugPrint(foo);
| ^ | ^
4 | 4 |
5 | 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"
`; `;
@@ -744,7 +744,7 @@ exports[`like-regexp.js [espree] format 1`] = `
"Unterminated regular expression (1:19) "Unterminated regular expression (1:19)
> 1 | 0 ? a : { b : 1 }/2; > 1 | 0 ? a : { b : 1 }/2;
| ^ | ^
2 | " 2 |"
`; `;
exports[`like-regexp.js format 1`] = ` exports[`like-regexp.js format 1`] = `
@@ -7,7 +7,7 @@ exports[`await.js [espree] format 1`] = `
> 3 | return (await request)::doSyncThing(); > 3 | return (await request)::doSyncThing();
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`await.js [meriyah] format 1`] = ` exports[`await.js [meriyah] format 1`] = `
@@ -17,7 +17,7 @@ exports[`await.js [meriyah] format 1`] = `
> 3 | return (await request)::doSyncThing(); > 3 | return (await request)::doSyncThing();
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`await.js - {"semi":false} [espree] format 1`] = ` exports[`await.js - {"semi":false} [espree] format 1`] = `
@@ -27,7 +27,7 @@ exports[`await.js - {"semi":false} [espree] format 1`] = `
> 3 | return (await request)::doSyncThing(); > 3 | return (await request)::doSyncThing();
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`await.js - {"semi":false} [meriyah] format 1`] = ` exports[`await.js - {"semi":false} [meriyah] format 1`] = `
@@ -37,7 +37,7 @@ exports[`await.js - {"semi":false} [meriyah] format 1`] = `
> 3 | return (await request)::doSyncThing(); > 3 | return (await request)::doSyncThing();
| ^ | ^
4 | }; 4 | };
5 | " 5 |"
`; `;
exports[`await.js - {"semi":false} format 1`] = ` exports[`await.js - {"semi":false} format 1`] = `
@@ -27,13 +27,13 @@ rangeStart: 11
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 |  1 | 
2 | 2 |
> 3 | class a { > 3 | class a {
| ^^^^ | ^^^^
> 4 | b( <|> ) {} > 4 | b( <|> ) {}
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
5 | } 5 | }
6 | 6 |
7 | let x 7 | let x
=====================================output===================================== =====================================output=====================================
 
@@ -55,15 +55,15 @@ rangeStart: 11
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 |  1 | 
2 | 2 |
> 3 | class a { > 3 | class a {
| ^^^^ | ^^^^
> 4 | b( ) {} > 4 | b( ) {}
| ^^^^^^^^^^^ | ^^^^^^^^^^^
5 | } 5 | }
6 | 6 |
7 | let x 7 | let x
8 | 8 |
=====================================output===================================== =====================================output=====================================
 
@@ -86,16 +86,16 @@ rangeStart: 12
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 |  1 | 
2 | 2 |
3 | 3 |
> 4 | class a { > 4 | class a {
| ^^^^ | ^^^^
> 5 | b( <|> ) {} > 5 | b( <|> ) {}
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
6 | } 6 | }
7 | 7 |
8 | let x 8 | let x
9 | 9 |
=====================================output===================================== =====================================output=====================================
 
@@ -5,7 +5,7 @@ exports[`import.js [espree] format 1`] = `
> 1 | import(/* comment */) > 1 | import(/* comment */)
| ^ | ^
2 | new import(/* comment */) 2 | new import(/* comment */)
3 | " 3 |"
`; `;
exports[`import.js [flow] format 1`] = ` exports[`import.js [flow] format 1`] = `
@@ -13,7 +13,7 @@ exports[`import.js [flow] format 1`] = `
> 1 | import(/* comment */) > 1 | import(/* comment */)
| ^ | ^
2 | new import(/* comment */) 2 | new import(/* comment */)
3 | " 3 |"
`; `;
exports[`import.js [meriyah] format 1`] = ` exports[`import.js [meriyah] format 1`] = `
@@ -21,7 +21,7 @@ exports[`import.js [meriyah] format 1`] = `
> 1 | import(/* comment */) > 1 | import(/* comment */)
| ^ | ^
2 | new import(/* comment */) 2 | new import(/* comment */)
3 | " 3 |"
`; `;
exports[`import.js [typescript] format 1`] = ` exports[`import.js [typescript] format 1`] = `
@@ -29,7 +29,7 @@ exports[`import.js [typescript] format 1`] = `
1 | import(/* comment */) 1 | import(/* comment */)
> 2 | new import(/* comment */) > 2 | new import(/* comment */)
| ^ | ^
3 | " 3 |"
`; `;
exports[`import.js format 1`] = ` exports[`import.js format 1`] = `
@@ -3,37 +3,37 @@
exports[`optional-chaining.js [espree] format 1`] = ` exports[`optional-chaining.js [espree] format 1`] = `
"Unexpected character '#' (3:13) "Unexpected character '#' (3:13)
1 | // https://github.com/babel/babel/pull/11669 1 | // https://github.com/babel/babel/pull/11669
2 | 2 |
> 3 | delete obj?.#x.a > 3 | delete obj?.#x.a
| ^ | ^
4 | " 4 |"
`; `;
exports[`optional-chaining.js [meriyah] format 1`] = ` exports[`optional-chaining.js [meriyah] format 1`] = `
"[3:13]: Dot property must be an identifier (3:13) "[3:13]: Dot property must be an identifier (3:13)
1 | // https://github.com/babel/babel/pull/11669 1 | // https://github.com/babel/babel/pull/11669
2 | 2 |
> 3 | delete obj?.#x.a > 3 | delete obj?.#x.a
| ^ | ^
4 | " 4 |"
`; `;
exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = ` exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = `
"Unexpected character '#' (3:13) "Unexpected character '#' (3:13)
1 | // https://github.com/babel/babel/pull/11669 1 | // https://github.com/babel/babel/pull/11669
2 | 2 |
> 3 | delete obj?.#x.a > 3 | delete obj?.#x.a
| ^ | ^
4 | " 4 |"
`; `;
exports[`optional-chaining.js - {"semi":false} [meriyah] format 1`] = ` exports[`optional-chaining.js - {"semi":false} [meriyah] format 1`] = `
"[3:13]: Dot property must be an identifier (3:13) "[3:13]: Dot property must be an identifier (3:13)
1 | // https://github.com/babel/babel/pull/11669 1 | // https://github.com/babel/babel/pull/11669
2 | 2 |
> 3 | delete obj?.#x.a > 3 | delete obj?.#x.a
| ^ | ^
4 | " 4 |"
`; `;
exports[`optional-chaining.js - {"semi":false} format 1`] = ` exports[`optional-chaining.js - {"semi":false} format 1`] = `
@@ -78,7 +78,7 @@ exports[`private_fields.js [espree] format 1`] = `
> 1 | class A { #x; #y; } > 1 | class A { #x; #y; }
| ^ | ^
2 | class B { #x = 0; #y = 1; } 2 | class B { #x = 0; #y = 1; }
3 | 3 |
4 | class C {" 4 | class C {"
`; `;
@@ -87,7 +87,7 @@ exports[`private_fields.js - {"semi":false} [espree] format 1`] = `
> 1 | class A { #x; #y; } > 1 | class A { #x; #y; }
| ^ | ^
2 | class B { #x = 0; #y = 1; } 2 | class B { #x = 0; #y = 1; }
3 | 3 |
4 | class C {" 4 | class C {"
`; `;
@@ -4,14 +4,14 @@ exports[`example.js [espree] format 1`] = `
"'super' keyword outside a method (1:1) "'super' keyword outside a method (1:1)
> 1 | super(); > 1 | super();
| ^ | ^
2 | " 2 |"
`; `;
exports[`example.js [meriyah] format 1`] = ` exports[`example.js [meriyah] format 1`] = `
"[1:6]: Calls to super must be in the \\"constructor\\" method of a class expression or class declaration that has a superclass (1:6) "[1:6]: Calls to super must be in the \\"constructor\\" method of a class expression or class declaration that has a superclass (1:6)
> 1 | super(); > 1 | super();
| ^ | ^
2 | " 2 |"
`; `;
exports[`example.js format 1`] = ` exports[`example.js format 1`] = `
@@ -7,7 +7,7 @@ exports[`pipeline_own_line.js [espree] format 1`] = `
> 4 | |> x > 4 | |> x
| ^ | ^
5 | } 5 | }
6 | 6 |
7 | bifornCringerMoshedPerplexSawder(" 7 | bifornCringerMoshedPerplexSawder("
`; `;
@@ -18,7 +18,7 @@ exports[`pipeline_own_line.js [meriyah] format 1`] = `
> 4 | |> x > 4 | |> x
| ^ | ^
5 | } 5 | }
6 | 6 |
7 | bifornCringerMoshedPerplexSawder(" 7 | bifornCringerMoshedPerplexSawder("
`; `;
@@ -315,10 +315,10 @@ rangeStart: 31
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | thisWontBeFormatted ( 1 ,3) 1 | thisWontBeFormatted ( 1 ,3)
2 | 2 |
> 3 | thisWillBeFormatted <|> (2 ,3, ) > 3 | thisWillBeFormatted <|> (2 ,3, )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 | > 4 |
| ^ | ^
> 5 | thisWontBeFormatted (2, 90 ,) > 5 | thisWontBeFormatted (2, 90 ,)
| ^ | ^
@@ -343,10 +343,10 @@ rangeStart: 31
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | thisWontBeFormatted ( 1 ,3) 1 | thisWontBeFormatted ( 1 ,3)
2 | 2 |
> 3 | thisWillBeFormatted (2 ,3<|>, ) > 3 | thisWillBeFormatted (2 ,3<|>, )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 | > 4 |
| ^ | ^
> 5 | thisWontBeFormatted (2, 90 ,) > 5 | thisWontBeFormatted (2, 90 ,)
| ^ | ^
@@ -371,10 +371,10 @@ rangeStart: 31
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | thisWontBeFormatted ( 1 ,3) 1 | thisWontBeFormatted ( 1 ,3)
2 | 2 |
> 3 | thisWillBeFormatted (2 ,3, <|> ) > 3 | thisWillBeFormatted (2 ,3, <|> )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 | > 4 |
| ^ | ^
> 5 | thisWontBeFormatted (2, 90 ,) > 5 | thisWontBeFormatted (2, 90 ,)
| ^ | ^
@@ -399,11 +399,11 @@ rangeStart: 30
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | thisWontBeFormatted <|> ( 1 ,3) 1 | thisWontBeFormatted <|> ( 1 ,3)
> 2 | > 2 |
| ^ | ^
> 3 | thisWillBeFormatted (2 ,3, ) > 3 | thisWillBeFormatted (2 ,3, )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 | > 4 |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 5 | thisWontBeFormatted (2, 90 ,) > 5 | thisWontBeFormatted (2, 90 ,)
| ^ | ^
@@ -428,10 +428,10 @@ rangeStart: 31
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | thisWontBeFormatted ( 1 ,3) 1 | thisWontBeFormatted ( 1 ,3)
2 | 2 |
> 3 | thisWillBeFormatted (2 ,3, ) > 3 | thisWillBeFormatted (2 ,3, )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 | > 4 |
| ^ | ^
> 5 | thisWontBeFormatted (2, 9<|>0 ,) > 5 | thisWontBeFormatted (2, 9<|>0 ,)
| ^^^^ | ^^^^
@@ -17,7 +17,7 @@ exports[`comments.js [meriyah] format 1`] = `
> 4 | static property: Array<string>; > 4 | static property: Array<string>;
| ^ | ^
5 | } 5 | }
6 | " 6 |"
`; `;
exports[`comments.js format 1`] = ` exports[`comments.js format 1`] = `
@@ -4,18 +4,18 @@ exports[`after_export.js [espree] format 1`] = `
"Unexpected character '@' (1:8) "Unexpected character '@' (1:8)
> 1 | export @decorator class Foo {} > 1 | export @decorator class Foo {}
| ^ | ^
2 | 2 |
3 | export default @decorator class {} 3 | export default @decorator class {}
4 | " 4 |"
`; `;
exports[`after_export.js [meriyah] format 1`] = ` exports[`after_export.js [meriyah] format 1`] = `
"[1:8]: Unexpected token: '@' (1:8) "[1:8]: Unexpected token: '@' (1:8)
> 1 | export @decorator class Foo {} > 1 | export @decorator class Foo {}
| ^ | ^
2 | 2 |
3 | export default @decorator class {} 3 | export default @decorator class {}
4 | " 4 |"
`; `;
exports[`after_export.js format 1`] = ` exports[`after_export.js format 1`] = `
@@ -45,7 +45,7 @@ exports[`before_export.js [espree] format 1`] = `
> 1 | @decorator > 1 | @decorator
| ^ | ^
2 | export class Foo {} 2 | export class Foo {}
3 | 3 |
4 | @decorator" 4 | @decorator"
`; `;
@@ -4,9 +4,9 @@ exports[`classes.js [espree] format 1`] = `
"Unexpected character '@' (1:1) "Unexpected character '@' (1:1)
> 1 | @deco class Foo {} > 1 | @deco class Foo {}
| ^ | ^
2 | 2 |
3 | @deco export class Bar {} 3 | @deco export class Bar {}
4 | " 4 |"
`; `;
exports[`classes.js format 1`] = ` exports[`classes.js format 1`] = `
@@ -59,7 +59,7 @@ const bar =
exports[`comments.js [espree] format 1`] = ` exports[`comments.js [espree] format 1`] = `
"Unexpected character '@' (3:1) "Unexpected character '@' (3:1)
1 | var x = 100 1 | var x = 100
2 | 2 |
> 3 | @Hello({ > 3 | @Hello({
| ^ | ^
4 | a: 'a', // Comment is in the wrong place 4 | a: 'a', // Comment is in the wrong place
@@ -140,12 +140,12 @@ export class Bar {}
exports[`methods.js [espree] format 1`] = ` exports[`methods.js [espree] format 1`] = `
"Unexpected character '@' (3:3) "Unexpected character '@' (3:3)
1 | 1 |
2 | class Yo { 2 | class Yo {
> 3 | @foo(\\"hello\\") > 3 | @foo(\\"hello\\")
| ^ | ^
4 | async plop() {} 4 | async plop() {}
5 | 5 |
6 | @anotherDecoratorWithALongName(\\"and a very long string as a first argument\\")" 6 | @anotherDecoratorWithALongName(\\"and a very long string as a first argument\\")"
`; `;
@@ -184,7 +184,7 @@ class Yo {
exports[`mixed.js [espree] format 1`] = ` exports[`mixed.js [espree] format 1`] = `
"Unexpected character '@' (3:1) "Unexpected character '@' (3:1)
1 | // https://github.com/prettier/prettier/issues/6747 1 | // https://github.com/prettier/prettier/issues/6747
2 | 2 |
> 3 | @foo > 3 | @foo
| ^ | ^
4 | export default class MyComponent { 4 | export default class MyComponent {
@@ -221,22 +221,22 @@ export default class MyComponent {
exports[`mobx.js [espree] format 1`] = ` exports[`mobx.js [espree] format 1`] = `
"Unexpected character '@' (3:1) "Unexpected character '@' (3:1)
1 | import {observable} from \\"mobx\\"; 1 | import {observable} from \\"mobx\\";
2 | 2 |
> 3 | @observer class OrderLine { > 3 | @observer class OrderLine {
| ^ | ^
4 | @observable price:number = 0; 4 | @observable price:number = 0;
5 | @observable amount:number = 1; 5 | @observable amount:number = 1;
6 | " 6 |"
`; `;
exports[`mobx.js [meriyah] format 1`] = ` exports[`mobx.js [meriyah] format 1`] = `
"[4:20]: Unexpected token: ':' (4:20) "[4:20]: Unexpected token: ':' (4:20)
2 | 2 |
3 | @observer class OrderLine { 3 | @observer class OrderLine {
> 4 | @observable price:number = 0; > 4 | @observable price:number = 0;
| ^ | ^
5 | @observable amount:number = 1; 5 | @observable amount:number = 1;
6 | 6 |
7 | constructor(price) {" 7 | constructor(price) {"
`; `;
@@ -438,7 +438,7 @@ exports[`parens.js [espree] format 1`] = `
| ^ | ^
3 | x 3 | x
4 | } 4 | }
5 | " 5 |"
`; `;
exports[`parens.js format 1`] = ` exports[`parens.js format 1`] = `
@@ -466,7 +466,7 @@ exports[`redux.js [espree] format 1`] = `
> 1 | @connect(mapStateToProps, mapDispatchToProps) > 1 | @connect(mapStateToProps, mapDispatchToProps)
| ^ | ^
2 | export class MyApp extends React.Component {} 2 | export class MyApp extends React.Component {}
3 | 3 |
4 | @connect(state => ({ todos: state.todos }))" 4 | @connect(state => ({ todos: state.todos }))"
`; `;
@@ -4,28 +4,28 @@ exports[`assertions.js [espree] format 1`] = `
"Unexpected token , (1:20) "Unexpected token , (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`assertions.js [flow] format 1`] = ` exports[`assertions.js [flow] format 1`] = `
"Unexpected token \`,\`, expected the token \`)\` (1:20) "Unexpected token \`,\`, expected the token \`)\` (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`assertions.js [meriyah] format 1`] = ` exports[`assertions.js [meriyah] format 1`] = `
"[1:20]: Expected ')' (1:20) "[1:20]: Expected ')' (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`assertions.js [typescript] format 1`] = ` exports[`assertions.js [typescript] format 1`] = `
"Dynamic import must have one specifier as an argument. (1:8) "Dynamic import must have one specifier as an argument. (1:8)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`assertions.js format 1`] = ` exports[`assertions.js format 1`] = `
+48 -48
View File
@@ -82,14 +82,14 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( <|> ) {}<LF> > 4 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x 7 | let x
=====================================output===================================== =====================================output=====================================
<LF> <LF>
@@ -112,14 +112,14 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( <|> ) {}<LF> > 4 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x 7 | let x
=====================================output===================================== =====================================output=====================================
<CR> <CR>
@@ -142,14 +142,14 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( <|> ) {}<LF> > 4 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x 7 | let x
=====================================output===================================== =====================================output=====================================
<CRLF> <CRLF>
@@ -172,14 +172,14 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( <|> ) {}<LF> > 4 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x 7 | let x
=====================================output===================================== =====================================output=====================================
<LF> <LF>
@@ -201,16 +201,16 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( ) {}<LF> > 4 | b( ) {}<LF>
| ^^^^^^^^^^^<LF> | ^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x<LF> 7 | let x<LF>
8 | 8 |
=====================================output===================================== =====================================output=====================================
<LF> <LF>
<LF> <LF>
@@ -232,16 +232,16 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( ) {}<LF> > 4 | b( ) {}<LF>
| ^^^^^^^^^^^<LF> | ^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x<LF> 7 | let x<LF>
8 | 8 |
=====================================output===================================== =====================================output=====================================
<CR> <CR>
<CR> <CR>
@@ -263,16 +263,16 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( ) {}<LF> > 4 | b( ) {}<LF>
| ^^^^^^^^^^^<LF> | ^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x<LF> 7 | let x<LF>
8 | 8 |
=====================================output===================================== =====================================output=====================================
<CRLF> <CRLF>
<CRLF> <CRLF>
@@ -294,16 +294,16 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
> 3 | class a {<LF> > 3 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 4 | b( ) {}<LF> > 4 | b( ) {}<LF>
| ^^^^^^^^^^^<LF> | ^^^^^^^^^^^<LF>
5 | }<LF> 5 | }<LF>
6 | <LF> 6 |<LF>
7 | let x<LF> 7 | let x<LF>
8 | 8 |
=====================================output===================================== =====================================output=====================================
<LF> <LF>
<LF> <LF>
@@ -326,17 +326,17 @@ rangeEnd: 27
rangeStart: 11 rangeStart: 11
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
3 | <LF> 3 |<LF>
> 4 | class a {<LF> > 4 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 5 | b( <|> ) {}<LF> > 5 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
6 | }<LF> 6 | }<LF>
7 | <LF> 7 |<LF>
8 | let x <LF> 8 | let x <LF>
9 | 9 |
=====================================output===================================== =====================================output=====================================
<LF> <LF>
<LF> <LF>
@@ -360,17 +360,17 @@ rangeEnd: 27
rangeStart: 11 rangeStart: 11
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
3 | <LF> 3 |<LF>
> 4 | class a {<LF> > 4 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 5 | b( <|> ) {}<LF> > 5 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
6 | }<LF> 6 | }<LF>
7 | <LF> 7 |<LF>
8 | let x <LF> 8 | let x <LF>
9 | 9 |
=====================================output===================================== =====================================output=====================================
<CR> <CR>
<CR> <CR>
@@ -394,17 +394,17 @@ rangeEnd: 27
rangeStart: 11 rangeStart: 11
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
3 | <LF> 3 |<LF>
> 4 | class a {<LF> > 4 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 5 | b( <|> ) {}<LF> > 5 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
6 | }<LF> 6 | }<LF>
7 | <LF> 7 |<LF>
8 | let x <LF> 8 | let x <LF>
9 | 9 |
=====================================output===================================== =====================================output=====================================
<CRLF> <CRLF>
<CRLF> <CRLF>
@@ -428,17 +428,17 @@ rangeEnd: 27
rangeStart: 11 rangeStart: 11
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | <LF> 1 |<LF>
2 | <LF> 2 |<LF>
3 | <LF> 3 |<LF>
> 4 | class a {<LF> > 4 | class a {<LF>
| ^^^^<LF> | ^^^^<LF>
> 5 | b( <|> ) {}<LF> > 5 | b( <|> ) {}<LF>
| ^^^^^^^^^^^^^^<LF> | ^^^^^^^^^^^^^^<LF>
6 | }<LF> 6 | }<LF>
7 | <LF> 7 |<LF>
8 | let x <LF> 8 | let x <LF>
9 | 9 |
=====================================output===================================== =====================================output=====================================
<LF> <LF>
<LF> <LF>
@@ -3,23 +3,23 @@
exports[`test.js [espree] format 1`] = ` exports[`test.js [espree] format 1`] = `
"Unexpected token a (3:8) "Unexpected token a (3:8)
1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\"; 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\";
2 | 2 |
> 3 | export a,{b} from \\"./baz\\"; > 3 | export a,{b} from \\"./baz\\";
| ^ | ^
4 | 4 |
5 | export * as ns from \\"mod\\"; 5 | export * as ns from \\"mod\\";
6 | " 6 |"
`; `;
exports[`test.js [meriyah] format 1`] = ` exports[`test.js [meriyah] format 1`] = `
"[3:8]: Unexpected token: 'identifier' (3:8) "[3:8]: Unexpected token: 'identifier' (3:8)
1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\"; 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\";
2 | 2 |
> 3 | export a,{b} from \\"./baz\\"; > 3 | export a,{b} from \\"./baz\\";
| ^ | ^
4 | 4 |
5 | export * as ns from \\"mod\\"; 5 | export * as ns from \\"mod\\";
6 | " 6 |"
`; `;
exports[`test.js format 1`] = ` exports[`test.js format 1`] = `
@@ -4,14 +4,14 @@ exports[`dynamic-import.js [espree] format 1`] = `
"Unexpected token , (1:20) "Unexpected token , (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`dynamic-import.js [meriyah] format 1`] = ` exports[`dynamic-import.js [meriyah] format 1`] = `
"[1:20]: Expected ')' (1:20) "[1:20]: Expected ')' (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`dynamic-import.js format 1`] = ` exports[`dynamic-import.js format 1`] = `
@@ -34,7 +34,7 @@ exports[`empty.js [espree] format 1`] = `
> 2 | export * as bar from \\"bar.json\\" assert { } > 2 | export * as bar from \\"bar.json\\" assert { }
| ^ | ^
3 | export * as baz from \\"baz.json\\" assert { /* comment */ } 3 | export * as baz from \\"baz.json\\" assert { /* comment */ }
4 | 4 |
5 | import * as foo from \\"foo.json\\"" 5 | import * as foo from \\"foo.json\\""
`; `;
@@ -44,7 +44,7 @@ exports[`empty.js [meriyah] format 1`] = `
> 2 | export * as bar from \\"bar.json\\" assert { } > 2 | export * as bar from \\"bar.json\\" assert { }
| ^ | ^
3 | export * as baz from \\"baz.json\\" assert { /* comment */ } 3 | export * as baz from \\"baz.json\\" assert { /* comment */ }
4 | 4 |
5 | import * as foo from \\"foo.json\\"" 5 | import * as foo from \\"foo.json\\""
`; `;
@@ -77,14 +77,14 @@ exports[`multi-types.js [espree] format 1`] = `
"Unexpected token assert (1:31) "Unexpected token assert (1:31)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`multi-types.js [meriyah] format 1`] = ` exports[`multi-types.js [meriyah] format 1`] = `
"[1:36]: Unexpected token: 'identifier' (1:36) "[1:36]: Unexpected token: 'identifier' (1:36)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`multi-types.js format 1`] = ` exports[`multi-types.js format 1`] = `
@@ -123,7 +123,7 @@ exports[`re-export.js [espree] format 1`] = `
| ^ | ^
2 | export * from \\"foo.json\\" assert { type: \\"json\\" }; 2 | export * from \\"foo.json\\" assert { type: \\"json\\" };
3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" }; 3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" };
4 | " 4 |"
`; `;
exports[`re-export.js [meriyah] format 1`] = ` exports[`re-export.js [meriyah] format 1`] = `
@@ -132,7 +132,7 @@ exports[`re-export.js [meriyah] format 1`] = `
| ^ | ^
2 | export * from \\"foo.json\\" assert { type: \\"json\\" }; 2 | export * from \\"foo.json\\" assert { type: \\"json\\" };
3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" }; 3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" };
4 | " 4 |"
`; `;
exports[`re-export.js format 1`] = ` exports[`re-export.js format 1`] = `
@@ -157,14 +157,14 @@ exports[`static-import.js [espree] format 1`] = `
"Unexpected token assert (1:31) "Unexpected token assert (1:31)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`static-import.js [meriyah] format 1`] = ` exports[`static-import.js [meriyah] format 1`] = `
"[1:36]: Unexpected token: 'identifier' (1:36) "[1:36]: Unexpected token: 'identifier' (1:36)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`static-import.js format 1`] = ` exports[`static-import.js format 1`] = `
@@ -185,14 +185,14 @@ exports[`without-from.js [espree] format 1`] = `
"Unexpected token assert (1:14) "Unexpected token assert (1:14)
> 1 | import \\"foo\\" assert { type: \\"json\\" } > 1 | import \\"foo\\" assert { type: \\"json\\" }
| ^ | ^
2 | " 2 |"
`; `;
exports[`without-from.js [meriyah] format 1`] = ` exports[`without-from.js [meriyah] format 1`] = `
"[1:19]: Unexpected token: 'identifier' (1:19) "[1:19]: Unexpected token: 'identifier' (1:19)
> 1 | import \\"foo\\" assert { type: \\"json\\" } > 1 | import \\"foo\\" assert { type: \\"json\\" }
| ^ | ^
2 | " 2 |"
`; `;
exports[`without-from.js format 1`] = ` exports[`without-from.js format 1`] = `
@@ -4,14 +4,14 @@ exports[`dynamic-import.js - {"bracketSpacing":false} [espree] format 1`] = `
"Unexpected token , (1:20) "Unexpected token , (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`dynamic-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` exports[`dynamic-import.js - {"bracketSpacing":false} [meriyah] format 1`] = `
"[1:20]: Expected ')' (1:20) "[1:20]: Expected ')' (1:20)
> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); > 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } });
| ^ | ^
2 | " 2 |"
`; `;
exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = ` exports[`dynamic-import.js - {"bracketSpacing":false} format 1`] = `
@@ -59,14 +59,14 @@ exports[`re-export.js - {"bracketSpacing":false} [espree] format 1`] = `
"Unexpected token assert (1:33) "Unexpected token assert (1:33)
> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; > 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = ` exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = `
"[1:38]: Unexpected token: 'identifier' (1:38) "[1:38]: Unexpected token: 'identifier' (1:38)
> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; > 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`re-export.js - {"bracketSpacing":false} format 1`] = ` exports[`re-export.js - {"bracketSpacing":false} format 1`] = `
@@ -88,14 +88,14 @@ exports[`static-import.js - {"bracketSpacing":false} [espree] format 1`] = `
"Unexpected token assert (1:31) "Unexpected token assert (1:31)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = `
"[1:36]: Unexpected token: 'identifier' (1:36) "[1:36]: Unexpected token: 'identifier' (1:36)
> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; > 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`static-import.js - {"bracketSpacing":false} format 1`] = ` exports[`static-import.js - {"bracketSpacing":false} format 1`] = `
@@ -4,7 +4,7 @@ exports[`duplicate_bindings.js [espree] format 1`] = `
"Identifier 'A' has already been declared (1:19) "Identifier 'A' has already been declared (1:19)
> 1 | class A{} class A{} > 1 | class A{} class A{}
| ^ | ^
2 | " 2 |"
`; `;
exports[`duplicate_bindings.js format 1`] = ` exports[`duplicate_bindings.js format 1`] = `
@@ -4,21 +4,21 @@ exports[`invalid-exponent.js [espree] format 1`] = `
"Invalid number (1:1) "Invalid number (1:1)
> 1 | 12.3e > 1 | 12.3e
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-exponent.js [meriyah] format 1`] = ` exports[`invalid-exponent.js [meriyah] format 1`] = `
"[1:5]: Non-number found after exponent indicator (1:5) "[1:5]: Non-number found after exponent indicator (1:5)
> 1 | 12.3e > 1 | 12.3e
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-exponent.js [typescript] format 1`] = ` exports[`invalid-exponent.js [typescript] format 1`] = `
"Digit expected. (1:6) "Digit expected. (1:6)
> 1 | 12.3e > 1 | 12.3e
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-exponent.js format 1`] = ` exports[`invalid-exponent.js format 1`] = `
@@ -42,7 +42,7 @@ exports[`number.js [espree] format 1`] = `
| ^ | ^
3 | return (100).toString(); 3 | return (100).toString();
4 | } 4 | }
5 | " 5 |"
`; `;
exports[`number.js [meriyah] format 1`] = ` exports[`number.js [meriyah] format 1`] = `
@@ -52,7 +52,7 @@ exports[`number.js [meriyah] format 1`] = `
| ^ | ^
3 | return (100).toString(); 3 | return (100).toString();
4 | } 4 | }
5 | " 5 |"
`; `;
exports[`number.js format 1`] = ` exports[`number.js format 1`] = `
@@ -4,14 +4,14 @@ exports[`invalid.js [espree] format 1`] = `
"Assigning to rvalue (1:21) "Assigning to rvalue (1:21)
> 1 | c.foo.bar().baz ??= result.foo.bar().baz(a.baz) &&= result.baz; > 1 | c.foo.bar().baz ??= result.foo.bar().baz(a.baz) &&= result.baz;
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid.js [meriyah] format 1`] = ` exports[`invalid.js [meriyah] format 1`] = `
"[1:19]: Unexpected token: '=' (1:19) "[1:19]: Unexpected token: '=' (1:19)
> 1 | c.foo.bar().baz ??= result.foo.bar().baz(a.baz) &&= result.baz; > 1 | c.foo.bar().baz ??= result.foo.bar().baz(a.baz) &&= result.baz;
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid.js format 1`] = ` exports[`invalid.js format 1`] = `
@@ -32,7 +32,7 @@ exports[`logical-assignment.js [meriyah] format 1`] = `
"[1:5]: Unexpected token: '=' (1:5) "[1:5]: Unexpected token: '=' (1:5)
> 1 | a ||= b; > 1 | a ||= b;
| ^ | ^
2 | 2 |
3 | a &&= \\"foo\\"; 3 | a &&= \\"foo\\";
4 | b ||= \\"foo\\";" 4 | b ||= \\"foo\\";"
`; `;
@@ -55,7 +55,7 @@ exports[`module-string-names-import.js [espree] format 1`] = `
| ^ | ^
2 | import { \\"foo\\" as bar, \\"default\\" as qux } from \\"module-a\\"; 2 | import { \\"foo\\" as bar, \\"default\\" as qux } from \\"module-a\\";
3 | import { \\"學而時習之,不亦說乎?\\" as quotation } from \\"Confucius\\"; 3 | import { \\"學而時習之,不亦說乎?\\" as quotation } from \\"Confucius\\";
4 | " 4 |"
`; `;
exports[`module-string-names-import.js [meriyah] format 1`] = ` exports[`module-string-names-import.js [meriyah] format 1`] = `
@@ -64,7 +64,7 @@ exports[`module-string-names-import.js [meriyah] format 1`] = `
| ^ | ^
2 | import { \\"foo\\" as bar, \\"default\\" as qux } from \\"module-a\\"; 2 | import { \\"foo\\" as bar, \\"default\\" as qux } from \\"module-a\\";
3 | import { \\"學而時習之,不亦說乎?\\" as quotation } from \\"Confucius\\"; 3 | import { \\"學而時習之,不亦說乎?\\" as quotation } from \\"Confucius\\";
4 | " 4 |"
`; `;
exports[`module-string-names-import.js format 1`] = ` exports[`module-string-names-import.js format 1`] = `
@@ -7,7 +7,7 @@ exports[`text.js [espree] format 1`] = `
> 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`; > 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`;
| ^ | ^
7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`; 7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`;
8 | 8 |
9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;" 9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;"
`; `;
@@ -27,7 +27,7 @@ exports[`text.js [meriyah] format 1`] = `
> 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`; > 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`;
| ^ | ^
7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`; 7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`;
8 | 8 |
9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;" 9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;"
`; `;
@@ -5,7 +5,7 @@ exports[`no-semi.js [espree] format 1`] = `
1 | a 1 | a
> 2 | ;::b.c > 2 | ;::b.c
| ^ | ^
3 | 3 |
4 | class A { 4 | class A {
5 | a = b;" 5 | a = b;"
`; `;
@@ -15,7 +15,7 @@ exports[`no-semi.js [meriyah] format 1`] = `
1 | a 1 | a
> 2 | ;::b.c > 2 | ;::b.c
| ^ | ^
3 | 3 |
4 | class A { 4 | class A {
5 | a = b;" 5 | a = b;"
`; `;
@@ -25,7 +25,7 @@ exports[`no-semi.js - {"semi":false} [espree] format 1`] = `
1 | a 1 | a
> 2 | ;::b.c > 2 | ;::b.c
| ^ | ^
3 | 3 |
4 | class A { 4 | class A {
5 | a = b;" 5 | a = b;"
`; `;
@@ -35,7 +35,7 @@ exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = `
1 | a 1 | a
> 2 | ;::b.c > 2 | ;::b.c
| ^ | ^
3 | 3 |
4 | class A { 4 | class A {
5 | a = b;" 5 | a = b;"
`; `;
@@ -2,7 +2,7 @@
exports[`class.js [espree] format 1`] = ` exports[`class.js [espree] format 1`] = `
"Unexpected token ; (12:6) "Unexpected token ; (12:6)
10 | 10 |
11 | class C1 { 11 | class C1 {
> 12 | get; // The semicolon *is* necessary > 12 | get; // The semicolon *is* necessary
| ^ | ^
@@ -13,7 +13,7 @@ exports[`class.js [espree] format 1`] = `
exports[`class.js - {"semi":false} [espree] format 1`] = ` exports[`class.js - {"semi":false} [espree] format 1`] = `
"Unexpected token ; (12:6) "Unexpected token ; (12:6)
10 | 10 |
11 | class C1 { 11 | class C1 {
> 12 | get; // The semicolon *is* necessary > 12 | get; // The semicolon *is* necessary
| ^ | ^
@@ -153,7 +153,7 @@ exports[`getter-setter.js [espree] format 1`] = `
> 3 | ({ set x() {} }); > 3 | ({ set x() {} });
| ^ | ^
4 | ({ get x(x) {} }); 4 | ({ get x(x) {} });
5 | " 5 |"
`; `;
exports[`getter-setter.js [meriyah] format 1`] = ` exports[`getter-setter.js [meriyah] format 1`] = `
@@ -163,7 +163,7 @@ exports[`getter-setter.js [meriyah] format 1`] = `
> 3 | ({ set x() {} }); > 3 | ({ set x() {} });
| ^ | ^
4 | ({ get x(x) {} }); 4 | ({ get x(x) {} });
5 | " 5 |"
`; `;
exports[`getter-setter.js format 1`] = ` exports[`getter-setter.js format 1`] = `
@@ -192,7 +192,7 @@ printWidth: 80
exports[`invalid-accessor-generator.js [espree] format 1`] = ` exports[`invalid-accessor-generator.js [espree] format 1`] = `
"Unexpected token * (5:9) "Unexpected token * (5:9)
3 | 3 |
4 | ({ 4 | ({
> 5 | get *iterator() { }, > 5 | get *iterator() { },
| ^ | ^
@@ -203,7 +203,7 @@ exports[`invalid-accessor-generator.js [espree] format 1`] = `
exports[`invalid-accessor-generator.js [meriyah] format 1`] = ` exports[`invalid-accessor-generator.js [meriyah] format 1`] = `
"[5:9]: A getter cannot be a generator (5:9) "[5:9]: A getter cannot be a generator (5:9)
3 | 3 |
4 | ({ 4 | ({
> 5 | get *iterator() { }, > 5 | get *iterator() { },
| ^ | ^
@@ -214,7 +214,7 @@ exports[`invalid-accessor-generator.js [meriyah] format 1`] = `
exports[`invalid-accessor-generator.js [typescript] format 1`] = ` exports[`invalid-accessor-generator.js [typescript] format 1`] = `
"Identifier expected. (5:9) "Identifier expected. (5:9)
3 | 3 |
4 | ({ 4 | ({
> 5 | get *iterator() { }, > 5 | get *iterator() { },
| ^ | ^
@@ -257,14 +257,14 @@ exports[`invalid-setter.js [espree] format 1`] = `
"setter should have exactly one param (1:9) "setter should have exactly one param (1:9)
> 1 | ({ set x(){} }); > 1 | ({ set x(){} });
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-setter.js [meriyah] format 1`] = ` exports[`invalid-setter.js [meriyah] format 1`] = `
"[1:10]: Setter functions must have exactly one argument (1:10) "[1:10]: Setter functions must have exactly one argument (1:10)
> 1 | ({ set x(){} }); > 1 | ({ set x(){} });
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-setter.js format 1`] = ` exports[`invalid-setter.js format 1`] = `
@@ -5,7 +5,7 @@ exports[`test.js [espree] format 1`] = `
> 1 | const addOne = add(1, ?); // apply from the left > 1 | const addOne = add(1, ?); // apply from the left
| ^ | ^
2 | addOne(2); // 3 2 | addOne(2); // 3
3 | 3 |
4 | const addTen = add(?, 10); // apply from the right" 4 | const addTen = add(?, 10); // apply from the right"
`; `;
@@ -14,7 +14,7 @@ exports[`test.js [meriyah] format 1`] = `
> 1 | const addOne = add(1, ?); // apply from the left > 1 | const addOne = add(1, ?); // apply from the left
| ^ | ^
2 | addOne(2); // 3 2 | addOne(2); // 3
3 | 3 |
4 | const addTen = add(?, 10); // apply from the right" 4 | const addTen = add(?, 10); // apply from the right"
`; `;
@@ -163,18 +163,18 @@ exports[`minimal_pipeline_operator.js [espree] format 1`] = `
"Unexpected token > (1:4) "Unexpected token > (1:4)
> 1 | a |> b |> c; > 1 | a |> b |> c;
| ^ | ^
2 | 2 |
3 | a |> (b |> c); 3 | a |> (b |> c);
4 | " 4 |"
`; `;
exports[`minimal_pipeline_operator.js [meriyah] format 1`] = ` exports[`minimal_pipeline_operator.js [meriyah] format 1`] = `
"[1:4]: Unexpected token: '>' (1:4) "[1:4]: Unexpected token: '>' (1:4)
> 1 | a |> b |> c; > 1 | a |> b |> c;
| ^ | ^
2 | 2 |
3 | a |> (b |> c); 3 | a |> (b |> c);
4 | " 4 |"
`; `;
exports[`minimal_pipeline_operator.js format 1`] = ` exports[`minimal_pipeline_operator.js format 1`] = `
@@ -292,7 +292,7 @@ exports[`smart_pipeline_operator.js [espree] format 1`] = `
"Unexpected token > (1:4) "Unexpected token > (1:4)
> 1 | a |> await # |> # * 3; > 1 | a |> await # |> # * 3;
| ^ | ^
2 | 2 |
3 | foo 3 | foo
4 | |> await #" 4 | |> await #"
`; `;
@@ -301,7 +301,7 @@ exports[`smart_pipeline_operator.js [meriyah] format 1`] = `
"[1:4]: Unexpected token: '>' (1:4) "[1:4]: Unexpected token: '>' (1:4)
> 1 | a |> await # |> # * 3; > 1 | a |> await # |> # * 3;
| ^ | ^
2 | 2 |
3 | foo 3 | foo
4 | |> await #" 4 | |> await #"
`; `;
@@ -5,7 +5,7 @@ exports[`private-in.js [espree] format 1`] = `
> 1 | if (#prop in obj) { > 1 | if (#prop in obj) {
| ^ | ^
2 | } 2 | }
3 | 3 |
4 | #prop in obj;" 4 | #prop in obj;"
`; `;
@@ -6,7 +6,7 @@ exports[`classes.js - {"quoteProps":"as-needed"} [espree] format 1`] = `
> 2 | a = \\"a\\" > 2 | a = \\"a\\"
| ^ | ^
3 | }; 3 | };
4 | 4 |
5 | class B {" 5 | class B {"
`; `;
@@ -63,7 +63,7 @@ exports[`classes.js - {"quoteProps":"consistent","singleQuote":true} [espree] fo
> 2 | a = \\"a\\" > 2 | a = \\"a\\"
| ^ | ^
3 | }; 3 | };
4 | 4 |
5 | class B {" 5 | class B {"
`; `;
@@ -121,7 +121,7 @@ exports[`classes.js - {"quoteProps":"consistent"} [espree] format 1`] = `
> 2 | a = \\"a\\" > 2 | a = \\"a\\"
| ^ | ^
3 | }; 3 | };
4 | 4 |
5 | class B {" 5 | class B {"
`; `;
@@ -178,7 +178,7 @@ exports[`classes.js - {"quoteProps":"preserve"} [espree] format 1`] = `
> 2 | a = \\"a\\" > 2 | a = \\"a\\"
| ^ | ^
3 | }; 3 | };
4 | 4 |
5 | class B {" 5 | class B {"
`; `;
+68 -68
View File
@@ -12,11 +12,11 @@ rangeStart: 8
2 | , 2 | ,
> 3 | ,,,, > 3 | ,,,,
| ^^^^ | ^^^^
> 4 | > 4 |
| ^ | ^
> 5 | , > 5 | ,
| ^ | ^
> 6 | > 6 |
| ^ | ^
7 | , 7 | ,
8 | a, 8 | a,
@@ -39,7 +39,7 @@ rangeStart: 13
2 | // The range will be 13~26 2 | // The range will be 13~26
3 | // \`foo\` ends at 13, should not format 3 | // \`foo\` ends at 13, should not format
4 | // \`bar\` ends at 26, should format 4 | // \`bar\` ends at 26, should format
5 | 5 |
=====================================output===================================== =====================================output=====================================
foo = 1.0000;bar = 1.0;baz=1.0000; foo = 1.0000;bar = 1.0;baz=1.0000;
// The range will be 13~26 // The range will be 13~26
@@ -66,9 +66,9 @@ rangeStart: 28
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
7 | ); d( 7 | ); d(
8 | ); 8 | );
9 | 9 |
10 | } 10 | }
11 | 11 |
=====================================output===================================== =====================================output=====================================
function a( function a(
){ ){
@@ -96,7 +96,7 @@ rangeStart: 13
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
5 | ); d( 5 | ); d(
6 | ); 6 | );
7 | 7 |
=====================================output===================================== =====================================output=====================================
a ( a (
); );
@@ -116,14 +116,14 @@ rangeEnd: 26
rangeStart: 10 rangeStart: 10
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | 1 |
2 | 2 |
> 3 | class a { > 3 | class a {
| ^^^^ | ^^^^
> 4 | b( ) {} > 4 | b( ) {}
| ^^^^^^^^^^^ | ^^^^^^^^^^^
5 | } 5 | }
6 | 6 |
7 | let x 7 | let x
=====================================output===================================== =====================================output=====================================
@@ -152,7 +152,7 @@ rangeStart: 19
> 4 | call(1,2,3) > 4 | call(1,2,3)
| ^^^^^^^^^ | ^^^^^^^^^
5 | } 5 | }
6 | 6 |
=====================================output===================================== =====================================output=====================================
call(1,2,3) call(1,2,3)
call(1, 2, 3); call(1, 2, 3);
@@ -174,7 +174,7 @@ rangeStart: 0
> 1 | 'aaa'; > 1 | 'aaa';
| ^ | ^
2 | 'bbb'; 2 | 'bbb';
3 | 3 |
=====================================output===================================== =====================================output=====================================
"aaa"; "aaa";
'bbb'; 'bbb';
@@ -192,7 +192,7 @@ rangeStart: 16
=====================================input====================================== =====================================input======================================
> 1 | function ugly ( {a=1, b = 2 } ) {} > 1 | function ugly ( {a=1, b = 2 } ) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | 2 |
=====================================output===================================== =====================================output=====================================
function ugly({ a = 1, b = 2 }) {} function ugly({ a = 1, b = 2 }) {}
@@ -216,7 +216,7 @@ rangeStart: 222
6 | } 6 | }
7 | } 7 | }
8 | } 8 | }
9 | 9 |
=====================================output===================================== =====================================output=====================================
function ugly ( {a=1, b = 2 } ) { function ugly ( {a=1, b = 2 } ) {
function ugly ( {a=1, b = 2 } ) { function ugly ( {a=1, b = 2 } ) {
@@ -243,12 +243,12 @@ rangeStart: 17
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
3 | return 1; 3 | return 1;
4 | } 4 | }
5 | 5 |
6 | dontTouchThis(){ 6 | dontTouchThis(){
7 | return 2 ; 7 | return 2 ;
8 | } 8 | }
9 | } 9 | }
10 | 10 |
=====================================output===================================== =====================================output=====================================
export class F { export class F {
reformatThis() { reformatThis() {
@@ -276,12 +276,12 @@ rangeStart: 17
| ^ | ^
3 | return 1; 3 | return 1;
4 | } 4 | }
5 | 5 |
6 | dontTouchThis(){ 6 | dontTouchThis(){
7 | return 2 ; 7 | return 2 ;
8 | } 8 | }
9 | } 9 | }
10 | 10 |
=====================================output===================================== =====================================output=====================================
export class F { export class F {
reformatThis() { reformatThis() {
@@ -309,7 +309,7 @@ rangeStart: 16
> 2 | /**/ > 2 | /**/
| ^^^^ | ^^^^
3 | } 3 | }
4 | 4 |
=====================================output===================================== =====================================output=====================================
export default class Foo { export default class Foo {
/**/ /**/
@@ -330,7 +330,7 @@ rangeStart: 16
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
2 | /**/ 2 | /**/
3 | } 3 | }
4 | 4 |
=====================================output===================================== =====================================output=====================================
export default function Foo() { export default function Foo() {
/**/ /**/
@@ -353,7 +353,7 @@ rangeStart: 16
| ^^^^ | ^^^^
> 3 | } > 3 | }
| ^ | ^
4 | 4 |
=====================================output===================================== =====================================output=====================================
/* */ function Foo() { /* */ function Foo() {
/**/ /**/
@@ -375,7 +375,7 @@ rangeStart: 17
| ^^^^ | ^^^^
> 3 | } > 3 | }
| ^ | ^
4 | 4 |
=====================================output===================================== =====================================output=====================================
/* */ class Foo { /* */ class Foo {
/**/ /**/
@@ -397,7 +397,7 @@ rangeStart: 29
> 2 | color: blue; > 2 | color: blue;
| ^^^^^ | ^^^^^
3 | \`; 3 | \`;
4 | 4 |
=====================================output===================================== =====================================output=====================================
export const Button = styled.button\` export const Button = styled.button\`
color: blue; color: blue;
@@ -425,7 +425,7 @@ rangeStart: 80
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
7 | }; 7 | };
8 | } 8 | }
9 | 9 |
=====================================output===================================== =====================================output=====================================
function ugly() { function ugly() {
const dictWithSeveralEntries = { const dictWithSeveralEntries = {
@@ -448,16 +448,16 @@ rangeStart: 45
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | import def , {named} from 'x' 1 | import def , {named} from 'x'
2 | 2 |
> 3 | export * from 'd' > 3 | export * from 'd'
| ^^^^^^^^^^^ | ^^^^^^^^^^^
4 | 4 |
5 | export const x 5 | export const x
6 | = 42 6 | = 42
7 | 7 |
8 | export default 42 8 | export default 42
9 | 9 |
10 | 10 |
=====================================output===================================== =====================================output=====================================
import def , {named} from 'x' import def , {named} from 'x'
@@ -481,18 +481,18 @@ rangeStart: 57
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | import def , {named} from 'x' 1 | import def , {named} from 'x'
2 | 2 |
3 | export * from 'd' 3 | export * from 'd'
> 4 | > 4 |
| ^ | ^
> 5 | export const x > 5 | export const x
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
> 6 | = 42 > 6 | = 42
| ^^ | ^^
7 | 7 |
8 | export default 42 8 | export default 42
9 | 9 |
10 | 10 |
=====================================output===================================== =====================================output=====================================
import def , {named} from 'x' import def , {named} from 'x'
@@ -515,16 +515,16 @@ rangeStart: 104
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | import def , {named} from 'x' 1 | import def , {named} from 'x'
2 | 2 |
3 | export * from 'd' 3 | export * from 'd'
4 | 4 |
5 | export const x 5 | export const x
6 | = 42 6 | = 42
7 | 7 |
> 8 | export default 42 > 8 | export default 42
| ^^^^ | ^^^^
9 | 9 |
10 | 10 |
=====================================output===================================== =====================================output=====================================
import def , {named} from 'x' import def , {named} from 'x'
@@ -549,15 +549,15 @@ rangeStart: 7
=====================================input====================================== =====================================input======================================
> 1 | import def , {named} from 'x' > 1 | import def , {named} from 'x'
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
2 | 2 |
3 | export * from 'd' 3 | export * from 'd'
4 | 4 |
5 | export const x 5 | export const x
6 | = 42 6 | = 42
7 | 7 |
8 | export default 42 8 | export default 42
9 | 9 |
10 | 10 |
=====================================output===================================== =====================================output=====================================
import def, { named } from "x"; import def, { named } from "x";
@@ -583,24 +583,24 @@ rangeStart: 30
1 | call( 1 | call(
2 | 1, 2,3 2 | 1, 2,3
3 | ); 3 | );
4 | 4 |
5 | call( 5 | call(
> 6 | 1, 2,3 > 6 | 1, 2,3
| ^^^ | ^^^
> 7 | ); > 7 | );
| ^^ | ^^
> 8 | > 8 |
| ^^ | ^^
> 9 | call( > 9 | call(
| ^^ | ^^
> 10 | 1, 2,3 > 10 | 1, 2,3
| ^^^^^ | ^^^^^
11 | ); 11 | );
12 | 12 |
13 | call( 13 | call(
14 | 1, 2,3 14 | 1, 2,3
15 | ); 15 | );
16 | 16 |
=====================================output===================================== =====================================output=====================================
call( call(
1, 2,3 1, 2,3
@@ -628,7 +628,7 @@ rangeStart: 18
1 | call( 1 | call(
2 | 1, 2,3 2 | 1, 2,3
3 | ); 3 | );
> 4 | > 4 |
| ^ | ^
> 5 | call( > 5 | call(
| ^^^^^ | ^^^^^
@@ -636,7 +636,7 @@ rangeStart: 18
| ^^^^^ | ^^^^^
> 7 | ); > 7 | );
| ^^^^^ | ^^^^^
> 8 | > 8 |
| ^^^^^ | ^^^^^
> 9 | call( > 9 | call(
| ^^^^^ | ^^^^^
@@ -644,12 +644,12 @@ rangeStart: 18
| ^^^^^ | ^^^^^
> 11 | ); > 11 | );
| ^^^^^ | ^^^^^
> 12 | > 12 |
| ^ | ^
13 | call( 13 | call(
14 | 1, 2,3 14 | 1, 2,3
15 | ); 15 | );
16 | 16 |
=====================================output===================================== =====================================output=====================================
call( call(
1, 2,3 1, 2,3
@@ -684,7 +684,7 @@ rangeStart: 0
| ^^^ | ^^^
5 | } 5 | }
6 | catch (err) {} 6 | catch (err) {}
7 | 7 |
=====================================output===================================== =====================================output=====================================
try { try {
if (condition) { if (condition) {
@@ -711,7 +711,7 @@ rangeStart: 28
> 4 | } > 4 | }
| ^^ | ^^
5 | } 5 | }
6 | 6 |
=====================================output===================================== =====================================output=====================================
function f() { function f() {
if (true) { if (true) {
@@ -739,7 +739,7 @@ rangeStart: 9
| ^^^ | ^^^
5 | } 5 | }
6 | catch (err) {} 6 | catch (err) {}
7 | 7 |
=====================================output===================================== =====================================output=====================================
try { try {
if (condition) { if (condition) {
@@ -768,7 +768,7 @@ rangeStart: 9
| ^^^ | ^^^
5 | } 5 | }
6 | catch (err) {} 6 | catch (err) {}
7 | 7 |
=====================================output===================================== =====================================output=====================================
try { try {
1;if (condition) { 1;if (condition) {
@@ -790,7 +790,7 @@ rangeStart: 11
=====================================input====================================== =====================================input======================================
> 1 | const y = {a:1, b:2} > 1 | const y = {a:1, b:2}
| ^^^ | ^^^
2 | 2 |
=====================================output===================================== =====================================output=====================================
const y = { a: 1, b: 2 }; const y = { a: 1, b: 2 };
@@ -805,7 +805,7 @@ rangeEnd: 104
rangeStart: 53 rangeStart: 53
| | printWidth | | printWidth
=====================================input====================================== =====================================input======================================
1 | 1 |
2 | const y = [ 2 | const y = [
3 | { 3 | {
4 | a: 1, 4 | a: 1,
@@ -820,7 +820,7 @@ rangeStart: 53
> 9 | }, > 9 | },
| ^^^^^^ | ^^^^^^
10 | ] 10 | ]
11 | 11 |
=====================================output===================================== =====================================output=====================================
const y = [ const y = [
@@ -853,7 +853,7 @@ rangeStart: 224
6 | } 6 | }
7 | } 7 | }
8 | } 8 | }
9 | 9 |
=====================================output===================================== =====================================output=====================================
function ugly ( {a=1, b = 2 } ) { function ugly ( {a=1, b = 2 } ) {
function ugly ( {a=1, b = 2 } ) { function ugly ( {a=1, b = 2 } ) {
@@ -879,8 +879,8 @@ rangeStart: 32
2 | call( 2 | call(
3 | 1, 2,3 3 | 1, 2,3
4 | ); 4 | );
5 | 5 |
> 6 | > 6 |
| ^ | ^
> 7 | call( > 7 | call(
| ^^^^^ | ^^^^^
@@ -913,14 +913,14 @@ rangeStart: 0
| ^^^^^^^^ | ^^^^^^^^
> 3 | ); > 3 | );
| ^^^^^^^^ | ^^^^^^^^
> 4 | > 4 |
| ^ | ^
5 | 5 |
6 | // Unchanged 6 | // Unchanged
7 | call( 7 | call(
8 | 1, 2,3 8 | 1, 2,3
9 | ); 9 | );
10 | 10 |
=====================================output===================================== =====================================output=====================================
call(1, 2, 3); call(1, 2, 3);
@@ -944,7 +944,7 @@ rangeStart: 26
> 1 | foo = 1.0000;bar = 1.0000;baz=1.0000; > 1 | foo = 1.0000;bar = 1.0000;baz=1.0000;
| ^^^^^^^^^^^^^ [Reversed range] | ^^^^^^^^^^^^^ [Reversed range]
2 | // The range will be 26~13, should not format anything 2 | // The range will be 26~13, should not format anything
3 | 3 |
=====================================output===================================== =====================================output=====================================
foo = 1.0000;bar = 1.0000;baz=1.0000; foo = 1.0000;bar = 1.0000;baz=1.0000;
// The range will be 26~13, should not format anything // The range will be 26~13, should not format anything
@@ -963,7 +963,7 @@ rangeStart: 13
> 1 | foo = 1.0000;bar = 1.0000;baz=1.0000; > 1 | foo = 1.0000;bar = 1.0000;baz=1.0000;
| ^ | ^
2 | // The range will be 13~13, should not format anything 2 | // The range will be 13~13, should not format anything
3 | 3 |
=====================================output===================================== =====================================output=====================================
foo = 1.0000;bar = 1.0000;baz=1.0000; foo = 1.0000;bar = 1.0000;baz=1.0000;
// The range will be 13~13, should not format anything // The range will be 13~13, should not format anything
@@ -982,7 +982,7 @@ rangeStart: 7
1 | try {} 1 | try {}
> 2 | catch (err) {} > 2 | catch (err) {}
| ^ | ^
3 | 3 |
=====================================output===================================== =====================================output=====================================
try { try {
} catch (err) {} } catch (err) {}
@@ -1000,7 +1000,7 @@ rangeStart: 0
=====================================input====================================== =====================================input======================================
> 1 | > 1 |
| ^ | ^
2 | 2 |
=====================================output===================================== =====================================output=====================================
@@ -6,7 +6,7 @@ exports[`computed.js [espree] format 1`] = `
> 2 | assert(#{ [key]: 1 } === #{ a: 1 }) > 2 | assert(#{ [key]: 1 } === #{ a: 1 })
| ^ | ^
3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 })
4 | 4 |
5 | assert(#{ [true]: 1 } === #{ true: 1 })" 5 | assert(#{ [true]: 1 } === #{ true: 1 })"
`; `;
@@ -16,7 +16,7 @@ exports[`computed.js [meriyah] format 1`] = `
> 2 | assert(#{ [key]: 1 } === #{ a: 1 }) > 2 | assert(#{ [key]: 1 } === #{ a: 1 })
| ^ | ^
3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 })
4 | 4 |
5 | assert(#{ [true]: 1 } === #{ true: 1 })" 5 | assert(#{ [true]: 1 } === #{ true: 1 })"
`; `;
@@ -56,7 +56,7 @@ exports[`destructuring.js [espree] format 1`] = `
| ^ | ^
2 | assert(a === 1); 2 | assert(a === 1);
3 | assert(b === 2); 3 | assert(b === 2);
4 | " 4 |"
`; `;
exports[`destructuring.js [meriyah] format 1`] = ` exports[`destructuring.js [meriyah] format 1`] = `
@@ -65,7 +65,7 @@ exports[`destructuring.js [meriyah] format 1`] = `
| ^ | ^
2 | assert(a === 1); 2 | assert(a === 1);
3 | assert(b === 2); 3 | assert(b === 2);
4 | " 4 |"
`; `;
exports[`destructuring.js format 1`] = ` exports[`destructuring.js format 1`] = `
@@ -101,7 +101,7 @@ assert(rest.c === 3);
exports[`invalid-record-method.js [espree] format 1`] = ` exports[`invalid-record-method.js [espree] format 1`] = `
"Unexpected character '#' (3:1) "Unexpected character '#' (3:1)
1 | // Invalid, https://github.com/babel/babel/pull/11652/ 1 | // Invalid, https://github.com/babel/babel/pull/11652/
2 | 2 |
> 3 | #{ > 3 | #{
| ^ | ^
4 | a() {}, 4 | a() {},
@@ -112,7 +112,7 @@ exports[`invalid-record-method.js [espree] format 1`] = `
exports[`invalid-record-method.js [meriyah] format 1`] = ` exports[`invalid-record-method.js [meriyah] format 1`] = `
"[3:1]: '#' not followed by identifier (3:1) "[3:1]: '#' not followed by identifier (3:1)
1 | // Invalid, https://github.com/babel/babel/pull/11652/ 1 | // Invalid, https://github.com/babel/babel/pull/11652/
2 | 2 |
> 3 | #{ > 3 | #{
| ^ | ^
4 | a() {}, 4 | a() {},
@@ -218,7 +218,7 @@ exports[`shorthand.js [espree] format 1`] = `
> 2 | const record = #{ url } > 2 | const record = #{ url }
| ^ | ^
3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple
4 | " 4 |"
`; `;
exports[`shorthand.js [meriyah] format 1`] = ` exports[`shorthand.js [meriyah] format 1`] = `
@@ -227,7 +227,7 @@ exports[`shorthand.js [meriyah] format 1`] = `
> 2 | const record = #{ url } > 2 | const record = #{ url }
| ^ | ^
3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple
4 | " 4 |"
`; `;
exports[`shorthand.js format 1`] = ` exports[`shorthand.js format 1`] = `
@@ -254,7 +254,7 @@ exports[`spread.js [espree] format 1`] = `
| ^ | ^
2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData } 2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData }
3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" } 3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" }
4 | " 4 |"
`; `;
exports[`spread.js [meriyah] format 1`] = ` exports[`spread.js [meriyah] format 1`] = `
@@ -263,7 +263,7 @@ exports[`spread.js [meriyah] format 1`] = `
| ^ | ^
2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData } 2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData }
3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" } 3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" }
4 | " 4 |"
`; `;
exports[`spread.js format 1`] = ` exports[`spread.js format 1`] = `
@@ -296,7 +296,7 @@ exports[`syntax.js [espree] format 1`] = `
| ^ | ^
2 | #{ a: 1, b: 2 } 2 | #{ a: 1, b: 2 }
3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] }
4 | " 4 |"
`; `;
exports[`syntax.js [meriyah] format 1`] = ` exports[`syntax.js [meriyah] format 1`] = `
@@ -305,7 +305,7 @@ exports[`syntax.js [meriyah] format 1`] = `
| ^ | ^
2 | #{ a: 1, b: 2 } 2 | #{ a: 1, b: 2 }
3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] } 3 | #{ a: 1, b: #[2, 3, #{ c: 4 }] }
4 | " 4 |"
`; `;
exports[`syntax.js format 1`] = ` exports[`syntax.js format 1`] = `
@@ -4,7 +4,7 @@ exports[`throw_expression.js [espree] format 1`] = `
"Unexpected token throw (1:26) "Unexpected token throw (1:26)
> 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {} > 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {}
| ^ | ^
2 | 2 |
3 | lint(ast, { 3 | lint(ast, {
4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")" 4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")"
`; `;
@@ -13,7 +13,7 @@ exports[`throw_expression.js [meriyah] format 1`] = `
"[1:30]: Unexpected token: 'throw' (1:30) "[1:30]: Unexpected token: 'throw' (1:30)
> 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {} > 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {}
| ^ | ^
2 | 2 |
3 | lint(ast, { 3 | lint(ast, {
4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")" 4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")"
`; `;
@@ -4,14 +4,14 @@ exports[`example.js [espree] format 1`] = `
"Cannot use keyword 'await' outside an async function (1:1) "Cannot use keyword 'await' outside an async function (1:1)
> 1 | await something(); > 1 | await something();
| ^ | ^
2 | " 2 |"
`; `;
exports[`example.js [meriyah] format 1`] = ` exports[`example.js [meriyah] format 1`] = `
"[1:5]: 'Await' may not be used as an identifier in this context (1:5) "[1:5]: 'Await' may not be used as an identifier in this context (1:5)
> 1 | await something(); > 1 | await something();
| ^ | ^
2 | " 2 |"
`; `;
exports[`example.js format 1`] = ` exports[`example.js format 1`] = `
@@ -4,7 +4,7 @@ exports[`trailing.js [espree] format 1`] = `
"Unexpected token type (1:8) "Unexpected token type (1:8)
> 1 | export type Result<T, V> = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" }; > 1 | export type Result<T, V> = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" };
| ^ | ^
2 | 2 |
3 | // Note: there are trailing whitespace in this file 3 | // Note: there are trailing whitespace in this file
4 | \`" 4 | \`"
`; `;
@@ -13,7 +13,7 @@ exports[`trailing.js [meriyah] format 1`] = `
"[1:11]: Unexpected token: 'identifier' (1:11) "[1:11]: Unexpected token: 'identifier' (1:11)
> 1 | export type Result<T, V> = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" }; > 1 | export type Result<T, V> = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" };
| ^ | ^
2 | 2 |
3 | // Note: there are trailing whitespace in this file 3 | // Note: there are trailing whitespace in this file
4 | \`" 4 | \`"
`; `;
+13 -13
View File
@@ -6,7 +6,7 @@ exports[`destructuring.js [espree] format 1`] = `
| ^ | ^
2 | assert(a === 1); 2 | assert(a === 1);
3 | assert(b === 2); 3 | assert(b === 2);
4 | " 4 |"
`; `;
exports[`destructuring.js [meriyah] format 1`] = ` exports[`destructuring.js [meriyah] format 1`] = `
@@ -15,7 +15,7 @@ exports[`destructuring.js [meriyah] format 1`] = `
| ^ | ^
2 | assert(a === 1); 2 | assert(a === 1);
3 | assert(b === 2); 3 | assert(b === 2);
4 | " 4 |"
`; `;
exports[`destructuring.js format 1`] = ` exports[`destructuring.js format 1`] = `
@@ -52,21 +52,21 @@ exports[`invalid-tuple-holes.js [babel] format 1`] = `
"Unexpected token ',' (1:4) "Unexpected token ',' (1:4)
> 1 | #[,] > 1 | #[,]
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-tuple-holes.js [espree] format 1`] = ` exports[`invalid-tuple-holes.js [espree] format 1`] = `
"Unexpected character '#' (1:1) "Unexpected character '#' (1:1)
> 1 | #[,] > 1 | #[,]
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-tuple-holes.js [meriyah] format 1`] = ` exports[`invalid-tuple-holes.js [meriyah] format 1`] = `
"[1:1]: '#' not followed by identifier (1:1) "[1:1]: '#' not followed by identifier (1:1)
> 1 | #[,] > 1 | #[,]
| ^ | ^
2 | " 2 |"
`; `;
exports[`syntax.js [espree] format 1`] = ` exports[`syntax.js [espree] format 1`] = `
@@ -75,7 +75,7 @@ exports[`syntax.js [espree] format 1`] = `
| ^ | ^
2 | #[1, 2] 2 | #[1, 2]
3 | #[1, 2, #{ a: 3 }] 3 | #[1, 2, #{ a: 3 }]
4 | " 4 |"
`; `;
exports[`syntax.js [meriyah] format 1`] = ` exports[`syntax.js [meriyah] format 1`] = `
@@ -84,7 +84,7 @@ exports[`syntax.js [meriyah] format 1`] = `
| ^ | ^
2 | #[1, 2] 2 | #[1, 2]
3 | #[1, 2, #{ a: 3 }] 3 | #[1, 2, #{ a: 3 }]
4 | " 4 |"
`; `;
exports[`syntax.js format 1`] = ` exports[`syntax.js format 1`] = `
@@ -109,18 +109,18 @@ exports[`tuple.js [espree] format 1`] = `
"Unexpected character '#' (1:16) "Unexpected character '#' (1:16)
> 1 | const tuple1 = #[1, 2, 3]; > 1 | const tuple1 = #[1, 2, 3];
| ^ | ^
2 | 2 |
3 | assert(tuple1[0] === 1); 3 | assert(tuple1[0] === 1);
4 | " 4 |"
`; `;
exports[`tuple.js [meriyah] format 1`] = ` exports[`tuple.js [meriyah] format 1`] = `
"[1:16]: '#' not followed by identifier (1:16) "[1:16]: '#' not followed by identifier (1:16)
> 1 | const tuple1 = #[1, 2, 3]; > 1 | const tuple1 = #[1, 2, 3];
| ^ | ^
2 | 2 |
3 | assert(tuple1[0] === 1); 3 | assert(tuple1[0] === 1);
4 | " 4 |"
`; `;
exports[`tuple.js format 1`] = ` exports[`tuple.js format 1`] = `
@@ -173,14 +173,14 @@ exports[`tuple-trailing-comma.js [espree] format 1`] = `
"Unexpected character '#' (1:1) "Unexpected character '#' (1:1)
> 1 | #[1,] > 1 | #[1,]
| ^ | ^
2 | " 2 |"
`; `;
exports[`tuple-trailing-comma.js [meriyah] format 1`] = ` exports[`tuple-trailing-comma.js [meriyah] format 1`] = `
"[1:1]: '#' not followed by identifier (1:1) "[1:1]: '#' not followed by identifier (1:1)
> 1 | #[1,] > 1 | #[1,]
| ^ | ^
2 | " 2 |"
`; `;
exports[`tuple-trailing-comma.js format 1`] = ` exports[`tuple-trailing-comma.js format 1`] = `
@@ -4,21 +4,21 @@ exports[`invalid-const.js [espree] format 1`] = `
"Unexpected token ; (1:10) "Unexpected token ; (1:10)
> 1 | const foo; > 1 | const foo;
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-const.js [flow] format 1`] = ` exports[`invalid-const.js [flow] format 1`] = `
"Const must be initialized (1:7) "Const must be initialized (1:7)
> 1 | const foo; > 1 | const foo;
| ^^^ | ^^^
2 | " 2 |"
`; `;
exports[`invalid-const.js [meriyah] format 1`] = ` exports[`invalid-const.js [meriyah] format 1`] = `
"[1:10]: Missing initializer in const declaration (1:10) "[1:10]: Missing initializer in const declaration (1:10)
> 1 | const foo; > 1 | const foo;
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-const.js format 1`] = ` exports[`invalid-const.js format 1`] = `
@@ -10,7 +10,7 @@ rangeStart: 1
=====================================input====================================== =====================================input======================================
> 1 | {"a":1, "b":2} > 1 | {"a":1, "b":2}
| ^^^ | ^^^
2 | 2 |
=====================================output===================================== =====================================output=====================================
{"a":1, "b":2} {"a":1, "b":2}
@@ -27,7 +27,7 @@ rangeStart: 5
=====================================input====================================== =====================================input======================================
> 1 | {"a":1, "b":2} > 1 | {"a":1, "b":2}
| ^ | ^
2 | 2 |
=====================================output===================================== =====================================output=====================================
{"a":1, "b":2} {"a":1, "b":2}
@@ -3,17 +3,17 @@
exports[`async-arrow-invalid.js [babel] format 1`] = ` exports[`async-arrow-invalid.js [babel] format 1`] = `
"Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1) "Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1)
1 | // https://github.com/babel/babel/pull/11979 1 | // https://github.com/babel/babel/pull/11979
2 | 2 |
> 3 | <T> async () => {} > 3 | <T> async () => {}
| ^ | ^
4 | " 4 |"
`; `;
exports[`async-arrow-invalid.js [babel-flow] format 1`] = ` exports[`async-arrow-invalid.js [babel-flow] format 1`] = `
"Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1) "Type parameters must come after the async keyword, e.g. instead of \`<T> async (3:1)
1 | // https://github.com/babel/babel/pull/11979 1 | // https://github.com/babel/babel/pull/11979
2 | 2 |
> 3 | <T> async () => {} > 3 | <T> async () => {}
| ^ | ^
4 | " 4 |"
`; `;
@@ -4,14 +4,14 @@ exports[`type-annotation-expr-statement.ts [babel-ts] format 1`] = `
"Did not expect a type annotation here. (1:3) "Did not expect a type annotation here. (1:3)
> 1 | (a: T); > 1 | (a: T);
| ^ | ^
2 | " 2 |"
`; `;
exports[`type-annotation-func.ts [babel-ts] format 1`] = ` exports[`type-annotation-func.ts [babel-ts] format 1`] = `
"Did not expect a type annotation here. (1:10) "Did not expect a type annotation here. (1:10)
> 1 | func<T>(a: T); > 1 | func<T>(a: T);
| ^ | ^
2 | " 2 |"
`; `;
exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = ` exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = `
@@ -22,5 +22,5 @@ exports[`type-annotation-in-jsx.tsx [babel-ts] format 1`] = `
| ^ | ^
4 | ); 4 | );
5 | } 5 | }
6 | " 6 |"
`; `;
@@ -2,9 +2,9 @@
exports[`async-arrow-invalid.js [flow] format 1`] = ` exports[`async-arrow-invalid.js [flow] format 1`] = `
"Unexpected token ILLEGAL (4:1) "Unexpected token ILLEGAL (4:1)
2 | 2 |
3 | <T> async () => {} 3 | <T> async () => {}
> 4 | > 4 |
| ^" | ^"
`; `;
@@ -12,14 +12,14 @@ exports[`default-escaped.js [flow] format 1`] = `
"Unexpected identifier, expected the token \`{\` (1:8) "Unexpected identifier, expected the token \`{\` (1:8)
> 1 | export asyn\\\\u{63} from \\"async\\"; > 1 | export asyn\\\\u{63} from \\"async\\";
| ^^^^^^^^^^ | ^^^^^^^^^^
2 | " 2 |"
`; `;
exports[`dynamic-import.js [flow] format 1`] = ` exports[`dynamic-import.js [flow] format 1`] = `
"Unexpected token \`,\`, expected the token \`)\` (1:24) "Unexpected token \`,\`, expected the token \`)\` (1:24)
> 1 | import('./prettier.mjs', {}) > 1 | import('./prettier.mjs', {})
| ^ | ^
2 | " 2 |"
`; `;
exports[`function-async.js [flow] format 1`] = ` exports[`function-async.js [flow] format 1`] = `
@@ -33,14 +33,14 @@ exports[`module-attributes-dynamic.js [flow] format 1`] = `
"Unexpected token \`,\`, expected the token \`)\` (1:18) "Unexpected token \`,\`, expected the token \`)\` (1:18)
> 1 | import(\\"foo.json\\", { with: { type: \\"json\\" } }) > 1 | import(\\"foo.json\\", { with: { type: \\"json\\" } })
| ^ | ^
2 | " 2 |"
`; `;
exports[`module-attributes-static.js [flow] format 1`] = ` exports[`module-attributes-static.js [flow] format 1`] = `
"Unexpected token \`with\`, expected the token \`;\` (1:28) "Unexpected token \`with\`, expected the token \`;\` (1:28)
> 1 | import foo from \\"foo.json\\" with type: \\"json\\"; > 1 | import foo from \\"foo.json\\" with type: \\"json\\";
| ^^^^ | ^^^^
2 | " 2 |"
`; `;
exports[`newline-before-arrow.js [flow] format 1`] = ` exports[`newline-before-arrow.js [flow] format 1`] = `
@@ -48,14 +48,14 @@ exports[`newline-before-arrow.js [flow] format 1`] = `
1 | async x 1 | async x
> 2 | => x > 2 | => x
| ^^ | ^^
3 | " 3 |"
`; `;
exports[`number.js [flow] format 1`] = ` exports[`number.js [flow] format 1`] = `
"Unexpected token ILLEGAL (3:5) "Unexpected token ILLEGAL (3:5)
1 | // https://github.com/babel/babel/pull/11854 1 | // https://github.com/babel/babel/pull/11854
2 | 2 |
> 3 | a = 09e1_1; > 3 | a = 09e1_1;
| ^^^^ | ^^^^
4 | " 4 |"
`; `;
@@ -3,10 +3,10 @@
exports[`type-interfaces.graphql [graphql] format 1`] = ` exports[`type-interfaces.graphql [graphql] format 1`] = `
"Syntax Error: Unexpected \\"|\\". (5:21) "Syntax Error: Unexpected \\"|\\". (5:21)
3 | # which will break seperator detection added in #7305 3 | # which will break seperator detection added in #7305
4 | 4 |
> 5 | type A implements A | B { > 5 | type A implements A | B {
| ^ | ^
6 | a: a 6 | a: a
7 | } 7 | }
8 | " 8 |"
`; `;
@@ -8,7 +8,7 @@ Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SE
1 | <A > 1 | <A >
> 2 | x, {{@name} > 2 | x, {{@name}
| ^ | ^
3 | " 3 |"
`; `;
exports[`invalid-2.hbs [glimmer] format 1`] = ` exports[`invalid-2.hbs [glimmer] format 1`] = `
@@ -20,10 +20,10 @@ exports[`invalid-2.hbs [glimmer] format 1`] = `
(error occurred in 'an unknown module' @ line 3 : column 0) (3:0) (error occurred in 'an unknown module' @ line 3 : column 0) (3:0)
1 | <a> 1 | <a>
2 | 2 |
> 3 | <{@name> > 3 | <{@name>
| ^^^^^^^^ | ^^^^^^^^
4 | " 4 |"
`; `;
exports[`invalid-3.hbs [glimmer] format 1`] = ` exports[`invalid-3.hbs [glimmer] format 1`] = `
@@ -32,10 +32,10 @@ exports[`invalid-3.hbs [glimmer] format 1`] = `
-----^ -----^
Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (3:3) Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (3:3)
1 | <a> 1 | <a>
2 | 2 |
> 3 | {{}} > 3 | {{}}
| ^ | ^
4 | " 4 |"
`; `;
exports[`tilde-comments-1.hbs [glimmer] format 1`] = ` exports[`tilde-comments-1.hbs [glimmer] format 1`] = `
@@ -45,7 +45,7 @@ exports[`tilde-comments-1.hbs [glimmer] format 1`] = `
Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4)
> 1 | {{~}} > 1 | {{~}}
| ^ | ^
2 | " 2 |"
`; `;
exports[`tilde-comments-2.hbs [glimmer] format 1`] = ` exports[`tilde-comments-2.hbs [glimmer] format 1`] = `
@@ -55,5 +55,5 @@ exports[`tilde-comments-2.hbs [glimmer] format 1`] = `
Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4) Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE' (1:4)
> 1 | {{~~}} > 1 | {{~~}}
| ^ | ^
2 | " 2 |"
`; `;
@@ -2,27 +2,27 @@
exports[`decorator.ts [babel-ts] format 1`] = ` exports[`decorator.ts [babel-ts] format 1`] = `
"Leading decorators must be attached to a class declaration (4:1) "Leading decorators must be attached to a class declaration (4:1)
2 | 2 |
3 | @dec 3 | @dec
> 4 | enum E {} > 4 | enum E {}
| ^ | ^
5 | " 5 |"
`; `;
exports[`decorator.ts [typescript] format 1`] = ` exports[`decorator.ts [typescript] format 1`] = `
"Leading decorators must be attached to a class declaration (3:1) "Leading decorators must be attached to a class declaration (3:1)
1 | declare function dec<T>(target: T): T; 1 | declare function dec<T>(target: T): T;
2 | 2 |
> 3 | @dec > 3 | @dec
| ^^^^ | ^^^^
> 4 | enum E {} > 4 | enum E {}
| ^^^^^^^^^^ | ^^^^^^^^^^
5 | " 5 |"
`; `;
exports[`enums.ts [babel-ts] format 1`] = ` exports[`enums.ts [babel-ts] format 1`] = `
"Leading decorators must be attached to a class declaration (4:1) "Leading decorators must be attached to a class declaration (4:1)
2 | 2 |
3 | @decorator() 3 | @decorator()
> 4 | enum Direction { > 4 | enum Direction {
| ^ | ^
@@ -34,7 +34,7 @@ exports[`enums.ts [babel-ts] format 1`] = `
exports[`enums.ts [typescript] format 1`] = ` exports[`enums.ts [typescript] format 1`] = `
"Leading decorators must be attached to a class declaration (3:1) "Leading decorators must be attached to a class declaration (3:1)
1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375
2 | 2 |
> 3 | @decorator() > 3 | @decorator()
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
> 4 | enum Direction { > 4 | enum Direction {
@@ -49,50 +49,50 @@ exports[`enums.ts [typescript] format 1`] = `
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
> 9 | } > 9 | }
| ^^ | ^^
10 | " 10 |"
`; `;
exports[`function.ts [babel-ts] format 1`] = ` exports[`function.ts [babel-ts] format 1`] = `
"Leading decorators must be attached to a class declaration (4:1) "Leading decorators must be attached to a class declaration (4:1)
2 | 2 |
3 | @decorator() 3 | @decorator()
> 4 | function foo( ){} > 4 | function foo( ){}
| ^ | ^
5 | " 5 |"
`; `;
exports[`function.ts [typescript] format 1`] = ` exports[`function.ts [typescript] format 1`] = `
"Leading decorators must be attached to a class declaration (3:1) "Leading decorators must be attached to a class declaration (3:1)
1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375
2 | 2 |
> 3 | @decorator() > 3 | @decorator()
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
> 4 | function foo( ){} > 4 | function foo( ){}
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^
5 | " 5 |"
`; `;
exports[`interface.ts [babel-ts] format 1`] = ` exports[`interface.ts [babel-ts] format 1`] = `
"Leading decorators must be attached to a class declaration (5:1) "Leading decorators must be attached to a class declaration (5:1)
3 | 3 |
4 | @hello() 4 | @hello()
> 5 | interface MyInterface {id: string; > 5 | interface MyInterface {id: string;
| ^ | ^
6 | } 6 | }
7 | " 7 |"
`; `;
exports[`interface.ts [typescript] format 1`] = ` exports[`interface.ts [typescript] format 1`] = `
"Leading decorators must be attached to a class declaration (4:1) "Leading decorators must be attached to a class declaration (4:1)
2 | // #4632 2 | // #4632
3 | 3 |
> 4 | @hello() > 4 | @hello()
| ^^^^^^^^ | ^^^^^^^^
> 5 | interface MyInterface {id: string; > 5 | interface MyInterface {id: string;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 6 | } > 6 | }
| ^^ | ^^
7 | " 7 |"
`; `;
exports[`issue-9102.ts [babel-ts] format 1`] = ` exports[`issue-9102.ts [babel-ts] format 1`] = `
@@ -101,7 +101,7 @@ exports[`issue-9102.ts [babel-ts] format 1`] = `
> 2 | type T = 1; > 2 | type T = 1;
| ^ | ^
3 | class C {} 3 | class C {}
4 | " 4 |"
`; `;
exports[`issue-9102.ts [typescript] format 1`] = ` exports[`issue-9102.ts [typescript] format 1`] = `
@@ -111,5 +111,5 @@ exports[`issue-9102.ts [typescript] format 1`] = `
> 2 | type T = 1; > 2 | type T = 1;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
3 | class C {} 3 | class C {}
4 | " 4 |"
`; `;
@@ -8,42 +8,42 @@ exports[`html-like-comments.js [babel] format 1`] = `
| ^ | ^
4 | 'hello world' 4 | 'hello world'
5 | ) 5 | )
6 | " 6 |"
`; `;
exports[`import-assertions-for-export-without-from.js [babel] format 1`] = ` exports[`import-assertions-for-export-without-from.js [babel] format 1`] = `
"Unexpected token, expected \\";\\" (1:16) "Unexpected token, expected \\";\\" (1:16)
> 1 | export { foo } assert { type: \\"json\\" }; > 1 | export { foo } assert { type: \\"json\\" };
| ^ | ^
2 | " 2 |"
`; `;
exports[`import-assertions-with-parens.js [babel] format 1`] = ` exports[`import-assertions-with-parens.js [babel] format 1`] = `
"Unexpected token (1:19) "Unexpected token (1:19)
> 1 | import \\"x\\" assert ({type: 'json'}); > 1 | import \\"x\\" assert ({type: 'json'});
| ^ | ^
2 | " 2 |"
`; `;
exports[`module-attributes.js [babel] format 1`] = ` exports[`module-attributes.js [babel] format 1`] = `
"Unexpected token, expected \\";\\" (1:28) "Unexpected token, expected \\";\\" (1:28)
> 1 | import foo from \\"foo.json\\" with type: \\"json\\"; > 1 | import foo from \\"foo.json\\" with type: \\"json\\";
| ^ | ^
2 | " 2 |"
`; `;
exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = ` exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = `
"Unexpected token, expected \\")\\" (3:18) "Unexpected token, expected \\")\\" (3:18)
1 | // https://github.com/babel/babel/pull/11931 1 | // https://github.com/babel/babel/pull/11931
2 | 2 |
> 3 | for (() => x in y;;); > 3 | for (() => x in y;;);
| ^ | ^
4 | " 4 |"
`; `;
exports[`partial-template-strings.js [babel] format 1`] = ` exports[`partial-template-strings.js [babel] format 1`] = `
"Unexpected token (6:42) "Unexpected token (6:42)
4 | 4 |
5 | const Diagnostics = { 5 | const Diagnostics = {
> 6 | unexpected_token: \`Unexpected token: \${?}\`, > 6 | unexpected_token: \`Unexpected token: \${?}\`,
| ^ | ^
@@ -90,7 +90,7 @@ exports[`snippet: #5 [babel] format 1`] = `
exports[`snippet: #6 [babel] format 1`] = ` exports[`snippet: #6 [babel] format 1`] = `
"Unexpected token (5:12) "Unexpected token (5:12)
3 | 3 |
4 | static isC(obj) { 4 | static isC(obj) {
> 5 | return try obj.#brand; > 5 | return try obj.#brand;
| ^ | ^
@@ -137,8 +137,8 @@ exports[`snippet: #12 [babel] format 1`] = `
exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = ` exports[`static-import-source-should-not-has-extra-token.js [babel] format 1`] = `
"Unexpected token (4:16) "Unexpected token (4:16)
2 | // be parenthesized, that accidentally break #8016 2 | // be parenthesized, that accidentally break #8016
3 | 3 |
> 4 | import {} from (('a')); > 4 | import {} from (('a'));
| ^ | ^
5 | " 5 |"
`; `;
@@ -17,7 +17,7 @@ exports[`open-double-quote.less [less] format 1`] = `
> 2 | background: url(\\" > 2 | background: url(\\"
| ^ | ^
3 | } 3 | }
4 | " 4 |"
`; `;
exports[`open-sigle-quote.less [less] format 1`] = ` exports[`open-sigle-quote.less [less] format 1`] = `
@@ -26,5 +26,5 @@ exports[`open-sigle-quote.less [less] format 1`] = `
> 2 | background: url(' > 2 | background: url('
| ^ | ^
3 | } 3 | }
4 | " 4 |"
`; `;
@@ -4,23 +4,23 @@ exports[`default-escaped.ts [typescript] format 1`] = `
"Declaration or statement expected. (1:1) "Declaration or statement expected. (1:1)
> 1 | export asyn\\\\u{63} from \\"async\\"; > 1 | export asyn\\\\u{63} from \\"async\\";
| ^ | ^
2 | " 2 |"
`; `;
exports[`dynamic-import.ts [typescript] format 1`] = ` exports[`dynamic-import.ts [typescript] format 1`] = `
"Dynamic import must have one specifier as an argument. (1:8) "Dynamic import must have one specifier as an argument. (1:8)
> 1 | import('./prettier.mjs', {}) > 1 | import('./prettier.mjs', {})
| ^ | ^
2 | " 2 |"
`; `;
exports[`invalid-jsx-1.ts [typescript] format 1`] = ` exports[`invalid-jsx-1.ts [typescript] format 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (3:45) "Unexpected token. Did you mean \`{'>'}\` or \`&gt;\`? (3:45)
1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters 1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters
2 | 2 |
> 3 | let directions = <div>Navigate to: Menu Bar > Tools > Options</div> > 3 | let directions = <div>Navigate to: Menu Bar > Tools > Options</div>
| ^ | ^
4 | " 4 |"
`; `;
exports[`issue-8773.ts [typescript] format 1`] = `"Comment \\"comment\\" was not printed. Please report this error!"`; exports[`issue-8773.ts [typescript] format 1`] = `"Comment \\"comment\\" was not printed. Please report this error!"`;
@@ -29,14 +29,14 @@ exports[`module-attributes-dynamic.ts [typescript] format 1`] = `
"Dynamic import must have one specifier as an argument. (1:8) "Dynamic import must have one specifier as an argument. (1:8)
> 1 | import(\\"foo.json\\", { with: { type: \\"json\\" } }) > 1 | import(\\"foo.json\\", { with: { type: \\"json\\" } })
| ^ | ^
2 | " 2 |"
`; `;
exports[`module-attributes-static.ts [typescript] format 1`] = ` exports[`module-attributes-static.ts [typescript] format 1`] = `
"';' expected. (1:28) "';' expected. (1:28)
> 1 | import foo from \\"foo.json\\" with type: \\"json\\"; > 1 | import foo from \\"foo.json\\" with type: \\"json\\";
| ^ | ^
2 | " 2 |"
`; `;
exports[`newline-before-arrow.ts [typescript] format 1`] = ` exports[`newline-before-arrow.ts [typescript] format 1`] = `
@@ -44,7 +44,7 @@ exports[`newline-before-arrow.ts [typescript] format 1`] = `
> 1 | async x > 1 | async x
| ^ | ^
2 | => x 2 | => x
3 | " 3 |"
`; `;
exports[`snippet: #0 [typescript] format 1`] = ` exports[`snippet: #0 [typescript] format 1`] = `
@@ -3,7 +3,7 @@
exports[`unclosed_tag.vue [vue] format 1`] = ` exports[`unclosed_tag.vue [vue] format 1`] = `
"Unexpected character \\"EOF\\" (2:1) "Unexpected character \\"EOF\\" (2:1)
1 | <div 1 | <div
> 2 | > 2 |
| ^" | ^"
`; `;
@@ -13,7 +13,7 @@ exports[`unclosed_tag_in_template.vue [vue] format 1`] = `
3 | </ 3 | </
> 4 | </template> > 4 | </template>
| ^ | ^
5 | " 5 |"
`; `;
exports[`upper-case.html [vue] format 1`] = ` exports[`upper-case.html [vue] format 1`] = `
@@ -12,6 +12,6 @@ exports[`block-scalar-with-spaces-only.yml [yaml] format 1`] = `
| ^ | ^
> 5 | # comment > 5 | # comment
| ^ | ^
> 6 | > 6 |
| ^" | ^"
`; `;
@@ -88,7 +88,7 @@ requirePragma: true
3 | */ 3 | */
> 4 | var test = true > 4 | var test = true
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
5 | 5 |
=====================================output===================================== =====================================output=====================================
/** /**
* @prettier * @prettier
@@ -109,7 +109,7 @@ requirePragma: true
=====================================input====================================== =====================================input======================================
> 1 | var test = true > 1 | var test = true
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
2 | 2 |
=====================================output===================================== =====================================output=====================================
var test = true var test = true
@@ -6,7 +6,7 @@ exports[`constructor.ts [babel-ts] format 1`] = `
> 2 | constructor(static a: number) {} > 2 | constructor(static a: number) {}
| ^ | ^
3 | } 3 | }
4 | 4 |
5 | class foo {" 5 | class foo {"
`; `;
@@ -263,7 +263,7 @@ exports[`generics.ts [babel-ts] format 1`] = `
"A class name is required (1:6) "A class name is required (1:6)
> 1 | class<T> implements Map<T> {} > 1 | class<T> implements Map<T> {}
| ^ | ^
2 | 2 |
3 | interface AudioBufferList { 3 | interface AudioBufferList {
4 | mBuffers: interop.Reference<any /*AudioBuffer*/>;" 4 | mBuffers: interop.Reference<any /*AudioBuffer*/>;"
`; `;
@@ -292,12 +292,12 @@ interface AudioBufferList {
exports[`methods.ts [babel-ts] format 1`] = ` exports[`methods.ts [babel-ts] format 1`] = `
"Unexpected token, expected \\";\\" (6:10) "Unexpected token, expected \\";\\" (6:10)
4 | 4 |
5 | interface Iterable<T> { 5 | interface Iterable<T> {
> 6 | export [Symbol.iterator](): Iterator<T>; > 6 | export [Symbol.iterator](): Iterator<T>;
| ^ | ^
7 | } 7 | }
8 | 8 |
9 | export class Check {" 9 | export class Check {"
`; `;
@@ -433,7 +433,7 @@ exports[`errorOnInitializerInInterfaceProperty.ts [babel-ts] format 1`] = `
> 2 | bar: number = 5; > 2 | bar: number = 5;
| ^ | ^
3 | } 3 | }
4 | " 4 |"
`; `;
exports[`errorOnInitializerInInterfaceProperty.ts format 1`] = ` exports[`errorOnInitializerInInterfaceProperty.ts format 1`] = `
@@ -442,12 +442,12 @@ class E extends D {
exports[`readonlyInConstructorParameters.ts [babel-ts] format 1`] = ` exports[`readonlyInConstructorParameters.ts [babel-ts] format 1`] = `
"Unexpected token, expected \\",\\" (7:33) "Unexpected token, expected \\",\\" (7:33)
5 | 5 |
6 | class E { 6 | class E {
> 7 | constructor(readonly public x: number) {} > 7 | constructor(readonly public x: number) {}
| ^ | ^
8 | } 8 | }
9 | 9 |
10 | class F {" 10 | class F {"
`; `;
@@ -6,7 +6,7 @@ exports[`parserES5ForOfStatement2.ts [babel-ts] format 1`] = `
> 2 | for (var of X) { > 2 | for (var of X) {
| ^ | ^
3 | } 3 | }
4 | " 4 |"
`; `;
exports[`parserES5ForOfStatement2.ts format 1`] = ` exports[`parserES5ForOfStatement2.ts format 1`] = `
@@ -32,7 +32,7 @@ exports[`parserES5ForOfStatement21.ts [babel-ts] format 1`] = `
1 | //@target: ES5 1 | //@target: ES5
> 2 | for (var of of) { } > 2 | for (var of of) { }
| ^ | ^
3 | " 3 |"
`; `;
exports[`parserES5ForOfStatement21.ts format 1`] = ` exports[`parserES5ForOfStatement21.ts format 1`] = `
@@ -57,7 +57,7 @@ exports[`parserForInStatement2.ts [babel-ts] format 1`] = `
> 1 | for (var in X) { > 1 | for (var in X) {
| ^ | ^
2 | } 2 | }
3 | " 3 |"
`; `;
exports[`parserForInStatement2.ts format 1`] = ` exports[`parserForInStatement2.ts format 1`] = `
@@ -4,7 +4,7 @@ exports[`abstractKeyword.ts [babel-ts] format 1`] = `
"Unexpected token, expected \\";\\" (1:10) "Unexpected token, expected \\";\\" (1:10)
> 1 | abstract interface I {} > 1 | abstract interface I {}
| ^ | ^
2 | " 2 |"
`; `;
exports[`abstractKeyword.ts format 1`] = ` exports[`abstractKeyword.ts format 1`] = `
@@ -594,12 +594,12 @@ function f(x: string): void {
exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = ` exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = `
"Rest element must be last element (9:36) "Rest element must be last element (9:36)
7 | 7 |
8 | //Function overload signature with rest param followed by non-optional parameter 8 | //Function overload signature with rest param followed by non-optional parameter
> 9 | function fn5(x: string, ...y: any[], z: string); > 9 | function fn5(x: string, ...y: any[], z: string);
| ^ | ^
10 | function fn5() { } 10 | function fn5() { }
11 | " 11 |"
`; `;
exports[`functionOverloadErrorsSyntax.ts format 1`] = ` exports[`functionOverloadErrorsSyntax.ts format 1`] = `
@@ -45,7 +45,7 @@ exports[`abstractProperties.ts [babel-ts] format 1`] = `
| ^ | ^
3 | private abstract b: 2; 3 | private abstract b: 2;
4 | static abstract c: 3; 4 | static abstract c: 3;
5 | " 5 |"
`; `;
exports[`abstractProperties.ts format 1`] = ` exports[`abstractProperties.ts format 1`] = `
@@ -154,7 +154,7 @@ class f7<> {
exports[`index-signature.ts [babel-ts] format 1`] = ` exports[`index-signature.ts [babel-ts] format 1`] = `
"Unexpected token, expected \\"]\\" (4:13) "Unexpected token, expected \\"]\\" (4:13)
2 | 2 |
3 | type TwoParams = { 3 | type TwoParams = {
> 4 | [a: string, b: string]: string; > 4 | [a: string, b: string]: string;
| ^ | ^
@@ -165,7 +165,7 @@ exports[`index-signature.ts [babel-ts] format 1`] = `
exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = `
"Unexpected token, expected \\"]\\" (4:13) "Unexpected token, expected \\"]\\" (4:13)
2 | 2 |
3 | type TwoParams = { 3 | type TwoParams = {
> 4 | [a: string, b: string]: string; > 4 | [a: string, b: string]: string;
| ^ | ^
@@ -239,7 +239,7 @@ type TooLongSingleParam = {
exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = `
"Unexpected token, expected \\"]\\" (4:13) "Unexpected token, expected \\"]\\" (4:13)
2 | 2 |
3 | type TwoParams = { 3 | type TwoParams = {
> 4 | [a: string, b: string]: string; > 4 | [a: string, b: string]: string;
| ^ | ^
@@ -4,18 +4,18 @@ exports[`abstract.ts [babel-ts] format 1`] = `
"Unexpected token, expected \\";\\" (1:10) "Unexpected token, expected \\";\\" (1:10)
> 1 | abstract interface I { > 1 | abstract interface I {
| ^ | ^
2 | 2 |
3 | } 3 | }
4 | " 4 |"
`; `;
exports[`abstract.ts - {"semi":false} [babel-ts] format 1`] = ` exports[`abstract.ts - {"semi":false} [babel-ts] format 1`] = `
"Unexpected token, expected \\";\\" (1:10) "Unexpected token, expected \\";\\" (1:10)
> 1 | abstract interface I { > 1 | abstract interface I {
| ^ | ^
2 | 2 |
3 | } 3 | }
4 | " 4 |"
`; `;
exports[`abstract.ts - {"semi":false} format 1`] = ` exports[`abstract.ts - {"semi":false} format 1`] = `
@@ -2,13 +2,13 @@
exports[`keywords.ts [babel-ts] format 1`] = ` exports[`keywords.ts [babel-ts] format 1`] = `
"Unexpected token, expected \\";\\" (4:12) "Unexpected token, expected \\";\\" (4:12)
2 | 2 |
3 | module Y3 { 3 | module Y3 {
> 4 | public module Module { > 4 | public module Module {
| ^ | ^
5 | class A { s: string } 5 | class A { s: string }
6 | } 6 | }
7 | " 7 |"
`; `;
exports[`keywords.ts format 1`] = ` exports[`keywords.ts format 1`] = `
@@ -12,7 +12,7 @@ rangeStart: 15
> 2 | export = f; > 2 | export = f;
| ^^^ | ^^^
3 | g( ) 3 | g( )
4 | 4 |
=====================================output===================================== =====================================output=====================================
f ( ); f ( );
export = f; export = f;
@@ -45,7 +45,7 @@ rangeStart: 102
> 9 | } > 9 | }
| ^^^^^ | ^^^^^
10 | } 10 | }
11 | 11 |
=====================================output===================================== =====================================output=====================================
class Foo { class Foo {
/** Does this key match a given MinimalKey extending object? */ /** Does this key match a given MinimalKey extending object? */
@@ -73,7 +73,7 @@ rangeStart: 29
> 2 | private obj = { isTest: true } > 2 | private obj = { isTest: true }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 | } 3 | }
4 | 4 |
=====================================output===================================== =====================================output=====================================
export default class Test { export default class Test {
private obj = { isTest: true }; private obj = { isTest: true };
@@ -75,21 +75,21 @@ exports[`template-literal-types.ts [babel] format 1`] = `
"Unexpected token (1:84) "Unexpected token (1:84)
> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; > 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
| ^ | ^
2 | " 2 |"
`; `;
exports[`template-literal-types.ts [babel-flow] format 1`] = ` exports[`template-literal-types.ts [babel-flow] format 1`] = `
"Unexpected token (1:84) "Unexpected token (1:84)
> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; > 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
| ^ | ^
2 | " 2 |"
`; `;
exports[`template-literal-types.ts [flow] format 1`] = ` exports[`template-literal-types.ts [flow] format 1`] = `
"Unexpected token \`\`\` (1:84) "Unexpected token \`\`\` (1:84)
> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a; > 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
| ^ | ^
2 | " 2 |"
`; `;
exports[`template-literal-types.ts format 1`] = ` exports[`template-literal-types.ts format 1`] = `
@@ -12,18 +12,18 @@ rangeStart: 73
2 | <p>Templates are formatted as well... 2 | <p>Templates are formatted as well...
3 | </p> 3 | </p>
4 | </template> 4 | </template>
5 | 5 |
> 6 | <script> > 6 | <script>
| ^^^^^^^^ | ^^^^^^^^
> 7 | let Prettier = format => { your.js('though') } > 7 | let Prettier = format => { your.js('though') }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 8 | </script> > 8 | </script>
| ^^^^^^^^^ | ^^^^^^^^^
9 | 9 |
10 | <style> 10 | <style>
11 | .and { css: too !important } 11 | .and { css: too !important }
12 | </style> 12 | </style>
13 | 13 |
=====================================output===================================== =====================================output=====================================
<template> <template>
<p>Templates are formatted as well...</p> <p>Templates are formatted as well...</p>
+1 -1
View File
@@ -280,7 +280,7 @@ function runTest({
rangeStart: rangeStartWithCursor, rangeStart: rangeStartWithCursor,
rangeEnd: rangeEndWithCursor, rangeEnd: rangeEndWithCursor,
}); });
codeOffset = codeForSnapshot.match(/^>?\s+1 \| /)[0].length; codeOffset = codeForSnapshot.match(/^>?\s+1 \|/)[0].length + 1;
} }
if (hasEndOfLine) { if (hasEndOfLine) {
@@ -14,7 +14,7 @@ exports[`markdown parser should handle CRLF correctly 1`] = `"\\"\`\`\`\\\\r\\\\
exports[`typescript parser should throw the first error when both JSX and non-JSX mode failed 1`] = ` exports[`typescript parser should throw the first error when both JSX and non-JSX mode failed 1`] = `
"Expression expected. (9:7) "Expression expected. (9:7)
7 | ); 7 | );
8 | 8 |
> 9 | label: > 9 | label:
| ^ | ^
10 | " 10 | "
+3 -9
View File
@@ -16,14 +16,7 @@
dependencies: dependencies:
"@babel/highlight" "^7.0.0" "@babel/highlight" "^7.0.0"
"@babel/code-frame@7.12.11": "@babel/code-frame@7.12.13", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13":
version "7.12.11"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
dependencies:
"@babel/highlight" "^7.10.4"
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13":
version "7.12.13" version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
@@ -249,7 +242,7 @@
"@babel/traverse" "^7.12.13" "@babel/traverse" "^7.12.13"
"@babel/types" "^7.12.13" "@babel/types" "^7.12.13"
"@babel/highlight@^7.0.0", "@babel/highlight@^7.10.4": "@babel/highlight@^7.0.0":
version "7.10.4" version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
@@ -3062,6 +3055,7 @@ eslint-plugin-jest@24.1.3:
"eslint-plugin-prettier-internal-rules@link:scripts/tools/eslint-plugin-prettier-internal-rules": "eslint-plugin-prettier-internal-rules@link:scripts/tools/eslint-plugin-prettier-internal-rules":
version "0.0.0" version "0.0.0"
uid ""
eslint-plugin-react@7.22.0: eslint-plugin-react@7.22.0:
version "7.22.0" version "7.22.0"