From 7ca5d83e451bd5461fdd1ed0a987eddf67288d2c Mon Sep 17 00:00:00 2001
From: fisker Cheung
Date: Sun, 25 Jan 2026 11:53:51 +0800
Subject: [PATCH] Move parser name to end in test title (#18745)
---
scripts/format-test-lint.js | 4 +-
tests/config/run-format-test.js | 53 +-
tests/config/utilities/check-parsers.js | 16 +-
.../__snapshots__/format.test.js.snap | 8 +-
.../__snapshots__/format.test.js.snap | 16 +-
.../__snapshots__/format.test.js.snap | 8 +-
.../record/__snapshots__/format.test.js.snap | 4 +-
.../__snapshots__/format.test.js.snap | 46 +-
.../await/__snapshots__/format.test.js.snap | 26 +-
.../binding/__snapshots__/format.test.js.snap | 86 +-
.../__snapshots__/format.test.js.snap | 26 +-
.../__snapshots__/format.test.js.snap | 26 +-
.../__snapshots__/format.test.js.snap | 30 +-
.../__snapshots__/format.test.js.snap | 56 +-
.../unary/__snapshots__/format.test.js.snap | 28 +-
.../__snapshots__/format.test.js.snap | 126 +-
.../ternary/__snapshots__/format.test.js.snap | 22 +-
.../__snapshots__/format.test.js.snap | 20 +-
.../__snapshots__/format.test.js.snap | 98 +-
.../__snapshots__/format.test.js.snap | 276 +--
.../format.test.js | 45 +-
.../__snapshots__/format.test.js.snap | 304 +--
.../__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 96 +-
.../for-of/__snapshots__/format.test.js.snap | 54 +-
.../import/__snapshots__/format.test.js.snap | 48 +-
.../invalid/__snapshots__/format.test.js.snap | 130 +-
.../__snapshots__/format.test.js.snap | 18 +-
.../literal/__snapshots__/format.test.js.snap | 8 +-
.../__snapshots__/format.test.js.snap | 18 +-
.../object/__snapshots__/format.test.js.snap | 32 +-
.../__snapshots__/format.test.js.snap | 48 +-
.../record/__snapshots__/format.test.js.snap | 40 +-
.../__snapshots__/format.test.js.snap | 16 +-
.../__snapshots__/format.test.js.snap | 32 +-
.../__snapshots__/format.test.js.snap | 6 +-
.../__snapshots__/format.test.js.snap | 78 +-
.../__snapshots__/format.test.js.snap | 26 +-
.../__snapshots__/format.test.js.snap | 78 +-
.../__snapshots__/format.test.js.snap | 1464 +++++++-------
.../__snapshots__/format.test.js.snap | 958 ++++-----
.../invalid/__snapshots__/format.test.js.snap | 12 +-
.../__snapshots__/format.test.js.snap | 40 +-
.../__snapshots__/format.test.js.snap | 48 +-
.../__snapshots__/format.test.js.snap | 94 +-
.../__snapshots__/format.test.js.snap | 612 +++---
.../__snapshots__/format.test.js.snap | 70 +-
.../__snapshots__/format.test.js.snap | 538 ++---
.../__snapshots__/format.test.js.snap | 534 ++---
.../__snapshots__/format.test.js.snap | 126 +-
.../__snapshots__/format.test.js.snap | 470 ++---
.../__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 1792 ++++++++---------
.../js/do/__snapshots__/format.test.js.snap | 170 +-
.../__snapshots__/format.test.js.snap | 134 +-
.../__snapshots__/format.test.js.snap | 1146 +++++------
.../escaped/__snapshots__/format.test.js.snap | 96 +-
.../__snapshots__/format.test.js.snap | 86 +-
.../__snapshots__/format.test.js.snap | 44 +-
.../export/__snapshots__/format.test.js.snap | 64 +-
.../for-of/__snapshots__/format.test.js.snap | 24 +-
.../js/for/__snapshots__/format.test.js.snap | 92 +-
.../ignore/__snapshots__/format.test.js.snap | 146 +-
.../__snapshots__/format.test.js.snap | 176 +-
.../__snapshots__/format.test.js.snap | 70 +-
.../__snapshots__/format.test.js.snap | 48 +-
.../__snapshots__/format.test.js.snap | 216 +-
.../__snapshots__/format.test.js.snap | 32 +-
.../__snapshots__/format.test.js.snap | 216 +-
.../__snapshots__/format.test.js.snap | 78 +-
.../__snapshots__/format.test.js.snap | 186 +-
.../__snapshots__/format.test.js.snap | 112 +-
.../__snapshots__/format.test.js.snap | 172 +-
.../__snapshots__/format.test.js.snap | 16 +-
.../__snapshots__/format.test.js.snap | 22 +-
.../objects/__snapshots__/format.test.js.snap | 190 +-
.../__snapshots__/format.test.js.snap | 272 +--
.../__snapshots__/format.test.js.snap | 78 +-
.../__snapshots__/format.test.js.snap | 238 +--
.../__snapshots__/format.test.js.snap | 20 +-
.../__snapshots__/format.test.js.snap | 122 +-
.../__snapshots__/format.test.js.snap | 208 +-
.../strings/__snapshots__/format.test.js.snap | 78 +-
.../__snapshots__/format.test.js.snap | 78 +-
.../__snapshots__/format.test.js.snap | 138 +-
.../__snapshots__/format.test.js.snap | 1122 +++++------
.../empty/__snapshots__/format.test.js.snap | 54 +-
.../__snapshots__/format.test.js.snap | 144 +-
.../__snapshots__/format.test.js.snap | 8 +-
.../__snapshots__/format.test.js.snap | 22 +-
.../jsx/do/__snapshots__/format.test.js.snap | 86 +-
.../spread/__snapshots__/format.test.js.snap | 40 +-
.../__snapshots__/format.test.js.snap | 2 +-
.../{scss-syntax.scss => scss-syntax.unknown} | 0
.../__snapshots__/format.test.js.snap | 48 +-
.../__snapshots__/format.test.js.snap | 22 +-
.../misc/shared-fixtures/.not-test-directory | 0
.../class-property-named-constructor.js | 36 +
.../mj-raw/__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 22 +-
.../__snapshots__/format.test.js.snap | 2 +-
.../{less-syntax.less => less-syntax.unknown} | 0
.../__snapshots__/format.test.js.snap | 2 +-
.../inline-comment/format.test.js | 0
.../inline-comment/inline-comment.scss} | 0
.../readme/__snapshots__/format.test.js.snap | 2 +-
.../stylefmt-repo/readme/format.test.js | 0
.../stylefmt-repo/readme/readme.scss} | 0
.../__snapshots__/format.test.js.snap | 42 +-
.../__snapshots__/format.test.js.snap | 12 +-
.../__snapshots__/format.test.js.snap | 6 +-
.../__snapshots__/format.test.js.snap | 6 +-
.../__snapshots__/format.test.js.snap | 157 ++
.../format.test.js | 9 +
.../__snapshots__/format.test.js.snap | 6 +-
.../__snapshots__/format.test.js.snap | 108 +-
.../__snapshots__/format.test.js.snap | 36 +-
.../__snapshots__/format.test.js.snap | 120 +-
.../enum/__snapshots__/format.test.js.snap | 34 +-
.../__snapshots__/format.test.js.snap | 12 +-
.../__snapshots__/format.test.js.snap | 18 +-
.../__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 4 +-
.../__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 52 +-
.../__snapshots__/format.test.js.snap | 20 +-
.../loop/__snapshots__/format.test.js.snap | 18 +-
.../__snapshots__/format.test.js.snap | 6 +-
.../__snapshots__/format.test.js.snap | 1452 ++++++-------
.../__snapshots__/format.test.js.snap | 18 +-
.../tuple/__snapshots__/format.test.js.snap | 76 +-
.../__snapshots__/format.test.js.snap | 16 +-
.../__snapshots__/format.test.js.snap | 28 +-
.../__snapshots__/format.test.js.snap | 28 +-
.../__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 58 +-
.../__snapshots__/format.test.js.snap | 42 +-
.../__snapshots__/format.test.js.snap | 24 +-
.../__snapshots__/format.test.js.snap | 160 +-
.../__snapshots__/format.test.js.snap | 38 +-
.../__snapshots__/format.test.js.snap | 60 +-
.../__snapshots__/format.test.js.snap | 34 +-
142 files changed, 9016 insertions(+), 9018 deletions(-)
rename tests/format/less/_errors_/{scss-syntax.scss => scss-syntax.unknown} (100%)
create mode 100644 tests/format/misc/shared-fixtures/.not-test-directory
create mode 100644 tests/format/misc/shared-fixtures/class-property-named-constructor.js
rename tests/format/scss/_errors_/{less-syntax.less => less-syntax.unknown} (100%)
rename tests/format/{css => scss}/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap (93%)
rename tests/format/{css => scss}/stylefmt-repo/inline-comment/format.test.js (100%)
rename tests/format/{css/stylefmt-repo/inline-comment/inline-comment.css => scss/stylefmt-repo/inline-comment/inline-comment.scss} (100%)
rename tests/format/{css => scss}/stylefmt-repo/readme/__snapshots__/format.test.js.snap (97%)
rename tests/format/{css => scss}/stylefmt-repo/readme/format.test.js (100%)
rename tests/format/{css/stylefmt-repo/readme/readme.css => scss/stylefmt-repo/readme/readme.scss} (100%)
create mode 100644 tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap
create mode 100644 tests/format/typescript/_errors_/class-property-named-constructor/format.test.js
diff --git a/scripts/format-test-lint.js b/scripts/format-test-lint.js
index aaad5278f..d5605ec76 100644
--- a/scripts/format-test-lint.js
+++ b/scripts/format-test-lint.js
@@ -24,6 +24,7 @@ async function* checkDirectory(directory) {
directory,
ok:
directory === FORMAT_TEST_DIRECTORY ||
+ files.some((file) => file.name === ".not-test-directory") ||
!files.some(
(file) => file.isFile() && file.name !== TEST_SCRIPT_FILE_NAME,
) ||
@@ -44,13 +45,12 @@ for await (const { directory, ok } of checkDirectory(FORMAT_TEST_DIRECTORY)) {
const name = path.relative(PROJECT_ROOT, directory).replaceAll("\\", "/");
if (!ok) {
- console.log(name);
+ console.log(` - ${name}`);
directories.push(name);
}
}
if (directories.length > 0) {
- console.log();
console.error(
`${directories.length > 1 ? "Directories" : "Directory"} above missing "${TEST_SCRIPT_FILE_NAME}" file.`,
);
diff --git a/tests/config/run-format-test.js b/tests/config/run-format-test.js
index ee93f97a6..ae6a2d684 100644
--- a/tests/config/run-format-test.js
+++ b/tests/config/run-format-test.js
@@ -186,12 +186,11 @@ function runFormatTest(fixtures, parsers, options = {}) {
runFormat: () => format(code, formatOptions),
};
});
- const shouldSnapshotResult = testCases.some(
+ const testCaseForSnapshot = testCases.find(
(testCase) =>
!testCase.expectFail && typeof testCase.expectedOutput !== "string",
);
- let testCaseForSnapshot;
beforeAll(async () => {
await Promise.all(
testCases.map(async (test) => {
@@ -206,16 +205,12 @@ function runFormatTest(fixtures, parsers, options = {}) {
}
}),
);
-
- testCaseForSnapshot = testCases.find(({ formatResult }) =>
- Boolean(formatResult),
- );
});
const hasMultipleParsers = testCases.length > 1;
for (const testCase of testCases) {
- const testTitle = `${hasMultipleParsers ? `[${testCase.parser}] ` : ""}format`;
+ const testTitle = `format${testCaseForSnapshot !== testCase && hasMultipleParsers ? `[${testCase.parser}]` : ""}`;
test(testTitle, async () => {
await runTest({
@@ -225,34 +220,12 @@ function runFormatTest(fixtures, parsers, options = {}) {
result: testCase,
testCaseForSnapshot,
});
-
- if (shouldSnapshotResult && !hasMultipleParsers) {
- snapshotFormatResult(testCaseForSnapshot);
- }
- });
- }
-
- if (shouldSnapshotResult && hasMultipleParsers) {
- test("format", () => {
- snapshotFormatResult(testCaseForSnapshot);
});
}
});
}
}
-function snapshotFormatResult(testCase) {
- expect(testCase).toBeDefined();
-
- expect(
- createSnapshot(testCase.formatResult, {
- parsers: testCase.explicitParsers,
- formatOptions: testCase.formatOptions,
- CURSOR_PLACEHOLDER,
- }),
- ).toMatchSnapshot();
-}
-
async function runTest({
filename,
code,
@@ -271,7 +244,6 @@ async function runTest({
}
expect(formatResult).toBeDefined();
- expect(testCaseForSnapshot.formatResult).toBeDefined();
// Make sure output has consistent EOL
expect(formatResult.eolVisualizedOutput).toBe(
@@ -280,10 +252,23 @@ async function runTest({
if (typeof result.expectedOutput === "string") {
expect(formatResult.eolVisualizedOutput).toBe(visualizeEndOfLine(output));
- } else if (testCaseForSnapshot !== result) {
- expect(formatResult.eolVisualizedOutput).toStrictEqual(
- testCaseForSnapshot.formatResult.eolVisualizedOutput,
- );
+ } else {
+ expect(testCaseForSnapshot).toBeDefined();
+ expect(testCaseForSnapshot.formatResult).toBeDefined();
+
+ if (testCaseForSnapshot === result) {
+ expect(
+ createSnapshot(testCaseForSnapshot.formatResult, {
+ parsers: testCaseForSnapshot.explicitParsers,
+ formatOptions: testCaseForSnapshot.formatOptions,
+ CURSOR_PLACEHOLDER,
+ }),
+ ).toMatchSnapshot();
+ } else {
+ expect(formatResult.eolVisualizedOutput).toStrictEqual(
+ testCaseForSnapshot.formatResult.eolVisualizedOutput,
+ );
+ }
}
if (!FULL_TEST) {
diff --git a/tests/config/utilities/check-parsers.js b/tests/config/utilities/check-parsers.js
index e6a6f806e..58815cc28 100644
--- a/tests/config/utilities/check-parsers.js
+++ b/tests/config/utilities/check-parsers.js
@@ -26,8 +26,15 @@ const categoryParsers = new Map([
"flow",
{
parsers: ["flow", "babel-flow"],
- verifyParsers: ["flow", "babel-flow", "typescript", "babel-ts"],
- extensions: [".js", ".cjs", ".mjs"],
+ verifyParsers: [
+ "flow",
+ "babel-flow",
+ "typescript",
+ "babel-ts",
+ "hermes",
+ "babel",
+ ],
+ extensions: [".js", ".cjs", ".mjs", ".unknown"],
},
],
[
@@ -62,6 +69,7 @@ const categoryParsers = new Map([
"typescript",
"babel-ts",
"hermes",
+ "__babel_estree",
],
extensions: [".js", ".cjs", ".mjs"],
},
@@ -115,7 +123,7 @@ const categoryParsers = new Map([
{
parsers: ["less"],
verifyParsers: ["css", "scss"],
- extensions: [".less"],
+ extensions: [".less", ".unknown"],
},
],
["lwc", { parsers: ["lwc"], verifyParsers: [], extensions: [".html"] }],
@@ -129,7 +137,7 @@ const categoryParsers = new Map([
{
parsers: ["scss"],
verifyParsers: ["css", "less"],
- extensions: [".scss"],
+ extensions: [".scss", ".unknown"],
},
],
[
diff --git a/tests/format/flow/_errors_/babel-flow/__snapshots__/format.test.js.snap b/tests/format/flow/_errors_/babel-flow/__snapshots__/format.test.js.snap
index 88a7c4431..25d721903 100644
--- a/tests/format/flow/_errors_/babel-flow/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/_errors_/babel-flow/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`async-arrow-invalid.js [babel] format 1`] = `
+exports[`async-arrow-invalid.js format[babel] 1`] = `
"Unterminated JSX contents. (3:19)
1 | // https://github.com/babel/babel/pull/11979
2 |
@@ -10,7 +10,7 @@ exports[`async-arrow-invalid.js [babel] format 1`] = `
Cause: Unterminated JSX contents. (3:18)"
`;
-exports[`async-arrow-invalid.js [babel-flow] format 1`] = `
+exports[`async-arrow-invalid.js format[babel-flow] 1`] = `
"Type parameters must come after the async keyword, e.g. instead of \` async () => {}\`, use \`async () => {}\`. (3:1)
1 | // https://github.com/babel/babel/pull/11979
2 |
@@ -20,7 +20,7 @@ exports[`async-arrow-invalid.js [babel-flow] format 1`] = `
Cause: Type parameters must come after the async keyword, e.g. instead of \` async () => {}\`, use \`async () => {}\`. (3:0)"
`;
-exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = `
+exports[`wrong-arrow-no-parens-jsx.js format[babel] 1`] = `
"Unterminated JSX contents. (1:4)
> 1 | (a => b);
| ^
@@ -28,7 +28,7 @@ exports[`wrong-arrow-no-parens-jsx.js [babel] format 1`] = `
Cause: Unterminated JSX contents. (1:3)"
`;
-exports[`wrong-arrow-no-parens-jsx.js [babel-flow] format 1`] = `
+exports[`wrong-arrow-no-parens-jsx.js format[babel-flow] 1`] = `
"Unterminated JSX contents. (1:4)
> 1 | (a => b);
| ^
diff --git a/tests/format/flow/_errors_/interface/__snapshots__/format.test.js.snap b/tests/format/flow/_errors_/interface/__snapshots__/format.test.js.snap
index b99ee76cc..060190ef9 100644
--- a/tests/format/flow/_errors_/interface/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/_errors_/interface/__snapshots__/format.test.js.snap
@@ -1,52 +1,52 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-flow] format 1`] = `
+exports[`snippet: #0 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | interface A mixins B {}
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected identifier, expected the token \`{\` (1:13)
> 1 | interface A mixins B {}
| ^^^^^^"
`;
-exports[`snippet: #1 [babel-flow] format 1`] = `
+exports[`snippet: #1 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | interface A implements B {}
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Unexpected identifier, expected the token \`{\` (1:13)
> 1 | interface A implements B {}
| ^^^^^^^^^^"
`;
-exports[`snippet: #2 [babel-flow] format 1`] = `
+exports[`snippet: #2 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:21)
> 1 | declare interface A mixins B {}
| ^
Cause: Unexpected token, expected "{" (1:20)"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected identifier, expected the token \`{\` (1:21)
> 1 | declare interface A mixins B {}
| ^^^^^^"
`;
-exports[`snippet: #3 [babel-flow] format 1`] = `
+exports[`snippet: #3 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:21)
> 1 | declare interface A implements B {}
| ^
Cause: Unexpected token, expected "{" (1:20)"
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected identifier, expected the token \`{\` (1:21)
> 1 | declare interface A implements B {}
| ^^^^^^^^^^"
diff --git a/tests/format/flow/_errors_/invalid-match/__snapshots__/format.test.js.snap b/tests/format/flow/_errors_/invalid-match/__snapshots__/format.test.js.snap
index fd7acb4cc..1f7fdc7cd 100644
--- a/tests/format/flow/_errors_/invalid-match/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/_errors_/invalid-match/__snapshots__/format.test.js.snap
@@ -1,12 +1,12 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"\`match\` argument must not be empty (1:7)
> 1 | match () {}
| ^^"
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`snippet: #0 format[hermes] 1`] = `
"'match' argument must not be empty (1:6)
> 1 | match () {}
| ^
@@ -15,13 +15,13 @@ match () {}
^~"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"\`match\` argument cannot contain spread elements (1:8)
> 1 | match (...b) {}
| ^^^^"
`;
-exports[`snippet: #1 [hermes] format 1`] = `
+exports[`snippet: #1 format[hermes] 1`] = `
"'match' argument cannot contain spread elements (1:7)
> 1 | match (...b) {}
| ^
diff --git a/tests/format/flow/_errors_/record/__snapshots__/format.test.js.snap b/tests/format/flow/_errors_/record/__snapshots__/format.test.js.snap
index d6bd49412..db29304f9 100644
--- a/tests/format/flow/_errors_/record/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/_errors_/record/__snapshots__/format.test.js.snap
@@ -1,12 +1,12 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected token \`{\`, expected the token \`;\` (1:24)
> 1 | const a = not_a_record {}
| ^"
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`snippet: #0 format[hermes] 1`] = `
"';' expected (1:23)
> 1 | const a = not_a_record {}
| ^
diff --git a/tests/format/flow/as-satisfies-expression/__snapshots__/format.test.js.snap b/tests/format/flow/as-satisfies-expression/__snapshots__/format.test.js.snap
index 2228ee352..fea0d8b8d 100644
--- a/tests/format/flow/as-satisfies-expression/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/as-satisfies-expression/__snapshots__/format.test.js.snap
@@ -335,20 +335,6 @@ function foo() {
================================================================================
`;
-exports[`satisfies.js [hermes] format 1`] = `
-"';' expected (3:12)
- 1 | // @flow
- 2 |
-> 3 | const x = y satisfies T;
- | ^
- 4 |
- 5 | // demonstrating how "satisfies" expression can be practically used as expression statement.
- 6 | const _ = (type: 'foo' | 'bar') => {
-Cause: ';' expected (3:12)
-const x = y satisfies T;
- ^"
-`;
-
exports[`satisfies.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -441,17 +427,18 @@ function satisfiesChain() {
================================================================================
`;
-exports[`ternary.js [hermes] format 1`] = `
-"invalid assignment left-hand side (3:0)
+exports[`satisfies.js format[hermes] 1`] = `
+"';' expected (3:12)
1 | // @flow
2 |
-> 3 | foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
- 4 | ? baaaaaaaaaaaaaaaaaaaaar
- 5 | : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo;
- 6 |
-Cause: invalid assignment left-hand side (3:0)
-foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
-^~~"
+> 3 | const x = y satisfies T;
+ | ^
+ 4 |
+ 5 | // demonstrating how "satisfies" expression can be practically used as expression statement.
+ 6 | const _ = (type: 'foo' | 'bar') => {
+Cause: ';' expected (3:12)
+const x = y satisfies T;
+ ^"
`;
exports[`ternary.js format 1`] = `
@@ -559,3 +546,16 @@ bifornCringerMoshedPerplexSawder =
================================================================================
`;
+
+exports[`ternary.js format[hermes] 1`] = `
+"invalid assignment left-hand side (3:0)
+ 1 | // @flow
+ 2 |
+> 3 | foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 4 | ? baaaaaaaaaaaaaaaaaaaaar
+ 5 | : baaaaaaaaaaaaaaaaaaaaaz) as Fooooooooooo;
+ 6 |
+Cause: invalid assignment left-hand side (3:0)
+foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+^~~"
+`;
diff --git a/tests/format/flow/await/__snapshots__/format.test.js.snap b/tests/format/flow/await/__snapshots__/format.test.js.snap
index 153821ff3..ba523e145 100644
--- a/tests/format/flow/await/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/await/__snapshots__/format.test.js.snap
@@ -1,18 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`await-keywords.js [hermes] format 1`] = `
-"'await' not in an async function (2:6)
- 1 | export class C1 {
-> 2 | p = await (0);
- | ^
- 3 | }
- 4 |
- 5 | await (0);
-Cause: 'await' not in an async function (2:6)
- p = await (0);
- ^~~~~~~~~"
-`;
-
exports[`await-keywords.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -92,3 +79,16 @@ await(0);
================================================================================
`;
+
+exports[`await-keywords.js format[hermes] 1`] = `
+"'await' not in an async function (2:6)
+ 1 | export class C1 {
+> 2 | p = await (0);
+ | ^
+ 3 | }
+ 4 |
+ 5 | await (0);
+Cause: 'await' not in an async function (2:6)
+ p = await (0);
+ ^~~~~~~~~"
+`;
diff --git a/tests/format/flow/flow-repo/binding/__snapshots__/format.test.js.snap b/tests/format/flow/flow-repo/binding/__snapshots__/format.test.js.snap
index a444db21c..ad0103eda 100644
--- a/tests/format/flow/flow-repo/binding/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/flow-repo/binding/__snapshots__/format.test.js.snap
@@ -1,18 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`const.js [hermes] format 1`] = `
-"invalid operand in update operation (4:0)
- 2 |
- 3 | // errors: const cannot be reassigned
-> 4 | x++;
- 5 | x--;
- 6 | x += 0;
- 7 | x -= 0;
-Cause: invalid operand in update operation (4:0)
-x++;
-^"
-`;
-
exports[`const.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -79,21 +66,17 @@ for (const { baz } of bazzes) {
================================================================================
`;
-exports[`rebinding.js [hermes] format 1`] = `
-"Identifier 'A' is already declared (53:8)
- 51 | function class_class() {
- 52 | class A {}
-> 53 | class A {} // error: name already bound
- | ^
- 54 | }
- 55 |
- 56 | function class_let() {
-Cause: Identifier 'A' is already declared (53:8)
- class A {} // error: name already bound
- ^
-note: previous declaration (52:8)
- class A {}
- ^"
+exports[`const.js format[hermes] 1`] = `
+"invalid operand in update operation (4:0)
+ 2 |
+ 3 | // errors: const cannot be reassigned
+> 4 | x++;
+ 5 | x--;
+ 6 | x += 0;
+ 7 | x -= 0;
+Cause: invalid operand in update operation (4:0)
+x++;
+^"
`;
exports[`rebinding.js format 1`] = `
@@ -502,21 +485,21 @@ function fn_params_clash_fn_binding(x, y) {
================================================================================
`;
-exports[`scope.js [hermes] format 1`] = `
-"Identifier 'a' is already declared (19:10)
- 17 | break;
- 18 | case "bar":
-> 19 | let a = ""; // error: a already bound in switch
- | ^
- 20 | break;
- 21 | }
- 22 | }
-Cause: Identifier 'a' is already declared (19:10)
- let a = ""; // error: a already bound in switch
- ^
-note: previous declaration (15:10)
- let a = ""; // ok: local to switch
- ^"
+exports[`rebinding.js format[hermes] 1`] = `
+"Identifier 'A' is already declared (53:8)
+ 51 | function class_class() {
+ 52 | class A {}
+> 53 | class A {} // error: name already bound
+ | ^
+ 54 | }
+ 55 |
+ 56 | function class_let() {
+Cause: Identifier 'A' is already declared (53:8)
+ class A {} // error: name already bound
+ ^
+note: previous declaration (52:8)
+ class A {}
+ ^"
`;
exports[`scope.js format 1`] = `
@@ -753,6 +736,23 @@ function default_param_2() {
================================================================================
`;
+exports[`scope.js format[hermes] 1`] = `
+"Identifier 'a' is already declared (19:10)
+ 17 | break;
+ 18 | case "bar":
+> 19 | let a = ""; // error: a already bound in switch
+ | ^
+ 20 | break;
+ 21 | }
+ 22 | }
+Cause: Identifier 'a' is already declared (19:10)
+ let a = ""; // error: a already bound in switch
+ ^
+note: previous declaration (15:10)
+ let a = ""; // ok: local to switch
+ ^"
+`;
+
exports[`tdz.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
diff --git a/tests/format/flow/flow-repo/esproposal_decorators.ignore/__snapshots__/format.test.js.snap b/tests/format/flow/flow-repo/esproposal_decorators.ignore/__snapshots__/format.test.js.snap
index c5350bc63..b994ba636 100644
--- a/tests/format/flow/flow-repo/esproposal_decorators.ignore/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/flow-repo/esproposal_decorators.ignore/__snapshots__/format.test.js.snap
@@ -1,18 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`test.js [hermes] format 1`] = `
-"unrecognized character '@' (3:0)
- 1 | /* @flow */
- 2 |
-> 3 | @decorator4
- 4 | class Foo {
- 5 | @decorator1
- 6 | method1() {}
-Cause: unrecognized character '@' (3:0)
-@decorator4
-^"
-`;
-
exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -46,3 +33,16 @@ class Foo {
================================================================================
`;
+
+exports[`test.js format[hermes] 1`] = `
+"unrecognized character '@' (3:0)
+ 1 | /* @flow */
+ 2 |
+> 3 | @decorator4
+ 4 | class Foo {
+ 5 | @decorator1
+ 6 | method1() {}
+Cause: unrecognized character '@' (3:0)
+@decorator4
+^"
+`;
diff --git a/tests/format/flow/flow-repo/esproposal_decorators.warn/__snapshots__/format.test.js.snap b/tests/format/flow/flow-repo/esproposal_decorators.warn/__snapshots__/format.test.js.snap
index c5350bc63..b994ba636 100644
--- a/tests/format/flow/flow-repo/esproposal_decorators.warn/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/flow-repo/esproposal_decorators.warn/__snapshots__/format.test.js.snap
@@ -1,18 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`test.js [hermes] format 1`] = `
-"unrecognized character '@' (3:0)
- 1 | /* @flow */
- 2 |
-> 3 | @decorator4
- 4 | class Foo {
- 5 | @decorator1
- 6 | method1() {}
-Cause: unrecognized character '@' (3:0)
-@decorator4
-^"
-`;
-
exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -46,3 +33,16 @@ class Foo {
================================================================================
`;
+
+exports[`test.js format[hermes] 1`] = `
+"unrecognized character '@' (3:0)
+ 1 | /* @flow */
+ 2 |
+> 3 | @decorator4
+ 4 | class Foo {
+ 5 | @decorator1
+ 6 | method1() {}
+Cause: unrecognized character '@' (3:0)
+@decorator4
+^"
+`;
diff --git a/tests/format/flow/flow-repo/find-module/__snapshots__/format.test.js.snap b/tests/format/flow/flow-repo/find-module/__snapshots__/format.test.js.snap
index 846f3ba88..f149f34b9 100644
--- a/tests/format/flow/flow-repo/find-module/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/flow-repo/find-module/__snapshots__/format.test.js.snap
@@ -14,21 +14,6 @@ module.exports = 0;
================================================================================
`;
-exports[`test.js [hermes] format 1`] = `
-"Identifier 'x' is already declared (4:7)
- 2 | (x: string);
- 3 |
-> 4 | import x from './req';
- | ^
- 5 |
-Cause: Identifier 'x' is already declared (4:7)
-import x from './req';
- ^
-note: previous declaration (1:4)
-var x = require('./req');
- ^"
-`;
-
exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -48,3 +33,18 @@ import x from "./req";
================================================================================
`;
+
+exports[`test.js format[hermes] 1`] = `
+"Identifier 'x' is already declared (4:7)
+ 2 | (x: string);
+ 3 |
+> 4 | import x from './req';
+ | ^
+ 5 |
+Cause: Identifier 'x' is already declared (4:7)
+import x from './req';
+ ^
+note: previous declaration (1:4)
+var x = require('./req');
+ ^"
+`;
diff --git a/tests/format/flow/flow-repo/type_only_vars/__snapshots__/format.test.js.snap b/tests/format/flow/flow-repo/type_only_vars/__snapshots__/format.test.js.snap
index 726f9b0a6..eb03fd7a0 100644
--- a/tests/format/flow/flow-repo/type_only_vars/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/flow-repo/type_only_vars/__snapshots__/format.test.js.snap
@@ -38,23 +38,6 @@ module.exports = {
================================================================================
`;
-exports[`bad_shadowing.js [hermes] format 1`] = `
-"Identifier 'A' is already declared (13:4)
- 11 |
- 12 | // These string types should confict with the imported types
-> 13 | var A: string = "Hello";
- | ^
- 14 | var Foo: string = "Goodbye";
- 15 | var Baz: string = "Go away please";
- 16 |
-Cause: Identifier 'A' is already declared (13:4)
-var A: string = "Hello";
- ^~~~~~~~~
-note: previous declaration (5:14)
-import typeof A from "./A.js";
- ^"
-`;
-
exports[`bad_shadowing.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -103,18 +86,18 @@ var duck: string = "quack";
================================================================================
`;
-exports[`good_shadowing.js [hermes] format 1`] = `
-"Identifier 'A' is already declared (8:4)
- 6 | import type {Foo, Bar as Baz} from "./A.js";
- 7 |
-> 8 | var A = require('./A.js');
- | ^
- 9 | var Foo = A.Foo;
- 10 | var Baz = A.Bar;
+exports[`bad_shadowing.js format[hermes] 1`] = `
+"Identifier 'A' is already declared (13:4)
11 |
-Cause: Identifier 'A' is already declared (8:4)
-var A = require('./A.js');
- ^
+ 12 | // These string types should confict with the imported types
+> 13 | var A: string = "Hello";
+ | ^
+ 14 | var Foo: string = "Goodbye";
+ 15 | var Baz: string = "Go away please";
+ 16 |
+Cause: Identifier 'A' is already declared (13:4)
+var A: string = "Hello";
+ ^~~~~~~~~
note: previous declaration (5:14)
import typeof A from "./A.js";
^"
@@ -172,6 +155,23 @@ var b: Foo = new A.Foo();
================================================================================
`;
+exports[`good_shadowing.js format[hermes] 1`] = `
+"Identifier 'A' is already declared (8:4)
+ 6 | import type {Foo, Bar as Baz} from "./A.js";
+ 7 |
+> 8 | var A = require('./A.js');
+ | ^
+ 9 | var Foo = A.Foo;
+ 10 | var Baz = A.Bar;
+ 11 |
+Cause: Identifier 'A' is already declared (8:4)
+var A = require('./A.js');
+ ^
+note: previous declaration (5:14)
+import typeof A from "./A.js";
+ ^"
+`;
+
exports[`import_type.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
diff --git a/tests/format/flow/flow-repo/unary/__snapshots__/format.test.js.snap b/tests/format/flow/flow-repo/unary/__snapshots__/format.test.js.snap
index 9094e251a..3bc16ec9b 100644
--- a/tests/format/flow/flow-repo/unary/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/flow-repo/unary/__snapshots__/format.test.js.snap
@@ -50,20 +50,6 @@ function x4(y: string): boolean {
================================================================================
`;
-exports[`update.js [hermes] format 1`] = `
-"invalid operand in update operation (31:4)
- 29 | function() {
- 30 | const y = 123;
-> 31 | y++; // error, can't update const
- | ^
- 32 | y--; // error, can't update const
- 33 | },
- 34 |
-Cause: invalid operand in update operation (31:4)
- y++; // error, can't update const
- ^"
-`;
-
exports[`update.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -151,3 +137,17 @@ let tests = [
================================================================================
`;
+
+exports[`update.js format[hermes] 1`] = `
+"invalid operand in update operation (31:4)
+ 29 | function() {
+ 30 | const y = 123;
+> 31 | y++; // error, can't update const
+ | ^
+ 32 | y--; // error, can't update const
+ 33 | },
+ 34 |
+Cause: invalid operand in update operation (31:4)
+ y++; // error, can't update const
+ ^"
+`;
diff --git a/tests/format/flow/mapped-types/__snapshots__/format.test.js.snap b/tests/format/flow/mapped-types/__snapshots__/format.test.js.snap
index 143bcbcb7..bec38a8d5 100644
--- a/tests/format/flow/mapped-types/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/mapped-types/__snapshots__/format.test.js.snap
@@ -1,40 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`comments.js [babel-ts] format 1`] = `
-"Unexpected token (3:3)
- 1 | type Type = {
- 2 | // comment
-> 3 | +[T in number]: number;
- | ^
- 4 | };
- 5 |
- 6 | type Type = {
-Cause: Unexpected token (3:2)"
-`;
-
-exports[`comments.js [oxc-ts] format 1`] = `
-"Unexpected token (3:3)
- 1 | type Type = {
- 2 | // comment
-> 3 | +[T in number]: number;
- | ^
- 4 | };
- 5 |
- 6 | type Type = {"
-`;
-
-exports[`comments.js [typescript] format 1`] = `
-"Property or signature expected. (3:3)
- 1 | type Type = {
- 2 | // comment
-> 3 | +[T in number]: number;
- | ^
- 4 | };
- 5 |
- 6 | type Type = {
-Cause: Property or signature expected."
-`;
-
exports[`comments.js format 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
@@ -126,38 +91,38 @@ type Type = {
================================================================================
`;
-exports[`mapped-types.js [babel-ts] format 1`] = `
-"Unexpected token (5:28)
- 3 | type Mapped = {[key in keyof O]: O[key]};
- 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
-> 5 | type MappedWithVariance = {+[key in keyof O]: number};
- | ^
- 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
- 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
- 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
-Cause: Unexpected token (5:27)"
+exports[`comments.js format[babel-ts] 1`] = `
+"Unexpected token (3:3)
+ 1 | type Type = {
+ 2 | // comment
+> 3 | +[T in number]: number;
+ | ^
+ 4 | };
+ 5 |
+ 6 | type Type = {
+Cause: Unexpected token (3:2)"
`;
-exports[`mapped-types.js [oxc-ts] format 1`] = `
-"Unexpected token (5:28)
- 3 | type Mapped = {[key in keyof O]: O[key]};
- 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
-> 5 | type MappedWithVariance = {+[key in keyof O]: number};
- | ^
- 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
- 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
- 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};"
+exports[`comments.js format[oxc-ts] 1`] = `
+"Unexpected token (3:3)
+ 1 | type Type = {
+ 2 | // comment
+> 3 | +[T in number]: number;
+ | ^
+ 4 | };
+ 5 |
+ 6 | type Type = {"
`;
-exports[`mapped-types.js [typescript] format 1`] = `
-"Property or signature expected. (5:28)
- 3 | type Mapped = {[key in keyof O]: O[key]};
- 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
-> 5 | type MappedWithVariance = {+[key in keyof O]: number};
- | ^
- 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
- 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
- 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
+exports[`comments.js format[typescript] 1`] = `
+"Property or signature expected. (3:3)
+ 1 | type Type = {
+ 2 | // comment
+> 3 | +[T in number]: number;
+ | ^
+ 4 | };
+ 5 |
+ 6 | type Type = {
Cause: Property or signature expected."
`;
@@ -217,6 +182,41 @@ type MappedWithComments = {
================================================================================
`;
+exports[`mapped-types.js format[babel-ts] 1`] = `
+"Unexpected token (5:28)
+ 3 | type Mapped = {[key in keyof O]: O[key]};
+ 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
+> 5 | type MappedWithVariance = {+[key in keyof O]: number};
+ | ^
+ 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
+ 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
+ 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
+Cause: Unexpected token (5:27)"
+`;
+
+exports[`mapped-types.js format[oxc-ts] 1`] = `
+"Unexpected token (5:28)
+ 3 | type Mapped = {[key in keyof O]: O[key]};
+ 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
+> 5 | type MappedWithVariance = {+[key in keyof O]: number};
+ | ^
+ 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
+ 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
+ 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};"
+`;
+
+exports[`mapped-types.js format[typescript] 1`] = `
+"Property or signature expected. (5:28)
+ 3 | type Mapped = {[key in keyof O]: O[key]};
+ 4 | type MappedLong = {[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
+> 5 | type MappedWithVariance = {+[key in keyof O]: number};
+ | ^
+ 6 | type MappedWithVarianceLong = {-[key in keyof AReallyLongNameThatShouldReallyMostDefinitelyCauseALineWrap]: number};
+ 7 | type MappedWithPlusOptional = {[key in keyof O]+?: number};
+ 8 | type MappedWithMinusOptional = {[key in keyof O]-?: number};
+Cause: Property or signature expected."
+`;
+
exports[`ts-compatibility.js format 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
diff --git a/tests/format/flow/ternary/__snapshots__/format.test.js.snap b/tests/format/flow/ternary/__snapshots__/format.test.js.snap
index 2617e46c6..4c2811e61 100644
--- a/tests/format/flow/ternary/__snapshots__/format.test.js.snap
+++ b/tests/format/flow/ternary/__snapshots__/format.test.js.snap
@@ -1,16 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`arrows.js [flow] format 1`] = `
-"Unexpected token \`)\`, expected the token \`:\` (6:22)
- 4 | // ref: https://github.com/facebook/flow/issues/8731
- 5 |
-> 6 | (a ? (b = c) : d => e); // a ? (b = c) : (d => e)
- | ^
- 7 | (a ? (b += c) : d => e); // a ? (b += c) : (d => e)
- 8 |
- 9 | (a ? (b = c) : d => e : f); // a ? ((b = c): d => e) : f"
-`;
-
exports[`arrows.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -58,3 +47,14 @@ a ? (b) => (): e => f : g; // ((a ? (b => (c += d)) : (e => f)) : g)
================================================================================
`;
+
+exports[`arrows.js format[flow] 1`] = `
+"Unexpected token \`)\`, expected the token \`:\` (6:22)
+ 4 | // ref: https://github.com/facebook/flow/issues/8731
+ 5 |
+> 6 | (a ? (b = c) : d => e); // a ? (b = c) : (d => e)
+ | ^
+ 7 | (a ? (b += c) : d => e); // a ? (b += c) : (d => e)
+ 8 |
+ 9 | (a ? (b = c) : d => e : f); // a ? ((b = c): d => e) : f"
+`;
diff --git a/tests/format/js/_errors_/assignment/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/assignment/__snapshots__/format.test.js.snap
index 8958c1b30..7cf338d9a 100644
--- a/tests/format/js/_errors_/assignment/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/assignment/__snapshots__/format.test.js.snap
@@ -1,69 +1,69 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Assigning to rvalue (1:1)
> 1 | ({}) = x;
| ^
Cause: Assigning to rvalue (1:0)"
`;
-exports[`snippet: #0 [acorn] format 2`] = `
+exports[`snippet: #0 format[acorn] 2`] = `
"The keyword 'let' is reserved (1:21)
> 1 | class Foo extends ((let)[0] = 1) {}
| ^
Cause: The keyword 'let' is reserved (1:20)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | ({}) = x;
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | ({}) = x;
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Assigning to rvalue (1:1)
> 1 | ({}) = x;
| ^
Cause: Assigning to rvalue"
`;
-exports[`snippet: #0 [espree] format 2`] = `
+exports[`snippet: #0 format[espree] 2`] = `
"The keyword 'let' is reserved (1:21)
> 1 | class Foo extends ((let)[0] = 1) {}
| ^
Cause: The keyword 'let' is reserved"
`;
-exports[`snippet: #0 [espree] format 3`] = `
+exports[`snippet: #0 format[espree] 3`] = `
"The keyword 'let' is reserved (1:18)
> 1 | export default ((let)[0] = 1);
| ^
Cause: The keyword 'let' is reserved"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Invalid left-hand side in assignment (1:6)
> 1 | ({}) = x;
| ^
Cause: [1:5-1:6]: Invalid left-hand side in assignment"
`;
-exports[`snippet: #0 [meriyah] format 2`] = `
+exports[`snippet: #0 format[meriyah] 2`] = `
"The identifier 'let' must not be in expression position in strict mode (1:24)
> 1 | class Foo extends ((let)[0] = 1) {}
| ^
Cause: [1:23-1:24]: The identifier 'let' must not be in expression position in strict mode"
`;
-exports[`snippet: #0 [meriyah] format 3`] = `
+exports[`snippet: #0 format[meriyah] 3`] = `
"The identifier 'let' must not be in expression position in strict mode (1:21)
> 1 | export default ((let)[0] = 1);
| ^
diff --git a/tests/format/js/_errors_/async-await/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/async-await/__snapshots__/format.test.js.snap
index 442081ec4..45ecadb0f 100644
--- a/tests/format/js/_errors_/async-await/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/async-await/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Unexpected token (2:26)
1 | async function foo() {
> 2 | function bar(x = await 2) {}
@@ -9,14 +9,14 @@ exports[`snippet: #0 [acorn] format 1`] = `
Cause: Unexpected token (2:25)"
`;
-exports[`snippet: #0 [acorn] format 2`] = `
+exports[`snippet: #0 format[acorn] 2`] = `
"Await expression cannot be a default value (1:12)
> 1 | async (x = await (2)) => {};
| ^
Cause: Await expression cannot be a default value (1:11)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"'await' is only allowed within async functions and at the top levels of modules. (2:20)
1 | async function foo() {
> 2 | function bar(x = await 2) {}
@@ -25,14 +25,14 @@ exports[`snippet: #0 [babel] format 1`] = `
Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:19)"
`;
-exports[`snippet: #0 [babel] format 2`] = `
+exports[`snippet: #0 format[babel] 2`] = `
"'await' is not allowed in async function parameters. (1:12)
> 1 | async (x = await (2)) => {};
| ^
Cause: 'await' is not allowed in async function parameters. (1:11)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Cannot use keyword 'await' outside an async function (2:20)
1 | async function foo() {
> 2 | function bar(x = await 2) {}
@@ -41,14 +41,14 @@ exports[`snippet: #0 [espree] format 1`] = `
Cause: Cannot use keyword 'await' outside an async function"
`;
-exports[`snippet: #0 [espree] format 2`] = `
+exports[`snippet: #0 format[espree] 2`] = `
"Await expression cannot be a default value (1:12)
> 1 | async (x = await (2)) => {};
| ^
Cause: Await expression cannot be a default value"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected number, expected the token \`,\` (2:26)
1 | async function foo() {
> 2 | function bar(x = await 2) {}
@@ -56,13 +56,13 @@ exports[`snippet: #0 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #0 [flow] format 2`] = `
+exports[`snippet: #0 format[flow] 2`] = `
"\`await\` is not allowed in async function parameters. (1:12)
> 1 | async (x = await (2)) => {};
| ^^^^^"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Await expression not allowed in formal parameter (2:20)
1 | async function foo() {
> 2 | function bar(x = await 2) {}
@@ -71,272 +71,272 @@ exports[`snippet: #0 [meriyah] format 1`] = `
Cause: [2:19-2:24]: Await expression not allowed in formal parameter"
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"Await expression cannot be a default value (1:12)
> 1 | async (x = await 2) => {};
| ^
Cause: Await expression cannot be a default value (1:11)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"'await' is not allowed in async function parameters. (1:12)
> 1 | async (x = await 2) => {};
| ^
Cause: 'await' is not allowed in async function parameters. (1:11)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"Await expression cannot be a default value (1:12)
> 1 | async (x = await 2) => {};
| ^
Cause: Await expression cannot be a default value"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"\`await\` is not allowed in async function parameters. (1:12)
> 1 | async (x = await 2) => {};
| ^^^^^"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Await expression not allowed in formal parameter (1:21)
> 1 | async (x = await 2) => {};
| ^^
Cause: [1:20-1:22]: Await expression not allowed in formal parameter"
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Unexpected token (1:25)
> 1 | f = async (a) => await a! ** 6;
| ^
Cause: Unexpected token (1:24)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Unexpected token (1:27)
> 1 | f = async (a) => await a! ** 6;
| ^
Cause: Unexpected token (1:26)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Unexpected token ! (1:25)
> 1 | f = async (a) => await a! ** 6;
| ^
Cause: Unexpected token !"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:25)
> 1 | f = async (a) => await a! ** 6;
| ^"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Unexpected token: '!' (1:25)
> 1 | f = async (a) => await a! ** 6;
| ^
Cause: [1:24-1:25]: Unexpected token: '!'"
`;
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"Unexpected token (1:14)
> 1 | f = (a) => +a! ** 6;
| ^
Cause: Unexpected token (1:13)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Unexpected token (1:16)
> 1 | f = (a) => +a! ** 6;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"Unexpected token ! (1:14)
> 1 | f = (a) => +a! ** 6;
| ^
Cause: Unexpected token !"
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected token \`!\`, expected the end of an expression statement (\`;\`) (1:14)
> 1 | f = (a) => +a! ** 6;
| ^"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"Unexpected token: '!' (1:14)
> 1 | f = (a) => +a! ** 6;
| ^
Cause: [1:13-1:14]: Unexpected token: '!'"
`;
-exports[`snippet: #4 [acorn] format 1`] = `
+exports[`snippet: #4 format[acorn] 1`] = `
"Unexpected token (1:22)
> 1 | async (a) => (await a!) ** 6;
| ^
Cause: Unexpected token (1:21)"
`;
-exports[`snippet: #4 [babel] format 1`] = `
+exports[`snippet: #4 format[babel] 1`] = `
"Unexpected token, expected "," (1:22)
> 1 | async (a) => (await a!) ** 6;
| ^
Cause: Unexpected token, expected "," (1:21)"
`;
-exports[`snippet: #4 [espree] format 1`] = `
+exports[`snippet: #4 format[espree] 1`] = `
"Unexpected token ! (1:22)
> 1 | async (a) => (await a!) ** 6;
| ^
Cause: Unexpected token !"
`;
-exports[`snippet: #4 [flow] format 1`] = `
+exports[`snippet: #4 format[flow] 1`] = `
"Unexpected token \`!\`, expected the token \`)\` (1:22)
> 1 | async (a) => (await a!) ** 6;
| ^"
`;
-exports[`snippet: #4 [meriyah] format 1`] = `
+exports[`snippet: #4 format[meriyah] 1`] = `
"Expected ')' (1:22)
> 1 | async (a) => (await a!) ** 6;
| ^
Cause: [1:21-1:22]: Expected ')'"
`;
-exports[`snippet: #5 [acorn] format 1`] = `
+exports[`snippet: #5 format[acorn] 1`] = `
"Unexpected token (1:6)
> 1 | (-+5 ** 6);
| ^
Cause: Unexpected token (1:5)"
`;
-exports[`snippet: #5 [babel] format 1`] = `
+exports[`snippet: #5 format[babel] 1`] = `
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:3)
> 1 | (-+5 ** 6);
| ^
Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)"
`;
-exports[`snippet: #5 [espree] format 1`] = `
+exports[`snippet: #5 format[espree] 1`] = `
"Unexpected token ** (1:6)
> 1 | (-+5 ** 6);
| ^
Cause: Unexpected token **"
`;
-exports[`snippet: #5 [flow] format 1`] = `
+exports[`snippet: #5 format[flow] 1`] = `
"Invalid left-hand side in exponentiation expression (1:2)
> 1 | (-+5 ** 6);
| ^^^"
`;
-exports[`snippet: #5 [meriyah] format 1`] = `
+exports[`snippet: #5 format[meriyah] 1`] = `
"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:6)
> 1 | (-+5 ** 6);
| ^^
Cause: [1:5-1:7]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses"
`;
-exports[`snippet: #6 [acorn] format 1`] = `
+exports[`snippet: #6 format[acorn] 1`] = `
"Unexpected token (1:25)
> 1 | f = async () => await 5 ** 6;
| ^
Cause: Unexpected token (1:24)"
`;
-exports[`snippet: #6 [babel] format 1`] = `
+exports[`snippet: #6 format[babel] 1`] = `
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23)
> 1 | f = async () => await 5 ** 6;
| ^
Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)"
`;
-exports[`snippet: #6 [espree] format 1`] = `
+exports[`snippet: #6 format[espree] 1`] = `
"Unexpected token ** (1:25)
> 1 | f = async () => await 5 ** 6;
| ^
Cause: Unexpected token **"
`;
-exports[`snippet: #6 [flow] format 1`] = `
+exports[`snippet: #6 format[flow] 1`] = `
"Invalid left-hand side in exponentiation expression (1:17)
> 1 | f = async () => await 5 ** 6;
| ^^^^^^^"
`;
-exports[`snippet: #6 [meriyah] format 1`] = `
+exports[`snippet: #6 format[meriyah] 1`] = `
"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:25)
> 1 | f = async () => await 5 ** 6;
| ^^
Cause: [1:24-1:26]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses"
`;
-exports[`snippet: #7 [acorn] format 1`] = `
+exports[`snippet: #7 format[acorn] 1`] = `
"Unexpected token (1:26)
> 1 | f = async () => await -5 ** 6;
| ^
Cause: Unexpected token (1:25)"
`;
-exports[`snippet: #7 [babel] format 1`] = `
+exports[`snippet: #7 format[babel] 1`] = `
"Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:23)
> 1 | f = async () => await -5 ** 6;
| ^
Cause: Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:22)"
`;
-exports[`snippet: #7 [espree] format 1`] = `
+exports[`snippet: #7 format[espree] 1`] = `
"Unexpected token ** (1:26)
> 1 | f = async () => await -5 ** 6;
| ^
Cause: Unexpected token **"
`;
-exports[`snippet: #7 [flow] format 1`] = `
+exports[`snippet: #7 format[flow] 1`] = `
"Invalid left-hand side in exponentiation expression (1:17)
> 1 | f = async () => await -5 ** 6;
| ^^^^^^^^"
`;
-exports[`snippet: #7 [meriyah] format 1`] = `
+exports[`snippet: #7 format[meriyah] 1`] = `
"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses (1:26)
> 1 | f = async () => await -5 ** 6;
| ^^
Cause: [1:25-1:27]: Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses"
`;
-exports[`snippet: #8 [acorn] format 1`] = `
+exports[`snippet: #8 format[acorn] 1`] = `
"Shorthand property assignments are valid only in destructuring patterns (1:15)
> 1 | async({ foo33 = 1 });
| ^
Cause: Shorthand property assignments are valid only in destructuring patterns (1:14)"
`;
-exports[`snippet: #8 [babel] format 1`] = `
+exports[`snippet: #8 format[babel] 1`] = `
"Invalid shorthand property initializer. (1:15)
> 1 | async({ foo33 = 1 });
| ^
Cause: Invalid shorthand property initializer. (1:14)"
`;
-exports[`snippet: #8 [espree] format 1`] = `
+exports[`snippet: #8 format[espree] 1`] = `
"Shorthand property assignments are valid only in destructuring patterns (1:15)
> 1 | async({ foo33 = 1 });
| ^
Cause: Shorthand property assignments are valid only in destructuring patterns"
`;
-exports[`snippet: #8 [flow] format 1`] = `
+exports[`snippet: #8 format[flow] 1`] = `
"Unexpected token \`=\` (1:15)
> 1 | async({ foo33 = 1 });
| ^"
`;
-exports[`snippet: #8 [meriyah] format 1`] = `
+exports[`snippet: #8 format[meriyah] 1`] = `
"Invalid shorthand property initializer (1:21)
> 1 | async({ foo33 = 1 });
| ^
diff --git a/tests/format/js/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap
index 121bb81a6..2d22497e1 100644
--- a/tests/format/js/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | constructor
@@ -9,7 +9,7 @@ exports[`snippet: #0 [acorn] format 1`] = `
Cause: Classes can't have a field named 'constructor' (2:2)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | constructor
@@ -18,7 +18,7 @@ exports[`snippet: #0 [babel] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:2)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | constructor
@@ -27,16 +27,7 @@ exports[`snippet: #0 [babel-ts] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:2)"
`;
-exports[`snippet: #0 [babel-ts] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:3)
- 1 | abstract class Foo {
-> 2 | constructor
- | ^
- 3 | }
-Cause: Classes may not have a field named 'constructor'. (2:2)"
-`;
-
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | constructor
@@ -45,7 +36,7 @@ exports[`snippet: #0 [espree] format 1`] = `
Cause: Classes can't have a field named 'constructor'"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Classes may not have fields named \`constructor\`. (2:3)
1 | class Foo {
> 2 | constructor
@@ -53,7 +44,7 @@ exports[`snippet: #0 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`snippet: #0 format[hermes] 1`] = `
"invalid class property name (2:2)
1 | class Foo {
> 2 | constructor
@@ -64,7 +55,7 @@ Cause: invalid class property name (2:2)
^~~~~~~~~~~"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Classes may not have a field called constructor (3:1)
1 | class Foo {
2 | constructor
@@ -73,7 +64,7 @@ exports[`snippet: #0 [meriyah] format 1`] = `
Cause: [3:0-3:1]: Classes may not have a field called constructor"
`;
-exports[`snippet: #0 [oxc] format 1`] = `
+exports[`snippet: #0 format[oxc] 1`] = `
"Expected \`(\` but found \`}\` (3:1)
1 | class Foo {
2 | constructor
@@ -81,7 +72,7 @@ exports[`snippet: #0 [oxc] format 1`] = `
| ^"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Expected \`(\` but found \`}\` (3:1)
1 | class Foo {
2 | constructor
@@ -89,15 +80,7 @@ exports[`snippet: #0 [oxc-ts] format 1`] = `
| ^"
`;
-exports[`snippet: #0 [oxc-ts] format 2`] = `
-"Expected \`(\` but found \`}\` (3:1)
- 1 | abstract class Foo {
- 2 | constructor
-> 3 | }
- | ^"
-`;
-
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"'(' expected. (3:1)
1 | class Foo {
2 | constructor
@@ -106,16 +89,7 @@ exports[`snippet: #0 [typescript] format 1`] = `
Cause: '(' expected."
`;
-exports[`snippet: #0 [typescript] format 2`] = `
-"'(' expected. (3:1)
- 1 | abstract class Foo {
- 2 | constructor
-> 3 | }
- | ^
-Cause: '(' expected."
-`;
-
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -124,7 +98,7 @@ exports[`snippet: #1 [acorn] format 1`] = `
Cause: Classes can't have a field named 'constructor' (2:2)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -133,7 +107,7 @@ exports[`snippet: #1 [babel] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:2)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -142,16 +116,7 @@ exports[`snippet: #1 [babel-ts] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:2)"
`;
-exports[`snippet: #1 [babel-ts] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:3)
- 1 | abstract class Foo {
-> 2 | 'constructor'
- | ^
- 3 | }
-Cause: Classes may not have a field named 'constructor'. (2:2)"
-`;
-
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -160,7 +125,7 @@ exports[`snippet: #1 [espree] format 1`] = `
Cause: Classes can't have a field named 'constructor'"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Classes may not have fields named \`constructor\`. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -168,7 +133,7 @@ exports[`snippet: #1 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #1 [hermes] format 1`] = `
+exports[`snippet: #1 format[hermes] 1`] = `
"invalid class property name (2:2)
1 | class Foo {
> 2 | 'constructor'
@@ -179,7 +144,7 @@ Cause: invalid class property name (2:2)
^~~~~~~~~~~~~"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Classes may not have a field called constructor (3:1)
1 | class Foo {
2 | 'constructor'
@@ -188,7 +153,7 @@ exports[`snippet: #1 [meriyah] format 1`] = `
Cause: [3:0-3:1]: Classes may not have a field called constructor"
`;
-exports[`snippet: #1 [oxc] format 1`] = `
+exports[`snippet: #1 format[oxc] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -196,7 +161,7 @@ exports[`snippet: #1 [oxc] format 1`] = `
3 | }"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -204,15 +169,7 @@ exports[`snippet: #1 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #1 [oxc-ts] format 2`] = `
-"Classes can't have a field named 'constructor' (2:3)
- 1 | abstract class Foo {
-> 2 | 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }"
-`;
-
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -221,16 +178,7 @@ exports[`snippet: #1 [typescript] format 1`] = `
Cause: Classes may not have a field named 'constructor'."
`;
-exports[`snippet: #1 [typescript] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:3)
- 1 | abstract class Foo {
-> 2 | 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }
-Cause: Classes may not have a field named 'constructor'."
-`;
-
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -239,7 +187,7 @@ exports[`snippet: #2 [acorn] format 1`] = `
Cause: Classes can't have a field named 'constructor' (2:2)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -248,7 +196,7 @@ exports[`snippet: #2 [babel] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:2)"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -257,16 +205,7 @@ exports[`snippet: #2 [babel-ts] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:2)"
`;
-exports[`snippet: #2 [babel-ts] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:3)
- 1 | abstract class Foo {
-> 2 | 'constructor'
- | ^
- 3 | }
-Cause: Classes may not have a field named 'constructor'. (2:2)"
-`;
-
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -275,7 +214,7 @@ exports[`snippet: #2 [espree] format 1`] = `
Cause: Classes can't have a field named 'constructor'"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Classes may not have fields named \`constructor\`. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -283,7 +222,7 @@ exports[`snippet: #2 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #2 [hermes] format 1`] = `
+exports[`snippet: #2 format[hermes] 1`] = `
"invalid class property name (2:2)
1 | class Foo {
> 2 | 'constructor'
@@ -294,7 +233,7 @@ Cause: invalid class property name (2:2)
^~~~~~~~~~~~~"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Classes may not have a field called constructor (3:1)
1 | class Foo {
2 | 'constructor'
@@ -303,7 +242,7 @@ exports[`snippet: #2 [meriyah] format 1`] = `
Cause: [3:0-3:1]: Classes may not have a field called constructor"
`;
-exports[`snippet: #2 [oxc] format 1`] = `
+exports[`snippet: #2 format[oxc] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -311,7 +250,7 @@ exports[`snippet: #2 [oxc] format 1`] = `
3 | }"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Classes can't have a field named 'constructor' (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -319,15 +258,7 @@ exports[`snippet: #2 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #2 [oxc-ts] format 2`] = `
-"Classes can't have a field named 'constructor' (2:3)
- 1 | abstract class Foo {
-> 2 | 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }"
-`;
-
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Classes may not have a field named 'constructor'. (2:3)
1 | class Foo {
> 2 | 'constructor'
@@ -336,16 +267,7 @@ exports[`snippet: #2 [typescript] format 1`] = `
Cause: Classes may not have a field named 'constructor'."
`;
-exports[`snippet: #2 [typescript] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:3)
- 1 | abstract class Foo {
-> 2 | 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }
-Cause: Classes may not have a field named 'constructor'."
-`;
-
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"Unexpected token (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -354,7 +276,7 @@ exports[`snippet: #3 [acorn] format 1`] = `
Cause: Unexpected token (2:11)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -363,7 +285,7 @@ exports[`snippet: #3 [babel] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:11)"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -372,16 +294,7 @@ exports[`snippet: #3 [babel-ts] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:11)"
`;
-exports[`snippet: #3 [babel-ts] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:12)
- 1 | abstract class Foo {
-> 2 | accessor 'constructor'
- | ^
- 3 | }
-Cause: Classes may not have a field named 'constructor'. (2:11)"
-`;
-
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"Unexpected token 'constructor' (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -390,7 +303,7 @@ exports[`snippet: #3 [espree] format 1`] = `
Cause: Unexpected token 'constructor'"
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected string, expected the token \`(\` (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -398,7 +311,7 @@ exports[`snippet: #3 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #3 [hermes] format 1`] = `
+exports[`snippet: #3 format[hermes] 1`] = `
"';' expected after class property (2:11)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -409,7 +322,7 @@ Cause: ';' expected after class property (2:11)
~~~~~~~~~^"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"Classes may not have a field called constructor (3:1)
1 | class Foo {
2 | accessor 'constructor'
@@ -418,7 +331,7 @@ exports[`snippet: #3 [meriyah] format 1`] = `
Cause: [3:0-3:1]: Classes may not have a field called constructor"
`;
-exports[`snippet: #3 [oxc] format 1`] = `
+exports[`snippet: #3 format[oxc] 1`] = `
"Classes may not have a field named 'constructor' (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -426,7 +339,7 @@ exports[`snippet: #3 [oxc] format 1`] = `
3 | }"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Classes may not have a field named 'constructor' (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -434,15 +347,7 @@ exports[`snippet: #3 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #3 [oxc-ts] format 2`] = `
-"Classes may not have a field named 'constructor' (2:12)
- 1 | abstract class Foo {
-> 2 | accessor 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }"
-`;
-
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -451,16 +356,7 @@ exports[`snippet: #3 [typescript] format 1`] = `
Cause: Classes may not have a field named 'constructor'."
`;
-exports[`snippet: #3 [typescript] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:12)
- 1 | abstract class Foo {
-> 2 | accessor 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }
-Cause: Classes may not have a field named 'constructor'."
-`;
-
-exports[`snippet: #4 [acorn] format 1`] = `
+exports[`snippet: #4 format[acorn] 1`] = `
"Unexpected token (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -469,7 +365,7 @@ exports[`snippet: #4 [acorn] format 1`] = `
Cause: Unexpected token (2:11)"
`;
-exports[`snippet: #4 [babel] format 1`] = `
+exports[`snippet: #4 format[babel] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -478,7 +374,7 @@ exports[`snippet: #4 [babel] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:11)"
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -487,16 +383,7 @@ exports[`snippet: #4 [babel-ts] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:11)"
`;
-exports[`snippet: #4 [babel-ts] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:12)
- 1 | abstract class Foo {
-> 2 | accessor 'constructor'
- | ^
- 3 | }
-Cause: Classes may not have a field named 'constructor'. (2:11)"
-`;
-
-exports[`snippet: #4 [espree] format 1`] = `
+exports[`snippet: #4 format[espree] 1`] = `
"Unexpected token 'constructor' (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -505,7 +392,7 @@ exports[`snippet: #4 [espree] format 1`] = `
Cause: Unexpected token 'constructor'"
`;
-exports[`snippet: #4 [flow] format 1`] = `
+exports[`snippet: #4 format[flow] 1`] = `
"Unexpected string, expected the token \`(\` (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -513,7 +400,7 @@ exports[`snippet: #4 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #4 [hermes] format 1`] = `
+exports[`snippet: #4 format[hermes] 1`] = `
"';' expected after class property (2:11)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -524,7 +411,7 @@ Cause: ';' expected after class property (2:11)
~~~~~~~~~^"
`;
-exports[`snippet: #4 [meriyah] format 1`] = `
+exports[`snippet: #4 format[meriyah] 1`] = `
"Classes may not have a field called constructor (3:1)
1 | class Foo {
2 | accessor 'constructor'
@@ -533,7 +420,7 @@ exports[`snippet: #4 [meriyah] format 1`] = `
Cause: [3:0-3:1]: Classes may not have a field called constructor"
`;
-exports[`snippet: #4 [oxc] format 1`] = `
+exports[`snippet: #4 format[oxc] 1`] = `
"Classes may not have a field named 'constructor' (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -541,7 +428,7 @@ exports[`snippet: #4 [oxc] format 1`] = `
3 | }"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"Classes may not have a field named 'constructor' (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -549,15 +436,7 @@ exports[`snippet: #4 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #4 [oxc-ts] format 2`] = `
-"Classes may not have a field named 'constructor' (2:12)
- 1 | abstract class Foo {
-> 2 | accessor 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }"
-`;
-
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor 'constructor'
@@ -566,16 +445,7 @@ exports[`snippet: #4 [typescript] format 1`] = `
Cause: Classes may not have a field named 'constructor'."
`;
-exports[`snippet: #4 [typescript] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:12)
- 1 | abstract class Foo {
-> 2 | accessor 'constructor'
- | ^^^^^^^^^^^^^
- 3 | }
-Cause: Classes may not have a field named 'constructor'."
-`;
-
-exports[`snippet: #5 [acorn] format 1`] = `
+exports[`snippet: #5 format[acorn] 1`] = `
"Unexpected token (2:12)
1 | class Foo {
> 2 | accessor constructor
@@ -584,7 +454,7 @@ exports[`snippet: #5 [acorn] format 1`] = `
Cause: Unexpected token (2:11)"
`;
-exports[`snippet: #5 [babel] format 1`] = `
+exports[`snippet: #5 format[babel] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor constructor
@@ -593,7 +463,7 @@ exports[`snippet: #5 [babel] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:11)"
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"Classes may not have a field named 'constructor'. (2:12)
1 | class Foo {
> 2 | accessor constructor
@@ -602,16 +472,7 @@ exports[`snippet: #5 [babel-ts] format 1`] = `
Cause: Classes may not have a field named 'constructor'. (2:11)"
`;
-exports[`snippet: #5 [babel-ts] format 2`] = `
-"Classes may not have a field named 'constructor'. (2:12)
- 1 | abstract class Foo {
-> 2 | accessor constructor
- | ^
- 3 | }
-Cause: Classes may not have a field named 'constructor'. (2:11)"
-`;
-
-exports[`snippet: #5 [espree] format 1`] = `
+exports[`snippet: #5 format[espree] 1`] = `
"Unexpected token constructor (2:12)
1 | class Foo {
> 2 | accessor constructor
@@ -620,7 +481,7 @@ exports[`snippet: #5 [espree] format 1`] = `
Cause: Unexpected token constructor"
`;
-exports[`snippet: #5 [flow] format 1`] = `
+exports[`snippet: #5 format[flow] 1`] = `
"Unexpected identifier, expected the token \`(\` (2:12)
1 | class Foo {
> 2 | accessor constructor
@@ -628,7 +489,7 @@ exports[`snippet: #5 [flow] format 1`] = `
3 | }"
`;
-exports[`snippet: #5 [hermes] format 1`] = `
+exports[`snippet: #5 format[hermes] 1`] = `
"';' expected after class property (2:11)
1 | class Foo {
> 2 | accessor constructor
@@ -639,7 +500,7 @@ Cause: ';' expected after class property (2:11)
~~~~~~~~~^"
`;
-exports[`snippet: #5 [meriyah] format 1`] = `
+exports[`snippet: #5 format[meriyah] 1`] = `
"Classes may not have a field called constructor (3:1)
1 | class Foo {
2 | accessor constructor
@@ -648,7 +509,7 @@ exports[`snippet: #5 [meriyah] format 1`] = `
Cause: [3:0-3:1]: Classes may not have a field called constructor"
`;
-exports[`snippet: #5 [oxc] format 1`] = `
+exports[`snippet: #5 format[oxc] 1`] = `
"Expected \`(\` but found \`}\` (3:1)
1 | class Foo {
2 | accessor constructor
@@ -656,7 +517,7 @@ exports[`snippet: #5 [oxc] format 1`] = `
| ^"
`;
-exports[`snippet: #5 [oxc-ts] format 1`] = `
+exports[`snippet: #5 format[oxc-ts] 1`] = `
"Expected \`(\` but found \`}\` (3:1)
1 | class Foo {
2 | accessor constructor
@@ -664,15 +525,7 @@ exports[`snippet: #5 [oxc-ts] format 1`] = `
| ^"
`;
-exports[`snippet: #5 [oxc-ts] format 2`] = `
-"Expected \`(\` but found \`}\` (3:1)
- 1 | abstract class Foo {
- 2 | accessor constructor
-> 3 | }
- | ^"
-`;
-
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"'(' expected. (3:1)
1 | class Foo {
2 | accessor constructor
@@ -680,12 +533,3 @@ exports[`snippet: #5 [typescript] format 1`] = `
| ^
Cause: '(' expected."
`;
-
-exports[`snippet: #5 [typescript] format 2`] = `
-"'(' expected. (3:1)
- 1 | abstract class Foo {
- 2 | accessor constructor
-> 3 | }
- | ^
-Cause: '(' expected."
-`;
diff --git a/tests/format/js/_errors_/class-property-named-constructor/format.test.js b/tests/format/js/_errors_/class-property-named-constructor/format.test.js
index 85bc53f2f..25c0a0dda 100644
--- a/tests/format/js/_errors_/class-property-named-constructor/format.test.js
+++ b/tests/format/js/_errors_/class-property-named-constructor/format.test.js
@@ -1,42 +1,9 @@
-import { outdent } from "outdent";
-
-const cases = [
- outdent`
- class Foo {
- constructor
- }
- `,
- outdent`
- class Foo {
- 'construct\u{6f}r'
- }
- `,
- outdent`
- class Foo {
- 'constructor'
- }
- `,
- outdent`
- class Foo {
- accessor 'construct\u{6f}r'
- }
- `,
- outdent`
- class Foo {
- accessor 'constructor'
- }
- `,
- outdent`
- class Foo {
- accessor constructor
- }
- `,
-];
+import { testCases } from "../../../misc/shared-fixtures/class-property-named-constructor.js";
runFormatTest(
{
importMeta: import.meta,
- snippets: cases,
+ snippets: testCases,
},
[
"babel",
@@ -51,11 +18,3 @@ runFormatTest(
"hermes",
],
);
-
-runFormatTest(
- {
- importMeta: import.meta,
- snippets: cases.map((code) => `abstract ${code}`),
- },
- ["typescript", "babel-ts", "oxc-ts"],
-);
diff --git a/tests/format/js/_errors_/discard-binding/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/discard-binding/__snapshots__/format.test.js.snap
index fcda0de7e..cbabd43b3 100644
--- a/tests/format/js/_errors_/discard-binding/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/discard-binding/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-array-expression.js [acorn] format 1`] = `
+exports[`invalid-array-expression.js format[acorn] 1`] = `
"Unexpected token (1:9)
> 1 | ([[[void], x, ], y]);
| ^
@@ -10,7 +10,7 @@ exports[`invalid-array-expression.js [acorn] format 1`] = `
Cause: Unexpected token (1:8)"
`;
-exports[`invalid-array-expression.js [babel] format 1`] = `
+exports[`invalid-array-expression.js format[babel] 1`] = `
"'void' must be followed by an expression when not used in a binding position. (1:5)
> 1 | ([[[void], x, ], y]);
| ^
@@ -20,7 +20,7 @@ exports[`invalid-array-expression.js [babel] format 1`] = `
Cause: 'void' must be followed by an expression when not used in a binding position. (1:4)"
`;
-exports[`invalid-array-expression.js [espree] format 1`] = `
+exports[`invalid-array-expression.js format[espree] 1`] = `
"Unexpected token ] (1:9)
> 1 | ([[[void], x, ], y]);
| ^
@@ -30,7 +30,7 @@ exports[`invalid-array-expression.js [espree] format 1`] = `
Cause: Unexpected token ]"
`;
-exports[`invalid-array-expression.js [hermes] format 1`] = `
+exports[`invalid-array-expression.js format[hermes] 1`] = `
"invalid expression (1:8)
> 1 | ([[[void], x, ], y]);
| ^
@@ -42,7 +42,7 @@ Cause: invalid expression (1:8)
^"
`;
-exports[`invalid-array-expression.js [meriyah] format 1`] = `
+exports[`invalid-array-expression.js format[meriyah] 1`] = `
"Unexpected token: ']' (1:9)
> 1 | ([[[void], x, ], y]);
| ^
@@ -52,7 +52,7 @@ exports[`invalid-array-expression.js [meriyah] format 1`] = `
Cause: [1:8-1:9]: Unexpected token: ']'"
`;
-exports[`invalid-array-expression.js [oxc] format 1`] = `
+exports[`invalid-array-expression.js format[oxc] 1`] = `
"Unexpected token (1:9)
> 1 | ([[[void], x, ], y]);
| ^
@@ -61,7 +61,7 @@ exports[`invalid-array-expression.js [oxc] format 1`] = `
4 |"
`;
-exports[`invalid-array-expression.js [oxc-ts] format 1`] = `
+exports[`invalid-array-expression.js format[oxc-ts] 1`] = `
"Unexpected token (1:9)
> 1 | ([[[void], x, ], y]);
| ^
@@ -70,7 +70,7 @@ exports[`invalid-array-expression.js [oxc-ts] format 1`] = `
4 |"
`;
-exports[`invalid-array-expression.js [typescript] format 1`] = `
+exports[`invalid-array-expression.js format[typescript] 1`] = `
"Expression expected. (1:9)
> 1 | ([[[void], x, ], y]);
| ^
@@ -80,7 +80,7 @@ exports[`invalid-array-expression.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-assignment-expression.js [acorn] format 1`] = `
+exports[`invalid-assignment-expression.js format[acorn] 1`] = `
"Unexpected token (1:6)
> 1 | void = 0;
| ^
@@ -88,7 +88,7 @@ exports[`invalid-assignment-expression.js [acorn] format 1`] = `
Cause: Unexpected token (1:5)"
`;
-exports[`invalid-assignment-expression.js [babel] format 1`] = `
+exports[`invalid-assignment-expression.js format[babel] 1`] = `
"Unexpected token (1:6)
> 1 | void = 0;
| ^
@@ -96,7 +96,7 @@ exports[`invalid-assignment-expression.js [babel] format 1`] = `
Cause: Unexpected token (1:5)"
`;
-exports[`invalid-assignment-expression.js [espree] format 1`] = `
+exports[`invalid-assignment-expression.js format[espree] 1`] = `
"Unexpected token = (1:6)
> 1 | void = 0;
| ^
@@ -104,7 +104,7 @@ exports[`invalid-assignment-expression.js [espree] format 1`] = `
Cause: Unexpected token ="
`;
-exports[`invalid-assignment-expression.js [hermes] format 1`] = `
+exports[`invalid-assignment-expression.js format[hermes] 1`] = `
"invalid expression (1:5)
> 1 | void = 0;
| ^
@@ -114,7 +114,7 @@ void = 0;
^"
`;
-exports[`invalid-assignment-expression.js [meriyah] format 1`] = `
+exports[`invalid-assignment-expression.js format[meriyah] 1`] = `
"Unexpected token: '=' (1:6)
> 1 | void = 0;
| ^
@@ -122,21 +122,21 @@ exports[`invalid-assignment-expression.js [meriyah] format 1`] = `
Cause: [1:5-1:6]: Unexpected token: '='"
`;
-exports[`invalid-assignment-expression.js [oxc] format 1`] = `
+exports[`invalid-assignment-expression.js format[oxc] 1`] = `
"Unexpected token (1:6)
> 1 | void = 0;
| ^
2 |"
`;
-exports[`invalid-assignment-expression.js [oxc-ts] format 1`] = `
+exports[`invalid-assignment-expression.js format[oxc-ts] 1`] = `
"Unexpected token (1:6)
> 1 | void = 0;
| ^
2 |"
`;
-exports[`invalid-assignment-expression.js [typescript] format 1`] = `
+exports[`invalid-assignment-expression.js format[typescript] 1`] = `
"Expression expected. (1:6)
> 1 | void = 0;
| ^
@@ -144,7 +144,7 @@ exports[`invalid-assignment-expression.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-assignment-for.js [acorn] format 1`] = `
+exports[`invalid-assignment-for.js format[acorn] 1`] = `
"Unexpected token (1:15)
> 1 | for (void of []);
| ^
@@ -152,7 +152,7 @@ exports[`invalid-assignment-for.js [acorn] format 1`] = `
Cause: Unexpected token (1:14)"
`;
-exports[`invalid-assignment-for.js [babel] format 1`] = `
+exports[`invalid-assignment-for.js format[babel] 1`] = `
"Unexpected token (1:15)
> 1 | for (void of []);
| ^
@@ -160,7 +160,7 @@ exports[`invalid-assignment-for.js [babel] format 1`] = `
Cause: Unexpected token (1:14)"
`;
-exports[`invalid-assignment-for.js [espree] format 1`] = `
+exports[`invalid-assignment-for.js format[espree] 1`] = `
"Unexpected token ] (1:15)
> 1 | for (void of []);
| ^
@@ -168,7 +168,7 @@ exports[`invalid-assignment-for.js [espree] format 1`] = `
Cause: Unexpected token ]"
`;
-exports[`invalid-assignment-for.js [hermes] format 1`] = `
+exports[`invalid-assignment-for.js format[hermes] 1`] = `
"invalid expression (1:14)
> 1 | for (void of []);
| ^
@@ -178,7 +178,7 @@ for (void of []);
^"
`;
-exports[`invalid-assignment-for.js [meriyah] format 1`] = `
+exports[`invalid-assignment-for.js format[meriyah] 1`] = `
"Unexpected token: ']' (1:15)
> 1 | for (void of []);
| ^
@@ -186,21 +186,21 @@ exports[`invalid-assignment-for.js [meriyah] format 1`] = `
Cause: [1:14-1:15]: Unexpected token: ']'"
`;
-exports[`invalid-assignment-for.js [oxc] format 1`] = `
+exports[`invalid-assignment-for.js format[oxc] 1`] = `
"Unexpected token (1:15)
> 1 | for (void of []);
| ^
2 |"
`;
-exports[`invalid-assignment-for.js [oxc-ts] format 1`] = `
+exports[`invalid-assignment-for.js format[oxc-ts] 1`] = `
"Unexpected token (1:15)
> 1 | for (void of []);
| ^
2 |"
`;
-exports[`invalid-assignment-for.js [typescript] format 1`] = `
+exports[`invalid-assignment-for.js format[typescript] 1`] = `
"An element access expression should take an argument. (1:15)
> 1 | for (void of []);
| ^
@@ -208,7 +208,7 @@ exports[`invalid-assignment-for.js [typescript] format 1`] = `
Cause: An element access expression should take an argument."
`;
-exports[`invalid-assignment-pattern.js [acorn] format 1`] = `
+exports[`invalid-assignment-pattern.js format[acorn] 1`] = `
"Unexpected keyword 'void' (3:14)
1 | {
2 | // function parameter
@@ -220,7 +220,7 @@ exports[`invalid-assignment-pattern.js [acorn] format 1`] = `
Cause: Unexpected keyword 'void' (3:13)"
`;
-exports[`invalid-assignment-pattern.js [babel] format 1`] = `
+exports[`invalid-assignment-pattern.js format[babel] 1`] = `
"A void binding may not have an initializer. (3:14)
1 | {
2 | // function parameter
@@ -232,7 +232,7 @@ exports[`invalid-assignment-pattern.js [babel] format 1`] = `
Cause: A void binding may not have an initializer. (3:13)"
`;
-exports[`invalid-assignment-pattern.js [espree] format 1`] = `
+exports[`invalid-assignment-pattern.js format[espree] 1`] = `
"Unexpected keyword 'void' (3:14)
1 | {
2 | // function parameter
@@ -244,7 +244,7 @@ exports[`invalid-assignment-pattern.js [espree] format 1`] = `
Cause: Unexpected keyword 'void'"
`;
-exports[`invalid-assignment-pattern.js [hermes] format 1`] = `
+exports[`invalid-assignment-pattern.js format[hermes] 1`] = `
"identifier, '{' or '[' expected in binding pattern (3:13)
1 | {
2 | // function parameter
@@ -258,7 +258,7 @@ Cause: identifier, '{' or '[' expected in binding pattern (3:13)
^"
`;
-exports[`invalid-assignment-pattern.js [meriyah] format 1`] = `
+exports[`invalid-assignment-pattern.js format[meriyah] 1`] = `
"Invalid keyword (3:14)
1 | {
2 | // function parameter
@@ -270,7 +270,7 @@ exports[`invalid-assignment-pattern.js [meriyah] format 1`] = `
Cause: [3:13-3:17]: Invalid keyword"
`;
-exports[`invalid-assignment-pattern.js [oxc] format 1`] = `
+exports[`invalid-assignment-pattern.js format[oxc] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
1 | {
2 | // function parameter
@@ -281,7 +281,7 @@ exports[`invalid-assignment-pattern.js [oxc] format 1`] = `
6 | // arrow function parameter"
`;
-exports[`invalid-assignment-pattern.js [oxc-ts] format 1`] = `
+exports[`invalid-assignment-pattern.js format[oxc-ts] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
1 | {
2 | // function parameter
@@ -292,7 +292,7 @@ exports[`invalid-assignment-pattern.js [oxc-ts] format 1`] = `
6 | // arrow function parameter"
`;
-exports[`invalid-assignment-pattern.js [typescript] format 1`] = `
+exports[`invalid-assignment-pattern.js format[typescript] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
1 | {
2 | // function parameter
@@ -304,7 +304,7 @@ exports[`invalid-assignment-pattern.js [typescript] format 1`] = `
Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
-exports[`invalid-async-call-argument.js [acorn] format 1`] = `
+exports[`invalid-async-call-argument.js format[acorn] 1`] = `
"Unexpected token (1:11)
> 1 | async(void, x);
| ^
@@ -314,7 +314,7 @@ exports[`invalid-async-call-argument.js [acorn] format 1`] = `
Cause: Unexpected token (1:10)"
`;
-exports[`invalid-async-call-argument.js [babel] format 1`] = `
+exports[`invalid-async-call-argument.js format[babel] 1`] = `
"'void' must be followed by an expression when not used in a binding position. (1:7)
> 1 | async(void, x);
| ^
@@ -324,7 +324,7 @@ exports[`invalid-async-call-argument.js [babel] format 1`] = `
Cause: 'void' must be followed by an expression when not used in a binding position. (1:6)"
`;
-exports[`invalid-async-call-argument.js [espree] format 1`] = `
+exports[`invalid-async-call-argument.js format[espree] 1`] = `
"Unexpected token , (1:11)
> 1 | async(void, x);
| ^
@@ -334,7 +334,7 @@ exports[`invalid-async-call-argument.js [espree] format 1`] = `
Cause: Unexpected token ,"
`;
-exports[`invalid-async-call-argument.js [hermes] format 1`] = `
+exports[`invalid-async-call-argument.js format[hermes] 1`] = `
"invalid expression (1:10)
> 1 | async(void, x);
| ^
@@ -346,7 +346,7 @@ async(void, x);
^"
`;
-exports[`invalid-async-call-argument.js [meriyah] format 1`] = `
+exports[`invalid-async-call-argument.js format[meriyah] 1`] = `
"Unexpected token: ',' (1:11)
> 1 | async(void, x);
| ^
@@ -356,7 +356,7 @@ exports[`invalid-async-call-argument.js [meriyah] format 1`] = `
Cause: [1:10-1:11]: Unexpected token: ','"
`;
-exports[`invalid-async-call-argument.js [oxc] format 1`] = `
+exports[`invalid-async-call-argument.js format[oxc] 1`] = `
"Unexpected token (1:11)
> 1 | async(void, x);
| ^
@@ -365,7 +365,7 @@ exports[`invalid-async-call-argument.js [oxc] format 1`] = `
4 |"
`;
-exports[`invalid-async-call-argument.js [oxc-ts] format 1`] = `
+exports[`invalid-async-call-argument.js format[oxc-ts] 1`] = `
"Unexpected token (1:11)
> 1 | async(void, x);
| ^
@@ -374,7 +374,7 @@ exports[`invalid-async-call-argument.js [oxc-ts] format 1`] = `
4 |"
`;
-exports[`invalid-async-call-argument.js [typescript] format 1`] = `
+exports[`invalid-async-call-argument.js format[typescript] 1`] = `
"Expression expected. (1:11)
> 1 | async(void, x);
| ^
@@ -384,7 +384,7 @@ exports[`invalid-async-call-argument.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-catch-parameter.js [acorn] format 1`] = `
+exports[`invalid-catch-parameter.js format[acorn] 1`] = `
"Unexpected keyword 'void' (1:15)
> 1 | try {} catch (void) {}
| ^
@@ -392,7 +392,7 @@ exports[`invalid-catch-parameter.js [acorn] format 1`] = `
Cause: Unexpected keyword 'void' (1:14)"
`;
-exports[`invalid-catch-parameter.js [babel] format 1`] = `
+exports[`invalid-catch-parameter.js format[babel] 1`] = `
"A void binding can not be the catch clause parameter. Use \`try { ... } catch { ... }\` if you want to discard the caught error. (1:15)
> 1 | try {} catch (void) {}
| ^
@@ -400,7 +400,7 @@ exports[`invalid-catch-parameter.js [babel] format 1`] = `
Cause: A void binding can not be the catch clause parameter. Use \`try { ... } catch { ... }\` if you want to discard the caught error. (1:14)"
`;
-exports[`invalid-catch-parameter.js [espree] format 1`] = `
+exports[`invalid-catch-parameter.js format[espree] 1`] = `
"Unexpected keyword 'void' (1:15)
> 1 | try {} catch (void) {}
| ^
@@ -408,7 +408,7 @@ exports[`invalid-catch-parameter.js [espree] format 1`] = `
Cause: Unexpected keyword 'void'"
`;
-exports[`invalid-catch-parameter.js [hermes] format 1`] = `
+exports[`invalid-catch-parameter.js format[hermes] 1`] = `
"'identifier' expected inside catch list (1:14)
> 1 | try {} catch (void) {}
| ^
@@ -418,7 +418,7 @@ try {} catch (void) {}
~~~~~~~^"
`;
-exports[`invalid-catch-parameter.js [meriyah] format 1`] = `
+exports[`invalid-catch-parameter.js format[meriyah] 1`] = `
"Invalid keyword (1:15)
> 1 | try {} catch (void) {}
| ^^^^
@@ -426,21 +426,21 @@ exports[`invalid-catch-parameter.js [meriyah] format 1`] = `
Cause: [1:14-1:18]: Invalid keyword"
`;
-exports[`invalid-catch-parameter.js [oxc] format 1`] = `
+exports[`invalid-catch-parameter.js format[oxc] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (1:15)
> 1 | try {} catch (void) {}
| ^^^^
2 |"
`;
-exports[`invalid-catch-parameter.js [oxc-ts] format 1`] = `
+exports[`invalid-catch-parameter.js format[oxc-ts] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (1:15)
> 1 | try {} catch (void) {}
| ^^^^
2 |"
`;
-exports[`invalid-catch-parameter.js [typescript] format 1`] = `
+exports[`invalid-catch-parameter.js format[typescript] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (1:15)
> 1 | try {} catch (void) {}
| ^
@@ -448,7 +448,7 @@ exports[`invalid-catch-parameter.js [typescript] format 1`] = `
Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
-exports[`invalid-lone-arrow-function-parameter.js [acorn] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[acorn] 1`] = `
"Unexpected token (1:6)
> 1 | void => {}
| ^
@@ -456,7 +456,7 @@ exports[`invalid-lone-arrow-function-parameter.js [acorn] format 1`] = `
Cause: Unexpected token (1:5)"
`;
-exports[`invalid-lone-arrow-function-parameter.js [babel] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[babel] 1`] = `
"Unexpected token (1:6)
> 1 | void => {}
| ^
@@ -464,7 +464,7 @@ exports[`invalid-lone-arrow-function-parameter.js [babel] format 1`] = `
Cause: Unexpected token (1:5)"
`;
-exports[`invalid-lone-arrow-function-parameter.js [espree] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[espree] 1`] = `
"Unexpected token => (1:6)
> 1 | void => {}
| ^
@@ -472,7 +472,7 @@ exports[`invalid-lone-arrow-function-parameter.js [espree] format 1`] = `
Cause: Unexpected token =>"
`;
-exports[`invalid-lone-arrow-function-parameter.js [hermes] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[hermes] 1`] = `
"invalid expression (1:5)
> 1 | void => {}
| ^
@@ -482,7 +482,7 @@ void => {}
^"
`;
-exports[`invalid-lone-arrow-function-parameter.js [meriyah] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[meriyah] 1`] = `
"Unexpected token: '=>' (1:6)
> 1 | void => {}
| ^^
@@ -490,21 +490,21 @@ exports[`invalid-lone-arrow-function-parameter.js [meriyah] format 1`] = `
Cause: [1:5-1:7]: Unexpected token: '=>'"
`;
-exports[`invalid-lone-arrow-function-parameter.js [oxc] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[oxc] 1`] = `
"Unexpected token (1:6)
> 1 | void => {}
| ^^
2 |"
`;
-exports[`invalid-lone-arrow-function-parameter.js [oxc-ts] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[oxc-ts] 1`] = `
"Unexpected token (1:6)
> 1 | void => {}
| ^^
2 |"
`;
-exports[`invalid-lone-arrow-function-parameter.js [typescript] format 1`] = `
+exports[`invalid-lone-arrow-function-parameter.js format[typescript] 1`] = `
"Expression expected. (1:6)
> 1 | void => {}
| ^
@@ -512,7 +512,7 @@ exports[`invalid-lone-arrow-function-parameter.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [acorn] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[acorn] 1`] = `
"Unexpected token (1:7)
> 1 | async void => {}
| ^
@@ -520,7 +520,7 @@ exports[`invalid-lone-async-arrow-function-parameter.js [acorn] format 1`] = `
Cause: Unexpected token (1:6)"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [babel] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[babel] 1`] = `
"Unexpected token (1:12)
> 1 | async void => {}
| ^
@@ -528,7 +528,7 @@ exports[`invalid-lone-async-arrow-function-parameter.js [babel] format 1`] = `
Cause: Unexpected token (1:11)"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [espree] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[espree] 1`] = `
"Unexpected token void (1:7)
> 1 | async void => {}
| ^
@@ -536,7 +536,7 @@ exports[`invalid-lone-async-arrow-function-parameter.js [espree] format 1`] = `
Cause: Unexpected token void"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [hermes] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[hermes] 1`] = `
"';' expected (1:6)
> 1 | async void => {}
| ^
@@ -546,7 +546,7 @@ async void => {}
^"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [meriyah] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[meriyah] 1`] = `
"Unexpected token: 'void' (1:7)
> 1 | async void => {}
| ^^^^
@@ -554,21 +554,21 @@ exports[`invalid-lone-async-arrow-function-parameter.js [meriyah] format 1`] = `
Cause: [1:6-1:10]: Unexpected token: 'void'"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [oxc] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[oxc] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
> 1 | async void => {}
| ^
2 |"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [oxc-ts] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
> 1 | async void => {}
| ^
2 |"
`;
-exports[`invalid-lone-async-arrow-function-parameter.js [typescript] format 1`] = `
+exports[`invalid-lone-async-arrow-function-parameter.js format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | async void => {}
| ^
@@ -576,7 +576,7 @@ exports[`invalid-lone-async-arrow-function-parameter.js [typescript] format 1`]
Cause: Unexpected keyword or identifier."
`;
-exports[`invalid-object-expression.js [acorn] format 1`] = `
+exports[`invalid-object-expression.js format[acorn] 1`] = `
"Unexpected token (1:22)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -586,7 +586,7 @@ exports[`invalid-object-expression.js [acorn] format 1`] = `
Cause: Unexpected token (1:21)"
`;
-exports[`invalid-object-expression.js [babel] format 1`] = `
+exports[`invalid-object-expression.js format[babel] 1`] = `
"'void' must be followed by an expression when not used in a binding position. (1:17)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -596,7 +596,7 @@ exports[`invalid-object-expression.js [babel] format 1`] = `
Cause: 'void' must be followed by an expression when not used in a binding position. (1:16)"
`;
-exports[`invalid-object-expression.js [espree] format 1`] = `
+exports[`invalid-object-expression.js format[espree] 1`] = `
"Unexpected token } (1:22)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -606,7 +606,7 @@ exports[`invalid-object-expression.js [espree] format 1`] = `
Cause: Unexpected token }"
`;
-exports[`invalid-object-expression.js [hermes] format 1`] = `
+exports[`invalid-object-expression.js format[hermes] 1`] = `
"invalid expression (1:21)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -618,7 +618,7 @@ Cause: invalid expression (1:21)
^"
`;
-exports[`invalid-object-expression.js [meriyah] format 1`] = `
+exports[`invalid-object-expression.js format[meriyah] 1`] = `
"Unexpected token: '}' (1:22)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -628,7 +628,7 @@ exports[`invalid-object-expression.js [meriyah] format 1`] = `
Cause: [1:21-1:22]: Unexpected token: '}'"
`;
-exports[`invalid-object-expression.js [oxc] format 1`] = `
+exports[`invalid-object-expression.js format[oxc] 1`] = `
"Unexpected token (1:22)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -637,7 +637,7 @@ exports[`invalid-object-expression.js [oxc] format 1`] = `
4 |"
`;
-exports[`invalid-object-expression.js [oxc-ts] format 1`] = `
+exports[`invalid-object-expression.js format[oxc-ts] 1`] = `
"Unexpected token (1:22)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -646,7 +646,7 @@ exports[`invalid-object-expression.js [oxc-ts] format 1`] = `
4 |"
`;
-exports[`invalid-object-expression.js [typescript] format 1`] = `
+exports[`invalid-object-expression.js format[typescript] 1`] = `
"Expression expected. (1:22)
> 1 | ({ p: { p: { p: void }, x, }, y});
| ^
@@ -656,7 +656,7 @@ exports[`invalid-object-expression.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-parenthesized-assignment.js [acorn] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[acorn] 1`] = `
"Unexpected token (1:7)
> 1 | [(void)] = [];
| ^
@@ -664,7 +664,7 @@ exports[`invalid-parenthesized-assignment.js [acorn] format 1`] = `
Cause: Unexpected token (1:6)"
`;
-exports[`invalid-parenthesized-assignment.js [babel] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[babel] 1`] = `
"'void' must be followed by an expression when not used in a binding position. (1:3)
> 1 | [(void)] = [];
| ^
@@ -672,7 +672,7 @@ exports[`invalid-parenthesized-assignment.js [babel] format 1`] = `
Cause: 'void' must be followed by an expression when not used in a binding position. (1:2)"
`;
-exports[`invalid-parenthesized-assignment.js [espree] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[espree] 1`] = `
"Unexpected token ) (1:7)
> 1 | [(void)] = [];
| ^
@@ -680,7 +680,7 @@ exports[`invalid-parenthesized-assignment.js [espree] format 1`] = `
Cause: Unexpected token )"
`;
-exports[`invalid-parenthesized-assignment.js [hermes] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[hermes] 1`] = `
"invalid expression (1:6)
> 1 | [(void)] = [];
| ^
@@ -690,7 +690,7 @@ Cause: invalid expression (1:6)
^"
`;
-exports[`invalid-parenthesized-assignment.js [meriyah] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[meriyah] 1`] = `
"Unexpected token: ')' (1:7)
> 1 | [(void)] = [];
| ^
@@ -698,21 +698,21 @@ exports[`invalid-parenthesized-assignment.js [meriyah] format 1`] = `
Cause: [1:6-1:7]: Unexpected token: ')'"
`;
-exports[`invalid-parenthesized-assignment.js [oxc] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[oxc] 1`] = `
"Unexpected token (1:7)
> 1 | [(void)] = [];
| ^
2 |"
`;
-exports[`invalid-parenthesized-assignment.js [oxc-ts] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[oxc-ts] 1`] = `
"Unexpected token (1:7)
> 1 | [(void)] = [];
| ^
2 |"
`;
-exports[`invalid-parenthesized-assignment.js [typescript] format 1`] = `
+exports[`invalid-parenthesized-assignment.js format[typescript] 1`] = `
"Expression expected. (1:7)
> 1 | [(void)] = [];
| ^
@@ -720,7 +720,7 @@ exports[`invalid-parenthesized-assignment.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-parenthesized-binding.js [acorn] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[acorn] 1`] = `
"Unexpected token (1:10)
> 1 | const [, (void), ] = value;
| ^
@@ -728,7 +728,7 @@ exports[`invalid-parenthesized-binding.js [acorn] format 1`] = `
Cause: Unexpected token (1:9)"
`;
-exports[`invalid-parenthesized-binding.js [babel] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[babel] 1`] = `
"Unexpected token (1:10)
> 1 | const [, (void), ] = value;
| ^
@@ -736,7 +736,7 @@ exports[`invalid-parenthesized-binding.js [babel] format 1`] = `
Cause: Unexpected token (1:9)"
`;
-exports[`invalid-parenthesized-binding.js [espree] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[espree] 1`] = `
"Unexpected token ( (1:10)
> 1 | const [, (void), ] = value;
| ^
@@ -744,7 +744,7 @@ exports[`invalid-parenthesized-binding.js [espree] format 1`] = `
Cause: Unexpected token ("
`;
-exports[`invalid-parenthesized-binding.js [hermes] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[hermes] 1`] = `
"identifier, '{' or '[' expected in binding pattern (1:9)
> 1 | const [, (void), ] = value;
| ^
@@ -754,7 +754,7 @@ const [, (void), ] = value;
^"
`;
-exports[`invalid-parenthesized-binding.js [meriyah] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[meriyah] 1`] = `
"Unexpected token: ')' (1:15)
> 1 | const [, (void), ] = value;
| ^
@@ -762,21 +762,21 @@ exports[`invalid-parenthesized-binding.js [meriyah] format 1`] = `
Cause: [1:14-1:15]: Unexpected token: ')'"
`;
-exports[`invalid-parenthesized-binding.js [oxc] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[oxc] 1`] = `
"Unexpected token (1:10)
> 1 | const [, (void), ] = value;
| ^
2 |"
`;
-exports[`invalid-parenthesized-binding.js [oxc-ts] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[oxc-ts] 1`] = `
"Unexpected token (1:10)
> 1 | const [, (void), ] = value;
| ^
2 |"
`;
-exports[`invalid-parenthesized-binding.js [typescript] format 1`] = `
+exports[`invalid-parenthesized-binding.js format[typescript] 1`] = `
"Array element destructuring pattern expected. (1:10)
> 1 | const [, (void), ] = value;
| ^
@@ -784,7 +784,7 @@ exports[`invalid-parenthesized-binding.js [typescript] format 1`] = `
Cause: Array element destructuring pattern expected."
`;
-exports[`invalid-rest-element-array-pattern.js [acorn] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[acorn] 1`] = `
"Unexpected keyword 'void' (2:12)
1 | {
> 2 | var [ ...void ] = [];
@@ -795,7 +795,7 @@ exports[`invalid-rest-element-array-pattern.js [acorn] format 1`] = `
Cause: Unexpected keyword 'void' (2:11)"
`;
-exports[`invalid-rest-element-array-pattern.js [babel] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[babel] 1`] = `
"Unexpected void binding. (2:12)
1 | {
> 2 | var [ ...void ] = [];
@@ -806,7 +806,7 @@ exports[`invalid-rest-element-array-pattern.js [babel] format 1`] = `
Cause: Unexpected void binding. (2:11)"
`;
-exports[`invalid-rest-element-array-pattern.js [espree] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[espree] 1`] = `
"Unexpected keyword 'void' (2:12)
1 | {
> 2 | var [ ...void ] = [];
@@ -817,7 +817,7 @@ exports[`invalid-rest-element-array-pattern.js [espree] format 1`] = `
Cause: Unexpected keyword 'void'"
`;
-exports[`invalid-rest-element-array-pattern.js [hermes] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[hermes] 1`] = `
"identifier, '{' or '[' expected in binding pattern (2:11)
1 | {
> 2 | var [ ...void ] = [];
@@ -830,7 +830,7 @@ Cause: identifier, '{' or '[' expected in binding pattern (2:11)
^"
`;
-exports[`invalid-rest-element-array-pattern.js [meriyah] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[meriyah] 1`] = `
"Unexpected token: ']' (2:17)
1 | {
> 2 | var [ ...void ] = [];
@@ -841,7 +841,7 @@ exports[`invalid-rest-element-array-pattern.js [meriyah] format 1`] = `
Cause: [2:16-2:17]: Unexpected token: ']'"
`;
-exports[`invalid-rest-element-array-pattern.js [oxc] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[oxc] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
1 | {
> 2 | var [ ...void ] = [];
@@ -851,7 +851,7 @@ exports[`invalid-rest-element-array-pattern.js [oxc] format 1`] = `
5 | for (var [...void] of [[]]);"
`;
-exports[`invalid-rest-element-array-pattern.js [oxc-ts] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[oxc-ts] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
1 | {
> 2 | var [ ...void ] = [];
@@ -861,7 +861,7 @@ exports[`invalid-rest-element-array-pattern.js [oxc-ts] format 1`] = `
5 | for (var [...void] of [[]]);"
`;
-exports[`invalid-rest-element-array-pattern.js [typescript] format 1`] = `
+exports[`invalid-rest-element-array-pattern.js format[typescript] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
1 | {
> 2 | var [ ...void ] = [];
@@ -872,7 +872,7 @@ exports[`invalid-rest-element-array-pattern.js [typescript] format 1`] = `
Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [acorn] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[acorn] 1`] = `
"Unexpected token (1:16)
> 1 | for ([ ...void ] of []);
| ^
@@ -880,7 +880,7 @@ exports[`invalid-rest-element-array-pattern-for-lhs.js [acorn] format 1`] = `
Cause: Unexpected token (1:15)"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [babel] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[babel] 1`] = `
"Unexpected token (1:16)
> 1 | for ([ ...void ] of []);
| ^
@@ -888,7 +888,7 @@ exports[`invalid-rest-element-array-pattern-for-lhs.js [babel] format 1`] = `
Cause: Unexpected token (1:15)"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [espree] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[espree] 1`] = `
"Unexpected token ] (1:16)
> 1 | for ([ ...void ] of []);
| ^
@@ -896,7 +896,7 @@ exports[`invalid-rest-element-array-pattern-for-lhs.js [espree] format 1`] = `
Cause: Unexpected token ]"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [hermes] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[hermes] 1`] = `
"invalid expression (1:15)
> 1 | for ([ ...void ] of []);
| ^
@@ -906,7 +906,7 @@ for ([ ...void ] of []);
^"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [meriyah] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[meriyah] 1`] = `
"Unexpected token: ']' (1:16)
> 1 | for ([ ...void ] of []);
| ^
@@ -914,21 +914,21 @@ exports[`invalid-rest-element-array-pattern-for-lhs.js [meriyah] format 1`] = `
Cause: [1:15-1:16]: Unexpected token: ']'"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [oxc] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[oxc] 1`] = `
"Unexpected token (1:16)
> 1 | for ([ ...void ] of []);
| ^
2 |"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [oxc-ts] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[oxc-ts] 1`] = `
"Unexpected token (1:16)
> 1 | for ([ ...void ] of []);
| ^
2 |"
`;
-exports[`invalid-rest-element-array-pattern-for-lhs.js [typescript] format 1`] = `
+exports[`invalid-rest-element-array-pattern-for-lhs.js format[typescript] 1`] = `
"Expression expected. (1:16)
> 1 | for ([ ...void ] of []);
| ^
@@ -936,7 +936,7 @@ exports[`invalid-rest-element-array-pattern-for-lhs.js [typescript] format 1`] =
Cause: Expression expected."
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [acorn] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[acorn] 1`] = `
"Unexpected token (1:12)
> 1 | ([ ...void ] = []);
| ^
@@ -944,7 +944,7 @@ exports[`invalid-rest-element-array-pattern-lhs.js [acorn] format 1`] = `
Cause: Unexpected token (1:11)"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [babel] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[babel] 1`] = `
"Unexpected token (1:12)
> 1 | ([ ...void ] = []);
| ^
@@ -952,7 +952,7 @@ exports[`invalid-rest-element-array-pattern-lhs.js [babel] format 1`] = `
Cause: Unexpected token (1:11)"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [espree] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[espree] 1`] = `
"Unexpected token ] (1:12)
> 1 | ([ ...void ] = []);
| ^
@@ -960,7 +960,7 @@ exports[`invalid-rest-element-array-pattern-lhs.js [espree] format 1`] = `
Cause: Unexpected token ]"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [hermes] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[hermes] 1`] = `
"invalid expression (1:11)
> 1 | ([ ...void ] = []);
| ^
@@ -970,7 +970,7 @@ Cause: invalid expression (1:11)
^"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [meriyah] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[meriyah] 1`] = `
"Unexpected token: ']' (1:12)
> 1 | ([ ...void ] = []);
| ^
@@ -978,21 +978,21 @@ exports[`invalid-rest-element-array-pattern-lhs.js [meriyah] format 1`] = `
Cause: [1:11-1:12]: Unexpected token: ']'"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [oxc] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[oxc] 1`] = `
"Unexpected token (1:12)
> 1 | ([ ...void ] = []);
| ^
2 |"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [oxc-ts] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[oxc-ts] 1`] = `
"Unexpected token (1:12)
> 1 | ([ ...void ] = []);
| ^
2 |"
`;
-exports[`invalid-rest-element-array-pattern-lhs.js [typescript] format 1`] = `
+exports[`invalid-rest-element-array-pattern-lhs.js format[typescript] 1`] = `
"Expression expected. (1:12)
> 1 | ([ ...void ] = []);
| ^
@@ -1000,7 +1000,7 @@ exports[`invalid-rest-element-array-pattern-lhs.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-rest-element-object-pattern.js [acorn] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[acorn] 1`] = `
"Unexpected keyword 'void' (2:12)
1 | {
> 2 | var { ...void } = {};
@@ -1011,7 +1011,7 @@ exports[`invalid-rest-element-object-pattern.js [acorn] format 1`] = `
Cause: Unexpected keyword 'void' (2:11)"
`;
-exports[`invalid-rest-element-object-pattern.js [babel] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[babel] 1`] = `
"Unexpected void binding. (2:12)
1 | {
> 2 | var { ...void } = {};
@@ -1022,7 +1022,7 @@ exports[`invalid-rest-element-object-pattern.js [babel] format 1`] = `
Cause: Unexpected void binding. (2:11)"
`;
-exports[`invalid-rest-element-object-pattern.js [espree] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[espree] 1`] = `
"Unexpected keyword 'void' (2:12)
1 | {
> 2 | var { ...void } = {};
@@ -1033,7 +1033,7 @@ exports[`invalid-rest-element-object-pattern.js [espree] format 1`] = `
Cause: Unexpected keyword 'void'"
`;
-exports[`invalid-rest-element-object-pattern.js [hermes] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[hermes] 1`] = `
"identifier expected after '...' in object pattern (2:11)
1 | {
> 2 | var { ...void } = {};
@@ -1046,7 +1046,7 @@ Cause: identifier expected after '...' in object pattern (2:11)
^"
`;
-exports[`invalid-rest-element-object-pattern.js [meriyah] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[meriyah] 1`] = `
"Unexpected token: '}' (2:17)
1 | {
> 2 | var { ...void } = {};
@@ -1057,7 +1057,7 @@ exports[`invalid-rest-element-object-pattern.js [meriyah] format 1`] = `
Cause: [2:16-2:17]: Unexpected token: '}'"
`;
-exports[`invalid-rest-element-object-pattern.js [oxc] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[oxc] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
1 | {
> 2 | var { ...void } = {};
@@ -1067,7 +1067,7 @@ exports[`invalid-rest-element-object-pattern.js [oxc] format 1`] = `
5 | for (var { ...void } of [{}]);"
`;
-exports[`invalid-rest-element-object-pattern.js [oxc-ts] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[oxc-ts] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
1 | {
> 2 | var { ...void } = {};
@@ -1077,7 +1077,7 @@ exports[`invalid-rest-element-object-pattern.js [oxc-ts] format 1`] = `
5 | for (var { ...void } of [{}]);"
`;
-exports[`invalid-rest-element-object-pattern.js [typescript] format 1`] = `
+exports[`invalid-rest-element-object-pattern.js format[typescript] 1`] = `
"':' expected. (2:17)
1 | {
> 2 | var { ...void } = {};
@@ -1088,7 +1088,7 @@ exports[`invalid-rest-element-object-pattern.js [typescript] format 1`] = `
Cause: ':' expected."
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [acorn] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[acorn] 1`] = `
"Unexpected token (1:16)
> 1 | for ({ ...void } of []);
| ^
@@ -1096,7 +1096,7 @@ exports[`invalid-rest-element-object-pattern-for-lhs.js [acorn] format 1`] = `
Cause: Unexpected token (1:15)"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [babel] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[babel] 1`] = `
"Unexpected token (1:16)
> 1 | for ({ ...void } of []);
| ^
@@ -1104,7 +1104,7 @@ exports[`invalid-rest-element-object-pattern-for-lhs.js [babel] format 1`] = `
Cause: Unexpected token (1:15)"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [espree] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[espree] 1`] = `
"Unexpected token } (1:16)
> 1 | for ({ ...void } of []);
| ^
@@ -1112,7 +1112,7 @@ exports[`invalid-rest-element-object-pattern-for-lhs.js [espree] format 1`] = `
Cause: Unexpected token }"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [hermes] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[hermes] 1`] = `
"invalid expression (1:15)
> 1 | for ({ ...void } of []);
| ^
@@ -1122,7 +1122,7 @@ for ({ ...void } of []);
^"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [meriyah] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[meriyah] 1`] = `
"Unexpected token: '}' (1:16)
> 1 | for ({ ...void } of []);
| ^
@@ -1130,21 +1130,21 @@ exports[`invalid-rest-element-object-pattern-for-lhs.js [meriyah] format 1`] = `
Cause: [1:15-1:16]: Unexpected token: '}'"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [oxc] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[oxc] 1`] = `
"Unexpected token (1:16)
> 1 | for ({ ...void } of []);
| ^
2 |"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [oxc-ts] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[oxc-ts] 1`] = `
"Unexpected token (1:16)
> 1 | for ({ ...void } of []);
| ^
2 |"
`;
-exports[`invalid-rest-element-object-pattern-for-lhs.js [typescript] format 1`] = `
+exports[`invalid-rest-element-object-pattern-for-lhs.js format[typescript] 1`] = `
"Expression expected. (1:16)
> 1 | for ({ ...void } of []);
| ^
@@ -1152,7 +1152,7 @@ exports[`invalid-rest-element-object-pattern-for-lhs.js [typescript] format 1`]
Cause: Expression expected."
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [acorn] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[acorn] 1`] = `
"Unexpected token (1:12)
> 1 | ({ ...void } = {});
| ^
@@ -1160,7 +1160,7 @@ exports[`invalid-rest-element-object-pattern-lhs.js [acorn] format 1`] = `
Cause: Unexpected token (1:11)"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [babel] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[babel] 1`] = `
"Unexpected token (1:12)
> 1 | ({ ...void } = {});
| ^
@@ -1168,7 +1168,7 @@ exports[`invalid-rest-element-object-pattern-lhs.js [babel] format 1`] = `
Cause: Unexpected token (1:11)"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [espree] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[espree] 1`] = `
"Unexpected token } (1:12)
> 1 | ({ ...void } = {});
| ^
@@ -1176,7 +1176,7 @@ exports[`invalid-rest-element-object-pattern-lhs.js [espree] format 1`] = `
Cause: Unexpected token }"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [hermes] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[hermes] 1`] = `
"invalid expression (1:11)
> 1 | ({ ...void } = {});
| ^
@@ -1186,7 +1186,7 @@ Cause: invalid expression (1:11)
^"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [meriyah] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[meriyah] 1`] = `
"Unexpected token: '}' (1:12)
> 1 | ({ ...void } = {});
| ^
@@ -1194,21 +1194,21 @@ exports[`invalid-rest-element-object-pattern-lhs.js [meriyah] format 1`] = `
Cause: [1:11-1:12]: Unexpected token: '}'"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [oxc] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[oxc] 1`] = `
"Unexpected token (1:12)
> 1 | ({ ...void } = {});
| ^
2 |"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [oxc-ts] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[oxc-ts] 1`] = `
"Unexpected token (1:12)
> 1 | ({ ...void } = {});
| ^
2 |"
`;
-exports[`invalid-rest-element-object-pattern-lhs.js [typescript] format 1`] = `
+exports[`invalid-rest-element-object-pattern-lhs.js format[typescript] 1`] = `
"Expression expected. (1:12)
> 1 | ({ ...void } = {});
| ^
@@ -1216,7 +1216,7 @@ exports[`invalid-rest-element-object-pattern-lhs.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-sequence-expression.js [acorn] format 1`] = `
+exports[`invalid-sequence-expression.js format[acorn] 1`] = `
"Unexpected token (1:6)
> 1 | (void, x);
| ^
@@ -1226,7 +1226,7 @@ exports[`invalid-sequence-expression.js [acorn] format 1`] = `
Cause: Unexpected token (1:5)"
`;
-exports[`invalid-sequence-expression.js [babel] format 1`] = `
+exports[`invalid-sequence-expression.js format[babel] 1`] = `
"'void' must be followed by an expression when not used in a binding position. (1:2)
> 1 | (void, x);
| ^
@@ -1236,7 +1236,7 @@ exports[`invalid-sequence-expression.js [babel] format 1`] = `
Cause: 'void' must be followed by an expression when not used in a binding position. (1:1)"
`;
-exports[`invalid-sequence-expression.js [espree] format 1`] = `
+exports[`invalid-sequence-expression.js format[espree] 1`] = `
"Unexpected token , (1:6)
> 1 | (void, x);
| ^
@@ -1246,7 +1246,7 @@ exports[`invalid-sequence-expression.js [espree] format 1`] = `
Cause: Unexpected token ,"
`;
-exports[`invalid-sequence-expression.js [hermes] format 1`] = `
+exports[`invalid-sequence-expression.js format[hermes] 1`] = `
"invalid expression (1:5)
> 1 | (void, x);
| ^
@@ -1258,7 +1258,7 @@ Cause: invalid expression (1:5)
^"
`;
-exports[`invalid-sequence-expression.js [meriyah] format 1`] = `
+exports[`invalid-sequence-expression.js format[meriyah] 1`] = `
"Unexpected token: ',' (1:6)
> 1 | (void, x);
| ^
@@ -1268,7 +1268,7 @@ exports[`invalid-sequence-expression.js [meriyah] format 1`] = `
Cause: [1:5-1:6]: Unexpected token: ','"
`;
-exports[`invalid-sequence-expression.js [oxc] format 1`] = `
+exports[`invalid-sequence-expression.js format[oxc] 1`] = `
"Unexpected token (1:6)
> 1 | (void, x);
| ^
@@ -1277,7 +1277,7 @@ exports[`invalid-sequence-expression.js [oxc] format 1`] = `
4 |"
`;
-exports[`invalid-sequence-expression.js [oxc-ts] format 1`] = `
+exports[`invalid-sequence-expression.js format[oxc-ts] 1`] = `
"Unexpected token (1:6)
> 1 | (void, x);
| ^
@@ -1286,7 +1286,7 @@ exports[`invalid-sequence-expression.js [oxc-ts] format 1`] = `
4 |"
`;
-exports[`invalid-sequence-expression.js [typescript] format 1`] = `
+exports[`invalid-sequence-expression.js format[typescript] 1`] = `
"Expression expected. (1:6)
> 1 | (void, x);
| ^
@@ -1296,7 +1296,7 @@ exports[`invalid-sequence-expression.js [typescript] format 1`] = `
Cause: Expression expected."
`;
-exports[`invalid-variable-declarator.js [acorn] format 1`] = `
+exports[`invalid-variable-declarator.js format[acorn] 1`] = `
"Unexpected keyword 'void' (2:7)
1 | {
> 2 | var void = f();
@@ -1307,7 +1307,7 @@ exports[`invalid-variable-declarator.js [acorn] format 1`] = `
Cause: Unexpected keyword 'void' (2:6)"
`;
-exports[`invalid-variable-declarator.js [babel] format 1`] = `
+exports[`invalid-variable-declarator.js format[babel] 1`] = `
"Unexpected void binding. (2:7)
1 | {
> 2 | var void = f();
@@ -1318,7 +1318,7 @@ exports[`invalid-variable-declarator.js [babel] format 1`] = `
Cause: Unexpected void binding. (2:6)"
`;
-exports[`invalid-variable-declarator.js [espree] format 1`] = `
+exports[`invalid-variable-declarator.js format[espree] 1`] = `
"Unexpected keyword 'void' (2:7)
1 | {
> 2 | var void = f();
@@ -1329,7 +1329,7 @@ exports[`invalid-variable-declarator.js [espree] format 1`] = `
Cause: Unexpected keyword 'void'"
`;
-exports[`invalid-variable-declarator.js [hermes] format 1`] = `
+exports[`invalid-variable-declarator.js format[hermes] 1`] = `
"'identifier' expected in declaration (2:6)
1 | {
> 2 | var void = f();
@@ -1342,7 +1342,7 @@ Cause: 'identifier' expected in declaration (2:6)
~~~~^"
`;
-exports[`invalid-variable-declarator.js [meriyah] format 1`] = `
+exports[`invalid-variable-declarator.js format[meriyah] 1`] = `
"Invalid keyword (2:7)
1 | {
> 2 | var void = f();
@@ -1353,7 +1353,7 @@ exports[`invalid-variable-declarator.js [meriyah] format 1`] = `
Cause: [2:6-2:10]: Invalid keyword"
`;
-exports[`invalid-variable-declarator.js [oxc] format 1`] = `
+exports[`invalid-variable-declarator.js format[oxc] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:7)
1 | {
> 2 | var void = f();
@@ -1363,7 +1363,7 @@ exports[`invalid-variable-declarator.js [oxc] format 1`] = `
5 | let void = f(), void = g();"
`;
-exports[`invalid-variable-declarator.js [oxc-ts] format 1`] = `
+exports[`invalid-variable-declarator.js format[oxc-ts] 1`] = `
"Identifier expected. 'void' is a reserved word that cannot be used here. (2:7)
1 | {
> 2 | var void = f();
@@ -1373,7 +1373,7 @@ exports[`invalid-variable-declarator.js [oxc-ts] format 1`] = `
5 | let void = f(), void = g();"
`;
-exports[`invalid-variable-declarator.js [typescript] format 1`] = `
+exports[`invalid-variable-declarator.js format[typescript] 1`] = `
"'void' is not allowed as a variable declaration name. (2:7)
1 | {
> 2 | var void = f();
diff --git a/tests/format/js/_errors_/explicit-resource-management/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/explicit-resource-management/__snapshots__/format.test.js.snap
index e8bbd0df1..574662535 100644
--- a/tests/format/js/_errors_/explicit-resource-management/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/explicit-resource-management/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-for-await-using-binding-of-of.js [babel] format 1`] = `
+exports[`invalid-for-await-using-binding-of-of.js format[babel] 1`] = `
"Unexpected token, expected ")" (1:24)
> 1 | for await (using of of of);
| ^
@@ -8,14 +8,14 @@ exports[`invalid-for-await-using-binding-of-of.js [babel] format 1`] = `
Cause: Unexpected token, expected ")" (1:23)"
`;
-exports[`invalid-for-await-using-binding-of-of.js [flow] format 1`] = `
+exports[`invalid-for-await-using-binding-of-of.js format[flow] 1`] = `
"Unexpected token \`await\`, expected the token \`(\` (1:5)
> 1 | for await (using of of of);
| ^^^^^
2 |"
`;
-exports[`invalid-for-using-binding-in.js [babel] format 1`] = `
+exports[`invalid-for-using-binding-in.js format[babel] 1`] = `
"For-in loop may not start with 'using' declaration. (1:6)
> 1 | for (using foo in {});
| ^
@@ -23,14 +23,14 @@ exports[`invalid-for-using-binding-in.js [babel] format 1`] = `
Cause: For-in loop may not start with 'using' declaration. (1:5)"
`;
-exports[`invalid-for-using-binding-in.js [flow] format 1`] = `
+exports[`invalid-for-using-binding-in.js format[flow] 1`] = `
"Unexpected identifier, expected the token \`;\` (1:12)
> 1 | for (using foo in {});
| ^^^
2 |"
`;
-exports[`invalid-for-using-binding-of-in.js [babel] format 1`] = `
+exports[`invalid-for-using-binding-of-in.js format[babel] 1`] = `
"Unexpected token (1:15)
> 1 | for (using of in []);
| ^
@@ -38,14 +38,14 @@ exports[`invalid-for-using-binding-of-in.js [babel] format 1`] = `
Cause: Unexpected token (1:14)"
`;
-exports[`invalid-for-using-binding-of-in.js [flow] format 1`] = `
+exports[`invalid-for-using-binding-of-in.js format[flow] 1`] = `
"Unexpected token \`in\` (1:15)
> 1 | for (using of in []);
| ^^
2 |"
`;
-exports[`invalid-for-using-binding-of-of.js [babel] format 1`] = `
+exports[`invalid-for-using-binding-of-of.js format[babel] 1`] = `
"Unexpected token, expected ")" (1:18)
> 1 | for (using of of of);
| ^
@@ -53,14 +53,14 @@ exports[`invalid-for-using-binding-of-of.js [babel] format 1`] = `
Cause: Unexpected token, expected ")" (1:17)"
`;
-exports[`invalid-for-using-binding-of-of.js [flow] format 1`] = `
+exports[`invalid-for-using-binding-of-of.js format[flow] 1`] = `
"Unexpected token \`of\`, expected the token \`)\` (1:18)
> 1 | for (using of of of);
| ^^
2 |"
`;
-exports[`invalid-using-binding-let.js [babel] format 1`] = `
+exports[`invalid-using-binding-let.js format[babel] 1`] = `
"'let' is disallowed as a lexically bound name. (2:9)
1 | {
> 2 | using let = h();
@@ -70,7 +70,7 @@ exports[`invalid-using-binding-let.js [babel] format 1`] = `
Cause: 'let' is disallowed as a lexically bound name. (2:8)"
`;
-exports[`invalid-using-binding-let.js [flow] format 1`] = `
+exports[`invalid-using-binding-let.js format[flow] 1`] = `
"Unexpected token \`let\`, expected the end of an expression statement (\`;\`) (2:9)
1 | {
> 2 | using let = h();
@@ -79,7 +79,7 @@ exports[`invalid-using-binding-let.js [flow] format 1`] = `
4 |"
`;
-exports[`invalid-using-binding-pattern.js [babel] format 1`] = `
+exports[`invalid-using-binding-pattern.js format[babel] 1`] = `
"Unexpected token, expected ")" (4:25)
2 | using { foo } = f();
3 | using [ bar ] = g();
@@ -91,7 +91,7 @@ exports[`invalid-using-binding-pattern.js [babel] format 1`] = `
Cause: Unexpected token, expected ")" (4:24)"
`;
-exports[`invalid-using-binding-pattern.js [flow] format 1`] = `
+exports[`invalid-using-binding-pattern.js format[flow] 1`] = `
"Unexpected token \`{\`, expected the end of an expression statement (\`;\`) (2:9)
1 | {
> 2 | using { foo } = f();
diff --git a/tests/format/js/_errors_/export-name/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/export-name/__snapshots__/format.test.js.snap
index d518688cf..be6dd04ac 100644
--- a/tests/format/js/_errors_/export-name/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/export-name/__snapshots__/format.test.js.snap
@@ -1,61 +1,61 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [__babel_estree] format 1`] = `
+exports[`snippet: #0 format[__babel_estree] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate. (1:9)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #0 [babel-flow] format 1`] = `
+exports[`snippet: #0 format[babel-flow] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #0 [espree] format 2`] = `
+exports[`snippet: #0 format[espree] 2`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected string, expected an identifier (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`snippet: #0 format[hermes] 1`] = `
"'identifier' expected in import specifier (1:9)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^
@@ -64,81 +64,81 @@ import { "\\uD83C" as b } from "./foo";
~~^"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"An export name cannot include a lone surrogate (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^^^^^^^^
Cause: [1:9-1:17]: An export name cannot include a lone surrogate"
`;
-exports[`snippet: #0 [oxc] format 1`] = `
+exports[`snippet: #0 format[oxc] 1`] = `
"An export name cannot include a unicode lone surrogate (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"An export name cannot include a unicode lone surrogate (1:10)
> 1 | import { "\\uD83C" as b } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #1 [__babel_estree] format 1`] = `
+exports[`snippet: #1 format[__babel_estree] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate. (1:9)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #1 [babel-flow] format 1`] = `
+exports[`snippet: #1 format[babel-flow] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #1 [espree] format 2`] = `
+exports[`snippet: #1 format[espree] 2`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Unexpected string, expected an identifier (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #1 [hermes] format 1`] = `
+exports[`snippet: #1 format[hermes] 1`] = `
"'identifier' expected in export clause (1:9)
> 1 | export { "\\uD83C" } from "./foo";
| ^
@@ -147,81 +147,81 @@ export { "\\uD83C" } from "./foo";
~~^"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"An export name cannot include a lone surrogate (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^^^^^^^^
Cause: [1:9-1:17]: An export name cannot include a lone surrogate"
`;
-exports[`snippet: #1 [oxc] format 1`] = `
+exports[`snippet: #1 format[oxc] 1`] = `
"An export name cannot include a unicode lone surrogate (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"An export name cannot include a unicode lone surrogate (1:10)
> 1 | export { "\\uD83C" } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #2 [__babel_estree] format 1`] = `
+exports[`snippet: #2 format[__babel_estree] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate. (1:9)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #2 [babel-flow] format 1`] = `
+exports[`snippet: #2 format[babel-flow] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:9)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #2 [espree] format 2`] = `
+exports[`snippet: #2 format[espree] 2`] = `
"An export name cannot include a lone surrogate. (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected string, expected an identifier (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #2 [hermes] format 1`] = `
+exports[`snippet: #2 format[hermes] 1`] = `
"'identifier' expected in export clause (1:9)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^
@@ -230,81 +230,81 @@ export { "\\uD83C" as b } from "./foo";
~~^"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"An export name cannot include a lone surrogate (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^^^^^^^^
Cause: [1:9-1:17]: An export name cannot include a lone surrogate"
`;
-exports[`snippet: #2 [oxc] format 1`] = `
+exports[`snippet: #2 format[oxc] 1`] = `
"An export name cannot include a unicode lone surrogate (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"An export name cannot include a unicode lone surrogate (1:10)
> 1 | export { "\\uD83C" as b } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #3 [__babel_estree] format 1`] = `
+exports[`snippet: #3 format[__babel_estree] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
`;
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"An export name cannot include a lone surrogate. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate. (1:14)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
`;
-exports[`snippet: #3 [babel-flow] format 1`] = `
+exports[`snippet: #3 format[babel-flow] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"An export name cannot include a lone surrogate, found '\\ud83c'. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate, found '\\ud83c'. (1:14)"
`;
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"An export name cannot include a lone surrogate. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #3 [espree] format 2`] = `
+exports[`snippet: #3 format[espree] 2`] = `
"An export name cannot include a lone surrogate. (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
Cause: An export name cannot include a lone surrogate."
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected string, expected an identifier (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #3 [hermes] format 1`] = `
+exports[`snippet: #3 format[hermes] 1`] = `
"'identifier' expected in export clause (1:14)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^
@@ -313,20 +313,20 @@ export { b as "\\uD83C" } from "./foo";
~~~~~~~^"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"An export name cannot include a lone surrogate (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^^^^^^^^
Cause: [1:14-1:22]: An export name cannot include a lone surrogate"
`;
-exports[`snippet: #3 [oxc] format 1`] = `
+exports[`snippet: #3 format[oxc] 1`] = `
"An export name cannot include a unicode lone surrogate (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^^^^^^^^"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"An export name cannot include a unicode lone surrogate (1:15)
> 1 | export { b as "\\uD83C" } from "./foo";
| ^^^^^^^^"
diff --git a/tests/format/js/_errors_/for-of/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/for-of/__snapshots__/format.test.js.snap
index 334f10f56..f1510e658 100644
--- a/tests/format/js/_errors_/for-of/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/for-of/__snapshots__/format.test.js.snap
@@ -1,184 +1,184 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Unexpected token (1:15)
> 1 | for (async of []);
| ^
Cause: Unexpected token (1:14)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let.foo of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #0 [babel] format 2`] = `
+exports[`snippet: #0 format[babel] 2`] = `
"The left-hand side of a for-of loop may not be 'async'. (1:6)
> 1 | for (async of []);
| ^
Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)"
`;
-exports[`snippet: #0 [babel-flow] format 1`] = `
+exports[`snippet: #0 format[babel-flow] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let.foo of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #0 [babel-flow] format 2`] = `
+exports[`snippet: #0 format[babel-flow] 2`] = `
"The left-hand side of a for-of loop may not be 'async'. (1:6)
> 1 | for (async of []);
| ^
Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let.foo of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #0 [babel-ts] format 2`] = `
+exports[`snippet: #0 format[babel-ts] 2`] = `
"The left-hand side of a for-of loop may not be 'async'. (1:6)
> 1 | for (async of []);
| ^
Cause: The left-hand side of a for-of loop may not be 'async'. (1:5)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"The keyword 'let' is reserved (1:6)
> 1 | for (let.foo of []);
| ^
Cause: The keyword 'let' is reserved"
`;
-exports[`snippet: #0 [espree] format 2`] = `
+exports[`snippet: #0 format[espree] 2`] = `
"Unexpected token [ (1:15)
> 1 | for (async of []);
| ^
Cause: Unexpected token ["
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected token \`.\`, expected an identifier (1:9)
> 1 | for (let.foo of []);
| ^"
`;
-exports[`snippet: #0 [flow] format 2`] = `
+exports[`snippet: #0 format[flow] 2`] = `
"Invalid left-hand side in for-of (1:6)
> 1 | for (async of []);
| ^^^^^"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Identifier "let" disallowed as left-hand side expression in strict mode (1:9)
> 1 | for (let.foo of []);
| ^
Cause: [1:8-1:9]: Identifier "let" disallowed as left-hand side expression in strict mode"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Variable declaration expected. (1:9)
> 1 | for (let.foo of []);
| ^
Cause: Variable declaration expected."
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let().bar of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #1 [babel-flow] format 1`] = `
+exports[`snippet: #1 format[babel-flow] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let().bar of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let().bar of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"The keyword 'let' is reserved (1:6)
> 1 | for (let().bar of []);
| ^
Cause: The keyword 'let' is reserved"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Unexpected token \`(\`, expected an identifier (1:9)
> 1 | for (let().bar of []);
| ^"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Identifier "let" disallowed as left-hand side expression in strict mode (1:9)
> 1 | for (let().bar of []);
| ^
Cause: [1:8-1:9]: Identifier "let" disallowed as left-hand side expression in strict mode"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Variable declaration expected. (1:9)
> 1 | for (let().bar of []);
| ^
Cause: Variable declaration expected."
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let\`\`.bar of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #2 [babel-flow] format 1`] = `
+exports[`snippet: #2 format[babel-flow] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let\`\`.bar of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"The left-hand side of a for-of loop may not start with 'let'. (1:6)
> 1 | for (let\`\`.bar of []);
| ^
Cause: The left-hand side of a for-of loop may not start with 'let'. (1:5)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"The keyword 'let' is reserved (1:6)
> 1 | for (let\`\`.bar of []);
| ^
Cause: The keyword 'let' is reserved"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected template literal part, expected an identifier (1:9)
> 1 | for (let\`\`.bar of []);
| ^^"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Identifier "let" disallowed as left-hand side expression in strict mode (1:9)
> 1 | for (let\`\`.bar of []);
| ^^
Cause: [1:8-1:10]: Identifier "let" disallowed as left-hand side expression in strict mode"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Variable declaration expected. (1:9)
> 1 | for (let\`\`.bar of []);
| ^
diff --git a/tests/format/js/_errors_/import/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/import/__snapshots__/format.test.js.snap
index 49e7b7be3..a936c44cc 100644
--- a/tests/format/js/_errors_/import/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/import/__snapshots__/format.test.js.snap
@@ -1,163 +1,163 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Unexpected token (1:8)
> 1 | import();
| ^
Cause: Unexpected token (1:7)"
`;
-exports[`snippet: #0 [babel-flow] format 1`] = `
+exports[`snippet: #0 format[babel-flow] 1`] = `
"Unexpected token (1:8)
> 1 | import();
| ^
Cause: Unexpected token (1:7)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Unexpected token (1:8)
> 1 | import();
| ^
Cause: Unexpected token (1:7)"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected token \`)\` (1:8)
> 1 | import();
| ^"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Unexpected token: ')' (1:8)
> 1 | import();
| ^
Cause: [1:7-1:8]: Unexpected token: ')'"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Dynamic import requires exactly one or two arguments. (1:1)
> 1 | import();
| ^^^^^^^^
Cause: Dynamic import requires exactly one or two arguments."
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"Unexpected token (1:21)
> 1 | import(/* comment */);
| ^
Cause: Unexpected token (1:20)"
`;
-exports[`snippet: #1 [babel-flow] format 1`] = `
+exports[`snippet: #1 format[babel-flow] 1`] = `
"Unexpected token (1:21)
> 1 | import(/* comment */);
| ^
Cause: Unexpected token (1:20)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Unexpected token (1:21)
> 1 | import(/* comment */);
| ^
Cause: Unexpected token (1:20)"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Unexpected token \`)\` (1:21)
> 1 | import(/* comment */);
| ^"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Unexpected token: ')' (1:21)
> 1 | import(/* comment */);
| ^
Cause: [1:20-1:21]: Unexpected token: ')'"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Dynamic import requires exactly one or two arguments. (1:1)
> 1 | import(/* comment */);
| ^^^^^^^^^^^^^^^^^^^^^
Cause: Dynamic import requires exactly one or two arguments."
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Cannot use new with import(...). (1:5)
> 1 | new import('./a.mjs');
| ^
Cause: Cannot use new with import(...). (1:4)"
`;
-exports[`snippet: #2 [babel-flow] format 1`] = `
+exports[`snippet: #2 format[babel-flow] 1`] = `
"Cannot use new with import(...). (1:5)
> 1 | new import('./a.mjs');
| ^
Cause: Cannot use new with import(...). (1:4)"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Cannot use new with import(...). (1:5)
> 1 | new import('./a.mjs');
| ^
Cause: Cannot use new with import(...). (1:4)"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected token \`import\` (1:5)
> 1 | new import('./a.mjs');
| ^^^^^^"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Cannot use new with import(...) (1:11)
> 1 | new import('./a.mjs');
| ^
Cause: [1:10-1:11]: Cannot use new with import(...)"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Expression expected. (1:5)
> 1 | new import('./a.mjs');
| ^
Cause: Expression expected."
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Unexpected token (1:12)
> 1 | new import();
| ^
Cause: Unexpected token (1:11)"
`;
-exports[`snippet: #3 [babel-flow] format 1`] = `
+exports[`snippet: #3 format[babel-flow] 1`] = `
"Unexpected token (1:12)
> 1 | new import();
| ^
Cause: Unexpected token (1:11)"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Unexpected token (1:12)
> 1 | new import();
| ^
Cause: Unexpected token (1:11)"
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected token \`import\` (1:5)
> 1 | new import();
| ^^^^^^"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"Cannot use new with import(...) (1:11)
> 1 | new import();
| ^
Cause: [1:10-1:11]: Cannot use new with import(...)"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"Expression expected. (1:5)
> 1 | new import();
| ^
diff --git a/tests/format/js/_errors_/invalid/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/invalid/__snapshots__/format.test.js.snap
index b7451f14d..dc10e6e79 100644
--- a/tests/format/js/_errors_/invalid/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/invalid/__snapshots__/format.test.js.snap
@@ -1,444 +1,444 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Unexpected token (1:5)
> 1 | for each (a in b) {}
| ^
Cause: Unexpected token (1:4)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Unexpected token, expected "(" (1:5)
> 1 | for each (a in b) {}
| ^
Cause: Unexpected token, expected "(" (1:4)"
`;
-exports[`snippet: #0 [babel] format 2`] = `
+exports[`snippet: #0 format[babel] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a = b) = 1
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #0 [babel-flow] format 1`] = `
+exports[`snippet: #0 format[babel-flow] 1`] = `
"Unexpected token, expected "(" (1:5)
> 1 | for each (a in b) {}
| ^
Cause: Unexpected token, expected "(" (1:4)"
`;
-exports[`snippet: #0 [babel-flow] format 2`] = `
+exports[`snippet: #0 format[babel-flow] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a = b) = 1
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Unexpected token, expected "(" (1:5)
> 1 | for each (a in b) {}
| ^
Cause: Unexpected token, expected "(" (1:4)"
`;
-exports[`snippet: #0 [babel-ts] format 2`] = `
+exports[`snippet: #0 format[babel-ts] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a = b) = 1
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Unexpected token each (1:5)
> 1 | for each (a in b) {}
| ^
Cause: Unexpected token each"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected identifier, expected the token \`(\` (1:5)
> 1 | for each (a in b) {}
| ^^^^"
`;
-exports[`snippet: #0 [flow] format 2`] = `
+exports[`snippet: #0 format[flow] 2`] = `
"Invalid left-hand side in assignment (1:2)
> 1 | (a = b) = 1
| ^^^^^"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Expected '(' (1:5)
> 1 | for each (a in b) {}
| ^^^^
Cause: [1:4-1:8]: Expected '('"
`;
-exports[`snippet: #0 [meriyah] format 2`] = `
+exports[`snippet: #0 format[meriyah] 2`] = `
"Invalid left-hand side in assignment (1:9)
> 1 | (a = b) = 1
| ^
Cause: [1:8-1:9]: Invalid left-hand side in assignment"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"'(' expected. (1:5)
> 1 | for each (a in b) {}
| ^
Cause: '(' expected."
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"Unexpected token (1:7)
> 1 | class switch() {}
| ^
Cause: Unexpected token (1:6)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"A class name is required. (1:7)
> 1 | class switch() {}
| ^
Cause: A class name is required. (1:6)"
`;
-exports[`snippet: #1 [babel] format 2`] = `
+exports[`snippet: #1 format[babel] 2`] = `
"Invalid left-hand side in assignment expression. (1:5)
> 1 | a = 1 = 2
| ^
Cause: Invalid left-hand side in assignment expression. (1:4)"
`;
-exports[`snippet: #1 [babel-flow] format 1`] = `
+exports[`snippet: #1 format[babel-flow] 1`] = `
"A class name is required. (1:7)
> 1 | class switch() {}
| ^
Cause: A class name is required. (1:6)"
`;
-exports[`snippet: #1 [babel-flow] format 2`] = `
+exports[`snippet: #1 format[babel-flow] 2`] = `
"Invalid left-hand side in assignment expression. (1:5)
> 1 | a = 1 = 2
| ^
Cause: Invalid left-hand side in assignment expression. (1:4)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"A class name is required. (1:7)
> 1 | class switch() {}
| ^
Cause: A class name is required. (1:6)"
`;
-exports[`snippet: #1 [babel-ts] format 2`] = `
+exports[`snippet: #1 format[babel-ts] 2`] = `
"Invalid left-hand side in assignment expression. (1:5)
> 1 | a = 1 = 2
| ^
Cause: Invalid left-hand side in assignment expression. (1:4)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"Unexpected token switch (1:7)
> 1 | class switch() {}
| ^
Cause: Unexpected token switch"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Unexpected token \`switch\`, expected an identifier (1:7)
> 1 | class switch() {}
| ^^^^^^"
`;
-exports[`snippet: #1 [flow] format 2`] = `
+exports[`snippet: #1 format[flow] 2`] = `
"Invalid left-hand side in assignment (1:5)
> 1 | a = 1 = 2
| ^"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Unexpected strict mode reserved word (1:7)
> 1 | class switch() {}
| ^^^^^^
Cause: [1:6-1:12]: Unexpected strict mode reserved word"
`;
-exports[`snippet: #1 [meriyah] format 2`] = `
+exports[`snippet: #1 format[meriyah] 2`] = `
"Invalid left-hand side in assignment (1:7)
> 1 | a = 1 = 2
| ^
Cause: [1:6-1:7]: Invalid left-hand side in assignment"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"'{' expected. (1:7)
> 1 | class switch() {}
| ^
Cause: '{' expected."
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Unexpected token (1:13)
> 1 | ({ method() })
| ^
Cause: Unexpected token (1:12)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | ({ method() })
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #2 [babel] format 2`] = `
+exports[`snippet: #2 format[babel] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a = 1) = 2
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #2 [babel-flow] format 1`] = `
+exports[`snippet: #2 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | ({ method() })
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #2 [babel-flow] format 2`] = `
+exports[`snippet: #2 format[babel-flow] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a = 1) = 2
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | ({ method() })
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #2 [babel-ts] format 2`] = `
+exports[`snippet: #2 format[babel-ts] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a = 1) = 2
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Unexpected token } (1:13)
> 1 | ({ method() })
| ^
Cause: Unexpected token }"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected token \`}\`, expected the token \`{\` (1:13)
> 1 | ({ method() })
| ^"
`;
-exports[`snippet: #2 [flow] format 2`] = `
+exports[`snippet: #2 format[flow] 2`] = `
"Invalid left-hand side in assignment (1:2)
> 1 | (a = 1) = 2
| ^^^^^"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Expected '{' (1:13)
> 1 | ({ method() })
| ^
Cause: [1:12-1:13]: Expected '{'"
`;
-exports[`snippet: #2 [meriyah] format 2`] = `
+exports[`snippet: #2 format[meriyah] 2`] = `
"Invalid left-hand side in assignment (1:9)
> 1 | (a = 1) = 2
| ^
Cause: [1:8-1:9]: Invalid left-hand side in assignment"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"'{' expected. (1:11)
> 1 | ({ method() })
| ^
Cause: '{' expected."
`;
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"Unexpected token (1:15)
> 1 | ({ method({}) })
| ^
Cause: Unexpected token (1:14)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Unexpected token, expected "{" (1:15)
> 1 | ({ method({}) })
| ^
Cause: Unexpected token, expected "{" (1:14)"
`;
-exports[`snippet: #3 [babel] format 2`] = `
+exports[`snippet: #3 format[babel] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a += b) = 1
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #3 [babel-flow] format 1`] = `
+exports[`snippet: #3 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:15)
> 1 | ({ method({}) })
| ^
Cause: Unexpected token, expected "{" (1:14)"
`;
-exports[`snippet: #3 [babel-flow] format 2`] = `
+exports[`snippet: #3 format[babel-flow] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a += b) = 1
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:15)
> 1 | ({ method({}) })
| ^
Cause: Unexpected token, expected "{" (1:14)"
`;
-exports[`snippet: #3 [babel-ts] format 2`] = `
+exports[`snippet: #3 format[babel-ts] 2`] = `
"Invalid parenthesized assignment pattern. (1:1)
> 1 | (a += b) = 1
| ^
Cause: Invalid parenthesized assignment pattern. (1:0)"
`;
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"Unexpected token } (1:15)
> 1 | ({ method({}) })
| ^
Cause: Unexpected token }"
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected token \`}\`, expected the token \`{\` (1:15)
> 1 | ({ method({}) })
| ^"
`;
-exports[`snippet: #3 [flow] format 2`] = `
+exports[`snippet: #3 format[flow] 2`] = `
"Invalid left-hand side in assignment (1:2)
> 1 | (a += b) = 1
| ^^^^^^"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"Expected '{' (1:15)
> 1 | ({ method({}) })
| ^
Cause: [1:14-1:15]: Expected '{'"
`;
-exports[`snippet: #3 [meriyah] format 2`] = `
+exports[`snippet: #3 format[meriyah] 2`] = `
"Invalid left-hand side in assignment (1:10)
> 1 | (a += b) = 1
| ^
Cause: [1:9-1:10]: Invalid left-hand side in assignment"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"'{' expected. (1:13)
> 1 | ({ method({}) })
| ^
Cause: '{' expected."
`;
-exports[`snippet: #4 [acorn] format 1`] = `
+exports[`snippet: #4 format[acorn] 1`] = `
"Unexpected token (1:23)
> 1 | ({ method(parameter,) })
| ^
Cause: Unexpected token (1:22)"
`;
-exports[`snippet: #4 [babel] format 1`] = `
+exports[`snippet: #4 format[babel] 1`] = `
"Unexpected token, expected "{" (1:23)
> 1 | ({ method(parameter,) })
| ^
Cause: Unexpected token, expected "{" (1:22)"
`;
-exports[`snippet: #4 [babel] format 2`] = `
+exports[`snippet: #4 format[babel] 2`] = `
"Invalid left-hand side in assignment expression. (1:2)
> 1 | (a = b) += 1
| ^
Cause: Invalid left-hand side in assignment expression. (1:1)"
`;
-exports[`snippet: #4 [babel-flow] format 1`] = `
+exports[`snippet: #4 format[babel-flow] 1`] = `
"Unexpected token, expected "{" (1:23)
> 1 | ({ method(parameter,) })
| ^
Cause: Unexpected token, expected "{" (1:22)"
`;
-exports[`snippet: #4 [babel-flow] format 2`] = `
+exports[`snippet: #4 format[babel-flow] 2`] = `
"Invalid left-hand side in assignment expression. (1:2)
> 1 | (a = b) += 1
| ^
Cause: Invalid left-hand side in assignment expression. (1:1)"
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:23)
> 1 | ({ method(parameter,) })
| ^
Cause: Unexpected token, expected "{" (1:22)"
`;
-exports[`snippet: #4 [babel-ts] format 2`] = `
+exports[`snippet: #4 format[babel-ts] 2`] = `
"Invalid left-hand side in assignment expression. (1:2)
> 1 | (a = b) += 1
| ^
Cause: Invalid left-hand side in assignment expression. (1:1)"
`;
-exports[`snippet: #4 [espree] format 1`] = `
+exports[`snippet: #4 format[espree] 1`] = `
"Unexpected token } (1:23)
> 1 | ({ method(parameter,) })
| ^
Cause: Unexpected token }"
`;
-exports[`snippet: #4 [flow] format 1`] = `
+exports[`snippet: #4 format[flow] 1`] = `
"Unexpected token \`}\`, expected the token \`{\` (1:23)
> 1 | ({ method(parameter,) })
| ^"
`;
-exports[`snippet: #4 [flow] format 2`] = `
+exports[`snippet: #4 format[flow] 2`] = `
"Invalid left-hand side in assignment (1:2)
> 1 | (a = b) += 1
| ^^^^^"
`;
-exports[`snippet: #4 [meriyah] format 1`] = `
+exports[`snippet: #4 format[meriyah] 1`] = `
"Expected '{' (1:23)
> 1 | ({ method(parameter,) })
| ^
Cause: [1:22-1:23]: Expected '{'"
`;
-exports[`snippet: #4 [meriyah] format 2`] = `
+exports[`snippet: #4 format[meriyah] 2`] = `
"Invalid left-hand side in assignment (1:9)
> 1 | (a = b) += 1
| ^^
Cause: [1:8-1:10]: Invalid left-hand side in assignment"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"'{' expected. (1:21)
> 1 | ({ method(parameter,) })
| ^
diff --git a/tests/format/js/_errors_/known-source-type/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/known-source-type/__snapshots__/format.test.js.snap
index 5e0b82ce6..440268b07 100644
--- a/tests/format/js/_errors_/known-source-type/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/known-source-type/__snapshots__/format.test.js.snap
@@ -1,62 +1,62 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"'import' and 'export' may appear only with 'sourceType: module' (1:1)
> 1 | import "foo"
| ^
Cause: 'import' and 'export' may appear only with 'sourceType: module' (1:0)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"'import' and 'export' may appear only with 'sourceType: module' (1:1)
> 1 | import "foo"
| ^
Cause: 'import' and 'export' may appear only with 'sourceType: module'"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"The import keyword can only be used with the module goal (1:8)
> 1 | import "foo"
| ^^^^^
Cause: [1:7-1:12]: The import keyword can only be used with the module goal"
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"'with' in strict mode (1:1)
> 1 | with(foo) {}
| ^
Cause: 'with' in strict mode (1:0)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"'with' in strict mode (1:1)
> 1 | with(foo) {}
| ^
Cause: 'with' in strict mode"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Strict mode code may not include a with statement (1:5)
> 1 | with(foo) {}
| ^
Cause: [1:4-1:5]: Strict mode code may not include a with statement"
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Deleting local variable in strict mode (1:1)
> 1 | delete foo
| ^
Cause: Deleting local variable in strict mode (1:0)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Deleting local variable in strict mode (1:1)
> 1 | delete foo
| ^
Cause: Deleting local variable in strict mode"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Calling delete on expression not allowed in strict mode (1:8)
> 1 | delete foo
| ^^^
diff --git a/tests/format/js/_errors_/literal/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/literal/__snapshots__/format.test.js.snap
index 5489f42eb..6c980aaca 100644
--- a/tests/format/js/_errors_/literal/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/literal/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-exponent.js [acorn] format 1`] = `
+exports[`invalid-exponent.js format[acorn] 1`] = `
"Invalid number (1:1)
> 1 | 12.3e
| ^
@@ -8,7 +8,7 @@ exports[`invalid-exponent.js [acorn] format 1`] = `
Cause: Invalid number (1:0)"
`;
-exports[`invalid-exponent.js [babel] format 1`] = `
+exports[`invalid-exponent.js format[babel] 1`] = `
"Floating-point numbers require a valid exponent after the 'e'. (1:1)
> 1 | 12.3e
| ^
@@ -16,7 +16,7 @@ exports[`invalid-exponent.js [babel] format 1`] = `
Cause: Floating-point numbers require a valid exponent after the 'e'. (1:0)"
`;
-exports[`invalid-exponent.js [espree] format 1`] = `
+exports[`invalid-exponent.js format[espree] 1`] = `
"Invalid number (1:1)
> 1 | 12.3e
| ^
@@ -24,7 +24,7 @@ exports[`invalid-exponent.js [espree] format 1`] = `
Cause: Invalid number"
`;
-exports[`invalid-exponent.js [meriyah] format 1`] = `
+exports[`invalid-exponent.js format[meriyah] 1`] = `
"Non-number found after exponent indicator (1:1)
> 1 | 12.3e
| ^^^^^
diff --git a/tests/format/js/_errors_/newline-before-arrow/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/newline-before-arrow/__snapshots__/format.test.js.snap
index 0b784d855..10dcca6e6 100644
--- a/tests/format/js/_errors_/newline-before-arrow/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/newline-before-arrow/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`newline-before-arrow.js [acorn] format 1`] = `
+exports[`newline-before-arrow.js format[acorn] 1`] = `
"Unexpected token (2:1)
1 | async x
> 2 | => x
@@ -9,7 +9,7 @@ exports[`newline-before-arrow.js [acorn] format 1`] = `
Cause: Unexpected token (2:0)"
`;
-exports[`newline-before-arrow.js [babel] format 1`] = `
+exports[`newline-before-arrow.js format[babel] 1`] = `
"No line break is allowed before '=>'. (2:3)
1 | async x
> 2 | => x
@@ -18,7 +18,7 @@ exports[`newline-before-arrow.js [babel] format 1`] = `
Cause: No line break is allowed before '=>'. (2:2)"
`;
-exports[`newline-before-arrow.js [babel-ts] format 1`] = `
+exports[`newline-before-arrow.js format[babel-ts] 1`] = `
"No line break is allowed before '=>'. (2:3)
1 | async x
> 2 | => x
@@ -27,7 +27,7 @@ exports[`newline-before-arrow.js [babel-ts] format 1`] = `
Cause: No line break is allowed before '=>'. (2:2)"
`;
-exports[`newline-before-arrow.js [babel-ts] format 2`] = `
+exports[`newline-before-arrow.js format[babel-ts] 2`] = `
"No line break is allowed before '=>'. (2:3)
1 | async x
> 2 | => x
@@ -36,7 +36,7 @@ exports[`newline-before-arrow.js [babel-ts] format 2`] = `
Cause: No line break is allowed before '=>'. (2:2)"
`;
-exports[`newline-before-arrow.js [espree] format 1`] = `
+exports[`newline-before-arrow.js format[espree] 1`] = `
"Unexpected token => (2:1)
1 | async x
> 2 | => x
@@ -45,7 +45,7 @@ exports[`newline-before-arrow.js [espree] format 1`] = `
Cause: Unexpected token =>"
`;
-exports[`newline-before-arrow.js [flow] format 1`] = `
+exports[`newline-before-arrow.js format[flow] 1`] = `
"Illegal newline before arrow (2:1)
1 | async x
> 2 | => x
@@ -53,7 +53,7 @@ exports[`newline-before-arrow.js [flow] format 1`] = `
3 |"
`;
-exports[`newline-before-arrow.js [meriyah] format 1`] = `
+exports[`newline-before-arrow.js format[meriyah] 1`] = `
"No line break is allowed after '=>' (2:1)
1 | async x
> 2 | => x
@@ -62,7 +62,7 @@ exports[`newline-before-arrow.js [meriyah] format 1`] = `
Cause: [2:0-2:2]: No line break is allowed after '=>'"
`;
-exports[`newline-before-arrow.js [oxc] format 1`] = `
+exports[`newline-before-arrow.js format[oxc] 1`] = `
"Line terminator not permitted before arrow (2:1)
1 | async x
> 2 | => x
@@ -70,7 +70,7 @@ exports[`newline-before-arrow.js [oxc] format 1`] = `
3 |"
`;
-exports[`newline-before-arrow.js [typescript] format 1`] = `
+exports[`newline-before-arrow.js format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | async x
| ^
diff --git a/tests/format/js/_errors_/object/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/object/__snapshots__/format.test.js.snap
index 5debc2bcc..63abf051b 100644
--- a/tests/format/js/_errors_/object/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/object/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`getter-generator.js [acorn] format 1`] = `
+exports[`getter-generator.js format[acorn] 1`] = `
"Unexpected token (2:9)
1 | ({
> 2 | get *iterator() { },
@@ -10,7 +10,7 @@ exports[`getter-generator.js [acorn] format 1`] = `
Cause: Unexpected token (2:8)"
`;
-exports[`getter-generator.js [babel] format 1`] = `
+exports[`getter-generator.js format[babel] 1`] = `
"A getter cannot be a generator. (2:10)
1 | ({
> 2 | get *iterator() { },
@@ -20,7 +20,7 @@ exports[`getter-generator.js [babel] format 1`] = `
Cause: A getter cannot be a generator. (2:9)"
`;
-exports[`getter-generator.js [espree] format 1`] = `
+exports[`getter-generator.js format[espree] 1`] = `
"Unexpected token * (2:9)
1 | ({
> 2 | get *iterator() { },
@@ -30,7 +30,7 @@ exports[`getter-generator.js [espree] format 1`] = `
Cause: Unexpected token *"
`;
-exports[`getter-generator.js [meriyah] format 1`] = `
+exports[`getter-generator.js format[meriyah] 1`] = `
"A getter cannot be a generator (2:9)
1 | ({
> 2 | get *iterator() { },
@@ -40,7 +40,7 @@ exports[`getter-generator.js [meriyah] format 1`] = `
Cause: [2:8-2:9]: A getter cannot be a generator"
`;
-exports[`getter-with-parameter.js [acorn] format 1`] = `
+exports[`getter-with-parameter.js format[acorn] 1`] = `
"getter should have no params (1:9)
> 1 | ({ get x(a){} });
| ^
@@ -48,7 +48,7 @@ exports[`getter-with-parameter.js [acorn] format 1`] = `
Cause: getter should have no params (1:8)"
`;
-exports[`getter-with-parameter.js [babel] format 1`] = `
+exports[`getter-with-parameter.js format[babel] 1`] = `
"A 'get' accessor must not have any formal parameters. (1:4)
> 1 | ({ get x(a){} });
| ^
@@ -56,7 +56,7 @@ exports[`getter-with-parameter.js [babel] format 1`] = `
Cause: A 'get' accessor must not have any formal parameters. (1:3)"
`;
-exports[`getter-with-parameter.js [espree] format 1`] = `
+exports[`getter-with-parameter.js format[espree] 1`] = `
"getter should have no params (1:9)
> 1 | ({ get x(a){} });
| ^
@@ -64,7 +64,7 @@ exports[`getter-with-parameter.js [espree] format 1`] = `
Cause: getter should have no params"
`;
-exports[`getter-with-parameter.js [meriyah] format 1`] = `
+exports[`getter-with-parameter.js format[meriyah] 1`] = `
"Getter functions must have exactly no arguments (1:10)
> 1 | ({ get x(a){} });
| ^
@@ -72,7 +72,7 @@ exports[`getter-with-parameter.js [meriyah] format 1`] = `
Cause: [1:9-1:10]: Getter functions must have exactly no arguments"
`;
-exports[`setter-generator.js [acorn] format 1`] = `
+exports[`setter-generator.js format[acorn] 1`] = `
"Unexpected token (2:9)
1 | ({
> 2 | set *iterator(iter) { },
@@ -82,7 +82,7 @@ exports[`setter-generator.js [acorn] format 1`] = `
Cause: Unexpected token (2:8)"
`;
-exports[`setter-generator.js [babel] format 1`] = `
+exports[`setter-generator.js format[babel] 1`] = `
"A setter cannot be a generator. (2:10)
1 | ({
> 2 | set *iterator(iter) { },
@@ -92,7 +92,7 @@ exports[`setter-generator.js [babel] format 1`] = `
Cause: A setter cannot be a generator. (2:9)"
`;
-exports[`setter-generator.js [espree] format 1`] = `
+exports[`setter-generator.js format[espree] 1`] = `
"Unexpected token * (2:9)
1 | ({
> 2 | set *iterator(iter) { },
@@ -102,7 +102,7 @@ exports[`setter-generator.js [espree] format 1`] = `
Cause: Unexpected token *"
`;
-exports[`setter-generator.js [meriyah] format 1`] = `
+exports[`setter-generator.js format[meriyah] 1`] = `
"A setter cannot be a generator (2:9)
1 | ({
> 2 | set *iterator(iter) { },
@@ -112,7 +112,7 @@ exports[`setter-generator.js [meriyah] format 1`] = `
Cause: [2:8-2:9]: A setter cannot be a generator"
`;
-exports[`setter-without-parameter.js [acorn] format 1`] = `
+exports[`setter-without-parameter.js format[acorn] 1`] = `
"setter should have exactly one param (1:9)
> 1 | ({ set x(){} });
| ^
@@ -120,7 +120,7 @@ exports[`setter-without-parameter.js [acorn] format 1`] = `
Cause: setter should have exactly one param (1:8)"
`;
-exports[`setter-without-parameter.js [babel] format 1`] = `
+exports[`setter-without-parameter.js format[babel] 1`] = `
"A 'set' accessor must have exactly one formal parameter. (1:4)
> 1 | ({ set x(){} });
| ^
@@ -128,7 +128,7 @@ exports[`setter-without-parameter.js [babel] format 1`] = `
Cause: A 'set' accessor must have exactly one formal parameter. (1:3)"
`;
-exports[`setter-without-parameter.js [espree] format 1`] = `
+exports[`setter-without-parameter.js format[espree] 1`] = `
"setter should have exactly one param (1:9)
> 1 | ({ set x(){} });
| ^
@@ -136,7 +136,7 @@ exports[`setter-without-parameter.js [espree] format 1`] = `
Cause: setter should have exactly one param"
`;
-exports[`setter-without-parameter.js [meriyah] format 1`] = `
+exports[`setter-without-parameter.js format[meriyah] 1`] = `
"Setter functions must have exactly one argument (1:10)
> 1 | ({ set x(){} });
| ^
diff --git a/tests/format/js/_errors_/optional-chaining/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/optional-chaining/__snapshots__/format.test.js.snap
index 0ee071bab..0da839339 100644
--- a/tests/format/js/_errors_/optional-chaining/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/optional-chaining/__snapshots__/format.test.js.snap
@@ -1,118 +1,118 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:21)
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
| ^
Cause: Optional chaining cannot appear in the callee of new expressions (1:20)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Constructors in/after an Optional Chain are not allowed. (1:21)
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
| ^
Cause: Constructors in/after an Optional Chain are not allowed. (1:20)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:21)
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
| ^
Cause: Optional chaining cannot appear in the callee of new expressions"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Invalid optional chain from new expression (1:21)
> 1 | const baz3 = new obj?.foo?.bar?.baz(); // baz instance
| ^^
Cause: [1:20-1:22]: Invalid optional chain from new expression"
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:22)
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
| ^
Cause: Optional chaining cannot appear in the callee of new expressions (1:21)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"Constructors in/after an Optional Chain are not allowed. (1:22)
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
| ^
Cause: Constructors in/after an Optional Chain are not allowed. (1:21)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:22)
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
| ^
Cause: Optional chaining cannot appear in the callee of new expressions"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Invalid optional chain from new expression (1:22)
> 1 | const safe5 = new obj?.qux?.baz(); // undefined
| ^^
Cause: [1:21-1:23]: Invalid optional chain from new expression"
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:22)
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
| ^
Cause: Optional chaining cannot appear in the callee of new expressions (1:21)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Constructors in/after an Optional Chain are not allowed. (1:22)
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
| ^
Cause: Constructors in/after an Optional Chain are not allowed. (1:21)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:22)
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
| ^
Cause: Optional chaining cannot appear in the callee of new expressions"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"Invalid optional chain from new expression (1:22)
> 1 | const safe6 = new obj?.foo.bar.qux?.(); // undefined
| ^^
Cause: [1:21-1:23]: Invalid optional chain from new expression"
`;
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:26)
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
| ^
Cause: Optional chaining cannot appear in the callee of new expressions (1:25)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Constructors in/after an Optional Chain are not allowed. (1:26)
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
| ^
Cause: Constructors in/after an Optional Chain are not allowed. (1:25)"
`;
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:26)
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
| ^
Cause: Optional chaining cannot appear in the callee of new expressions"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"Invalid optional chain from new expression (1:26)
> 1 | const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor
| ^^
Cause: [1:25-1:27]: Invalid optional chain from new expression"
`;
-exports[`snippet: #4 [acorn] format 1`] = `
+exports[`snippet: #4 format[acorn] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (4:9)
2 | class Test {
3 | }
@@ -121,7 +121,7 @@ exports[`snippet: #4 [acorn] format 1`] = `
Cause: Optional chaining cannot appear in the callee of new expressions (4:8)"
`;
-exports[`snippet: #4 [babel] format 1`] = `
+exports[`snippet: #4 format[babel] 1`] = `
"Constructors in/after an Optional Chain are not allowed. (4:9)
2 | class Test {
3 | }
@@ -130,7 +130,7 @@ exports[`snippet: #4 [babel] format 1`] = `
Cause: Constructors in/after an Optional Chain are not allowed. (4:8)"
`;
-exports[`snippet: #4 [espree] format 1`] = `
+exports[`snippet: #4 format[espree] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (4:9)
2 | class Test {
3 | }
@@ -139,7 +139,7 @@ exports[`snippet: #4 [espree] format 1`] = `
Cause: Optional chaining cannot appear in the callee of new expressions"
`;
-exports[`snippet: #4 [meriyah] format 1`] = `
+exports[`snippet: #4 format[meriyah] 1`] = `
"Invalid optional chain from new expression (4:9)
2 | class Test {
3 | }
@@ -148,28 +148,28 @@ exports[`snippet: #4 [meriyah] format 1`] = `
Cause: [4:8-4:10]: Invalid optional chain from new expression"
`;
-exports[`snippet: #5 [acorn] format 1`] = `
+exports[`snippet: #5 format[acorn] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:11)
> 1 | new exists?.(); // undefined
| ^
Cause: Optional chaining cannot appear in the callee of new expressions (1:10)"
`;
-exports[`snippet: #5 [babel] format 1`] = `
+exports[`snippet: #5 format[babel] 1`] = `
"Constructors in/after an Optional Chain are not allowed. (1:11)
> 1 | new exists?.(); // undefined
| ^
Cause: Constructors in/after an Optional Chain are not allowed. (1:10)"
`;
-exports[`snippet: #5 [espree] format 1`] = `
+exports[`snippet: #5 format[espree] 1`] = `
"Optional chaining cannot appear in the callee of new expressions (1:11)
> 1 | new exists?.(); // undefined
| ^
Cause: Optional chaining cannot appear in the callee of new expressions"
`;
-exports[`snippet: #5 [meriyah] format 1`] = `
+exports[`snippet: #5 format[meriyah] 1`] = `
"Invalid optional chain from new expression (1:11)
> 1 | new exists?.(); // undefined
| ^^
diff --git a/tests/format/js/_errors_/record/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/record/__snapshots__/format.test.js.snap
index c260f1a22..06dfecfa1 100644
--- a/tests/format/js/_errors_/record/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/record/__snapshots__/format.test.js.snap
@@ -1,139 +1,139 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{a() {}}
| ^
Cause: Unexpected character '{' (1:1)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Unexpected token (1:1)
> 1 | #{a() {}}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{a() {}}
| ^
Cause: Unexpected character '{'"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"'#' not followed by identifier (1:1)
> 1 | #{a() {}}
| ^
Cause: [1:0-1:1]: '#' not followed by identifier"
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{async b() {}}
| ^
Cause: Unexpected character '{' (1:1)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"Unexpected token (1:1)
> 1 | #{async b() {}}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{async b() {}}
| ^
Cause: Unexpected character '{'"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"'#' not followed by identifier (1:1)
> 1 | #{async b() {}}
| ^
Cause: [1:0-1:1]: '#' not followed by identifier"
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{get c() {}}
| ^
Cause: Unexpected character '{' (1:1)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Unexpected token (1:1)
> 1 | #{get c() {}}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{get c() {}}
| ^
Cause: Unexpected character '{'"
`;
-exports[`snippet: #2 [meriyah] format 1`] = `
+exports[`snippet: #2 format[meriyah] 1`] = `
"'#' not followed by identifier (1:1)
> 1 | #{get c() {}}
| ^
Cause: [1:0-1:1]: '#' not followed by identifier"
`;
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{set d(_) {}}
| ^
Cause: Unexpected character '{' (1:1)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Unexpected token (1:1)
> 1 | #{set d(_) {}}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{set d(_) {}}
| ^
Cause: Unexpected character '{'"
`;
-exports[`snippet: #3 [meriyah] format 1`] = `
+exports[`snippet: #3 format[meriyah] 1`] = `
"'#' not followed by identifier (1:1)
> 1 | #{set d(_) {}}
| ^
Cause: [1:0-1:1]: '#' not followed by identifier"
`;
-exports[`snippet: #4 [acorn] format 1`] = `
+exports[`snippet: #4 format[acorn] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{*e() {}}
| ^
Cause: Unexpected character '{' (1:1)"
`;
-exports[`snippet: #4 [babel] format 1`] = `
+exports[`snippet: #4 format[babel] 1`] = `
"Unexpected token (1:1)
> 1 | #{*e() {}}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #4 [espree] format 1`] = `
+exports[`snippet: #4 format[espree] 1`] = `
"Unexpected character '{' (1:2)
> 1 | #{*e() {}}
| ^
Cause: Unexpected character '{'"
`;
-exports[`snippet: #4 [meriyah] format 1`] = `
+exports[`snippet: #4 format[meriyah] 1`] = `
"'#' not followed by identifier (1:1)
> 1 | #{*e() {}}
| ^
diff --git a/tests/format/js/_errors_/regex-v-u-flags/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/regex-v-u-flags/__snapshots__/format.test.js.snap
index c0848837b..9f6433302 100644
--- a/tests/format/js/_errors_/regex-v-u-flags/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/regex-v-u-flags/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-flags.js [acorn] format 1`] = `
+exports[`invalid-flags.js format[acorn] 1`] = `
"Invalid regular expression flag (1:2)
> 1 | /a/ugv;
| ^
@@ -8,7 +8,7 @@ exports[`invalid-flags.js [acorn] format 1`] = `
Cause: Invalid regular expression flag (1:1)"
`;
-exports[`invalid-flags.js [babel] format 1`] = `
+exports[`invalid-flags.js format[babel] 1`] = `
"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:7)
> 1 | /a/ugv;
| ^
@@ -16,7 +16,7 @@ exports[`invalid-flags.js [babel] format 1`] = `
Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6)"
`;
-exports[`invalid-flags.js [espree] format 1`] = `
+exports[`invalid-flags.js format[espree] 1`] = `
"Invalid regular expression flag (1:2)
> 1 | /a/ugv;
| ^
@@ -24,7 +24,7 @@ exports[`invalid-flags.js [espree] format 1`] = `
Cause: Invalid regular expression flag"
`;
-exports[`invalid-flags.js [meriyah] format 1`] = `
+exports[`invalid-flags.js format[meriyah] 1`] = `
"Duplicate regular expression flag 'uv' (1:1)
> 1 | /a/ugv;
| ^^^^^
@@ -32,7 +32,7 @@ exports[`invalid-flags.js [meriyah] format 1`] = `
Cause: [1:0-1:5]: Duplicate regular expression flag 'uv'"
`;
-exports[`invalid-flags2.js [acorn] format 1`] = `
+exports[`invalid-flags2.js format[acorn] 1`] = `
"Invalid regular expression flag (1:2)
> 1 | /a/vu;
| ^
@@ -40,7 +40,7 @@ exports[`invalid-flags2.js [acorn] format 1`] = `
Cause: Invalid regular expression flag (1:1)"
`;
-exports[`invalid-flags2.js [babel] format 1`] = `
+exports[`invalid-flags2.js format[babel] 1`] = `
"The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:6)
> 1 | /a/vu;
| ^
@@ -48,7 +48,7 @@ exports[`invalid-flags2.js [babel] format 1`] = `
Cause: The 'u' and 'v' regular expression flags cannot be enabled at the same time. (1:5)"
`;
-exports[`invalid-flags2.js [espree] format 1`] = `
+exports[`invalid-flags2.js format[espree] 1`] = `
"Invalid regular expression flag (1:2)
> 1 | /a/vu;
| ^
@@ -56,7 +56,7 @@ exports[`invalid-flags2.js [espree] format 1`] = `
Cause: Invalid regular expression flag"
`;
-exports[`invalid-flags2.js [meriyah] format 1`] = `
+exports[`invalid-flags2.js format[meriyah] 1`] = `
"Duplicate regular expression flag 'vu' (1:1)
> 1 | /a/vu;
| ^^^^
diff --git a/tests/format/js/_errors_/reserved-word/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/reserved-word/__snapshots__/format.test.js.snap
index ad98e1a3e..57692880e 100644
--- a/tests/format/js/_errors_/reserved-word/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/reserved-word/__snapshots__/format.test.js.snap
@@ -1,46 +1,46 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"The keyword 'interface' is reserved (1:7)
> 1 | class interface {}
| ^
Cause: The keyword 'interface' is reserved (1:6)"
`;
-exports[`snippet: #0 [acorn] format 2`] = `
+exports[`snippet: #0 format[acorn] 2`] = `
"Unexpected token (1:8)
> 1 | export asyn\\u{63} from "async";
| ^
Cause: Unexpected token (1:7)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"The keyword 'interface' is reserved (1:7)
> 1 | class interface {}
| ^
Cause: The keyword 'interface' is reserved"
`;
-exports[`snippet: #0 [espree] format 2`] = `
+exports[`snippet: #0 format[espree] 2`] = `
"Unexpected token asyn\\u{63} (1:8)
> 1 | export asyn\\u{63} from "async";
| ^
Cause: Unexpected token asyn\\u{63}"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Use of reserved word in strict mode (1:7)
> 1 | class interface {}
| ^^^^^^^^^"
`;
-exports[`snippet: #0 [flow] format 2`] = `
+exports[`snippet: #0 format[flow] 2`] = `
"Unexpected identifier, expected a declaration, statement or export specifiers (1:8)
> 1 | export asyn\\u{63} from "async";
| ^^^^^^^^^^"
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`snippet: #0 format[hermes] 1`] = `
"expected declaration in export (1:7)
> 1 | export asyn\\u{63} from "async";
| ^
@@ -49,60 +49,60 @@ export asyn\\u{63} from "async";
^~~~~~~~~~"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Unexpected strict mode reserved word (1:7)
> 1 | class interface {}
| ^^^^^^^^^
Cause: [1:6-1:15]: Unexpected strict mode reserved word"
`;
-exports[`snippet: #0 [meriyah] format 2`] = `
+exports[`snippet: #0 format[meriyah] 2`] = `
"Unexpected token: 'reserved if strict' (1:8)
> 1 | export asyn\\u{63} from "async";
| ^^^^^^^^^^
Cause: [1:7-1:17]: Unexpected token: 'reserved if strict'"
`;
-exports[`snippet: #0 [oxc] format 1`] = `
+exports[`snippet: #0 format[oxc] 1`] = `
"Unexpected token (1:8)
> 1 | export asyn\\u{63} from "async";
| ^^^^^^^^^^"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Keywords cannot contain escape characters (1:8)
> 1 | export asyn\\u{63} from "async";
| ^^^^^^^^^^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Declaration or statement expected. (1:1)
> 1 | export asyn\\u{63} from "async";
| ^
Cause: Declaration or statement expected."
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"The keyword 'interface' is reserved (1:8)
> 1 | import interface from "foo";
| ^
Cause: The keyword 'interface' is reserved (1:7)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"The keyword 'interface' is reserved (1:8)
> 1 | import interface from "foo";
| ^
Cause: The keyword 'interface' is reserved"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Use of reserved word in strict mode (1:8)
> 1 | import interface from "foo";
| ^^^^^^^^^"
`;
-exports[`snippet: #1 [meriyah] format 1`] = `
+exports[`snippet: #1 format[meriyah] 1`] = `
"Unexpected strict mode reserved word (1:8)
> 1 | import interface from "foo";
| ^^^^^^^^^
diff --git a/tests/format/js/_errors_/variable-declarator/__snapshots__/format.test.js.snap b/tests/format/js/_errors_/variable-declarator/__snapshots__/format.test.js.snap
index 0ca39c408..95a6fc356 100644
--- a/tests/format/js/_errors_/variable-declarator/__snapshots__/format.test.js.snap
+++ b/tests/format/js/_errors_/variable-declarator/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-const.js [acorn] format 1`] = `
+exports[`invalid-const.js format[acorn] 1`] = `
"Unexpected token (1:10)
> 1 | const foo;
| ^
@@ -8,7 +8,7 @@ exports[`invalid-const.js [acorn] format 1`] = `
Cause: Unexpected token (1:9)"
`;
-exports[`invalid-const.js [espree] format 1`] = `
+exports[`invalid-const.js format[espree] 1`] = `
"Unexpected token ; (1:10)
> 1 | const foo;
| ^
@@ -16,7 +16,7 @@ exports[`invalid-const.js [espree] format 1`] = `
Cause: Unexpected token ;"
`;
-exports[`invalid-const.js [meriyah] format 1`] = `
+exports[`invalid-const.js format[meriyah] 1`] = `
"Missing initializer in const declaration (1:10)
> 1 | const foo;
| ^
diff --git a/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap b/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap
index 822b02f70..5bfb79562 100644
--- a/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap
+++ b/tests/format/js/arrows-bind/__snapshots__/format.test.js.snap
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`arrows-bind.js [acorn] format 1`] = `
-"Unexpected token (1:9)
-> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
- | ^
- 2 | (a => b)::c;
- 3 | a::(b => c);
- 4 |
-Cause: Unexpected token (1:8)"
-`;
-
-exports[`arrows-bind.js [espree] format 1`] = `
-"Unexpected token : (1:9)
-> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
- | ^
- 2 | (a => b)::c;
- 3 | a::(b => c);
- 4 |
-Cause: Unexpected token :"
-`;
-
-exports[`arrows-bind.js [meriyah] format 1`] = `
-"Expected ')' (1:9)
-> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
- | ^
- 2 | (a => b)::c;
- 3 | a::(b => c);
- 4 |
-Cause: [1:8-1:9]: Expected ')'"
-`;
-
-exports[`arrows-bind.js [oxc] format 1`] = `
-"Expected \`,\` or \`)\` but found \`:\` (1:9)
-> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
- | ^
- 2 | (a => b)::c;
- 3 | a::(b => c);
- 4 |"
-`;
-
exports[`arrows-bind.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -56,3 +17,42 @@ a::((b) => c);
================================================================================
`;
+
+exports[`arrows-bind.js format[acorn] 1`] = `
+"Unexpected token (1:9)
+> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
+ | ^
+ 2 | (a => b)::c;
+ 3 | a::(b => c);
+ 4 |
+Cause: Unexpected token (1:8)"
+`;
+
+exports[`arrows-bind.js format[espree] 1`] = `
+"Unexpected token : (1:9)
+> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
+ | ^
+ 2 | (a => b)::c;
+ 3 | a::(b => c);
+ 4 |
+Cause: Unexpected token :"
+`;
+
+exports[`arrows-bind.js format[meriyah] 1`] = `
+"Expected ')' (1:9)
+> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
+ | ^
+ 2 | (a => b)::c;
+ 3 | a::(b => c);
+ 4 |
+Cause: [1:8-1:9]: Expected ')'"
+`;
+
+exports[`arrows-bind.js format[oxc] 1`] = `
+"Expected \`,\` or \`)\` but found \`:\` (1:9)
+> 1 | a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
+ | ^
+ 2 | (a => b)::c;
+ 3 | a::(b => c);
+ 4 |"
+`;
diff --git a/tests/format/js/assignment/__snapshots__/format.test.js.snap b/tests/format/js/assignment/__snapshots__/format.test.js.snap
index f8daa7c01..f1d9e0851 100644
--- a/tests/format/js/assignment/__snapshots__/format.test.js.snap
+++ b/tests/format/js/assignment/__snapshots__/format.test.js.snap
@@ -1,18 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`binaryish.js [hermes] format 1`] = `
-"invalid assignment left-hand side (6:0)
- 4 | descriptionLines;
- 5 |
-> 6 | computedDescriptionLines = (focused &&
- 7 | !loading &&
- 8 | descriptionLinesFocused) ||
- 9 | descriptionLines;
-Cause: invalid assignment left-hand side (6:0)
-computedDescriptionLines = (focused &&
-^~~~~~~~~~~~~~~~~~~~~~~~"
-`;
-
exports[`binaryish.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -41,6 +28,19 @@ computedDescriptionLines =
================================================================================
`;
+exports[`binaryish.js format[hermes] 1`] = `
+"invalid assignment left-hand side (6:0)
+ 4 | descriptionLines;
+ 5 |
+> 6 | computedDescriptionLines = (focused &&
+ 7 | !loading &&
+ 8 | descriptionLinesFocused) ||
+ 9 | descriptionLines;
+Cause: invalid assignment left-hand side (6:0)
+computedDescriptionLines = (focused &&
+^~~~~~~~~~~~~~~~~~~~~~~~"
+`;
+
exports[`call-with-template.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
diff --git a/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap b/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap
index f6c50c8fa..a084cc19e 100644
--- a/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap
+++ b/tests/format/js/async-do-expressions/__snapshots__/format.test.js.snap
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`async-do-expressions.js [acorn] format 1`] = `
-"Unexpected token (1:7)
-> 1 | async do {
- | ^
- 2 | 1;
- 3 | };
- 4 |
-Cause: Unexpected token (1:6)"
-`;
-
-exports[`async-do-expressions.js [espree] format 1`] = `
-"Unexpected token do (1:7)
-> 1 | async do {
- | ^
- 2 | 1;
- 3 | };
- 4 |
-Cause: Unexpected token do"
-`;
-
-exports[`async-do-expressions.js [meriyah] format 1`] = `
-"Unexpected token: 'do' (1:7)
-> 1 | async do {
- | ^^
- 2 | 1;
- 3 | };
- 4 |
-Cause: [1:6-1:8]: Unexpected token: 'do'"
-`;
-
-exports[`async-do-expressions.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
-> 1 | async do {
- | ^
- 2 | 1;
- 3 | };
- 4 |"
-`;
-
exports[`async-do-expressions.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -94,3 +55,42 @@ let x = async do {
================================================================================
`;
+
+exports[`async-do-expressions.js format[acorn] 1`] = `
+"Unexpected token (1:7)
+> 1 | async do {
+ | ^
+ 2 | 1;
+ 3 | };
+ 4 |
+Cause: Unexpected token (1:6)"
+`;
+
+exports[`async-do-expressions.js format[espree] 1`] = `
+"Unexpected token do (1:7)
+> 1 | async do {
+ | ^
+ 2 | 1;
+ 3 | };
+ 4 |
+Cause: Unexpected token do"
+`;
+
+exports[`async-do-expressions.js format[meriyah] 1`] = `
+"Unexpected token: 'do' (1:7)
+> 1 | async do {
+ | ^^
+ 2 | 1;
+ 3 | };
+ 4 |
+Cause: [1:6-1:8]: Unexpected token: 'do'"
+`;
+
+exports[`async-do-expressions.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
+> 1 | async do {
+ | ^
+ 2 | 1;
+ 3 | };
+ 4 |"
+`;
diff --git a/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap b/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap
index 81dfc4455..4f894f35a 100644
--- a/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap
+++ b/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap
@@ -1,36 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`async-do-expressions.js [acorn] format 1`] = `
-"Unexpected token (1:7)
-> 1 | async do { await requestAPI().json() };
- | ^
- 2 |
-Cause: Unexpected token (1:6)"
-`;
-
-exports[`async-do-expressions.js [espree] format 1`] = `
-"Unexpected token do (1:7)
-> 1 | async do { await requestAPI().json() };
- | ^
- 2 |
-Cause: Unexpected token do"
-`;
-
-exports[`async-do-expressions.js [meriyah] format 1`] = `
-"Unexpected token: 'do' (1:7)
-> 1 | async do { await requestAPI().json() };
- | ^^
- 2 |
-Cause: [1:6-1:8]: Unexpected token: 'do'"
-`;
-
-exports[`async-do-expressions.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
-> 1 | async do { await requestAPI().json() };
- | ^
- 2 |"
-`;
-
exports[`async-do-expressions.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -47,6 +16,37 @@ async do { await requestAPI().json() };
================================================================================
`;
+exports[`async-do-expressions.js format[acorn] 1`] = `
+"Unexpected token (1:7)
+> 1 | async do { await requestAPI().json() };
+ | ^
+ 2 |
+Cause: Unexpected token (1:6)"
+`;
+
+exports[`async-do-expressions.js format[espree] 1`] = `
+"Unexpected token do (1:7)
+> 1 | async do { await requestAPI().json() };
+ | ^
+ 2 |
+Cause: Unexpected token do"
+`;
+
+exports[`async-do-expressions.js format[meriyah] 1`] = `
+"Unexpected token: 'do' (1:7)
+> 1 | async do { await requestAPI().json() };
+ | ^^
+ 2 |
+Cause: [1:6-1:8]: Unexpected token: 'do'"
+`;
+
+exports[`async-do-expressions.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:6)
+> 1 | async do { await requestAPI().json() };
+ | ^
+ 2 |"
+`;
+
exports[`async-generators.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -437,26 +437,6 @@ class C {
================================================================================
`;
-exports[`decorator-auto-accessors.js [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class C extends HTMLElement {
-> 2 | accessor clicked = false;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`decorator-auto-accessors.js [espree] format 1`] = `
-"Unexpected token clicked (2:12)
- 1 | class C extends HTMLElement {
-> 2 | accessor clicked = false;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token clicked"
-`;
-
exports[`decorator-auto-accessors.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -475,28 +455,24 @@ class C extends HTMLElement {
================================================================================
`;
-exports[`decorators.js [acorn] format 1`] = `
-"Unexpected character '@' (3:1)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-decorators
- 2 |
-> 3 | @annotation
- | ^
- 4 | class MyClass { }
- 5 |
- 6 | function annotation(target) {
-Cause: Unexpected character '@' (3:0)"
+exports[`decorator-auto-accessors.js format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class C extends HTMLElement {
+> 2 | accessor clicked = false;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:11)"
`;
-exports[`decorators.js [espree] format 1`] = `
-"Unexpected character '@' (3:1)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-decorators
- 2 |
-> 3 | @annotation
- | ^
- 4 | class MyClass { }
- 5 |
- 6 | function annotation(target) {
-Cause: Unexpected character '@'"
+exports[`decorator-auto-accessors.js format[espree] 1`] = `
+"Unexpected token clicked (2:12)
+ 1 | class C extends HTMLElement {
+> 2 | accessor clicked = false;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token clicked"
`;
exports[`decorators.js format 1`] = `
@@ -569,28 +545,28 @@ function enumerable(value) {
================================================================================
`;
-exports[`deferred-import-evaluation.js [acorn] format 1`] = `
-"Unexpected token (1:14)
-> 1 | import defer * as ns from "x";
- | ^
+exports[`decorators.js format[acorn] 1`] = `
+"Unexpected character '@' (3:1)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-decorators
2 |
-Cause: Unexpected token (1:13)"
+> 3 | @annotation
+ | ^
+ 4 | class MyClass { }
+ 5 |
+ 6 | function annotation(target) {
+Cause: Unexpected character '@' (3:0)"
`;
-exports[`deferred-import-evaluation.js [espree] format 1`] = `
-"Unexpected token * (1:14)
-> 1 | import defer * as ns from "x";
- | ^
+exports[`decorators.js format[espree] 1`] = `
+"Unexpected character '@' (3:1)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-decorators
2 |
-Cause: Unexpected token *"
-`;
-
-exports[`deferred-import-evaluation.js [meriyah] format 1`] = `
-"Expected 'from' (1:14)
-> 1 | import defer * as ns from "x";
- | ^
- 2 |
-Cause: [1:13-1:14]: Expected 'from'"
+> 3 | @annotation
+ | ^
+ 4 | class MyClass { }
+ 5 |
+ 6 | function annotation(target) {
+Cause: Unexpected character '@'"
`;
exports[`deferred-import-evaluation.js format 1`] = `
@@ -607,51 +583,28 @@ import defer * as ns from "x";
================================================================================
`;
-exports[`destructuring-private.js [acorn] format 1`] = `
-"Unexpected token (5:13)
- 3 | constructor() {
- 4 | console.log(this.#x); // => 1
-> 5 | const { #x: x } = this;
- | ^
- 6 | console.log(x); // => 1
- 7 | }
- 8 | equals({ #x: otherX }) {
-Cause: Unexpected token (5:12)"
+exports[`deferred-import-evaluation.js format[acorn] 1`] = `
+"Unexpected token (1:14)
+> 1 | import defer * as ns from "x";
+ | ^
+ 2 |
+Cause: Unexpected token (1:13)"
`;
-exports[`destructuring-private.js [espree] format 1`] = `
-"Unexpected token #x (5:13)
- 3 | constructor() {
- 4 | console.log(this.#x); // => 1
-> 5 | const { #x: x } = this;
- | ^
- 6 | console.log(x); // => 1
- 7 | }
- 8 | equals({ #x: otherX }) {
-Cause: Unexpected token #x"
+exports[`deferred-import-evaluation.js format[espree] 1`] = `
+"Unexpected token * (1:14)
+> 1 | import defer * as ns from "x";
+ | ^
+ 2 |
+Cause: Unexpected token *"
`;
-exports[`destructuring-private.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (5:13)
- 3 | constructor() {
- 4 | console.log(this.#x); // => 1
-> 5 | const { #x: x } = this;
- | ^
- 6 | console.log(x); // => 1
- 7 | }
- 8 | equals({ #x: otherX }) {
-Cause: [5:12-5:13]: Unexpected token: 'PrivateField'"
-`;
-
-exports[`destructuring-private.js [oxc] format 1`] = `
-"Unexpected token (5:13)
- 3 | constructor() {
- 4 | console.log(this.#x); // => 1
-> 5 | const { #x: x } = this;
- | ^^
- 6 | console.log(x); // => 1
- 7 | }
- 8 | equals({ #x: otherX }) {"
+exports[`deferred-import-evaluation.js format[meriyah] 1`] = `
+"Expected 'from' (1:14)
+> 1 | import defer * as ns from "x";
+ | ^
+ 2 |
+Cause: [1:13-1:14]: Expected 'from'"
`;
exports[`destructuring-private.js format 1`] = `
@@ -690,35 +643,51 @@ class Foo {
================================================================================
`;
-exports[`discard-binding.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (1:11)
-> 1 | const [a, void] = iter;
- | ^
- 2 |
-Cause: Unexpected keyword 'void' (1:10)"
+exports[`destructuring-private.js format[acorn] 1`] = `
+"Unexpected token (5:13)
+ 3 | constructor() {
+ 4 | console.log(this.#x); // => 1
+> 5 | const { #x: x } = this;
+ | ^
+ 6 | console.log(x); // => 1
+ 7 | }
+ 8 | equals({ #x: otherX }) {
+Cause: Unexpected token (5:12)"
`;
-exports[`discard-binding.js [espree] format 1`] = `
-"Unexpected keyword 'void' (1:11)
-> 1 | const [a, void] = iter;
- | ^
- 2 |
-Cause: Unexpected keyword 'void'"
+exports[`destructuring-private.js format[espree] 1`] = `
+"Unexpected token #x (5:13)
+ 3 | constructor() {
+ 4 | console.log(this.#x); // => 1
+> 5 | const { #x: x } = this;
+ | ^
+ 6 | console.log(x); // => 1
+ 7 | }
+ 8 | equals({ #x: otherX }) {
+Cause: Unexpected token #x"
`;
-exports[`discard-binding.js [meriyah] format 1`] = `
-"Unexpected token: ']' (1:15)
-> 1 | const [a, void] = iter;
- | ^
- 2 |
-Cause: [1:14-1:15]: Unexpected token: ']'"
+exports[`destructuring-private.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (5:13)
+ 3 | constructor() {
+ 4 | console.log(this.#x); // => 1
+> 5 | const { #x: x } = this;
+ | ^
+ 6 | console.log(x); // => 1
+ 7 | }
+ 8 | equals({ #x: otherX }) {
+Cause: [5:12-5:13]: Unexpected token: 'PrivateField'"
`;
-exports[`discard-binding.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:11)
-> 1 | const [a, void] = iter;
- | ^^^^
- 2 |"
+exports[`destructuring-private.js format[oxc] 1`] = `
+"Unexpected token (5:13)
+ 3 | constructor() {
+ 4 | console.log(this.#x); // => 1
+> 5 | const { #x: x } = this;
+ | ^^
+ 6 | console.log(x); // => 1
+ 7 | }
+ 8 | equals({ #x: otherX }) {"
`;
exports[`discard-binding.js format 1`] = `
@@ -735,51 +704,35 @@ const [a, void] = iter;
================================================================================
`;
-exports[`do-expressions.js [acorn] format 1`] = `
-"Unexpected token (3:9)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+exports[`discard-binding.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (1:11)
+> 1 | const [a, void] = iter;
+ | ^
2 |
-> 3 | let a = do {
- | ^
- 4 | if(x > 10) {
- 5 | 'big';
- 6 | } else {
-Cause: Unexpected token (3:8)"
+Cause: Unexpected keyword 'void' (1:10)"
`;
-exports[`do-expressions.js [espree] format 1`] = `
-"Unexpected token do (3:9)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+exports[`discard-binding.js format[espree] 1`] = `
+"Unexpected keyword 'void' (1:11)
+> 1 | const [a, void] = iter;
+ | ^
2 |
-> 3 | let a = do {
- | ^
- 4 | if(x > 10) {
- 5 | 'big';
- 6 | } else {
-Cause: Unexpected token do"
+Cause: Unexpected keyword 'void'"
`;
-exports[`do-expressions.js [meriyah] format 1`] = `
-"Unexpected token: 'do' (3:9)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+exports[`discard-binding.js format[meriyah] 1`] = `
+"Unexpected token: ']' (1:15)
+> 1 | const [a, void] = iter;
+ | ^
2 |
-> 3 | let a = do {
- | ^^
- 4 | if(x > 10) {
- 5 | 'big';
- 6 | } else {
-Cause: [3:8-3:10]: Unexpected token: 'do'"
+Cause: [1:14-1:15]: Unexpected token: ']'"
`;
-exports[`do-expressions.js [oxc] format 1`] = `
-"Unexpected token (3:9)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
- 2 |
-> 3 | let a = do {
- | ^^
- 4 | if(x > 10) {
- 5 | 'big';
- 6 | } else {"
+exports[`discard-binding.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:11)
+> 1 | const [a, void] = iter;
+ | ^^^^
+ 2 |"
`;
exports[`do-expressions.js format 1`] = `
@@ -816,6 +769,53 @@ let a = x > 10 ? "big" : "small";
================================================================================
`;
+exports[`do-expressions.js format[acorn] 1`] = `
+"Unexpected token (3:9)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+ 2 |
+> 3 | let a = do {
+ | ^
+ 4 | if(x > 10) {
+ 5 | 'big';
+ 6 | } else {
+Cause: Unexpected token (3:8)"
+`;
+
+exports[`do-expressions.js format[espree] 1`] = `
+"Unexpected token do (3:9)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+ 2 |
+> 3 | let a = do {
+ | ^
+ 4 | if(x > 10) {
+ 5 | 'big';
+ 6 | } else {
+Cause: Unexpected token do"
+`;
+
+exports[`do-expressions.js format[meriyah] 1`] = `
+"Unexpected token: 'do' (3:9)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+ 2 |
+> 3 | let a = do {
+ | ^^
+ 4 | if(x > 10) {
+ 5 | 'big';
+ 6 | } else {
+Cause: [3:8-3:10]: Unexpected token: 'do'"
+`;
+
+exports[`do-expressions.js format[oxc] 1`] = `
+"Unexpected token (3:9)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-do-expressions
+ 2 |
+> 3 | let a = do {
+ | ^^
+ 4 | if(x > 10) {
+ 5 | 'big';
+ 6 | } else {"
+`;
+
exports[`dynamic-import.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -844,17 +844,6 @@ import(prettier).then((module) => console.log(module));
================================================================================
`;
-exports[`explicit-resource-management.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:9)
- 1 | function * g() {
-> 2 | using handle = acquireFileHandle(); // block-scoped critical resource
- | ^^^^^^
- 3 | } // cleanup
- 4 |
- 5 | {
-Cause: [2:8-2:14]: Unexpected token: 'identifier'"
-`;
-
exports[`explicit-resource-management.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -891,43 +880,15 @@ function* g() {
================================================================================
`;
-exports[`export-default-from.js [acorn] format 1`] = `
-"Unexpected token (4:8)
- 2 |
- 3 |
-> 4 | export v from 'mod';
- | ^
- 5 |
-Cause: Unexpected token (4:7)"
-`;
-
-exports[`export-default-from.js [espree] format 1`] = `
-"Unexpected token v (4:8)
- 2 |
- 3 |
-> 4 | export v from 'mod';
- | ^
- 5 |
-Cause: Unexpected token v"
-`;
-
-exports[`export-default-from.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (4:8)
- 2 |
- 3 |
-> 4 | export v from 'mod';
- | ^
- 5 |
-Cause: [4:7-4:8]: Unexpected token: 'identifier'"
-`;
-
-exports[`export-default-from.js [oxc] format 1`] = `
-"Unexpected token (4:8)
- 2 |
- 3 |
-> 4 | export v from 'mod';
- | ^
- 5 |"
+exports[`explicit-resource-management.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:9)
+ 1 | function * g() {
+> 2 | using handle = acquireFileHandle(); // block-scoped critical resource
+ | ^^^^^^
+ 3 | } // cleanup
+ 4 |
+ 5 | {
+Cause: [2:8-2:14]: Unexpected token: 'identifier'"
`;
exports[`export-default-from.js format 1`] = `
@@ -949,6 +910,45 @@ export v from "mod";
================================================================================
`;
+exports[`export-default-from.js format[acorn] 1`] = `
+"Unexpected token (4:8)
+ 2 |
+ 3 |
+> 4 | export v from 'mod';
+ | ^
+ 5 |
+Cause: Unexpected token (4:7)"
+`;
+
+exports[`export-default-from.js format[espree] 1`] = `
+"Unexpected token v (4:8)
+ 2 |
+ 3 |
+> 4 | export v from 'mod';
+ | ^
+ 5 |
+Cause: Unexpected token v"
+`;
+
+exports[`export-default-from.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (4:8)
+ 2 |
+ 3 |
+> 4 | export v from 'mod';
+ | ^
+ 5 |
+Cause: [4:7-4:8]: Unexpected token: 'identifier'"
+`;
+
+exports[`export-default-from.js format[oxc] 1`] = `
+"Unexpected token (4:8)
+ 2 |
+ 3 |
+> 4 | export v from 'mod';
+ | ^
+ 5 |"
+`;
+
exports[`export-namespace-from.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -967,65 +967,6 @@ export * as ns from "mod";
================================================================================
`;
-exports[`flow.js [__babel_estree] format 1`] = `
-"Unexpected token, expected "," (3:17)
- 1 | // https://babeljs.io/docs/babel-preset-flow
- 2 |
-> 3 | function foo(one: any, two: number, three?): string {}
- | ^
- 4 |
-Cause: Unexpected token, expected "," (3:16)"
-`;
-
-exports[`flow.js [acorn] format 1`] = `
-"Unexpected token (3:17)
- 1 | // https://babeljs.io/docs/babel-preset-flow
- 2 |
-> 3 | function foo(one: any, two: number, three?): string {}
- | ^
- 4 |
-Cause: Unexpected token (3:16)"
-`;
-
-exports[`flow.js [babel] format 1`] = `
-"Unexpected token, expected "," (3:17)
- 1 | // https://babeljs.io/docs/babel-preset-flow
- 2 |
-> 3 | function foo(one: any, two: number, three?): string {}
- | ^
- 4 |
-Cause: Unexpected token, expected "," (3:16)"
-`;
-
-exports[`flow.js [espree] format 1`] = `
-"Unexpected token : (3:17)
- 1 | // https://babeljs.io/docs/babel-preset-flow
- 2 |
-> 3 | function foo(one: any, two: number, three?): string {}
- | ^
- 4 |
-Cause: Unexpected token :"
-`;
-
-exports[`flow.js [meriyah] format 1`] = `
-"Expected ')' (3:17)
- 1 | // https://babeljs.io/docs/babel-preset-flow
- 2 |
-> 3 | function foo(one: any, two: number, three?): string {}
- | ^
- 4 |
-Cause: [3:16-3:17]: Expected ')'"
-`;
-
-exports[`flow.js [oxc] format 1`] = `
-"Expected \`,\` or \`)\` but found \`:\` (3:17)
- 1 | // https://babeljs.io/docs/babel-preset-flow
- 2 |
-> 3 | function foo(one: any, two: number, three?): string {}
- | ^
- 4 |"
-`;
-
exports[`flow.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -1044,51 +985,63 @@ function foo(one: any, two: number, three?): string {}
================================================================================
`;
-exports[`function-bind.js [acorn] format 1`] = `
-"Unexpected token (3:5)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
+exports[`flow.js format[__babel_estree] 1`] = `
+"Unexpected token, expected "," (3:17)
+ 1 | // https://babeljs.io/docs/babel-preset-flow
2 |
-> 3 | obj::func
- | ^
- 4 | // is equivalent to:
- 5 | func.bind(obj)
- 6 |
-Cause: Unexpected token (3:4)"
+> 3 | function foo(one: any, two: number, three?): string {}
+ | ^
+ 4 |
+Cause: Unexpected token, expected "," (3:16)"
`;
-exports[`function-bind.js [espree] format 1`] = `
-"Unexpected token : (3:5)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
+exports[`flow.js format[acorn] 1`] = `
+"Unexpected token (3:17)
+ 1 | // https://babeljs.io/docs/babel-preset-flow
2 |
-> 3 | obj::func
- | ^
- 4 | // is equivalent to:
- 5 | func.bind(obj)
- 6 |
+> 3 | function foo(one: any, two: number, three?): string {}
+ | ^
+ 4 |
+Cause: Unexpected token (3:16)"
+`;
+
+exports[`flow.js format[babel] 1`] = `
+"Unexpected token, expected "," (3:17)
+ 1 | // https://babeljs.io/docs/babel-preset-flow
+ 2 |
+> 3 | function foo(one: any, two: number, three?): string {}
+ | ^
+ 4 |
+Cause: Unexpected token, expected "," (3:16)"
+`;
+
+exports[`flow.js format[espree] 1`] = `
+"Unexpected token : (3:17)
+ 1 | // https://babeljs.io/docs/babel-preset-flow
+ 2 |
+> 3 | function foo(one: any, two: number, three?): string {}
+ | ^
+ 4 |
Cause: Unexpected token :"
`;
-exports[`function-bind.js [meriyah] format 1`] = `
-"Unexpected token: ':' (3:5)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
+exports[`flow.js format[meriyah] 1`] = `
+"Expected ')' (3:17)
+ 1 | // https://babeljs.io/docs/babel-preset-flow
2 |
-> 3 | obj::func
- | ^
- 4 | // is equivalent to:
- 5 | func.bind(obj)
- 6 |
-Cause: [3:4-3:5]: Unexpected token: ':'"
+> 3 | function foo(one: any, two: number, three?): string {}
+ | ^
+ 4 |
+Cause: [3:16-3:17]: Expected ')'"
`;
-exports[`function-bind.js [oxc] format 1`] = `
-"Unexpected token (3:5)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
+exports[`flow.js format[oxc] 1`] = `
+"Expected \`,\` or \`)\` but found \`:\` (3:17)
+ 1 | // https://babeljs.io/docs/babel-preset-flow
2 |
-> 3 | obj::func
- | ^
- 4 | // is equivalent to:
- 5 | func.bind(obj)
- 6 |"
+> 3 | function foo(one: any, two: number, three?): string {}
+ | ^
+ 4 |"
`;
exports[`function-bind.js format 1`] = `
@@ -1136,51 +1089,51 @@ obj.func.call(obj, val);
================================================================================
`;
-exports[`function-sent.js [acorn] format 1`] = `
-"Unexpected token (4:33)
+exports[`function-bind.js format[acorn] 1`] = `
+"Unexpected token (3:5)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
2 |
- 3 | function* generator() {
-> 4 | console.log("Sent", function.sent);
- | ^
- 5 | console.log("Yield", yield);
- 6 | }
- 7 |
-Cause: Unexpected token (4:32)"
+> 3 | obj::func
+ | ^
+ 4 | // is equivalent to:
+ 5 | func.bind(obj)
+ 6 |
+Cause: Unexpected token (3:4)"
`;
-exports[`function-sent.js [espree] format 1`] = `
-"Unexpected token . (4:33)
+exports[`function-bind.js format[espree] 1`] = `
+"Unexpected token : (3:5)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
2 |
- 3 | function* generator() {
-> 4 | console.log("Sent", function.sent);
- | ^
- 5 | console.log("Yield", yield);
- 6 | }
- 7 |
-Cause: Unexpected token ."
+> 3 | obj::func
+ | ^
+ 4 | // is equivalent to:
+ 5 | func.bind(obj)
+ 6 |
+Cause: Unexpected token :"
`;
-exports[`function-sent.js [meriyah] format 1`] = `
-"Expected '(' (4:33)
+exports[`function-bind.js format[meriyah] 1`] = `
+"Unexpected token: ':' (3:5)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
2 |
- 3 | function* generator() {
-> 4 | console.log("Sent", function.sent);
- | ^
- 5 | console.log("Yield", yield);
- 6 | }
- 7 |
-Cause: [4:32-4:33]: Expected '('"
+> 3 | obj::func
+ | ^
+ 4 | // is equivalent to:
+ 5 | func.bind(obj)
+ 6 |
+Cause: [3:4-3:5]: Unexpected token: ':'"
`;
-exports[`function-sent.js [oxc] format 1`] = `
-"Expected \`(\` but found \`.\` (4:33)
+exports[`function-bind.js format[oxc] 1`] = `
+"Unexpected token (3:5)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-function-bind
2 |
- 3 | function* generator() {
-> 4 | console.log("Sent", function.sent);
- | ^
- 5 | console.log("Yield", yield);
- 6 | }
- 7 |"
+> 3 | obj::func
+ | ^
+ 4 | // is equivalent to:
+ 5 | func.bind(obj)
+ 6 |"
`;
exports[`function-sent.js format 1`] = `
@@ -1215,6 +1168,53 @@ iterator.next(2); // Logs "Yield 2"
================================================================================
`;
+exports[`function-sent.js format[acorn] 1`] = `
+"Unexpected token (4:33)
+ 2 |
+ 3 | function* generator() {
+> 4 | console.log("Sent", function.sent);
+ | ^
+ 5 | console.log("Yield", yield);
+ 6 | }
+ 7 |
+Cause: Unexpected token (4:32)"
+`;
+
+exports[`function-sent.js format[espree] 1`] = `
+"Unexpected token . (4:33)
+ 2 |
+ 3 | function* generator() {
+> 4 | console.log("Sent", function.sent);
+ | ^
+ 5 | console.log("Yield", yield);
+ 6 | }
+ 7 |
+Cause: Unexpected token ."
+`;
+
+exports[`function-sent.js format[meriyah] 1`] = `
+"Expected '(' (4:33)
+ 2 |
+ 3 | function* generator() {
+> 4 | console.log("Sent", function.sent);
+ | ^
+ 5 | console.log("Yield", yield);
+ 6 | }
+ 7 |
+Cause: [4:32-4:33]: Expected '('"
+`;
+
+exports[`function-sent.js format[oxc] 1`] = `
+"Expected \`(\` but found \`.\` (4:33)
+ 2 |
+ 3 | function* generator() {
+> 4 | console.log("Sent", function.sent);
+ | ^
+ 5 | console.log("Yield", yield);
+ 6 | }
+ 7 |"
+`;
+
exports[`import-assertions-dynamic.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -1357,45 +1357,6 @@ obj.a.b &&= c;
================================================================================
`;
-exports[`module-blocks.js [acorn] format 1`] = `
-"Unexpected token (1:16)
-> 1 | let m = module {
- | ^
- 2 | export let m = 2;
- 3 | export let n = 3;
- 4 | };
-Cause: Unexpected token (1:15)"
-`;
-
-exports[`module-blocks.js [espree] format 1`] = `
-"Unexpected token { (1:16)
-> 1 | let m = module {
- | ^
- 2 | export let m = 2;
- 3 | export let n = 3;
- 4 | };
-Cause: Unexpected token {"
-`;
-
-exports[`module-blocks.js [meriyah] format 1`] = `
-"Unexpected token: '{' (1:16)
-> 1 | let m = module {
- | ^
- 2 | export let m = 2;
- 3 | export let n = 3;
- 4 | };
-Cause: [1:15-1:16]: Unexpected token: '{'"
-`;
-
-exports[`module-blocks.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:15)
-> 1 | let m = module {
- | ^
- 2 | export let m = 2;
- 3 | export let n = 3;
- 4 | };"
-`;
-
exports[`module-blocks.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -1416,6 +1377,45 @@ let m = module {
================================================================================
`;
+exports[`module-blocks.js format[acorn] 1`] = `
+"Unexpected token (1:16)
+> 1 | let m = module {
+ | ^
+ 2 | export let m = 2;
+ 3 | export let n = 3;
+ 4 | };
+Cause: Unexpected token (1:15)"
+`;
+
+exports[`module-blocks.js format[espree] 1`] = `
+"Unexpected token { (1:16)
+> 1 | let m = module {
+ | ^
+ 2 | export let m = 2;
+ 3 | export let n = 3;
+ 4 | };
+Cause: Unexpected token {"
+`;
+
+exports[`module-blocks.js format[meriyah] 1`] = `
+"Unexpected token: '{' (1:16)
+> 1 | let m = module {
+ | ^
+ 2 | export let m = 2;
+ 3 | export let n = 3;
+ 4 | };
+Cause: [1:15-1:16]: Unexpected token: '{'"
+`;
+
+exports[`module-blocks.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:15)
+> 1 | let m = module {
+ | ^
+ 2 | export let m = 2;
+ 3 | export let n = 3;
+ 4 | };"
+`;
+
exports[`module-string-names.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -1741,37 +1741,6 @@ const ret = delete obj?.foo?.bar?.baz; // true
================================================================================
`;
-exports[`optional-chaining-assignment.js [acorn] format 1`] = `
-"Optional chaining cannot appear in left-hand side (1:1)
-> 1 | maybeAnObj?.prop = theValue;
- | ^
- 2 |
-Cause: Optional chaining cannot appear in left-hand side (1:0)"
-`;
-
-exports[`optional-chaining-assignment.js [espree] format 1`] = `
-"Optional chaining cannot appear in left-hand side (1:1)
-> 1 | maybeAnObj?.prop = theValue;
- | ^
- 2 |
-Cause: Optional chaining cannot appear in left-hand side"
-`;
-
-exports[`optional-chaining-assignment.js [meriyah] format 1`] = `
-"Invalid left-hand side in assignment (1:18)
-> 1 | maybeAnObj?.prop = theValue;
- | ^
- 2 |
-Cause: [1:17-1:18]: Invalid left-hand side in assignment"
-`;
-
-exports[`optional-chaining-assignment.js [oxc] format 1`] = `
-"Cannot assign to this expression (1:1)
-> 1 | maybeAnObj?.prop = theValue;
- | ^^^^^^^^^^^^^^^^
- 2 |"
-`;
-
exports[`optional-chaining-assignment.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -1786,51 +1755,35 @@ maybeAnObj?.prop = theValue;
================================================================================
`;
-exports[`partial-application.js [acorn] format 1`] = `
-"Unexpected token (5:23)
- 3 | function add(x, y) { return x + y; }
- 4 |
-> 5 | const addOne = add(1, ?); // apply from the left
- | ^
- 6 | addOne(2); // 3
- 7 |
- 8 | const addTen = add(?, 10); // apply from the right
-Cause: Unexpected token (5:22)"
+exports[`optional-chaining-assignment.js format[acorn] 1`] = `
+"Optional chaining cannot appear in left-hand side (1:1)
+> 1 | maybeAnObj?.prop = theValue;
+ | ^
+ 2 |
+Cause: Optional chaining cannot appear in left-hand side (1:0)"
`;
-exports[`partial-application.js [espree] format 1`] = `
-"Unexpected token ? (5:23)
- 3 | function add(x, y) { return x + y; }
- 4 |
-> 5 | const addOne = add(1, ?); // apply from the left
- | ^
- 6 | addOne(2); // 3
- 7 |
- 8 | const addTen = add(?, 10); // apply from the right
-Cause: Unexpected token ?"
+exports[`optional-chaining-assignment.js format[espree] 1`] = `
+"Optional chaining cannot appear in left-hand side (1:1)
+> 1 | maybeAnObj?.prop = theValue;
+ | ^
+ 2 |
+Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`partial-application.js [meriyah] format 1`] = `
-"Unexpected token: '?' (5:23)
- 3 | function add(x, y) { return x + y; }
- 4 |
-> 5 | const addOne = add(1, ?); // apply from the left
- | ^
- 6 | addOne(2); // 3
- 7 |
- 8 | const addTen = add(?, 10); // apply from the right
-Cause: [5:22-5:23]: Unexpected token: '?'"
+exports[`optional-chaining-assignment.js format[meriyah] 1`] = `
+"Invalid left-hand side in assignment (1:18)
+> 1 | maybeAnObj?.prop = theValue;
+ | ^
+ 2 |
+Cause: [1:17-1:18]: Invalid left-hand side in assignment"
`;
-exports[`partial-application.js [oxc] format 1`] = `
-"Unexpected token (5:23)
- 3 | function add(x, y) { return x + y; }
- 4 |
-> 5 | const addOne = add(1, ?); // apply from the left
- | ^
- 6 | addOne(2); // 3
- 7 |
- 8 | const addTen = add(?, 10); // apply from the right"
+exports[`optional-chaining-assignment.js format[oxc] 1`] = `
+"Cannot assign to this expression (1:1)
+> 1 | maybeAnObj?.prop = theValue;
+ | ^^^^^^^^^^^^^^^^
+ 2 |"
`;
exports[`partial-application.js format 1`] = `
@@ -1887,51 +1840,51 @@ super.f(?); // partial application allowed for call on |SuperProperty|
================================================================================
`;
-exports[`pipeline-operator-fsharp.js [acorn] format 1`] = `
-"Unexpected token (5:4)
- 3 |
- 4 | promise
-> 5 | |> await
- | ^
- 6 | |> x => doubleSay(x, ', ')
- 7 | |> capitalize
- 8 | |> x => x + '!'
-Cause: Unexpected token (5:3)"
+exports[`partial-application.js format[acorn] 1`] = `
+"Unexpected token (5:23)
+ 3 | function add(x, y) { return x + y; }
+ 4 |
+> 5 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 6 | addOne(2); // 3
+ 7 |
+ 8 | const addTen = add(?, 10); // apply from the right
+Cause: Unexpected token (5:22)"
`;
-exports[`pipeline-operator-fsharp.js [espree] format 1`] = `
-"Unexpected token > (5:4)
- 3 |
- 4 | promise
-> 5 | |> await
- | ^
- 6 | |> x => doubleSay(x, ', ')
- 7 | |> capitalize
- 8 | |> x => x + '!'
-Cause: Unexpected token >"
+exports[`partial-application.js format[espree] 1`] = `
+"Unexpected token ? (5:23)
+ 3 | function add(x, y) { return x + y; }
+ 4 |
+> 5 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 6 | addOne(2); // 3
+ 7 |
+ 8 | const addTen = add(?, 10); // apply from the right
+Cause: Unexpected token ?"
`;
-exports[`pipeline-operator-fsharp.js [meriyah] format 1`] = `
-"Unexpected token: '>' (5:4)
- 3 |
- 4 | promise
-> 5 | |> await
- | ^
- 6 | |> x => doubleSay(x, ', ')
- 7 | |> capitalize
- 8 | |> x => x + '!'
-Cause: [5:3-5:4]: Unexpected token: '>'"
+exports[`partial-application.js format[meriyah] 1`] = `
+"Unexpected token: '?' (5:23)
+ 3 | function add(x, y) { return x + y; }
+ 4 |
+> 5 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 6 | addOne(2); // 3
+ 7 |
+ 8 | const addTen = add(?, 10); // apply from the right
+Cause: [5:22-5:23]: Unexpected token: '?'"
`;
-exports[`pipeline-operator-fsharp.js [oxc] format 1`] = `
-"Unexpected token (5:4)
- 3 |
- 4 | promise
-> 5 | |> await
- | ^
- 6 | |> x => doubleSay(x, ', ')
- 7 | |> capitalize
- 8 | |> x => x + '!'"
+exports[`partial-application.js format[oxc] 1`] = `
+"Unexpected token (5:23)
+ 3 | function add(x, y) { return x + y; }
+ 4 |
+> 5 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 6 | addOne(2); // 3
+ 7 |
+ 8 | const addTen = add(?, 10); // apply from the right"
`;
exports[`pipeline-operator-fsharp.js format 1`] = `
@@ -2009,51 +1962,51 @@ let newScore = boundScore(0, 100, add(7, double(person.score)));
================================================================================
`;
-exports[`pipeline-operator-hack.cjs [acorn] format 1`] = `
-"Unexpected token (5:3)
+exports[`pipeline-operator-fsharp.js format[acorn] 1`] = `
+"Unexpected token (5:4)
3 |
- 4 | return list
-> 5 | |> take(prefix.length, %)
- | ^
- 6 | |> equals(%, prefix);
- 7 |
- 8 | // (The % token isn't final; it might instead be @ or ? or #.)
-Cause: Unexpected token (5:2)"
+ 4 | promise
+> 5 | |> await
+ | ^
+ 6 | |> x => doubleSay(x, ', ')
+ 7 | |> capitalize
+ 8 | |> x => x + '!'
+Cause: Unexpected token (5:3)"
`;
-exports[`pipeline-operator-hack.cjs [espree] format 1`] = `
-"Unexpected token > (5:3)
+exports[`pipeline-operator-fsharp.js format[espree] 1`] = `
+"Unexpected token > (5:4)
3 |
- 4 | return list
-> 5 | |> take(prefix.length, %)
- | ^
- 6 | |> equals(%, prefix);
- 7 |
- 8 | // (The % token isn't final; it might instead be @ or ? or #.)
+ 4 | promise
+> 5 | |> await
+ | ^
+ 6 | |> x => doubleSay(x, ', ')
+ 7 | |> capitalize
+ 8 | |> x => x + '!'
Cause: Unexpected token >"
`;
-exports[`pipeline-operator-hack.cjs [meriyah] format 1`] = `
-"Unexpected token: '>' (5:3)
+exports[`pipeline-operator-fsharp.js format[meriyah] 1`] = `
+"Unexpected token: '>' (5:4)
3 |
- 4 | return list
-> 5 | |> take(prefix.length, %)
- | ^
- 6 | |> equals(%, prefix);
- 7 |
- 8 | // (The % token isn't final; it might instead be @ or ? or #.)
-Cause: [5:2-5:3]: Unexpected token: '>'"
+ 4 | promise
+> 5 | |> await
+ | ^
+ 6 | |> x => doubleSay(x, ', ')
+ 7 | |> capitalize
+ 8 | |> x => x + '!'
+Cause: [5:3-5:4]: Unexpected token: '>'"
`;
-exports[`pipeline-operator-hack.cjs [oxc] format 1`] = `
-"Unexpected token (5:3)
+exports[`pipeline-operator-fsharp.js format[oxc] 1`] = `
+"Unexpected token (5:4)
3 |
- 4 | return list
-> 5 | |> take(prefix.length, %)
- | ^
- 6 | |> equals(%, prefix);
- 7 |
- 8 | // (The % token isn't final; it might instead be @ or ? or #.)"
+ 4 | promise
+> 5 | |> await
+ | ^
+ 6 | |> x => doubleSay(x, ', ')
+ 7 | |> capitalize
+ 8 | |> x => x + '!'"
`;
exports[`pipeline-operator-hack.cjs format 1`] = `
@@ -2082,51 +2035,51 @@ return list |> take(prefix.length, %) |> equals(%, prefix);
================================================================================
`;
-exports[`pipeline-operator-minimal.js [acorn] format 1`] = `
-"Identifier 'result' has already been declared (7:5)
- 5 | result //=> "Hello, hello!"
- 6 |
-> 7 | let result = "hello"
- | ^
- 8 | |> doubleSay
- 9 | |> capitalize
- 10 | |> exclaim;
-Cause: Identifier 'result' has already been declared (7:4)"
+exports[`pipeline-operator-hack.cjs format[acorn] 1`] = `
+"Unexpected token (5:3)
+ 3 |
+ 4 | return list
+> 5 | |> take(prefix.length, %)
+ | ^
+ 6 | |> equals(%, prefix);
+ 7 |
+ 8 | // (The % token isn't final; it might instead be @ or ? or #.)
+Cause: Unexpected token (5:2)"
`;
-exports[`pipeline-operator-minimal.js [espree] format 1`] = `
-"Identifier 'result' has already been declared (7:5)
- 5 | result //=> "Hello, hello!"
- 6 |
-> 7 | let result = "hello"
- | ^
- 8 | |> doubleSay
- 9 | |> capitalize
- 10 | |> exclaim;
-Cause: Identifier 'result' has already been declared"
+exports[`pipeline-operator-hack.cjs format[espree] 1`] = `
+"Unexpected token > (5:3)
+ 3 |
+ 4 | return list
+> 5 | |> take(prefix.length, %)
+ | ^
+ 6 | |> equals(%, prefix);
+ 7 |
+ 8 | // (The % token isn't final; it might instead be @ or ? or #.)
+Cause: Unexpected token >"
`;
-exports[`pipeline-operator-minimal.js [meriyah] format 1`] = `
-"Unexpected token: '>' (8:4)
- 6 |
- 7 | let result = "hello"
-> 8 | |> doubleSay
- | ^
- 9 | |> capitalize
- 10 | |> exclaim;
- 11 |
-Cause: [8:3-8:4]: Unexpected token: '>'"
+exports[`pipeline-operator-hack.cjs format[meriyah] 1`] = `
+"Unexpected token: '>' (5:3)
+ 3 |
+ 4 | return list
+> 5 | |> take(prefix.length, %)
+ | ^
+ 6 | |> equals(%, prefix);
+ 7 |
+ 8 | // (The % token isn't final; it might instead be @ or ? or #.)
+Cause: [5:2-5:3]: Unexpected token: '>'"
`;
-exports[`pipeline-operator-minimal.js [oxc] format 1`] = `
-"Unexpected token (8:4)
- 6 |
- 7 | let result = "hello"
-> 8 | |> doubleSay
- | ^
- 9 | |> capitalize
- 10 | |> exclaim;
- 11 |"
+exports[`pipeline-operator-hack.cjs format[oxc] 1`] = `
+"Unexpected token (5:3)
+ 3 |
+ 4 | return list
+> 5 | |> take(prefix.length, %)
+ | ^
+ 6 | |> equals(%, prefix);
+ 7 |
+ 8 | // (The % token isn't final; it might instead be @ or ? or #.)"
`;
exports[`pipeline-operator-minimal.js format 1`] = `
@@ -2162,6 +2115,53 @@ result; //=> "Hello, hello!"
================================================================================
`;
+exports[`pipeline-operator-minimal.js format[acorn] 1`] = `
+"Identifier 'result' has already been declared (7:5)
+ 5 | result //=> "Hello, hello!"
+ 6 |
+> 7 | let result = "hello"
+ | ^
+ 8 | |> doubleSay
+ 9 | |> capitalize
+ 10 | |> exclaim;
+Cause: Identifier 'result' has already been declared (7:4)"
+`;
+
+exports[`pipeline-operator-minimal.js format[espree] 1`] = `
+"Identifier 'result' has already been declared (7:5)
+ 5 | result //=> "Hello, hello!"
+ 6 |
+> 7 | let result = "hello"
+ | ^
+ 8 | |> doubleSay
+ 9 | |> capitalize
+ 10 | |> exclaim;
+Cause: Identifier 'result' has already been declared"
+`;
+
+exports[`pipeline-operator-minimal.js format[meriyah] 1`] = `
+"Unexpected token: '>' (8:4)
+ 6 |
+ 7 | let result = "hello"
+> 8 | |> doubleSay
+ | ^
+ 9 | |> capitalize
+ 10 | |> exclaim;
+ 11 |
+Cause: [8:3-8:4]: Unexpected token: '>'"
+`;
+
+exports[`pipeline-operator-minimal.js format[oxc] 1`] = `
+"Unexpected token (8:4)
+ 6 |
+ 7 | let result = "hello"
+> 8 | |> doubleSay
+ | ^
+ 9 | |> capitalize
+ 10 | |> exclaim;
+ 11 |"
+`;
+
exports[`private-fields-in-in.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -2363,33 +2363,6 @@ const re = /^(?i:[a-z])[a-z]$/;
================================================================================
`;
-exports[`source-phase-imports.js [acorn] format 1`] = `
-"Unexpected token (1:15)
-> 1 | import source fooSource from "foo";
- | ^
- 2 | import.source("x");
- 3 |
-Cause: Unexpected token (1:14)"
-`;
-
-exports[`source-phase-imports.js [espree] format 1`] = `
-"Unexpected token fooSource (1:15)
-> 1 | import source fooSource from "foo";
- | ^
- 2 | import.source("x");
- 3 |
-Cause: Unexpected token fooSource"
-`;
-
-exports[`source-phase-imports.js [meriyah] format 1`] = `
-"Expected 'from' (1:15)
-> 1 | import source fooSource from "foo";
- | ^^^^^^^^^
- 2 | import.source("x");
- 3 |
-Cause: [1:14-1:23]: Expected 'from'"
-`;
-
exports[`source-phase-imports.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
@@ -2406,51 +2379,31 @@ import.source("x");
================================================================================
`;
-exports[`throw-expressions.js [acorn] format 1`] = `
-"Unexpected token (3:23)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
- 2 |
-> 3 | function test(param = throw new Error('required!')) {
- | ^
- 4 | const test = param === true || throw new Error('Falsy!');
- 5 | }
- 6 |
-Cause: Unexpected token (3:22)"
+exports[`source-phase-imports.js format[acorn] 1`] = `
+"Unexpected token (1:15)
+> 1 | import source fooSource from "foo";
+ | ^
+ 2 | import.source("x");
+ 3 |
+Cause: Unexpected token (1:14)"
`;
-exports[`throw-expressions.js [espree] format 1`] = `
-"Unexpected token throw (3:23)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
- 2 |
-> 3 | function test(param = throw new Error('required!')) {
- | ^
- 4 | const test = param === true || throw new Error('Falsy!');
- 5 | }
- 6 |
-Cause: Unexpected token throw"
+exports[`source-phase-imports.js format[espree] 1`] = `
+"Unexpected token fooSource (1:15)
+> 1 | import source fooSource from "foo";
+ | ^
+ 2 | import.source("x");
+ 3 |
+Cause: Unexpected token fooSource"
`;
-exports[`throw-expressions.js [meriyah] format 1`] = `
-"Unexpected token: 'throw' (3:23)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
- 2 |
-> 3 | function test(param = throw new Error('required!')) {
- | ^^^^^
- 4 | const test = param === true || throw new Error('Falsy!');
- 5 | }
- 6 |
-Cause: [3:22-3:27]: Unexpected token: 'throw'"
-`;
-
-exports[`throw-expressions.js [oxc] format 1`] = `
-"Unexpected token (3:23)
- 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
- 2 |
-> 3 | function test(param = throw new Error('required!')) {
- | ^^^^^
- 4 | const test = param === true || throw new Error('Falsy!');
- 5 | }
- 6 |"
+exports[`source-phase-imports.js format[meriyah] 1`] = `
+"Expected 'from' (1:15)
+> 1 | import source fooSource from "foo";
+ | ^^^^^^^^^
+ 2 | import.source("x");
+ 3 |
+Cause: [1:14-1:23]: Expected 'from'"
`;
exports[`throw-expressions.js format 1`] = `
@@ -2475,63 +2428,51 @@ function test(param = throw new Error("required!")) {
================================================================================
`;
-exports[`typescript.js [__babel_estree] format 1`] = `
-"Unexpected token (3:8)
- 1 | // https://babeljs.io/docs/babel-preset-typescript
+exports[`throw-expressions.js format[acorn] 1`] = `
+"Unexpected token (3:23)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
2 |
-> 3 | const x: number = 0;
- | ^
- 4 |
-Cause: Unexpected token (3:7)"
+> 3 | function test(param = throw new Error('required!')) {
+ | ^
+ 4 | const test = param === true || throw new Error('Falsy!');
+ 5 | }
+ 6 |
+Cause: Unexpected token (3:22)"
`;
-exports[`typescript.js [acorn] format 1`] = `
-"Unexpected token (3:8)
- 1 | // https://babeljs.io/docs/babel-preset-typescript
+exports[`throw-expressions.js format[espree] 1`] = `
+"Unexpected token throw (3:23)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
2 |
-> 3 | const x: number = 0;
- | ^
- 4 |
-Cause: Unexpected token (3:7)"
+> 3 | function test(param = throw new Error('required!')) {
+ | ^
+ 4 | const test = param === true || throw new Error('Falsy!');
+ 5 | }
+ 6 |
+Cause: Unexpected token throw"
`;
-exports[`typescript.js [babel] format 1`] = `
-"Unexpected token (3:8)
- 1 | // https://babeljs.io/docs/babel-preset-typescript
+exports[`throw-expressions.js format[meriyah] 1`] = `
+"Unexpected token: 'throw' (3:23)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
2 |
-> 3 | const x: number = 0;
- | ^
- 4 |
-Cause: Unexpected token (3:7)"
+> 3 | function test(param = throw new Error('required!')) {
+ | ^^^^^
+ 4 | const test = param === true || throw new Error('Falsy!');
+ 5 | }
+ 6 |
+Cause: [3:22-3:27]: Unexpected token: 'throw'"
`;
-exports[`typescript.js [espree] format 1`] = `
-"Unexpected token : (3:8)
- 1 | // https://babeljs.io/docs/babel-preset-typescript
+exports[`throw-expressions.js format[oxc] 1`] = `
+"Unexpected token (3:23)
+ 1 | // https://babeljs.io/docs/babel-plugin-proposal-throw-expressions
2 |
-> 3 | const x: number = 0;
- | ^
- 4 |
-Cause: Unexpected token :"
-`;
-
-exports[`typescript.js [meriyah] format 1`] = `
-"Missing initializer in const declaration (3:8)
- 1 | // https://babeljs.io/docs/babel-preset-typescript
- 2 |
-> 3 | const x: number = 0;
- | ^
- 4 |
-Cause: [3:7-3:8]: Missing initializer in const declaration"
-`;
-
-exports[`typescript.js [oxc] format 1`] = `
-"Missing initializer in const declaration (3:7)
- 1 | // https://babeljs.io/docs/babel-preset-typescript
- 2 |
-> 3 | const x: number = 0;
- | ^
- 4 |"
+> 3 | function test(param = throw new Error('required!')) {
+ | ^^^^^
+ 4 | const test = param === true || throw new Error('Falsy!');
+ 5 | }
+ 6 |"
`;
exports[`typescript.js format 1`] = `
@@ -2552,51 +2493,63 @@ const x: number = 0;
================================================================================
`;
-exports[`v8intrinsic.js [acorn] format 1`] = `
-"Unexpected token (3:1)
- 1 | // https://github.com/babel/babel/pull/10148
+exports[`typescript.js format[__babel_estree] 1`] = `
+"Unexpected token (3:8)
+ 1 | // https://babeljs.io/docs/babel-preset-typescript
2 |
-> 3 | %DebugPrint(foo);
- | ^
+> 3 | const x: number = 0;
+ | ^
4 |
- 5 |
- 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json
-Cause: Unexpected token (3:0)"
+Cause: Unexpected token (3:7)"
`;
-exports[`v8intrinsic.js [espree] format 1`] = `
-"Unexpected token % (3:1)
- 1 | // https://github.com/babel/babel/pull/10148
+exports[`typescript.js format[acorn] 1`] = `
+"Unexpected token (3:8)
+ 1 | // https://babeljs.io/docs/babel-preset-typescript
2 |
-> 3 | %DebugPrint(foo);
- | ^
+> 3 | const x: number = 0;
+ | ^
4 |
- 5 |
- 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json
-Cause: Unexpected token %"
+Cause: Unexpected token (3:7)"
`;
-exports[`v8intrinsic.js [meriyah] format 1`] = `
-"Unexpected token: '%' (3:1)
- 1 | // https://github.com/babel/babel/pull/10148
+exports[`typescript.js format[babel] 1`] = `
+"Unexpected token (3:8)
+ 1 | // https://babeljs.io/docs/babel-preset-typescript
2 |
-> 3 | %DebugPrint(foo);
- | ^
+> 3 | const x: number = 0;
+ | ^
4 |
- 5 |
- 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json
-Cause: [3:0-3:1]: Unexpected token: '%'"
+Cause: Unexpected token (3:7)"
`;
-exports[`v8intrinsic.js [oxc] format 1`] = `
-"Unexpected token (3:1)
- 1 | // https://github.com/babel/babel/pull/10148
+exports[`typescript.js format[espree] 1`] = `
+"Unexpected token : (3:8)
+ 1 | // https://babeljs.io/docs/babel-preset-typescript
2 |
-> 3 | %DebugPrint(foo);
- | ^
+> 3 | const x: number = 0;
+ | ^
4 |
- 5 |
- 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json"
+Cause: Unexpected token :"
+`;
+
+exports[`typescript.js format[meriyah] 1`] = `
+"Missing initializer in const declaration (3:8)
+ 1 | // https://babeljs.io/docs/babel-preset-typescript
+ 2 |
+> 3 | const x: number = 0;
+ | ^
+ 4 |
+Cause: [3:7-3:8]: Missing initializer in const declaration"
+`;
+
+exports[`typescript.js format[oxc] 1`] = `
+"Missing initializer in const declaration (3:7)
+ 1 | // https://babeljs.io/docs/babel-preset-typescript
+ 2 |
+> 3 | const x: number = 0;
+ | ^
+ 4 |"
`;
exports[`v8intrinsic.js format 1`] = `
@@ -2659,3 +2612,50 @@ foo % bar();
================================================================================
`;
+
+exports[`v8intrinsic.js format[acorn] 1`] = `
+"Unexpected token (3:1)
+ 1 | // https://github.com/babel/babel/pull/10148
+ 2 |
+> 3 | %DebugPrint(foo);
+ | ^
+ 4 |
+ 5 |
+ 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json
+Cause: Unexpected token (3:0)"
+`;
+
+exports[`v8intrinsic.js format[espree] 1`] = `
+"Unexpected token % (3:1)
+ 1 | // https://github.com/babel/babel/pull/10148
+ 2 |
+> 3 | %DebugPrint(foo);
+ | ^
+ 4 |
+ 5 |
+ 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json
+Cause: Unexpected token %"
+`;
+
+exports[`v8intrinsic.js format[meriyah] 1`] = `
+"Unexpected token: '%' (3:1)
+ 1 | // https://github.com/babel/babel/pull/10148
+ 2 |
+> 3 | %DebugPrint(foo);
+ | ^
+ 4 |
+ 5 |
+ 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json
+Cause: [3:0-3:1]: Unexpected token: '%'"
+`;
+
+exports[`v8intrinsic.js format[oxc] 1`] = `
+"Unexpected token (3:1)
+ 1 | // https://github.com/babel/babel/pull/10148
+ 2 |
+> 3 | %DebugPrint(foo);
+ | ^
+ 4 |
+ 5 |
+ 6 | // Invalid code https://github.com/JLHwung/babel/blob/c1a3cbfd65e08b7013fd6f8c62add8cb10b4b169/packages/babel-parser/test/fixtures/v8intrinsic/_errors/in-bind-expression/options.json"
+`;
diff --git a/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap b/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap
index 9b913b987..b9e1be65d 100644
--- a/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap
+++ b/tests/format/js/bind-expressions/__snapshots__/format.test.js.snap
@@ -1,91 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`await.js [acorn] format 1`] = `
-"Unexpected token (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |
-Cause: Unexpected token (3:26)"
-`;
-
-exports[`await.js [espree] format 1`] = `
-"Unexpected token : (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |
-Cause: Unexpected token :"
-`;
-
-exports[`await.js [meriyah] format 1`] = `
-"Unexpected token: ':' (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |
-Cause: [3:26-3:27]: Unexpected token: ':'"
-`;
-
-exports[`await.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |"
-`;
-
-exports[`await.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |
-Cause: Unexpected token (3:26)"
-`;
-
-exports[`await.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |
-Cause: Unexpected token :"
-`;
-
-exports[`await.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |
-Cause: [3:26-3:27]: Unexpected token: ':'"
-`;
-
-exports[`await.js - {"semi":false} [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (3:27)
- 1 | const doBothThings = async () => {
- 2 | const request = doAsyncThing();
-> 3 | return (await request)::doSyncThing();
- | ^
- 4 | };
- 5 |"
-`;
-
exports[`await.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -107,6 +21,49 @@ const doBothThings = async () => {
================================================================================
`;
+exports[`await.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |
+Cause: Unexpected token (3:26)"
+`;
+
+exports[`await.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |
+Cause: Unexpected token :"
+`;
+
+exports[`await.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |
+Cause: [3:26-3:27]: Unexpected token: ':'"
+`;
+
+exports[`await.js - {"semi":false} format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |"
+`;
+
exports[`await.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -127,82 +84,47 @@ const doBothThings = async () => {
================================================================================
`;
-exports[`bind_parens.js [acorn] format 1`] = `
-"Unexpected token (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();
-Cause: Unexpected token (1:8)"
+exports[`await.js format[acorn] 1`] = `
+"Unexpected token (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |
+Cause: Unexpected token (3:26)"
`;
-exports[`bind_parens.js [espree] format 1`] = `
-"Unexpected token : (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();
+exports[`await.js format[espree] 1`] = `
+"Unexpected token : (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |
Cause: Unexpected token :"
`;
-exports[`bind_parens.js [meriyah] format 1`] = `
-"Unexpected token: ':' (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();
-Cause: [1:8-1:9]: Unexpected token: ':'"
+exports[`await.js format[meriyah] 1`] = `
+"Unexpected token: ':' (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |
+Cause: [3:26-3:27]: Unexpected token: ':'"
`;
-exports[`bind_parens.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();"
-`;
-
-exports[`bind_parens.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();
-Cause: Unexpected token (1:8)"
-`;
-
-exports[`bind_parens.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();
-Cause: Unexpected token :"
-`;
-
-exports[`bind_parens.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();
-Cause: [1:8-1:9]: Unexpected token: ':'"
-`;
-
-exports[`bind_parens.js - {"semi":false} [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
-> 1 | (a || b)::c;
- | ^
- 2 | a || (b::c);
- 3 | ::obj.prop;
- 4 | (void 0)::func();"
+exports[`await.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (3:27)
+ 1 | const doBothThings = async () => {
+ 2 | const request = doAsyncThing();
+> 3 | return (await request)::doSyncThing();
+ | ^
+ 4 | };
+ 5 |"
`;
exports[`bind_parens.js - {"semi":false} format 1`] = `
@@ -286,6 +208,45 @@ f[a::b()]
================================================================================
`;
+exports[`bind_parens.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();
+Cause: Unexpected token (1:8)"
+`;
+
+exports[`bind_parens.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();
+Cause: Unexpected token :"
+`;
+
+exports[`bind_parens.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();
+Cause: [1:8-1:9]: Unexpected token: ':'"
+`;
+
+exports[`bind_parens.js - {"semi":false} format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();"
+`;
+
exports[`bind_parens.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -366,98 +327,43 @@ f[a::b()];
================================================================================
`;
-exports[`long_name_method.js [acorn] format 1`] = `
-"Unexpected token (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {
-Cause: Unexpected token (3:53)"
+exports[`bind_parens.js format[acorn] 1`] = `
+"Unexpected token (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();
+Cause: Unexpected token (1:8)"
`;
-exports[`long_name_method.js [espree] format 1`] = `
-"Unexpected token : (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {
+exports[`bind_parens.js format[espree] 1`] = `
+"Unexpected token : (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();
Cause: Unexpected token :"
`;
-exports[`long_name_method.js [meriyah] format 1`] = `
-"Unexpected token: ':' (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {
-Cause: [3:53-3:54]: Unexpected token: ':'"
+exports[`bind_parens.js format[meriyah] 1`] = `
+"Unexpected token: ':' (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();
+Cause: [1:8-1:9]: Unexpected token: ':'"
`;
-exports[`long_name_method.js [oxc] format 1`] = `
-"Unexpected token (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {"
-`;
-
-exports[`long_name_method.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {
-Cause: Unexpected token (3:53)"
-`;
-
-exports[`long_name_method.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {
-Cause: Unexpected token :"
-`;
-
-exports[`long_name_method.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {
-Cause: [3:53-3:54]: Unexpected token: ':'"
-`;
-
-exports[`long_name_method.js - {"semi":false} [oxc] format 1`] = `
-"Unexpected token (3:54)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
- | ^
- 4 | }
- 5 |
- 6 | testLongNameMethodAndSomethingElseLallala() {"
+exports[`bind_parens.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
+> 1 | (a || b)::c;
+ | ^
+ 2 | a || (b::c);
+ 3 | ::obj.prop;
+ 4 | (void 0)::func();"
`;
exports[`long_name_method.js - {"semi":false} format 1`] = `
@@ -491,6 +397,53 @@ class X {
================================================================================
`;
+exports[`long_name_method.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {
+Cause: Unexpected token (3:53)"
+`;
+
+exports[`long_name_method.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {
+Cause: Unexpected token :"
+`;
+
+exports[`long_name_method.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {
+Cause: [3:53-3:54]: Unexpected token: ':'"
+`;
+
+exports[`long_name_method.js - {"semi":false} format[oxc] 1`] = `
+"Unexpected token (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {"
+`;
+
exports[`long_name_method.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -521,98 +474,51 @@ class X {
================================================================================
`;
-exports[`method_chain.js [acorn] format 1`] = `
-"Unexpected token (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)
-Cause: Unexpected token (10:8)"
+exports[`long_name_method.js format[acorn] 1`] = `
+"Unexpected token (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {
+Cause: Unexpected token (3:53)"
`;
-exports[`method_chain.js [espree] format 1`] = `
-"Unexpected token : (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)
+exports[`long_name_method.js format[espree] 1`] = `
+"Unexpected token : (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {
Cause: Unexpected token :"
`;
-exports[`method_chain.js [meriyah] format 1`] = `
-"Unexpected token: ':' (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)
-Cause: [10:8-10:9]: Unexpected token: ':'"
+exports[`long_name_method.js format[meriyah] 1`] = `
+"Unexpected token: ':' (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {
+Cause: [3:53-3:54]: Unexpected token: ':'"
`;
-exports[`method_chain.js [oxc] format 1`] = `
-"Unexpected token (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)"
-`;
-
-exports[`method_chain.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)
-Cause: Unexpected token (10:8)"
-`;
-
-exports[`method_chain.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)
-Cause: Unexpected token :"
-`;
-
-exports[`method_chain.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)
-Cause: [10:8-10:9]: Unexpected token: ':'"
-`;
-
-exports[`method_chain.js - {"semi":false} [oxc] format 1`] = `
-"Unexpected token (10:9)
- 8 | function test(observable) {
- 9 | return observable
-> 10 | ::filter(data => data.someTest)
- | ^
- 11 | ::throttle(() =>
- 12 | interval(10)
- 13 | ::take(1)"
+exports[`long_name_method.js format[oxc] 1`] = `
+"Unexpected token (3:54)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
+ | ^
+ 4 | }
+ 5 |
+ 6 | testLongNameMethodAndSomethingElseLallala() {"
`;
exports[`method_chain.js - {"semi":false} format 1`] = `
@@ -662,6 +568,53 @@ function test(observable) {
================================================================================
`;
+exports[`method_chain.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)
+Cause: Unexpected token (10:8)"
+`;
+
+exports[`method_chain.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)
+Cause: Unexpected token :"
+`;
+
+exports[`method_chain.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)
+Cause: [10:8-10:9]: Unexpected token: ':'"
+`;
+
+exports[`method_chain.js - {"semi":false} format[oxc] 1`] = `
+"Unexpected token (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)"
+`;
+
exports[`method_chain.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -708,98 +661,51 @@ function test(observable) {
================================================================================
`;
-exports[`short_name_method.js [acorn] format 1`] = `
-"Unexpected token (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {
-Cause: Unexpected token (3:23)"
+exports[`method_chain.js format[acorn] 1`] = `
+"Unexpected token (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)
+Cause: Unexpected token (10:8)"
`;
-exports[`short_name_method.js [espree] format 1`] = `
-"Unexpected token : (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {
+exports[`method_chain.js format[espree] 1`] = `
+"Unexpected token : (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)
Cause: Unexpected token :"
`;
-exports[`short_name_method.js [meriyah] format 1`] = `
-"Unexpected token: ':' (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {
-Cause: [3:23-3:24]: Unexpected token: ':'"
+exports[`method_chain.js format[meriyah] 1`] = `
+"Unexpected token: ':' (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)
+Cause: [10:8-10:9]: Unexpected token: ':'"
`;
-exports[`short_name_method.js [oxc] format 1`] = `
-"Unexpected token (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {"
-`;
-
-exports[`short_name_method.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {
-Cause: Unexpected token (3:23)"
-`;
-
-exports[`short_name_method.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {
-Cause: Unexpected token :"
-`;
-
-exports[`short_name_method.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {
-Cause: [3:23-3:24]: Unexpected token: ':'"
-`;
-
-exports[`short_name_method.js - {"semi":false} [oxc] format 1`] = `
-"Unexpected token (3:24)
- 1 | class X {
- 2 | constructor() {
-> 3 | this.shortMethod = ::this.shortMethod;
- | ^
- 4 | }
- 5 |
- 6 | shortMethod() {"
+exports[`method_chain.js format[oxc] 1`] = `
+"Unexpected token (10:9)
+ 8 | function test(observable) {
+ 9 | return observable
+> 10 | ::filter(data => data.someTest)
+ | ^
+ 11 | ::throttle(() =>
+ 12 | interval(10)
+ 13 | ::take(1)"
`;
exports[`short_name_method.js - {"semi":false} format 1`] = `
@@ -832,6 +738,53 @@ class X {
================================================================================
`;
+exports[`short_name_method.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {
+Cause: Unexpected token (3:23)"
+`;
+
+exports[`short_name_method.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {
+Cause: Unexpected token :"
+`;
+
+exports[`short_name_method.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {
+Cause: [3:23-3:24]: Unexpected token: ':'"
+`;
+
+exports[`short_name_method.js - {"semi":false} format[oxc] 1`] = `
+"Unexpected token (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {"
+`;
+
exports[`short_name_method.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -861,82 +814,51 @@ class X {
================================================================================
`;
-exports[`unary.js [acorn] format 1`] = `
-"Unexpected token (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !(
-Cause: Unexpected token (1:2)"
+exports[`short_name_method.js format[acorn] 1`] = `
+"Unexpected token (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {
+Cause: Unexpected token (3:23)"
`;
-exports[`unary.js [espree] format 1`] = `
-"Unexpected token : (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !(
+exports[`short_name_method.js format[espree] 1`] = `
+"Unexpected token : (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {
Cause: Unexpected token :"
`;
-exports[`unary.js [meriyah] format 1`] = `
-"Unexpected token: ':' (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !(
-Cause: [1:2-1:3]: Unexpected token: ':'"
+exports[`short_name_method.js format[meriyah] 1`] = `
+"Unexpected token: ':' (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {
+Cause: [3:23-3:24]: Unexpected token: ':'"
`;
-exports[`unary.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !("
-`;
-
-exports[`unary.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !(
-Cause: Unexpected token (1:2)"
-`;
-
-exports[`unary.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !(
-Cause: Unexpected token :"
-`;
-
-exports[`unary.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !(
-Cause: [1:2-1:3]: Unexpected token: ':'"
-`;
-
-exports[`unary.js - {"semi":false} [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:3)
-> 1 | !x::y;
- | ^
- 2 | !(x::y /* foo */);
- 3 | !(/* foo */ x::y);
- 4 | !("
+exports[`short_name_method.js format[oxc] 1`] = `
+"Unexpected token (3:24)
+ 1 | class X {
+ 2 | constructor() {
+> 3 | this.shortMethod = ::this.shortMethod;
+ | ^
+ 4 | }
+ 5 |
+ 6 | shortMethod() {"
`;
exports[`unary.js - {"semi":false} format 1`] = `
@@ -980,6 +902,45 @@ semi: false
================================================================================
`;
+exports[`unary.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !(
+Cause: Unexpected token (1:2)"
+`;
+
+exports[`unary.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !(
+Cause: Unexpected token :"
+`;
+
+exports[`unary.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !(
+Cause: [1:2-1:3]: Unexpected token: ':'"
+`;
+
+exports[`unary.js - {"semi":false} format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !("
+`;
+
exports[`unary.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -1019,3 +980,42 @@ printWidth: 80
================================================================================
`;
+
+exports[`unary.js format[acorn] 1`] = `
+"Unexpected token (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !(
+Cause: Unexpected token (1:2)"
+`;
+
+exports[`unary.js format[espree] 1`] = `
+"Unexpected token : (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !(
+Cause: Unexpected token :"
+`;
+
+exports[`unary.js format[meriyah] 1`] = `
+"Unexpected token: ':' (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !(
+Cause: [1:2-1:3]: Unexpected token: ':'"
+`;
+
+exports[`unary.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:3)
+> 1 | !x::y;
+ | ^
+ 2 | !(x::y /* foo */);
+ 3 | !(/* foo */ x::y);
+ 4 | !("
+`;
diff --git a/tests/format/js/call/invalid/__snapshots__/format.test.js.snap b/tests/format/js/call/invalid/__snapshots__/format.test.js.snap
index 64aad221d..0c8b4d186 100644
--- a/tests/format/js/call/invalid/__snapshots__/format.test.js.snap
+++ b/tests/format/js/call/invalid/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`null-arguments-item.js [__babel_estree] format 1`] = `
+exports[`null-arguments-item.js format[__babel_estree] 1`] = `
"Unexpected token ','. (1:12)
> 1 | foor('a', , 'b');
| ^
@@ -10,7 +10,7 @@ exports[`null-arguments-item.js [__babel_estree] format 1`] = `
Cause: Unexpected token ','. (1:11)"
`;
-exports[`null-arguments-item.js [acorn] format 1`] = `
+exports[`null-arguments-item.js format[acorn] 1`] = `
"Unexpected token (1:11)
> 1 | foor('a', , 'b');
| ^
@@ -20,7 +20,7 @@ exports[`null-arguments-item.js [acorn] format 1`] = `
Cause: Unexpected token (1:10)"
`;
-exports[`null-arguments-item.js [babel] format 1`] = `
+exports[`null-arguments-item.js format[babel] 1`] = `
"Unexpected token ','. (1:12)
> 1 | foor('a', , 'b');
| ^
@@ -30,7 +30,7 @@ exports[`null-arguments-item.js [babel] format 1`] = `
Cause: Unexpected token ','. (1:11)"
`;
-exports[`null-arguments-item.js [espree] format 1`] = `
+exports[`null-arguments-item.js format[espree] 1`] = `
"Unexpected token , (1:11)
> 1 | foor('a', , 'b');
| ^
@@ -40,7 +40,7 @@ exports[`null-arguments-item.js [espree] format 1`] = `
Cause: Unexpected token ,"
`;
-exports[`null-arguments-item.js [meriyah] format 1`] = `
+exports[`null-arguments-item.js format[meriyah] 1`] = `
"Unexpected token: ',' (1:11)
> 1 | foor('a', , 'b');
| ^
@@ -50,7 +50,7 @@ exports[`null-arguments-item.js [meriyah] format 1`] = `
Cause: [1:10-1:11]: Unexpected token: ','"
`;
-exports[`null-arguments-item.js [oxc] format 1`] = `
+exports[`null-arguments-item.js format[oxc] 1`] = `
"Unexpected token (1:11)
> 1 | foor('a', , 'b');
| ^
diff --git a/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap b/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap
index 97d8101fd..e2489e9ff 100644
--- a/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap
+++ b/tests/format/js/classes-private-fields/__snapshots__/format.test.js.snap
@@ -1,25 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`optional-chaining.js [espree] format 1`] = `
-"Private field '#x' must be declared in an enclosing class (3:13)
- 1 | // https://github.com/babel/babel/pull/11669
- 2 |
-> 3 | delete obj?.#x.a
- | ^
- 4 |
-Cause: Private field '#x' must be declared in an enclosing class"
-`;
-
-exports[`optional-chaining.js - {"semi":false} [espree] format 1`] = `
-"Private field '#x' must be declared in an enclosing class (3:13)
- 1 | // https://github.com/babel/babel/pull/11669
- 2 |
-> 3 | delete obj?.#x.a
- | ^
- 4 |
-Cause: Private field '#x' must be declared in an enclosing class"
-`;
-
exports[`optional-chaining.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -39,6 +19,16 @@ delete obj?.#x.a
================================================================================
`;
+exports[`optional-chaining.js - {"semi":false} format[espree] 1`] = `
+"Private field '#x' must be declared in an enclosing class (3:13)
+ 1 | // https://github.com/babel/babel/pull/11669
+ 2 |
+> 3 | delete obj?.#x.a
+ | ^
+ 4 |
+Cause: Private field '#x' must be declared in an enclosing class"
+`;
+
exports[`optional-chaining.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -57,6 +47,16 @@ delete obj?.#x.a;
================================================================================
`;
+exports[`optional-chaining.js format[espree] 1`] = `
+"Private field '#x' must be declared in an enclosing class (3:13)
+ 1 | // https://github.com/babel/babel/pull/11669
+ 2 |
+> 3 | delete obj?.#x.a
+ | ^
+ 4 |
+Cause: Private field '#x' must be declared in an enclosing class"
+`;
+
exports[`private_fields.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel"]
diff --git a/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap b/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap
index 4157f1fb0..b77d1db3a 100644
--- a/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap
+++ b/tests/format/js/classes/top-level-super/__snapshots__/format.test.js.snap
@@ -1,29 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`example.js [acorn] format 1`] = `
-"super() call outside constructor of a subclass (1:1)
-> 1 | super();
- | ^
- 2 |
-Cause: super() call outside constructor of a subclass (1:0)"
-`;
-
-exports[`example.js [espree] format 1`] = `
-"'super' keyword outside a method (1:1)
-> 1 | super();
- | ^
- 2 |
-Cause: 'super' keyword outside a method"
-`;
-
-exports[`example.js [meriyah] format 1`] = `
-"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6)
-> 1 | super();
- | ^
- 2 |
-Cause: [1:5-1:6]: Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass"
-`;
-
exports[`example.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
@@ -37,3 +13,27 @@ super();
================================================================================
`;
+
+exports[`example.js format[acorn] 1`] = `
+"super() call outside constructor of a subclass (1:1)
+> 1 | super();
+ | ^
+ 2 |
+Cause: super() call outside constructor of a subclass (1:0)"
+`;
+
+exports[`example.js format[espree] 1`] = `
+"'super' keyword outside a method (1:1)
+> 1 | super();
+ | ^
+ 2 |
+Cause: 'super' keyword outside a method"
+`;
+
+exports[`example.js format[meriyah] 1`] = `
+"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6)
+> 1 | super();
+ | ^
+ 2 |
+Cause: [1:5-1:6]: Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass"
+`;
diff --git a/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap b/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap
index d6f8083c6..032f91a50 100644
--- a/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap
+++ b/tests/format/js/comments-pipeline-own-line/__snapshots__/format.test.js.snap
@@ -1,52 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`pipeline_own_line.js [acorn] format 1`] = `
-"Unexpected token (4:3)
- 2 | 0
- 3 | // Comment
-> 4 | |> x
- | ^
- 5 | }
- 6 |
- 7 | bifornCringerMoshedPerplexSawder(
-Cause: Unexpected token (4:2)"
-`;
-
-exports[`pipeline_own_line.js [espree] format 1`] = `
-"Unexpected token > (4:3)
- 2 | 0
- 3 | // Comment
-> 4 | |> x
- | ^
- 5 | }
- 6 |
- 7 | bifornCringerMoshedPerplexSawder(
-Cause: Unexpected token >"
-`;
-
-exports[`pipeline_own_line.js [meriyah] format 1`] = `
-"Unexpected token: '>' (4:3)
- 2 | 0
- 3 | // Comment
-> 4 | |> x
- | ^
- 5 | }
- 6 |
- 7 | bifornCringerMoshedPerplexSawder(
-Cause: [4:2-4:3]: Unexpected token: '>'"
-`;
-
-exports[`pipeline_own_line.js [oxc] format 1`] = `
-"Unexpected token (4:3)
- 2 | 0
- 3 | // Comment
-> 4 | |> x
- | ^
- 5 | }
- 6 |
- 7 | bifornCringerMoshedPerplexSawder("
-`;
-
exports[`pipeline_own_line.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -134,3 +87,50 @@ bifornCringerMoshedPerplexSawder[
================================================================================
`;
+
+exports[`pipeline_own_line.js format[acorn] 1`] = `
+"Unexpected token (4:3)
+ 2 | 0
+ 3 | // Comment
+> 4 | |> x
+ | ^
+ 5 | }
+ 6 |
+ 7 | bifornCringerMoshedPerplexSawder(
+Cause: Unexpected token (4:2)"
+`;
+
+exports[`pipeline_own_line.js format[espree] 1`] = `
+"Unexpected token > (4:3)
+ 2 | 0
+ 3 | // Comment
+> 4 | |> x
+ | ^
+ 5 | }
+ 6 |
+ 7 | bifornCringerMoshedPerplexSawder(
+Cause: Unexpected token >"
+`;
+
+exports[`pipeline_own_line.js format[meriyah] 1`] = `
+"Unexpected token: '>' (4:3)
+ 2 | 0
+ 3 | // Comment
+> 4 | |> x
+ | ^
+ 5 | }
+ 6 |
+ 7 | bifornCringerMoshedPerplexSawder(
+Cause: [4:2-4:3]: Unexpected token: '>'"
+`;
+
+exports[`pipeline_own_line.js format[oxc] 1`] = `
+"Unexpected token (4:3)
+ 2 | 0
+ 3 | // Comment
+> 4 | |> x
+ | ^
+ 5 | }
+ 6 |
+ 7 | bifornCringerMoshedPerplexSawder("
+`;
diff --git a/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap b/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap
index 947c33e31..9d18c38fb 100644
--- a/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap
+++ b/tests/format/js/decorator-auto-accessors/__snapshots__/format.test.js.snap
@@ -1,45 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`basic.js [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class Foo {
-> 2 | accessor bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`basic.js [espree] format 1`] = `
-"Unexpected token bar (2:12)
- 1 | class Foo {
-> 2 | accessor bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token bar"
-`;
-
-exports[`basic.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class Foo {
-> 2 | accessor bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`basic.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token bar (2:12)
- 1 | class Foo {
-> 2 | accessor bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token bar"
-`;
-
exports[`basic.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -59,6 +19,26 @@ class Foo {
================================================================================
`;
+exports[`basic.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class Foo {
+> 2 | accessor bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`basic.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token bar (2:12)
+ 1 | class Foo {
+> 2 | accessor bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token bar"
+`;
+
exports[`basic.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -77,48 +57,24 @@ class Foo {
================================================================================
`;
-exports[`comments.js [acorn] format 1`] = `
-"Unexpected character '@' (2:3)
- 1 | class A {
-> 2 | @dec()
- | ^
- 3 | // comment
- 4 | accessor b;
- 5 | }
-Cause: Unexpected character '@' (2:2)"
+exports[`basic.js format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class Foo {
+> 2 | accessor bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:11)"
`;
-exports[`comments.js [espree] format 1`] = `
-"Unexpected character '@' (2:3)
- 1 | class A {
-> 2 | @dec()
- | ^
- 3 | // comment
- 4 | accessor b;
- 5 | }
-Cause: Unexpected character '@'"
-`;
-
-exports[`comments.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected character '@' (2:3)
- 1 | class A {
-> 2 | @dec()
- | ^
- 3 | // comment
- 4 | accessor b;
- 5 | }
-Cause: Unexpected character '@' (2:2)"
-`;
-
-exports[`comments.js - {"semi":false} [espree] format 1`] = `
-"Unexpected character '@' (2:3)
- 1 | class A {
-> 2 | @dec()
- | ^
- 3 | // comment
- 4 | accessor b;
- 5 | }
-Cause: Unexpected character '@'"
+exports[`basic.js format[espree] 1`] = `
+"Unexpected token bar (2:12)
+ 1 | class Foo {
+> 2 | accessor bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token bar"
`;
exports[`comments.js - {"semi":false} format 1`] = `
@@ -144,6 +100,28 @@ class A {
================================================================================
`;
+exports[`comments.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected character '@' (2:3)
+ 1 | class A {
+> 2 | @dec()
+ | ^
+ 3 | // comment
+ 4 | accessor b;
+ 5 | }
+Cause: Unexpected character '@' (2:2)"
+`;
+
+exports[`comments.js - {"semi":false} format[espree] 1`] = `
+"Unexpected character '@' (2:3)
+ 1 | class A {
+> 2 | @dec()
+ | ^
+ 3 | // comment
+ 4 | accessor b;
+ 5 | }
+Cause: Unexpected character '@'"
+`;
+
exports[`comments.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -166,44 +144,26 @@ class A {
================================================================================
`;
-exports[`computed.js [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class Foo {
-> 2 | accessor ["bar"];
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
+exports[`comments.js format[acorn] 1`] = `
+"Unexpected character '@' (2:3)
+ 1 | class A {
+> 2 | @dec()
+ | ^
+ 3 | // comment
+ 4 | accessor b;
+ 5 | }
+Cause: Unexpected character '@' (2:2)"
`;
-exports[`computed.js [espree] format 1`] = `
-"Unexpected token [ (2:12)
- 1 | class Foo {
-> 2 | accessor ["bar"];
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token ["
-`;
-
-exports[`computed.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class Foo {
-> 2 | accessor ["bar"];
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`computed.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token [ (2:12)
- 1 | class Foo {
-> 2 | accessor ["bar"];
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token ["
+exports[`comments.js format[espree] 1`] = `
+"Unexpected character '@' (2:3)
+ 1 | class A {
+> 2 | @dec()
+ | ^
+ 3 | // comment
+ 4 | accessor b;
+ 5 | }
+Cause: Unexpected character '@'"
`;
exports[`computed.js - {"semi":false} format 1`] = `
@@ -225,6 +185,26 @@ class Foo {
================================================================================
`;
+exports[`computed.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class Foo {
+> 2 | accessor ["bar"];
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`computed.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token [ (2:12)
+ 1 | class Foo {
+> 2 | accessor ["bar"];
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token ["
+`;
+
exports[`computed.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -243,6 +223,26 @@ class Foo {
================================================================================
`;
+exports[`computed.js format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class Foo {
+> 2 | accessor ["bar"];
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`computed.js format[espree] 1`] = `
+"Unexpected token [ (2:12)
+ 1 | class Foo {
+> 2 | accessor ["bar"];
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token ["
+`;
+
exports[`not-accessor-method.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -317,46 +317,6 @@ class Foo {
================================================================================
`;
-exports[`private.js [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class Foo {
-> 2 | accessor #bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`private.js [espree] format 1`] = `
-"Unexpected token #bar (2:12)
- 1 | class Foo {
-> 2 | accessor #bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token #bar"
-`;
-
-exports[`private.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class Foo {
-> 2 | accessor #bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`private.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token #bar (2:12)
- 1 | class Foo {
-> 2 | accessor #bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token #bar"
-`;
-
exports[`private.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -376,6 +336,26 @@ class Foo {
================================================================================
`;
+exports[`private.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class Foo {
+> 2 | accessor #bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`private.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token #bar (2:12)
+ 1 | class Foo {
+> 2 | accessor #bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token #bar"
+`;
+
exports[`private.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -394,44 +374,24 @@ class Foo {
================================================================================
`;
-exports[`static.js [acorn] format 1`] = `
-"Unexpected token (2:19)
+exports[`private.js format[acorn] 1`] = `
+"Unexpected token (2:12)
1 | class Foo {
-> 2 | static accessor bar;
- | ^
+> 2 | accessor #bar;
+ | ^
3 | }
4 |
-Cause: Unexpected token (2:18)"
+Cause: Unexpected token (2:11)"
`;
-exports[`static.js [espree] format 1`] = `
-"Unexpected token bar (2:19)
+exports[`private.js format[espree] 1`] = `
+"Unexpected token #bar (2:12)
1 | class Foo {
-> 2 | static accessor bar;
- | ^
+> 2 | accessor #bar;
+ | ^
3 | }
4 |
-Cause: Unexpected token bar"
-`;
-
-exports[`static.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:19)
- 1 | class Foo {
-> 2 | static accessor bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:18)"
-`;
-
-exports[`static.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token bar (2:19)
- 1 | class Foo {
-> 2 | static accessor bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token bar"
+Cause: Unexpected token #bar"
`;
exports[`static.js - {"semi":false} format 1`] = `
@@ -453,6 +413,26 @@ class Foo {
================================================================================
`;
+exports[`static.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:19)
+ 1 | class Foo {
+> 2 | static accessor bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:18)"
+`;
+
+exports[`static.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token bar (2:19)
+ 1 | class Foo {
+> 2 | static accessor bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token bar"
+`;
+
exports[`static.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -471,44 +451,24 @@ class Foo {
================================================================================
`;
-exports[`static-computed.js [acorn] format 1`] = `
+exports[`static.js format[acorn] 1`] = `
"Unexpected token (2:19)
1 | class Foo {
-> 2 | static accessor ["bar"];
+> 2 | static accessor bar;
| ^
3 | }
4 |
Cause: Unexpected token (2:18)"
`;
-exports[`static-computed.js [espree] format 1`] = `
-"Unexpected token [ (2:19)
+exports[`static.js format[espree] 1`] = `
+"Unexpected token bar (2:19)
1 | class Foo {
-> 2 | static accessor ["bar"];
+> 2 | static accessor bar;
| ^
3 | }
4 |
-Cause: Unexpected token ["
-`;
-
-exports[`static-computed.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:19)
- 1 | class Foo {
-> 2 | static accessor ["bar"];
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:18)"
-`;
-
-exports[`static-computed.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token [ (2:19)
- 1 | class Foo {
-> 2 | static accessor ["bar"];
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token ["
+Cause: Unexpected token bar"
`;
exports[`static-computed.js - {"semi":false} format 1`] = `
@@ -530,6 +490,26 @@ class Foo {
================================================================================
`;
+exports[`static-computed.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:19)
+ 1 | class Foo {
+> 2 | static accessor ["bar"];
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:18)"
+`;
+
+exports[`static-computed.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token [ (2:19)
+ 1 | class Foo {
+> 2 | static accessor ["bar"];
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token ["
+`;
+
exports[`static-computed.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -548,44 +528,24 @@ class Foo {
================================================================================
`;
-exports[`static-private.js [acorn] format 1`] = `
+exports[`static-computed.js format[acorn] 1`] = `
"Unexpected token (2:19)
1 | class Foo {
-> 2 | static accessor #bar;
+> 2 | static accessor ["bar"];
| ^
3 | }
4 |
Cause: Unexpected token (2:18)"
`;
-exports[`static-private.js [espree] format 1`] = `
-"Unexpected token #bar (2:19)
+exports[`static-computed.js format[espree] 1`] = `
+"Unexpected token [ (2:19)
1 | class Foo {
-> 2 | static accessor #bar;
+> 2 | static accessor ["bar"];
| ^
3 | }
4 |
-Cause: Unexpected token #bar"
-`;
-
-exports[`static-private.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:19)
- 1 | class Foo {
-> 2 | static accessor #bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token (2:18)"
-`;
-
-exports[`static-private.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token #bar (2:19)
- 1 | class Foo {
-> 2 | static accessor #bar;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected token #bar"
+Cause: Unexpected token ["
`;
exports[`static-private.js - {"semi":false} format 1`] = `
@@ -607,6 +567,26 @@ class Foo {
================================================================================
`;
+exports[`static-private.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:19)
+ 1 | class Foo {
+> 2 | static accessor #bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:18)"
+`;
+
+exports[`static-private.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token #bar (2:19)
+ 1 | class Foo {
+> 2 | static accessor #bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token #bar"
+`;
+
exports[`static-private.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -625,48 +605,24 @@ class Foo {
================================================================================
`;
-exports[`with-semicolon-1.js [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class C {
-> 2 | accessor clicked = "value";
- | ^
- 3 | [foo]() {}
- 4 | }
- 5 |
-Cause: Unexpected token (2:11)"
+exports[`static-private.js format[acorn] 1`] = `
+"Unexpected token (2:19)
+ 1 | class Foo {
+> 2 | static accessor #bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token (2:18)"
`;
-exports[`with-semicolon-1.js [espree] format 1`] = `
-"Unexpected token clicked (2:12)
- 1 | class C {
-> 2 | accessor clicked = "value";
- | ^
- 3 | [foo]() {}
- 4 | }
- 5 |
-Cause: Unexpected token clicked"
-`;
-
-exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class C {
-> 2 | accessor clicked = "value";
- | ^
- 3 | [foo]() {}
- 4 | }
- 5 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token clicked (2:12)
- 1 | class C {
-> 2 | accessor clicked = "value";
- | ^
- 3 | [foo]() {}
- 4 | }
- 5 |
-Cause: Unexpected token clicked"
+exports[`static-private.js format[espree] 1`] = `
+"Unexpected token #bar (2:19)
+ 1 | class Foo {
+> 2 | static accessor #bar;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected token #bar"
`;
exports[`with-semicolon-1.js - {"semi":false} format 1`] = `
@@ -690,6 +646,28 @@ class C {
================================================================================
`;
+exports[`with-semicolon-1.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class C {
+> 2 | accessor clicked = "value";
+ | ^
+ 3 | [foo]() {}
+ 4 | }
+ 5 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`with-semicolon-1.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token clicked (2:12)
+ 1 | class C {
+> 2 | accessor clicked = "value";
+ | ^
+ 3 | [foo]() {}
+ 4 | }
+ 5 |
+Cause: Unexpected token clicked"
+`;
+
exports[`with-semicolon-1.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -710,47 +688,25 @@ class C {
================================================================================
`;
-exports[`with-semicolon-2.js [acorn] format 1`] = `
+exports[`with-semicolon-1.js format[acorn] 1`] = `
"Unexpected token (2:12)
1 | class C {
> 2 | accessor clicked = "value";
| ^
- 3 | *foo() {}
+ 3 | [foo]() {}
4 | }
- 5 |
+ 5 |
Cause: Unexpected token (2:11)"
`;
-exports[`with-semicolon-2.js [espree] format 1`] = `
+exports[`with-semicolon-1.js format[espree] 1`] = `
"Unexpected token clicked (2:12)
1 | class C {
> 2 | accessor clicked = "value";
| ^
- 3 | *foo() {}
+ 3 | [foo]() {}
4 | }
- 5 |
-Cause: Unexpected token clicked"
-`;
-
-exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:12)
- 1 | class C {
-> 2 | accessor clicked = "value";
- | ^
- 3 | *foo() {}
- 4 | }
- 5 |
-Cause: Unexpected token (2:11)"
-`;
-
-exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token clicked (2:12)
- 1 | class C {
-> 2 | accessor clicked = "value";
- | ^
- 3 | *foo() {}
- 4 | }
- 5 |
+ 5 |
Cause: Unexpected token clicked"
`;
@@ -775,6 +731,28 @@ class C {
================================================================================
`;
+exports[`with-semicolon-2.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class C {
+> 2 | accessor clicked = "value";
+ | ^
+ 3 | *foo() {}
+ 4 | }
+ 5 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`with-semicolon-2.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token clicked (2:12)
+ 1 | class C {
+> 2 | accessor clicked = "value";
+ | ^
+ 3 | *foo() {}
+ 4 | }
+ 5 |
+Cause: Unexpected token clicked"
+`;
+
exports[`with-semicolon-2.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "babel-flow"]
@@ -794,3 +772,25 @@ class C {
================================================================================
`;
+
+exports[`with-semicolon-2.js format[acorn] 1`] = `
+"Unexpected token (2:12)
+ 1 | class C {
+> 2 | accessor clicked = "value";
+ | ^
+ 3 | *foo() {}
+ 4 | }
+ 5 |
+Cause: Unexpected token (2:11)"
+`;
+
+exports[`with-semicolon-2.js format[espree] 1`] = `
+"Unexpected token clicked (2:12)
+ 1 | class C {
+> 2 | accessor clicked = "value";
+ | ^
+ 3 | *foo() {}
+ 4 | }
+ 5 |
+Cause: Unexpected token clicked"
+`;
diff --git a/tests/format/js/decorators-export/__snapshots__/format.test.js.snap b/tests/format/js/decorators-export/__snapshots__/format.test.js.snap
index 0b23236a5..870bee63e 100644
--- a/tests/format/js/decorators-export/__snapshots__/format.test.js.snap
+++ b/tests/format/js/decorators-export/__snapshots__/format.test.js.snap
@@ -1,25 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`after_export.js [acorn] format 1`] = `
-"Unexpected character '@' (1:8)
-> 1 | export @decorator class Foo {}
- | ^
- 2 |
- 3 | export default @decorator class {}
- 4 |
-Cause: Unexpected character '@' (1:7)"
-`;
-
-exports[`after_export.js [espree] format 1`] = `
-"Unexpected character '@' (1:8)
-> 1 | export @decorator class Foo {}
- | ^
- 2 |
- 3 | export default @decorator class {}
- 4 |
-Cause: Unexpected character '@'"
-`;
-
exports[`after_export.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -42,23 +22,23 @@ class {}
================================================================================
`;
-exports[`before_export.js [acorn] format 1`] = `
-"Unexpected character '@' (1:1)
-> 1 | @decorator
- | ^
- 2 | export class Foo {}
- 3 |
- 4 | @decorator
-Cause: Unexpected character '@' (1:0)"
+exports[`after_export.js format[acorn] 1`] = `
+"Unexpected character '@' (1:8)
+> 1 | export @decorator class Foo {}
+ | ^
+ 2 |
+ 3 | export default @decorator class {}
+ 4 |
+Cause: Unexpected character '@' (1:7)"
`;
-exports[`before_export.js [espree] format 1`] = `
-"Unexpected character '@' (1:1)
-> 1 | @decorator
- | ^
- 2 | export class Foo {}
- 3 |
- 4 | @decorator
+exports[`after_export.js format[espree] 1`] = `
+"Unexpected character '@' (1:8)
+> 1 | export @decorator class Foo {}
+ | ^
+ 2 |
+ 3 | export default @decorator class {}
+ 4 |
Cause: Unexpected character '@'"
`;
@@ -83,3 +63,23 @@ export default class {}
================================================================================
`;
+
+exports[`before_export.js format[acorn] 1`] = `
+"Unexpected character '@' (1:1)
+> 1 | @decorator
+ | ^
+ 2 | export class Foo {}
+ 3 |
+ 4 | @decorator
+Cause: Unexpected character '@' (1:0)"
+`;
+
+exports[`before_export.js format[espree] 1`] = `
+"Unexpected character '@' (1:1)
+> 1 | @decorator
+ | ^
+ 2 | export class Foo {}
+ 3 |
+ 4 | @decorator
+Cause: Unexpected character '@'"
+`;
diff --git a/tests/format/js/decorators/__snapshots__/format.test.js.snap b/tests/format/js/decorators/__snapshots__/format.test.js.snap
index 8f941a014..eba8ce316 100644
--- a/tests/format/js/decorators/__snapshots__/format.test.js.snap
+++ b/tests/format/js/decorators/__snapshots__/format.test.js.snap
@@ -1,47 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`classes.js [acorn] format 1`] = `
-"Unexpected character '@' (1:1)
-> 1 | @deco class Foo {}
- | ^
- 2 |
- 3 | @deco export class Bar {}
- 4 |
-Cause: Unexpected character '@' (1:0)"
-`;
-
-exports[`classes.js [espree] format 1`] = `
-"Unexpected character '@' (1:1)
-> 1 | @deco class Foo {}
- | ^
- 2 |
- 3 | @deco export class Bar {}
- 4 |
-Cause: Unexpected character '@'"
-`;
-
-exports[`classes.js [flow] format 1`] = `
-"Unexpected token \`@\` (7:13)
- 5 | @deco export default class Baz {}
- 6 |
-> 7 | const foo = @deco class {
- | ^
- 8 | //
- 9 | };
- 10 |"
-`;
-
-exports[`classes.js [hermes] format 1`] = `
-"unrecognized character '@' (1:0)
-> 1 | @deco class Foo {}
- 2 |
- 3 | @deco export class Bar {}
- 4 |
-Cause: unrecognized character '@' (1:0)
-@deco class Foo {}
-^"
-`;
-
exports[`classes.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -89,40 +47,45 @@ const bar =
================================================================================
`;
-exports[`comments.js [acorn] format 1`] = `
-"Unexpected character '@' (3:1)
- 1 | var x = 100
- 2 |
-> 3 | @Hello({
+exports[`classes.js format[acorn] 1`] = `
+"Unexpected character '@' (1:1)
+> 1 | @deco class Foo {}
| ^
- 4 | a: 'a', // Comment is in the wrong place
- 5 | // test
- 6 | b: '2'
-Cause: Unexpected character '@' (3:0)"
+ 2 |
+ 3 | @deco export class Bar {}
+ 4 |
+Cause: Unexpected character '@' (1:0)"
`;
-exports[`comments.js [espree] format 1`] = `
-"Unexpected character '@' (3:1)
- 1 | var x = 100
- 2 |
-> 3 | @Hello({
+exports[`classes.js format[espree] 1`] = `
+"Unexpected character '@' (1:1)
+> 1 | @deco class Foo {}
| ^
- 4 | a: 'a', // Comment is in the wrong place
- 5 | // test
- 6 | b: '2'
+ 2 |
+ 3 | @deco export class Bar {}
+ 4 |
Cause: Unexpected character '@'"
`;
-exports[`comments.js [hermes] format 1`] = `
-"unrecognized character '@' (3:0)
- 1 | var x = 100
+exports[`classes.js format[flow] 1`] = `
+"Unexpected token \`@\` (7:13)
+ 5 | @deco export default class Baz {}
+ 6 |
+> 7 | const foo = @deco class {
+ | ^
+ 8 | //
+ 9 | };
+ 10 |"
+`;
+
+exports[`classes.js format[hermes] 1`] = `
+"unrecognized character '@' (1:0)
+> 1 | @deco class Foo {}
2 |
-> 3 | @Hello({
- 4 | a: 'a', // Comment is in the wrong place
- 5 | // test
- 6 | b: '2'
-Cause: unrecognized character '@' (3:0)
-@Hello({
+ 3 | @deco export class Bar {}
+ 4 |
+Cause: unrecognized character '@' (1:0)
+@deco class Foo {}
^"
`;
@@ -207,42 +170,41 @@ class Something {
================================================================================
`;
-exports[`member-expression.js [acorn] format 1`] = `
-"Unexpected character '@' (3:5)
- 1 | [
- 2 | class {
-> 3 | @(decorator)
- | ^
- 4 | method() {}
- 5 | },
- 6 | class {
-Cause: Unexpected character '@' (3:4)"
+exports[`comments.js format[acorn] 1`] = `
+"Unexpected character '@' (3:1)
+ 1 | var x = 100
+ 2 |
+> 3 | @Hello({
+ | ^
+ 4 | a: 'a', // Comment is in the wrong place
+ 5 | // test
+ 6 | b: '2'
+Cause: Unexpected character '@' (3:0)"
`;
-exports[`member-expression.js [espree] format 1`] = `
-"Unexpected character '@' (3:5)
- 1 | [
- 2 | class {
-> 3 | @(decorator)
- | ^
- 4 | method() {}
- 5 | },
- 6 | class {
+exports[`comments.js format[espree] 1`] = `
+"Unexpected character '@' (3:1)
+ 1 | var x = 100
+ 2 |
+> 3 | @Hello({
+ | ^
+ 4 | a: 'a', // Comment is in the wrong place
+ 5 | // test
+ 6 | b: '2'
Cause: Unexpected character '@'"
`;
-exports[`member-expression.js [hermes] format 1`] = `
-"unrecognized character '@' (3:4)
- 1 | [
- 2 | class {
-> 3 | @(decorator)
- | ^
- 4 | method() {}
- 5 | },
- 6 | class {
-Cause: unrecognized character '@' (3:4)
- @(decorator)
- ^"
+exports[`comments.js format[hermes] 1`] = `
+"unrecognized character '@' (3:0)
+ 1 | var x = 100
+ 2 |
+> 3 | @Hello({
+ 4 | a: 'a', // Comment is in the wrong place
+ 5 | // test
+ 6 | b: '2'
+Cause: unrecognized character '@' (3:0)
+@Hello({
+^"
`;
exports[`member-expression.js format 1`] = `
@@ -389,42 +351,42 @@ printWidth: 80
================================================================================
`;
-exports[`methods.js [acorn] format 1`] = `
-"Unexpected character '@' (3:3)
- 1 |
- 2 | class Yo {
-> 3 | @foo("hello")
- | ^
- 4 | async plop() {}
- 5 |
- 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
-Cause: Unexpected character '@' (3:2)"
+exports[`member-expression.js format[acorn] 1`] = `
+"Unexpected character '@' (3:5)
+ 1 | [
+ 2 | class {
+> 3 | @(decorator)
+ | ^
+ 4 | method() {}
+ 5 | },
+ 6 | class {
+Cause: Unexpected character '@' (3:4)"
`;
-exports[`methods.js [espree] format 1`] = `
-"Unexpected character '@' (3:3)
- 1 |
- 2 | class Yo {
-> 3 | @foo("hello")
- | ^
- 4 | async plop() {}
- 5 |
- 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
+exports[`member-expression.js format[espree] 1`] = `
+"Unexpected character '@' (3:5)
+ 1 | [
+ 2 | class {
+> 3 | @(decorator)
+ | ^
+ 4 | method() {}
+ 5 | },
+ 6 | class {
Cause: Unexpected character '@'"
`;
-exports[`methods.js [hermes] format 1`] = `
-"unrecognized character '@' (3:2)
- 1 |
- 2 | class Yo {
-> 3 | @foo("hello")
- | ^
- 4 | async plop() {}
- 5 |
- 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
-Cause: unrecognized character '@' (3:2)
- @foo("hello")
- ^"
+exports[`member-expression.js format[hermes] 1`] = `
+"unrecognized character '@' (3:4)
+ 1 | [
+ 2 | class {
+> 3 | @(decorator)
+ | ^
+ 4 | method() {}
+ 5 | },
+ 6 | class {
+Cause: unrecognized character '@' (3:4)
+ @(decorator)
+ ^"
`;
exports[`methods.js format 1`] = `
@@ -459,41 +421,42 @@ class Yo {
================================================================================
`;
-exports[`mixed.js [acorn] format 1`] = `
-"Unexpected character '@' (3:1)
- 1 | // https://github.com/prettier/prettier/issues/6747
- 2 |
-> 3 | @foo
- | ^
- 4 | export default class MyComponent {
- 5 | @task
- 6 | *foo() {
-Cause: Unexpected character '@' (3:0)"
+exports[`methods.js format[acorn] 1`] = `
+"Unexpected character '@' (3:3)
+ 1 |
+ 2 | class Yo {
+> 3 | @foo("hello")
+ | ^
+ 4 | async plop() {}
+ 5 |
+ 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
+Cause: Unexpected character '@' (3:2)"
`;
-exports[`mixed.js [espree] format 1`] = `
-"Unexpected character '@' (3:1)
- 1 | // https://github.com/prettier/prettier/issues/6747
- 2 |
-> 3 | @foo
- | ^
- 4 | export default class MyComponent {
- 5 | @task
- 6 | *foo() {
+exports[`methods.js format[espree] 1`] = `
+"Unexpected character '@' (3:3)
+ 1 |
+ 2 | class Yo {
+> 3 | @foo("hello")
+ | ^
+ 4 | async plop() {}
+ 5 |
+ 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
Cause: Unexpected character '@'"
`;
-exports[`mixed.js [hermes] format 1`] = `
-"unrecognized character '@' (3:0)
- 1 | // https://github.com/prettier/prettier/issues/6747
- 2 |
-> 3 | @foo
- 4 | export default class MyComponent {
- 5 | @task
- 6 | *foo() {
-Cause: unrecognized character '@' (3:0)
-@foo
-^"
+exports[`methods.js format[hermes] 1`] = `
+"unrecognized character '@' (3:2)
+ 1 |
+ 2 | class Yo {
+> 3 | @foo("hello")
+ | ^
+ 4 | async plop() {}
+ 5 |
+ 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")
+Cause: unrecognized character '@' (3:2)
+ @foo("hello")
+ ^"
`;
exports[`mixed.js format 1`] = `
@@ -522,40 +485,40 @@ export default class MyComponent {
================================================================================
`;
-exports[`mobx.js [acorn] format 1`] = `
+exports[`mixed.js format[acorn] 1`] = `
"Unexpected character '@' (3:1)
- 1 | import {observable} from "mobx";
+ 1 | // https://github.com/prettier/prettier/issues/6747
2 |
-> 3 | @observer class OrderLine {
+> 3 | @foo
| ^
- 4 | @observable price = 0;
- 5 | @observable amount = 1;
- 6 |
+ 4 | export default class MyComponent {
+ 5 | @task
+ 6 | *foo() {
Cause: Unexpected character '@' (3:0)"
`;
-exports[`mobx.js [espree] format 1`] = `
+exports[`mixed.js format[espree] 1`] = `
"Unexpected character '@' (3:1)
- 1 | import {observable} from "mobx";
+ 1 | // https://github.com/prettier/prettier/issues/6747
2 |
-> 3 | @observer class OrderLine {
+> 3 | @foo
| ^
- 4 | @observable price = 0;
- 5 | @observable amount = 1;
- 6 |
+ 4 | export default class MyComponent {
+ 5 | @task
+ 6 | *foo() {
Cause: Unexpected character '@'"
`;
-exports[`mobx.js [hermes] format 1`] = `
+exports[`mixed.js format[hermes] 1`] = `
"unrecognized character '@' (3:0)
- 1 | import {observable} from "mobx";
+ 1 | // https://github.com/prettier/prettier/issues/6747
2 |
-> 3 | @observer class OrderLine {
- 4 | @observable price = 0;
- 5 | @observable amount = 1;
- 6 |
+> 3 | @foo
+ 4 | export default class MyComponent {
+ 5 | @task
+ 6 | *foo() {
Cause: unrecognized character '@' (3:0)
-@observer class OrderLine {
+@foo
^"
`;
@@ -651,39 +614,41 @@ class OrderLine {
================================================================================
`;
-exports[`multiline.js [acorn] format 1`] = `
-"Unexpected character '@' (2:3)
- 1 | class Foo {
-> 2 | @deco([
- | ^
- 3 | foo,
- 4 | bar
- 5 | ]) prop = value;
-Cause: Unexpected character '@' (2:2)"
+exports[`mobx.js format[acorn] 1`] = `
+"Unexpected character '@' (3:1)
+ 1 | import {observable} from "mobx";
+ 2 |
+> 3 | @observer class OrderLine {
+ | ^
+ 4 | @observable price = 0;
+ 5 | @observable amount = 1;
+ 6 |
+Cause: Unexpected character '@' (3:0)"
`;
-exports[`multiline.js [espree] format 1`] = `
-"Unexpected character '@' (2:3)
- 1 | class Foo {
-> 2 | @deco([
- | ^
- 3 | foo,
- 4 | bar
- 5 | ]) prop = value;
+exports[`mobx.js format[espree] 1`] = `
+"Unexpected character '@' (3:1)
+ 1 | import {observable} from "mobx";
+ 2 |
+> 3 | @observer class OrderLine {
+ | ^
+ 4 | @observable price = 0;
+ 5 | @observable amount = 1;
+ 6 |
Cause: Unexpected character '@'"
`;
-exports[`multiline.js [hermes] format 1`] = `
-"unrecognized character '@' (2:2)
- 1 | class Foo {
-> 2 | @deco([
- | ^
- 3 | foo,
- 4 | bar
- 5 | ]) prop = value;
-Cause: unrecognized character '@' (2:2)
- @deco([
- ^"
+exports[`mobx.js format[hermes] 1`] = `
+"unrecognized character '@' (3:0)
+ 1 | import {observable} from "mobx";
+ 2 |
+> 3 | @observer class OrderLine {
+ 4 | @observable price = 0;
+ 5 | @observable amount = 1;
+ 6 |
+Cause: unrecognized character '@' (3:0)
+@observer class OrderLine {
+^"
`;
exports[`multiline.js format 1`] = `
@@ -725,38 +690,38 @@ class Foo {
================================================================================
`;
-exports[`multiple.js [acorn] format 1`] = `
+exports[`multiline.js format[acorn] 1`] = `
"Unexpected character '@' (2:3)
- 1 | const dog = class {
-> 2 | @readonly
+ 1 | class Foo {
+> 2 | @deco([
| ^
- 3 | @nonenumerable
- 4 | @doubledValue
- 5 | legs = 4;
+ 3 | foo,
+ 4 | bar
+ 5 | ]) prop = value;
Cause: Unexpected character '@' (2:2)"
`;
-exports[`multiple.js [espree] format 1`] = `
+exports[`multiline.js format[espree] 1`] = `
"Unexpected character '@' (2:3)
- 1 | const dog = class {
-> 2 | @readonly
+ 1 | class Foo {
+> 2 | @deco([
| ^
- 3 | @nonenumerable
- 4 | @doubledValue
- 5 | legs = 4;
+ 3 | foo,
+ 4 | bar
+ 5 | ]) prop = value;
Cause: Unexpected character '@'"
`;
-exports[`multiple.js [hermes] format 1`] = `
+exports[`multiline.js format[hermes] 1`] = `
"unrecognized character '@' (2:2)
- 1 | const dog = class {
-> 2 | @readonly
+ 1 | class Foo {
+> 2 | @deco([
| ^
- 3 | @nonenumerable
- 4 | @doubledValue
- 5 | legs = 4;
+ 3 | foo,
+ 4 | bar
+ 5 | ]) prop = value;
Cause: unrecognized character '@' (2:2)
- @readonly
+ @deco([
^"
`;
@@ -809,38 +774,38 @@ const foo = class {
================================================================================
`;
-exports[`parens.js [acorn] format 1`] = `
+exports[`multiple.js format[acorn] 1`] = `
"Unexpected character '@' (2:3)
- 1 | class X {
-> 2 | @(computed().volatile())
+ 1 | const dog = class {
+> 2 | @readonly
| ^
- 3 | x
- 4 | }
- 5 |
+ 3 | @nonenumerable
+ 4 | @doubledValue
+ 5 | legs = 4;
Cause: Unexpected character '@' (2:2)"
`;
-exports[`parens.js [espree] format 1`] = `
+exports[`multiple.js format[espree] 1`] = `
"Unexpected character '@' (2:3)
- 1 | class X {
-> 2 | @(computed().volatile())
+ 1 | const dog = class {
+> 2 | @readonly
| ^
- 3 | x
- 4 | }
- 5 |
+ 3 | @nonenumerable
+ 4 | @doubledValue
+ 5 | legs = 4;
Cause: Unexpected character '@'"
`;
-exports[`parens.js [hermes] format 1`] = `
+exports[`multiple.js format[hermes] 1`] = `
"unrecognized character '@' (2:2)
- 1 | class X {
-> 2 | @(computed().volatile())
+ 1 | const dog = class {
+> 2 | @readonly
| ^
- 3 | x
- 4 | }
- 5 |
+ 3 | @nonenumerable
+ 4 | @doubledValue
+ 5 | legs = 4;
Cause: unrecognized character '@' (2:2)
- @(computed().volatile())
+ @readonly
^"
`;
@@ -864,35 +829,39 @@ class X {
================================================================================
`;
-exports[`redux.js [acorn] format 1`] = `
-"Unexpected character '@' (1:1)
-> 1 | @connect(mapStateToProps, mapDispatchToProps)
- | ^
- 2 | export class MyApp extends React.Component {}
- 3 |
- 4 | @connect(state => ({ todos: state.todos }))
-Cause: Unexpected character '@' (1:0)"
+exports[`parens.js format[acorn] 1`] = `
+"Unexpected character '@' (2:3)
+ 1 | class X {
+> 2 | @(computed().volatile())
+ | ^
+ 3 | x
+ 4 | }
+ 5 |
+Cause: Unexpected character '@' (2:2)"
`;
-exports[`redux.js [espree] format 1`] = `
-"Unexpected character '@' (1:1)
-> 1 | @connect(mapStateToProps, mapDispatchToProps)
- | ^
- 2 | export class MyApp extends React.Component {}
- 3 |
- 4 | @connect(state => ({ todos: state.todos }))
+exports[`parens.js format[espree] 1`] = `
+"Unexpected character '@' (2:3)
+ 1 | class X {
+> 2 | @(computed().volatile())
+ | ^
+ 3 | x
+ 4 | }
+ 5 |
Cause: Unexpected character '@'"
`;
-exports[`redux.js [hermes] format 1`] = `
-"unrecognized character '@' (1:0)
-> 1 | @connect(mapStateToProps, mapDispatchToProps)
- 2 | export class MyApp extends React.Component {}
- 3 |
- 4 | @connect(state => ({ todos: state.todos }))
-Cause: unrecognized character '@' (1:0)
-@connect(mapStateToProps, mapDispatchToProps)
-^"
+exports[`parens.js format[hermes] 1`] = `
+"unrecognized character '@' (2:2)
+ 1 | class X {
+> 2 | @(computed().volatile())
+ | ^
+ 3 | x
+ 4 | }
+ 5 |
+Cause: unrecognized character '@' (2:2)
+ @(computed().volatile())
+ ^"
`;
exports[`redux.js format 1`] = `
@@ -916,3 +885,34 @@ export class Home extends React.Component {}
================================================================================
`;
+
+exports[`redux.js format[acorn] 1`] = `
+"Unexpected character '@' (1:1)
+> 1 | @connect(mapStateToProps, mapDispatchToProps)
+ | ^
+ 2 | export class MyApp extends React.Component {}
+ 3 |
+ 4 | @connect(state => ({ todos: state.todos }))
+Cause: Unexpected character '@' (1:0)"
+`;
+
+exports[`redux.js format[espree] 1`] = `
+"Unexpected character '@' (1:1)
+> 1 | @connect(mapStateToProps, mapDispatchToProps)
+ | ^
+ 2 | export class MyApp extends React.Component {}
+ 3 |
+ 4 | @connect(state => ({ todos: state.todos }))
+Cause: Unexpected character '@'"
+`;
+
+exports[`redux.js format[hermes] 1`] = `
+"unrecognized character '@' (1:0)
+> 1 | @connect(mapStateToProps, mapDispatchToProps)
+ 2 | export class MyApp extends React.Component {}
+ 3 |
+ 4 | @connect(state => ({ todos: state.todos }))
+Cause: unrecognized character '@' (1:0)
+@connect(mapStateToProps, mapDispatchToProps)
+^"
+`;
diff --git a/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap b/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap
index 3c4d74fc6..0a3333786 100644
--- a/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap
+++ b/tests/format/js/decorators/class-expression/__snapshots__/format.test.js.snap
@@ -1,79 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`arguments.js [acorn] format 1`] = `
-"Unexpected character '@' (1:13)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |
-Cause: Unexpected character '@' (1:12)"
-`;
-
-exports[`arguments.js [espree] format 1`] = `
-"Unexpected character '@' (1:13)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |
-Cause: Unexpected character '@'"
-`;
-
-exports[`arguments.js [flow] format 1`] = `
-"Unexpected token \`@\` (1:13)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |"
-`;
-
-exports[`arguments.js [hermes] format 1`] = `
-"unrecognized character '@' (1:12)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |
-Cause: unrecognized character '@' (1:12)
-console.log(@deco class Foo {})
- ^"
-`;
-
-exports[`arguments.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected character '@' (1:13)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |
-Cause: Unexpected character '@' (1:12)"
-`;
-
-exports[`arguments.js - {"semi":false} [espree] format 1`] = `
-"Unexpected character '@' (1:13)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |
-Cause: Unexpected character '@'"
-`;
-
-exports[`arguments.js - {"semi":false} [flow] format 1`] = `
-"Unexpected token \`@\` (1:13)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |"
-`;
-
-exports[`arguments.js - {"semi":false} [hermes] format 1`] = `
-"unrecognized character '@' (1:12)
-> 1 | console.log(@deco class Foo {})
- | ^
- 2 | console.log(@deco class {})
- 3 |
-Cause: unrecognized character '@' (1:12)
-console.log(@deco class Foo {})
- ^"
-`;
-
exports[`arguments.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -97,6 +23,43 @@ console.log(
================================================================================
`;
+exports[`arguments.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected character '@' (1:13)
+> 1 | console.log(@deco class Foo {})
+ | ^
+ 2 | console.log(@deco class {})
+ 3 |
+Cause: Unexpected character '@' (1:12)"
+`;
+
+exports[`arguments.js - {"semi":false} format[espree] 1`] = `
+"Unexpected character '@' (1:13)
+> 1 | console.log(@deco class Foo {})
+ | ^
+ 2 | console.log(@deco class {})
+ 3 |
+Cause: Unexpected character '@'"
+`;
+
+exports[`arguments.js - {"semi":false} format[flow] 1`] = `
+"Unexpected token \`@\` (1:13)
+> 1 | console.log(@deco class Foo {})
+ | ^
+ 2 | console.log(@deco class {})
+ 3 |"
+`;
+
+exports[`arguments.js - {"semi":false} format[hermes] 1`] = `
+"unrecognized character '@' (1:12)
+> 1 | console.log(@deco class Foo {})
+ | ^
+ 2 | console.log(@deco class {})
+ 3 |
+Cause: unrecognized character '@' (1:12)
+console.log(@deco class Foo {})
+ ^"
+`;
+
exports[`arguments.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -119,85 +82,40 @@ console.log(
================================================================================
`;
-exports[`class-expression.js [acorn] format 1`] = `
+exports[`arguments.js format[acorn] 1`] = `
"Unexpected character '@' (1:13)
-> 1 | const a1 = (@deco class Foo {});
+> 1 | console.log(@deco class Foo {})
| ^
- 2 | const a2 = (@deco class {});
+ 2 | console.log(@deco class {})
3 |
- 4 | (@deco class Foo {});
Cause: Unexpected character '@' (1:12)"
`;
-exports[`class-expression.js [espree] format 1`] = `
+exports[`arguments.js format[espree] 1`] = `
"Unexpected character '@' (1:13)
-> 1 | const a1 = (@deco class Foo {});
+> 1 | console.log(@deco class Foo {})
| ^
- 2 | const a2 = (@deco class {});
+ 2 | console.log(@deco class {})
3 |
- 4 | (@deco class Foo {});
Cause: Unexpected character '@'"
`;
-exports[`class-expression.js [flow] format 1`] = `
+exports[`arguments.js format[flow] 1`] = `
"Unexpected token \`@\` (1:13)
-> 1 | const a1 = (@deco class Foo {});
+> 1 | console.log(@deco class Foo {})
| ^
- 2 | const a2 = (@deco class {});
- 3 |
- 4 | (@deco class Foo {});"
+ 2 | console.log(@deco class {})
+ 3 |"
`;
-exports[`class-expression.js [hermes] format 1`] = `
+exports[`arguments.js format[hermes] 1`] = `
"unrecognized character '@' (1:12)
-> 1 | const a1 = (@deco class Foo {});
+> 1 | console.log(@deco class Foo {})
| ^
- 2 | const a2 = (@deco class {});
+ 2 | console.log(@deco class {})
3 |
- 4 | (@deco class Foo {});
Cause: unrecognized character '@' (1:12)
-const a1 = (@deco class Foo {});
- ^"
-`;
-
-exports[`class-expression.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected character '@' (1:13)
-> 1 | const a1 = (@deco class Foo {});
- | ^
- 2 | const a2 = (@deco class {});
- 3 |
- 4 | (@deco class Foo {});
-Cause: Unexpected character '@' (1:12)"
-`;
-
-exports[`class-expression.js - {"semi":false} [espree] format 1`] = `
-"Unexpected character '@' (1:13)
-> 1 | const a1 = (@deco class Foo {});
- | ^
- 2 | const a2 = (@deco class {});
- 3 |
- 4 | (@deco class Foo {});
-Cause: Unexpected character '@'"
-`;
-
-exports[`class-expression.js - {"semi":false} [flow] format 1`] = `
-"Unexpected token \`@\` (1:13)
-> 1 | const a1 = (@deco class Foo {});
- | ^
- 2 | const a2 = (@deco class {});
- 3 |
- 4 | (@deco class Foo {});"
-`;
-
-exports[`class-expression.js - {"semi":false} [hermes] format 1`] = `
-"unrecognized character '@' (1:12)
-> 1 | const a1 = (@deco class Foo {});
- | ^
- 2 | const a2 = (@deco class {});
- 3 |
- 4 | (@deco class Foo {});
-Cause: unrecognized character '@' (1:12)
-const a1 = (@deco class Foo {});
+console.log(@deco class Foo {})
^"
`;
@@ -259,6 +177,47 @@ class Foo {}
================================================================================
`;
+exports[`class-expression.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected character '@' (1:13)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
+ 3 |
+ 4 | (@deco class Foo {});
+Cause: Unexpected character '@' (1:12)"
+`;
+
+exports[`class-expression.js - {"semi":false} format[espree] 1`] = `
+"Unexpected character '@' (1:13)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
+ 3 |
+ 4 | (@deco class Foo {});
+Cause: Unexpected character '@'"
+`;
+
+exports[`class-expression.js - {"semi":false} format[flow] 1`] = `
+"Unexpected token \`@\` (1:13)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
+ 3 |
+ 4 | (@deco class Foo {});"
+`;
+
+exports[`class-expression.js - {"semi":false} format[hermes] 1`] = `
+"unrecognized character '@' (1:12)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
+ 3 |
+ 4 | (@deco class Foo {});
+Cause: unrecognized character '@' (1:12)
+const a1 = (@deco class Foo {});
+ ^"
+`;
+
exports[`class-expression.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -316,78 +275,45 @@ class Foo {}
================================================================================
`;
-exports[`member-expression.js [acorn] format 1`] = `
-"Unexpected character '@' (1:2)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
+exports[`class-expression.js format[acorn] 1`] = `
+"Unexpected character '@' (1:13)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
3 |
-Cause: Unexpected character '@' (1:1)"
+ 4 | (@deco class Foo {});
+Cause: Unexpected character '@' (1:12)"
`;
-exports[`member-expression.js [espree] format 1`] = `
-"Unexpected character '@' (1:2)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
+exports[`class-expression.js format[espree] 1`] = `
+"Unexpected character '@' (1:13)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
3 |
+ 4 | (@deco class Foo {});
Cause: Unexpected character '@'"
`;
-exports[`member-expression.js [flow] format 1`] = `
-"Unexpected token \`@\` (1:2)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
- 3 |"
-`;
-
-exports[`member-expression.js [hermes] format 1`] = `
-"unrecognized character '@' (1:1)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
+exports[`class-expression.js format[flow] 1`] = `
+"Unexpected token \`@\` (1:13)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
3 |
-Cause: unrecognized character '@' (1:1)
-(@deco class Foo {}).name;
- ^"
+ 4 | (@deco class Foo {});"
`;
-exports[`member-expression.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected character '@' (1:2)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
+exports[`class-expression.js format[hermes] 1`] = `
+"unrecognized character '@' (1:12)
+> 1 | const a1 = (@deco class Foo {});
+ | ^
+ 2 | const a2 = (@deco class {});
3 |
-Cause: Unexpected character '@' (1:1)"
-`;
-
-exports[`member-expression.js - {"semi":false} [espree] format 1`] = `
-"Unexpected character '@' (1:2)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
- 3 |
-Cause: Unexpected character '@'"
-`;
-
-exports[`member-expression.js - {"semi":false} [flow] format 1`] = `
-"Unexpected token \`@\` (1:2)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
- 3 |"
-`;
-
-exports[`member-expression.js - {"semi":false} [hermes] format 1`] = `
-"unrecognized character '@' (1:1)
-> 1 | (@deco class Foo {}).name;
- | ^
- 2 | (@deco class {}).name;
- 3 |
-Cause: unrecognized character '@' (1:1)
-(@deco class Foo {}).name;
- ^"
+ 4 | (@deco class Foo {});
+Cause: unrecognized character '@' (1:12)
+const a1 = (@deco class Foo {});
+ ^"
`;
exports[`member-expression.js - {"semi":false} format 1`] = `
@@ -413,6 +339,43 @@ semi: false
================================================================================
`;
+exports[`member-expression.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected character '@' (1:2)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |
+Cause: Unexpected character '@' (1:1)"
+`;
+
+exports[`member-expression.js - {"semi":false} format[espree] 1`] = `
+"Unexpected character '@' (1:2)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |
+Cause: Unexpected character '@'"
+`;
+
+exports[`member-expression.js - {"semi":false} format[flow] 1`] = `
+"Unexpected token \`@\` (1:2)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |"
+`;
+
+exports[`member-expression.js - {"semi":false} format[hermes] 1`] = `
+"unrecognized character '@' (1:1)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |
+Cause: unrecognized character '@' (1:1)
+(@deco class Foo {}).name;
+ ^"
+`;
+
exports[`member-expression.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -435,86 +398,41 @@ printWidth: 80
================================================================================
`;
-exports[`super-class.js [acorn] format 1`] = `
-"Unexpected character '@' (1:20)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |
-Cause: Unexpected character '@' (1:19)"
+exports[`member-expression.js format[acorn] 1`] = `
+"Unexpected character '@' (1:2)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |
+Cause: Unexpected character '@' (1:1)"
`;
-exports[`super-class.js [espree] format 1`] = `
-"Unexpected character '@' (1:20)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |
+exports[`member-expression.js format[espree] 1`] = `
+"Unexpected character '@' (1:2)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |
Cause: Unexpected character '@'"
`;
-exports[`super-class.js [flow] format 1`] = `
-"Unexpected token \`@\` (1:20)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |"
+exports[`member-expression.js format[flow] 1`] = `
+"Unexpected token \`@\` (1:2)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |"
`;
-exports[`super-class.js [hermes] format 1`] = `
-"unrecognized character '@' (1:19)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |
-Cause: unrecognized character '@' (1:19)
-class Foo extends (@deco class Foo {}){}
- ^"
-`;
-
-exports[`super-class.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected character '@' (1:20)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |
-Cause: Unexpected character '@' (1:19)"
-`;
-
-exports[`super-class.js - {"semi":false} [espree] format 1`] = `
-"Unexpected character '@' (1:20)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |
-Cause: Unexpected character '@'"
-`;
-
-exports[`super-class.js - {"semi":false} [flow] format 1`] = `
-"Unexpected token \`@\` (1:20)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |"
-`;
-
-exports[`super-class.js - {"semi":false} [hermes] format 1`] = `
-"unrecognized character '@' (1:19)
-> 1 | class Foo extends (@deco class Foo {}){}
- | ^
- 2 |
- 3 | class Foo extends (@deco class {}){}
- 4 |
-Cause: unrecognized character '@' (1:19)
-class Foo extends (@deco class Foo {}){}
- ^"
+exports[`member-expression.js format[hermes] 1`] = `
+"unrecognized character '@' (1:1)
+> 1 | (@deco class Foo {}).name;
+ | ^
+ 2 | (@deco class {}).name;
+ 3 |
+Cause: unrecognized character '@' (1:1)
+(@deco class Foo {}).name;
+ ^"
`;
exports[`super-class.js - {"semi":false} format 1`] = `
@@ -542,6 +460,47 @@ class Foo extends (
================================================================================
`;
+exports[`super-class.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected character '@' (1:20)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |
+Cause: Unexpected character '@' (1:19)"
+`;
+
+exports[`super-class.js - {"semi":false} format[espree] 1`] = `
+"Unexpected character '@' (1:20)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |
+Cause: Unexpected character '@'"
+`;
+
+exports[`super-class.js - {"semi":false} format[flow] 1`] = `
+"Unexpected token \`@\` (1:20)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |"
+`;
+
+exports[`super-class.js - {"semi":false} format[hermes] 1`] = `
+"unrecognized character '@' (1:19)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |
+Cause: unrecognized character '@' (1:19)
+class Foo extends (@deco class Foo {}){}
+ ^"
+`;
+
exports[`super-class.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -565,3 +524,44 @@ class Foo extends (
================================================================================
`;
+
+exports[`super-class.js format[acorn] 1`] = `
+"Unexpected character '@' (1:20)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |
+Cause: Unexpected character '@' (1:19)"
+`;
+
+exports[`super-class.js format[espree] 1`] = `
+"Unexpected character '@' (1:20)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |
+Cause: Unexpected character '@'"
+`;
+
+exports[`super-class.js format[flow] 1`] = `
+"Unexpected token \`@\` (1:20)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |"
+`;
+
+exports[`super-class.js format[hermes] 1`] = `
+"unrecognized character '@' (1:19)
+> 1 | class Foo extends (@deco class Foo {}){}
+ | ^
+ 2 |
+ 3 | class Foo extends (@deco class {}){}
+ 4 |
+Cause: unrecognized character '@' (1:19)
+class Foo extends (@deco class Foo {}){}
+ ^"
+`;
diff --git a/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap b/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap
index 40ca86ed8..be7842f52 100644
--- a/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap
+++ b/tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap
@@ -1,29 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`dynamic-import.js [acorn] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("foo");
- | ^
- 2 |
-Cause: The only valid meta property for import is 'import.meta' (1:7)"
-`;
-
-exports[`dynamic-import.js [espree] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("foo");
- | ^
- 2 |
-Cause: The only valid meta property for import is 'import.meta'"
-`;
-
-exports[`dynamic-import.js [meriyah] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("foo");
- | ^^^^^
- 2 |
-Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
-`;
-
exports[`dynamic-import.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -38,25 +14,25 @@ import.defer("foo");
================================================================================
`;
-exports[`dynamic-import-attributes-expression.js [acorn] format 1`] = `
+exports[`dynamic-import.js format[acorn] 1`] = `
"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("x", { with: { attr: "val" } });
+> 1 | import.defer("foo");
| ^
2 |
Cause: The only valid meta property for import is 'import.meta' (1:7)"
`;
-exports[`dynamic-import-attributes-expression.js [espree] format 1`] = `
+exports[`dynamic-import.js format[espree] 1`] = `
"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("x", { with: { attr: "val" } });
+> 1 | import.defer("foo");
| ^
2 |
Cause: The only valid meta property for import is 'import.meta'"
`;
-exports[`dynamic-import-attributes-expression.js [meriyah] format 1`] = `
+exports[`dynamic-import.js format[meriyah] 1`] = `
"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("x", { with: { attr: "val" } });
+> 1 | import.defer("foo");
| ^^^^^
2 |
Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
@@ -76,28 +52,28 @@ import.defer("x", { with: { attr: "val" } });
================================================================================
`;
-exports[`import-defer.js [acorn] format 1`] = `
-"Unexpected token (1:14)
-> 1 | import defer * as ns from "x";
- | ^
+exports[`dynamic-import-attributes-expression.js format[acorn] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.defer("x", { with: { attr: "val" } });
+ | ^
2 |
-Cause: Unexpected token (1:13)"
+Cause: The only valid meta property for import is 'import.meta' (1:7)"
`;
-exports[`import-defer.js [espree] format 1`] = `
-"Unexpected token * (1:14)
-> 1 | import defer * as ns from "x";
- | ^
+exports[`dynamic-import-attributes-expression.js format[espree] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.defer("x", { with: { attr: "val" } });
+ | ^
2 |
-Cause: Unexpected token *"
+Cause: The only valid meta property for import is 'import.meta'"
`;
-exports[`import-defer.js [meriyah] format 1`] = `
-"Expected 'from' (1:14)
-> 1 | import defer * as ns from "x";
- | ^
+exports[`dynamic-import-attributes-expression.js format[meriyah] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.defer("x", { with: { attr: "val" } });
+ | ^^^^^
2 |
-Cause: [1:13-1:14]: Expected 'from'"
+Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
`;
exports[`import-defer.js format 1`] = `
@@ -114,25 +90,25 @@ import defer * as ns from "x";
================================================================================
`;
-exports[`import-defer-attributes-declaration.js [acorn] format 1`] = `
+exports[`import-defer.js format[acorn] 1`] = `
"Unexpected token (1:14)
-> 1 | import defer * as ns from "x" with { attr: "val" };
+> 1 | import defer * as ns from "x";
| ^
2 |
Cause: Unexpected token (1:13)"
`;
-exports[`import-defer-attributes-declaration.js [espree] format 1`] = `
+exports[`import-defer.js format[espree] 1`] = `
"Unexpected token * (1:14)
-> 1 | import defer * as ns from "x" with { attr: "val" };
+> 1 | import defer * as ns from "x";
| ^
2 |
Cause: Unexpected token *"
`;
-exports[`import-defer-attributes-declaration.js [meriyah] format 1`] = `
+exports[`import-defer.js format[meriyah] 1`] = `
"Expected 'from' (1:14)
-> 1 | import defer * as ns from "x" with { attr: "val" };
+> 1 | import defer * as ns from "x";
| ^
2 |
Cause: [1:13-1:14]: Expected 'from'"
@@ -152,7 +128,31 @@ import defer * as ns from "x" with { attr: "val" };
================================================================================
`;
-exports[`no-default.js [__babel_estree] format 1`] = `
+exports[`import-defer-attributes-declaration.js format[acorn] 1`] = `
+"Unexpected token (1:14)
+> 1 | import defer * as ns from "x" with { attr: "val" };
+ | ^
+ 2 |
+Cause: Unexpected token (1:13)"
+`;
+
+exports[`import-defer-attributes-declaration.js format[espree] 1`] = `
+"Unexpected token * (1:14)
+> 1 | import defer * as ns from "x" with { attr: "val" };
+ | ^
+ 2 |
+Cause: Unexpected token *"
+`;
+
+exports[`import-defer-attributes-declaration.js format[meriyah] 1`] = `
+"Expected 'from' (1:14)
+> 1 | import defer * as ns from "x" with { attr: "val" };
+ | ^
+ 2 |
+Cause: [1:13-1:14]: Expected 'from'"
+`;
+
+exports[`no-default.js format[__babel_estree] 1`] = `
"Only \`import defer * as x from "./module"\` is valid. (1:14)
> 1 | import defer x from "x";
| ^
@@ -160,7 +160,7 @@ exports[`no-default.js [__babel_estree] format 1`] = `
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
`;
-exports[`no-default.js [acorn] format 1`] = `
+exports[`no-default.js format[acorn] 1`] = `
"Unexpected token (1:14)
> 1 | import defer x from "x";
| ^
@@ -168,7 +168,7 @@ exports[`no-default.js [acorn] format 1`] = `
Cause: Unexpected token (1:13)"
`;
-exports[`no-default.js [babel] format 1`] = `
+exports[`no-default.js format[babel] 1`] = `
"Only \`import defer * as x from "./module"\` is valid. (1:14)
> 1 | import defer x from "x";
| ^
@@ -176,7 +176,7 @@ exports[`no-default.js [babel] format 1`] = `
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
`;
-exports[`no-default.js [espree] format 1`] = `
+exports[`no-default.js format[espree] 1`] = `
"Unexpected token x (1:14)
> 1 | import defer x from "x";
| ^
@@ -184,7 +184,7 @@ exports[`no-default.js [espree] format 1`] = `
Cause: Unexpected token x"
`;
-exports[`no-default.js [meriyah] format 1`] = `
+exports[`no-default.js format[meriyah] 1`] = `
"Expected 'from' (1:14)
> 1 | import defer x from "x";
| ^
@@ -192,14 +192,14 @@ exports[`no-default.js [meriyah] format 1`] = `
Cause: [1:13-1:14]: Expected 'from'"
`;
-exports[`no-default.js [oxc] format 1`] = `
+exports[`no-default.js format[oxc] 1`] = `
"Default imports are not allowed in a deferred import. (1:8)
> 1 | import defer x from "x";
| ^^^^^
2 |"
`;
-exports[`no-named.js [__babel_estree] format 1`] = `
+exports[`no-named.js format[__babel_estree] 1`] = `
"Only \`import defer * as x from "./module"\` is valid. (1:16)
> 1 | import defer { x } from "x";
| ^
@@ -207,7 +207,7 @@ exports[`no-named.js [__babel_estree] format 1`] = `
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
`;
-exports[`no-named.js [acorn] format 1`] = `
+exports[`no-named.js format[acorn] 1`] = `
"Unexpected token (1:14)
> 1 | import defer { x } from "x";
| ^
@@ -215,7 +215,7 @@ exports[`no-named.js [acorn] format 1`] = `
Cause: Unexpected token (1:13)"
`;
-exports[`no-named.js [babel] format 1`] = `
+exports[`no-named.js format[babel] 1`] = `
"Only \`import defer * as x from "./module"\` is valid. (1:16)
> 1 | import defer { x } from "x";
| ^
@@ -223,7 +223,7 @@ exports[`no-named.js [babel] format 1`] = `
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
`;
-exports[`no-named.js [espree] format 1`] = `
+exports[`no-named.js format[espree] 1`] = `
"Unexpected token { (1:14)
> 1 | import defer { x } from "x";
| ^
@@ -231,7 +231,7 @@ exports[`no-named.js [espree] format 1`] = `
Cause: Unexpected token {"
`;
-exports[`no-named.js [meriyah] format 1`] = `
+exports[`no-named.js format[meriyah] 1`] = `
"Expected 'from' (1:14)
> 1 | import defer { x } from "x";
| ^
@@ -239,7 +239,7 @@ exports[`no-named.js [meriyah] format 1`] = `
Cause: [1:13-1:14]: Expected 'from'"
`;
-exports[`no-named.js [oxc] format 1`] = `
+exports[`no-named.js format[oxc] 1`] = `
"Named imports are not allowed in a deferred import. (1:8)
> 1 | import defer { x } from "x";
| ^^^^^
diff --git a/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap b/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap
index 8ca331913..0ef775538 100644
--- a/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap
+++ b/tests/format/js/destructuring-private-fields/__snapshots__/format.test.js.snap
@@ -1,48 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`arrow-params.js [acorn] format 1`] = `
-"Unexpected token (3:11)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = ({ #x: x }) => {}
- | ^
- 4 | }
- 5 |
-Cause: Unexpected token (3:10)"
-`;
-
-exports[`arrow-params.js [espree] format 1`] = `
-"Unexpected token #x (3:11)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = ({ #x: x }) => {}
- | ^
- 4 | }
- 5 |
-Cause: Unexpected token #x"
-`;
-
-exports[`arrow-params.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (3:11)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = ({ #x: x }) => {}
- | ^
- 4 | }
- 5 |
-Cause: [3:10-3:11]: Unexpected token: 'PrivateField'"
-`;
-
-exports[`arrow-params.js [oxc] format 1`] = `
-"Unexpected token (3:11)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = ({ #x: x }) => {}
- | ^^
- 4 | }
- 5 |"
-`;
-
exports[`arrow-params.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-flow", "babel-ts"]
@@ -63,51 +20,47 @@ class C {
================================================================================
`;
-exports[`assignment.js [acorn] format 1`] = `
-"Unexpected token (5:8)
- 3 | m() {
- 4 | let x;
-> 5 | ({ #x: x } = this);
- | ^
- 6 | }
- 7 | }
- 8 |
-Cause: Unexpected token (5:7)"
+exports[`arrow-params.js format[acorn] 1`] = `
+"Unexpected token (3:11)
+ 1 | class C {
+ 2 | #x = 1;
+> 3 | #p = ({ #x: x }) => {}
+ | ^
+ 4 | }
+ 5 |
+Cause: Unexpected token (3:10)"
`;
-exports[`assignment.js [espree] format 1`] = `
-"Unexpected token #x (5:8)
- 3 | m() {
- 4 | let x;
-> 5 | ({ #x: x } = this);
- | ^
- 6 | }
- 7 | }
- 8 |
+exports[`arrow-params.js format[espree] 1`] = `
+"Unexpected token #x (3:11)
+ 1 | class C {
+ 2 | #x = 1;
+> 3 | #p = ({ #x: x }) => {}
+ | ^
+ 4 | }
+ 5 |
Cause: Unexpected token #x"
`;
-exports[`assignment.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (5:8)
- 3 | m() {
- 4 | let x;
-> 5 | ({ #x: x } = this);
- | ^
- 6 | }
- 7 | }
- 8 |
-Cause: [5:7-5:8]: Unexpected token: 'PrivateField'"
+exports[`arrow-params.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (3:11)
+ 1 | class C {
+ 2 | #x = 1;
+> 3 | #p = ({ #x: x }) => {}
+ | ^
+ 4 | }
+ 5 |
+Cause: [3:10-3:11]: Unexpected token: 'PrivateField'"
`;
-exports[`assignment.js [oxc] format 1`] = `
-"Unexpected token (5:8)
- 3 | m() {
- 4 | let x;
-> 5 | ({ #x: x } = this);
- | ^^
- 6 | }
- 7 | }
- 8 |"
+exports[`arrow-params.js format[oxc] 1`] = `
+"Unexpected token (3:11)
+ 1 | class C {
+ 2 | #x = 1;
+> 3 | #p = ({ #x: x }) => {}
+ | ^^
+ 4 | }
+ 5 |"
`;
exports[`assignment.js format 1`] = `
@@ -136,47 +89,51 @@ class C {
================================================================================
`;
-exports[`async-arrow-params.js [acorn] format 1`] = `
-"Unexpected token (3:17)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = async ({ #x: x }) => {}
- | ^
- 4 | }
- 5 |
-Cause: Unexpected token (3:16)"
+exports[`assignment.js format[acorn] 1`] = `
+"Unexpected token (5:8)
+ 3 | m() {
+ 4 | let x;
+> 5 | ({ #x: x } = this);
+ | ^
+ 6 | }
+ 7 | }
+ 8 |
+Cause: Unexpected token (5:7)"
`;
-exports[`async-arrow-params.js [espree] format 1`] = `
-"Unexpected token #x (3:17)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = async ({ #x: x }) => {}
- | ^
- 4 | }
- 5 |
+exports[`assignment.js format[espree] 1`] = `
+"Unexpected token #x (5:8)
+ 3 | m() {
+ 4 | let x;
+> 5 | ({ #x: x } = this);
+ | ^
+ 6 | }
+ 7 | }
+ 8 |
Cause: Unexpected token #x"
`;
-exports[`async-arrow-params.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (3:17)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = async ({ #x: x }) => {}
- | ^
- 4 | }
- 5 |
-Cause: [3:16-3:17]: Unexpected token: 'PrivateField'"
+exports[`assignment.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (5:8)
+ 3 | m() {
+ 4 | let x;
+> 5 | ({ #x: x } = this);
+ | ^
+ 6 | }
+ 7 | }
+ 8 |
+Cause: [5:7-5:8]: Unexpected token: 'PrivateField'"
`;
-exports[`async-arrow-params.js [oxc] format 1`] = `
-"Unexpected token (3:17)
- 1 | class C {
- 2 | #x = 1;
-> 3 | #p = async ({ #x: x }) => {}
- | ^^
- 4 | }
- 5 |"
+exports[`assignment.js format[oxc] 1`] = `
+"Unexpected token (5:8)
+ 3 | m() {
+ 4 | let x;
+> 5 | ({ #x: x } = this);
+ | ^^
+ 6 | }
+ 7 | }
+ 8 |"
`;
exports[`async-arrow-params.js format 1`] = `
@@ -199,51 +156,47 @@ class C {
================================================================================
`;
-exports[`bindings.js [acorn] format 1`] = `
-"Unexpected token (4:12)
+exports[`async-arrow-params.js format[acorn] 1`] = `
+"Unexpected token (3:17)
+ 1 | class C {
2 | #x = 1;
- 3 | m() {
-> 4 | const {#x: x} = this;
- | ^
- 5 | }
- 6 | }
- 7 |
-Cause: Unexpected token (4:11)"
+> 3 | #p = async ({ #x: x }) => {}
+ | ^
+ 4 | }
+ 5 |
+Cause: Unexpected token (3:16)"
`;
-exports[`bindings.js [espree] format 1`] = `
-"Unexpected token #x (4:12)
+exports[`async-arrow-params.js format[espree] 1`] = `
+"Unexpected token #x (3:17)
+ 1 | class C {
2 | #x = 1;
- 3 | m() {
-> 4 | const {#x: x} = this;
- | ^
- 5 | }
- 6 | }
- 7 |
+> 3 | #p = async ({ #x: x }) => {}
+ | ^
+ 4 | }
+ 5 |
Cause: Unexpected token #x"
`;
-exports[`bindings.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (4:12)
+exports[`async-arrow-params.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (3:17)
+ 1 | class C {
2 | #x = 1;
- 3 | m() {
-> 4 | const {#x: x} = this;
- | ^
- 5 | }
- 6 | }
- 7 |
-Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
+> 3 | #p = async ({ #x: x }) => {}
+ | ^
+ 4 | }
+ 5 |
+Cause: [3:16-3:17]: Unexpected token: 'PrivateField'"
`;
-exports[`bindings.js [oxc] format 1`] = `
-"Unexpected token (4:12)
+exports[`async-arrow-params.js format[oxc] 1`] = `
+"Unexpected token (3:17)
+ 1 | class C {
2 | #x = 1;
- 3 | m() {
-> 4 | const {#x: x} = this;
- | ^^
- 5 | }
- 6 | }
- 7 |"
+> 3 | #p = async ({ #x: x }) => {}
+ | ^^
+ 4 | }
+ 5 |"
`;
exports[`bindings.js format 1`] = `
@@ -270,51 +223,51 @@ class C {
================================================================================
`;
-exports[`for-lhs.js [acorn] format 1`] = `
-"Unexpected token (5:11)
+exports[`bindings.js format[acorn] 1`] = `
+"Unexpected token (4:12)
+ 2 | #x = 1;
3 | m() {
- 4 | let x;
-> 5 | for ({#x: x} of [this]);
- | ^
- 6 | }
- 7 | }
- 8 |
-Cause: Unexpected token (5:10)"
+> 4 | const {#x: x} = this;
+ | ^
+ 5 | }
+ 6 | }
+ 7 |
+Cause: Unexpected token (4:11)"
`;
-exports[`for-lhs.js [espree] format 1`] = `
-"Unexpected token #x (5:11)
+exports[`bindings.js format[espree] 1`] = `
+"Unexpected token #x (4:12)
+ 2 | #x = 1;
3 | m() {
- 4 | let x;
-> 5 | for ({#x: x} of [this]);
- | ^
- 6 | }
- 7 | }
- 8 |
+> 4 | const {#x: x} = this;
+ | ^
+ 5 | }
+ 6 | }
+ 7 |
Cause: Unexpected token #x"
`;
-exports[`for-lhs.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (5:11)
+exports[`bindings.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (4:12)
+ 2 | #x = 1;
3 | m() {
- 4 | let x;
-> 5 | for ({#x: x} of [this]);
- | ^
- 6 | }
- 7 | }
- 8 |
-Cause: [5:10-5:11]: Unexpected token: 'PrivateField'"
+> 4 | const {#x: x} = this;
+ | ^
+ 5 | }
+ 6 | }
+ 7 |
+Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
`;
-exports[`for-lhs.js [oxc] format 1`] = `
-"Unexpected token (5:11)
+exports[`bindings.js format[oxc] 1`] = `
+"Unexpected token (4:12)
+ 2 | #x = 1;
3 | m() {
- 4 | let x;
-> 5 | for ({#x: x} of [this]);
- | ^^
- 6 | }
- 7 | }
- 8 |"
+> 4 | const {#x: x} = this;
+ | ^^
+ 5 | }
+ 6 | }
+ 7 |"
`;
exports[`for-lhs.js format 1`] = `
@@ -343,51 +296,51 @@ class C {
================================================================================
`;
-exports[`nested-bindings.js [acorn] format 1`] = `
-"Unexpected token (4:17)
- 2 | #x = 1;
+exports[`for-lhs.js format[acorn] 1`] = `
+"Unexpected token (5:11)
3 | m() {
-> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
- | ^
- 5 | }
- 6 | }
- 7 |
-Cause: Unexpected token (4:16)"
+ 4 | let x;
+> 5 | for ({#x: x} of [this]);
+ | ^
+ 6 | }
+ 7 | }
+ 8 |
+Cause: Unexpected token (5:10)"
`;
-exports[`nested-bindings.js [espree] format 1`] = `
-"Unexpected token #x (4:17)
- 2 | #x = 1;
+exports[`for-lhs.js format[espree] 1`] = `
+"Unexpected token #x (5:11)
3 | m() {
-> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
- | ^
- 5 | }
- 6 | }
- 7 |
+ 4 | let x;
+> 5 | for ({#x: x} of [this]);
+ | ^
+ 6 | }
+ 7 | }
+ 8 |
Cause: Unexpected token #x"
`;
-exports[`nested-bindings.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (4:17)
- 2 | #x = 1;
+exports[`for-lhs.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (5:11)
3 | m() {
-> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
- | ^
- 5 | }
- 6 | }
- 7 |
-Cause: [4:16-4:17]: Unexpected token: 'PrivateField'"
+ 4 | let x;
+> 5 | for ({#x: x} of [this]);
+ | ^
+ 6 | }
+ 7 | }
+ 8 |
+Cause: [5:10-5:11]: Unexpected token: 'PrivateField'"
`;
-exports[`nested-bindings.js [oxc] format 1`] = `
-"Unexpected token (4:17)
- 2 | #x = 1;
+exports[`for-lhs.js format[oxc] 1`] = `
+"Unexpected token (5:11)
3 | m() {
-> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
- | ^^
- 5 | }
- 6 | }
- 7 |"
+ 4 | let x;
+> 5 | for ({#x: x} of [this]);
+ | ^^
+ 6 | }
+ 7 | }
+ 8 |"
`;
exports[`nested-bindings.js format 1`] = `
@@ -419,48 +372,48 @@ class C {
================================================================================
`;
-exports[`valid-multiple-bindings.js [acorn] format 1`] = `
-"Unexpected token (4:12)
+exports[`nested-bindings.js format[acorn] 1`] = `
+"Unexpected token (4:17)
2 | #x = 1;
3 | m() {
-> 4 | const {#x: x1, #x: x2 = x1 } = this;
- | ^
+> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
+ | ^
5 | }
6 | }
7 |
-Cause: Unexpected token (4:11)"
+Cause: Unexpected token (4:16)"
`;
-exports[`valid-multiple-bindings.js [espree] format 1`] = `
-"Unexpected token #x (4:12)
+exports[`nested-bindings.js format[espree] 1`] = `
+"Unexpected token #x (4:17)
2 | #x = 1;
3 | m() {
-> 4 | const {#x: x1, #x: x2 = x1 } = this;
- | ^
+> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
+ | ^
5 | }
6 | }
7 |
Cause: Unexpected token #x"
`;
-exports[`valid-multiple-bindings.js [meriyah] format 1`] = `
-"Unexpected token: 'PrivateField' (4:12)
+exports[`nested-bindings.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (4:17)
2 | #x = 1;
3 | m() {
-> 4 | const {#x: x1, #x: x2 = x1 } = this;
- | ^
+> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
+ | ^
5 | }
6 | }
7 |
-Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
+Cause: [4:16-4:17]: Unexpected token: 'PrivateField'"
`;
-exports[`valid-multiple-bindings.js [oxc] format 1`] = `
-"Unexpected token (4:12)
+exports[`nested-bindings.js format[oxc] 1`] = `
+"Unexpected token (4:17)
2 | #x = 1;
3 | m() {
-> 4 | const {#x: x1, #x: x2 = x1 } = this;
- | ^^
+> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
+ | ^^
5 | }
6 | }
7 |"
@@ -489,3 +442,50 @@ class C {
================================================================================
`;
+
+exports[`valid-multiple-bindings.js format[acorn] 1`] = `
+"Unexpected token (4:12)
+ 2 | #x = 1;
+ 3 | m() {
+> 4 | const {#x: x1, #x: x2 = x1 } = this;
+ | ^
+ 5 | }
+ 6 | }
+ 7 |
+Cause: Unexpected token (4:11)"
+`;
+
+exports[`valid-multiple-bindings.js format[espree] 1`] = `
+"Unexpected token #x (4:12)
+ 2 | #x = 1;
+ 3 | m() {
+> 4 | const {#x: x1, #x: x2 = x1 } = this;
+ | ^
+ 5 | }
+ 6 | }
+ 7 |
+Cause: Unexpected token #x"
+`;
+
+exports[`valid-multiple-bindings.js format[meriyah] 1`] = `
+"Unexpected token: 'PrivateField' (4:12)
+ 2 | #x = 1;
+ 3 | m() {
+> 4 | const {#x: x1, #x: x2 = x1 } = this;
+ | ^
+ 5 | }
+ 6 | }
+ 7 |
+Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
+`;
+
+exports[`valid-multiple-bindings.js format[oxc] 1`] = `
+"Unexpected token (4:12)
+ 2 | #x = 1;
+ 3 | m() {
+> 4 | const {#x: x1, #x: x2 = x1 } = this;
+ | ^^
+ 5 | }
+ 6 | }
+ 7 |"
+`;
diff --git a/tests/format/js/destructuring/__snapshots__/format.test.js.snap b/tests/format/js/destructuring/__snapshots__/format.test.js.snap
index 0f3b45c4c..460ea62c8 100644
--- a/tests/format/js/destructuring/__snapshots__/format.test.js.snap
+++ b/tests/format/js/destructuring/__snapshots__/format.test.js.snap
@@ -1,17 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`destructuring.js [hermes] format 1`] = `
-"invalid assignment left-hand side (2:0)
- 1 | const [one, two = null, three = null] = arr;
-> 2 | a = ([s=1,]) => 1
- 3 | const { children, ...props } = this.props
- 4 |
- 5 | const { user: { firstName, lastName } } = this.props;
-Cause: invalid assignment left-hand side (2:0)
-a = ([s=1,]) => 1
-^"
-`;
-
exports[`destructuring.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -129,6 +117,18 @@ class A {
================================================================================
`;
+exports[`destructuring.js format[hermes] 1`] = `
+"invalid assignment left-hand side (2:0)
+ 1 | const [one, two = null, three = null] = arr;
+> 2 | a = ([s=1,]) => 1
+ 3 | const { children, ...props } = this.props
+ 4 |
+ 5 | const { user: { firstName, lastName } } = this.props;
+Cause: invalid assignment left-hand side (2:0)
+a = ([s=1,]) => 1
+^"
+`;
+
exports[`issue-5988.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
diff --git a/tests/format/js/discard-binding/__snapshots__/format.test.js.snap b/tests/format/js/discard-binding/__snapshots__/format.test.js.snap
index 8c372d4db..855eca0b4 100644
--- a/tests/format/js/discard-binding/__snapshots__/format.test.js.snap
+++ b/tests/format/js/discard-binding/__snapshots__/format.test.js.snap
@@ -1,100 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`array-pattern.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (3:12)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding
-Cause: Unexpected keyword 'void' (3:11)"
-`;
-
-exports[`array-pattern.js [espree] format 1`] = `
-"Unexpected keyword 'void' (3:12)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding
-Cause: Unexpected keyword 'void'"
-`;
-
-exports[`array-pattern.js [flow] format 1`] = `
-"Unexpected reserved word (3:12)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^^^^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding"
-`;
-
-exports[`array-pattern.js [hermes] format 1`] = `
-"identifier, '{' or '[' expected in binding pattern (3:11)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding
-Cause: identifier, '{' or '[' expected in binding pattern (3:11)
- const [, void, ] = value;
- ^"
-`;
-
-exports[`array-pattern.js [meriyah] format 1`] = `
-"Unexpected token: ',' (3:16)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding
-Cause: [3:15-3:16]: Unexpected token: ','"
-`;
-
-exports[`array-pattern.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:12)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^^^^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding"
-`;
-
-exports[`array-pattern.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:12)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^^^^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding"
-`;
-
-exports[`array-pattern.js [typescript] format 1`] = `
-"Array element destructuring pattern expected. (3:12)
- 1 | {
- 2 | // destructuring binding
-> 3 | const [, void, ] = value;
- | ^
- 4 | }
- 5 | {
- 6 | // for-of destructuring binding
-Cause: Array element destructuring pattern expected."
-`;
-
exports[`array-pattern.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -180,82 +85,98 @@ printWidth: 80
================================================================================
`;
-exports[`basic.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (1:8)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |
-Cause: Unexpected keyword 'void' (1:7)"
+exports[`array-pattern.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (3:12)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: Unexpected keyword 'void' (3:11)"
`;
-exports[`basic.js [espree] format 1`] = `
-"Unexpected keyword 'void' (1:8)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |
+exports[`array-pattern.js format[espree] 1`] = `
+"Unexpected keyword 'void' (3:12)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
Cause: Unexpected keyword 'void'"
`;
-exports[`basic.js [flow] format 1`] = `
-"Unexpected reserved word (1:8)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^^^^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |"
+exports[`array-pattern.js format[flow] 1`] = `
+"Unexpected reserved word (3:12)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding"
`;
-exports[`basic.js [hermes] format 1`] = `
-"identifier, '{' or '[' expected in binding pattern (1:7)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |
-Cause: identifier, '{' or '[' expected in binding pattern (1:7)
-const [void] = [,void] = [void,] = [];
- ^"
+exports[`array-pattern.js format[hermes] 1`] = `
+"identifier, '{' or '[' expected in binding pattern (3:11)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: identifier, '{' or '[' expected in binding pattern (3:11)
+ const [, void, ] = value;
+ ^"
`;
-exports[`basic.js [meriyah] format 1`] = `
-"Unexpected token: ']' (1:12)
-> 1 | const [void] = [,void] = [void,] = [];
+exports[`array-pattern.js format[meriyah] 1`] = `
+"Unexpected token: ',' (3:16)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: [3:15-3:16]: Unexpected token: ','"
+`;
+
+exports[`array-pattern.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:12)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding"
+`;
+
+exports[`array-pattern.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:12)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding"
+`;
+
+exports[`array-pattern.js format[typescript] 1`] = `
+"Array element destructuring pattern expected. (3:12)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const [, void, ] = value;
| ^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |
-Cause: [1:11-1:12]: Unexpected token: ']'"
-`;
-
-exports[`basic.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:8)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^^^^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |"
-`;
-
-exports[`basic.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:8)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^^^^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |"
-`;
-
-exports[`basic.js [typescript] format 1`] = `
-"Array element destructuring pattern expected. (1:8)
-> 1 | const [void] = [,void] = [void,] = [];
- | ^
- 2 |
- 3 | function f(void, { p: void }, [ void ]) {}
- 4 |
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
Cause: Array element destructuring pattern expected."
`;
@@ -285,67 +206,83 @@ async (void, { p: void }, [void]) => {};
================================================================================
`;
-exports[`discard-binding-arrow-params.js [acorn] format 1`] = `
-"Unexpected token (1:6)
-> 1 | (void) => {}
- | ^
+exports[`basic.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (1:8)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^
2 |
-Cause: Unexpected token (1:5)"
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |
+Cause: Unexpected keyword 'void' (1:7)"
`;
-exports[`discard-binding-arrow-params.js [espree] format 1`] = `
-"Unexpected token ) (1:6)
-> 1 | (void) => {}
- | ^
+exports[`basic.js format[espree] 1`] = `
+"Unexpected keyword 'void' (1:8)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^
2 |
-Cause: Unexpected token )"
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |
+Cause: Unexpected keyword 'void'"
`;
-exports[`discard-binding-arrow-params.js [flow] format 1`] = `
-"Unexpected token \`)\` (1:6)
-> 1 | (void) => {}
- | ^
- 2 |"
-`;
-
-exports[`discard-binding-arrow-params.js [hermes] format 1`] = `
-"invalid expression (1:5)
-> 1 | (void) => {}
- | ^
+exports[`basic.js format[flow] 1`] = `
+"Unexpected reserved word (1:8)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^^^^
2 |
-Cause: invalid expression (1:5)
-(void) => {}
- ^"
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |"
`;
-exports[`discard-binding-arrow-params.js [meriyah] format 1`] = `
-"Unexpected token: ')' (1:6)
-> 1 | (void) => {}
- | ^
+exports[`basic.js format[hermes] 1`] = `
+"identifier, '{' or '[' expected in binding pattern (1:7)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^
2 |
-Cause: [1:5-1:6]: Unexpected token: ')'"
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |
+Cause: identifier, '{' or '[' expected in binding pattern (1:7)
+const [void] = [,void] = [void,] = [];
+ ^"
`;
-exports[`discard-binding-arrow-params.js [oxc] format 1`] = `
-"Unexpected token (1:6)
-> 1 | (void) => {}
- | ^
- 2 |"
-`;
-
-exports[`discard-binding-arrow-params.js [oxc-ts] format 1`] = `
-"Unexpected token (1:6)
-> 1 | (void) => {}
- | ^
- 2 |"
-`;
-
-exports[`discard-binding-arrow-params.js [typescript] format 1`] = `
-"Expression expected. (1:6)
-> 1 | (void) => {}
- | ^
+exports[`basic.js format[meriyah] 1`] = `
+"Unexpected token: ']' (1:12)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^
2 |
-Cause: Expression expected."
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |
+Cause: [1:11-1:12]: Unexpected token: ']'"
+`;
+
+exports[`basic.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:8)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^^^^
+ 2 |
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |"
+`;
+
+exports[`basic.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:8)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^^^^
+ 2 |
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |"
+`;
+
+exports[`basic.js format[typescript] 1`] = `
+"Array element destructuring pattern expected. (1:8)
+> 1 | const [void] = [,void] = [void,] = [];
+ | ^
+ 2 |
+ 3 | function f(void, { p: void }, [ void ]) {}
+ 4 |
+Cause: Array element destructuring pattern expected."
`;
exports[`discard-binding-arrow-params.js format 1`] = `
@@ -362,65 +299,65 @@ printWidth: 80
================================================================================
`;
-exports[`discard-binding-assignment.js [acorn] format 1`] = `
-"Unexpected token (1:7)
-> 1 | ([void] = []);
- | ^
- 2 |
-Cause: Unexpected token (1:6)"
-`;
-
-exports[`discard-binding-assignment.js [espree] format 1`] = `
-"Unexpected token ] (1:7)
-> 1 | ([void] = []);
- | ^
- 2 |
-Cause: Unexpected token ]"
-`;
-
-exports[`discard-binding-assignment.js [flow] format 1`] = `
-"Unexpected token \`]\` (1:7)
-> 1 | ([void] = []);
- | ^
- 2 |"
-`;
-
-exports[`discard-binding-assignment.js [hermes] format 1`] = `
-"invalid expression (1:6)
-> 1 | ([void] = []);
+exports[`discard-binding-arrow-params.js format[acorn] 1`] = `
+"Unexpected token (1:6)
+> 1 | (void) => {}
| ^
2 |
-Cause: invalid expression (1:6)
-([void] = []);
- ^"
+Cause: Unexpected token (1:5)"
`;
-exports[`discard-binding-assignment.js [meriyah] format 1`] = `
-"Unexpected token: ']' (1:7)
-> 1 | ([void] = []);
- | ^
+exports[`discard-binding-arrow-params.js format[espree] 1`] = `
+"Unexpected token ) (1:6)
+> 1 | (void) => {}
+ | ^
2 |
-Cause: [1:6-1:7]: Unexpected token: ']'"
+Cause: Unexpected token )"
`;
-exports[`discard-binding-assignment.js [oxc] format 1`] = `
-"Unexpected token (1:7)
-> 1 | ([void] = []);
- | ^
+exports[`discard-binding-arrow-params.js format[flow] 1`] = `
+"Unexpected token \`)\` (1:6)
+> 1 | (void) => {}
+ | ^
2 |"
`;
-exports[`discard-binding-assignment.js [oxc-ts] format 1`] = `
-"Unexpected token (1:7)
-> 1 | ([void] = []);
- | ^
+exports[`discard-binding-arrow-params.js format[hermes] 1`] = `
+"invalid expression (1:5)
+> 1 | (void) => {}
+ | ^
+ 2 |
+Cause: invalid expression (1:5)
+(void) => {}
+ ^"
+`;
+
+exports[`discard-binding-arrow-params.js format[meriyah] 1`] = `
+"Unexpected token: ')' (1:6)
+> 1 | (void) => {}
+ | ^
+ 2 |
+Cause: [1:5-1:6]: Unexpected token: ')'"
+`;
+
+exports[`discard-binding-arrow-params.js format[oxc] 1`] = `
+"Unexpected token (1:6)
+> 1 | (void) => {}
+ | ^
2 |"
`;
-exports[`discard-binding-assignment.js [typescript] format 1`] = `
-"Expression expected. (1:7)
-> 1 | ([void] = []);
- | ^
+exports[`discard-binding-arrow-params.js format[oxc-ts] 1`] = `
+"Unexpected token (1:6)
+> 1 | (void) => {}
+ | ^
+ 2 |"
+`;
+
+exports[`discard-binding-arrow-params.js format[typescript] 1`] = `
+"Expression expected. (1:6)
+> 1 | (void) => {}
+ | ^
2 |
Cause: Expression expected."
`;
@@ -439,65 +376,65 @@ printWidth: 80
================================================================================
`;
-exports[`discard-binding-async-arrow-params.js [acorn] format 1`] = `
-"Unexpected token (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[acorn] 1`] = `
+"Unexpected token (1:7)
+> 1 | ([void] = []);
+ | ^
2 |
-Cause: Unexpected token (1:11)"
+Cause: Unexpected token (1:6)"
`;
-exports[`discard-binding-async-arrow-params.js [espree] format 1`] = `
-"Unexpected token ) (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[espree] 1`] = `
+"Unexpected token ] (1:7)
+> 1 | ([void] = []);
+ | ^
2 |
-Cause: Unexpected token )"
+Cause: Unexpected token ]"
`;
-exports[`discard-binding-async-arrow-params.js [flow] format 1`] = `
-"Unexpected token \`)\` (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[flow] 1`] = `
+"Unexpected token \`]\` (1:7)
+> 1 | ([void] = []);
+ | ^
2 |"
`;
-exports[`discard-binding-async-arrow-params.js [hermes] format 1`] = `
-"invalid expression (1:11)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[hermes] 1`] = `
+"invalid expression (1:6)
+> 1 | ([void] = []);
+ | ^
2 |
-Cause: invalid expression (1:11)
-async (void) => {}
- ^"
+Cause: invalid expression (1:6)
+([void] = []);
+ ^"
`;
-exports[`discard-binding-async-arrow-params.js [meriyah] format 1`] = `
-"Unexpected token: ')' (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[meriyah] 1`] = `
+"Unexpected token: ']' (1:7)
+> 1 | ([void] = []);
+ | ^
2 |
-Cause: [1:11-1:12]: Unexpected token: ')'"
+Cause: [1:6-1:7]: Unexpected token: ']'"
`;
-exports[`discard-binding-async-arrow-params.js [oxc] format 1`] = `
-"Unexpected token (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[oxc] 1`] = `
+"Unexpected token (1:7)
+> 1 | ([void] = []);
+ | ^
2 |"
`;
-exports[`discard-binding-async-arrow-params.js [oxc-ts] format 1`] = `
-"Unexpected token (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[oxc-ts] 1`] = `
+"Unexpected token (1:7)
+> 1 | ([void] = []);
+ | ^
2 |"
`;
-exports[`discard-binding-async-arrow-params.js [typescript] format 1`] = `
-"Expression expected. (1:12)
-> 1 | async (void) => {}
- | ^
+exports[`discard-binding-assignment.js format[typescript] 1`] = `
+"Expression expected. (1:7)
+> 1 | ([void] = []);
+ | ^
2 |
Cause: Expression expected."
`;
@@ -516,67 +453,67 @@ async (void) => {};
================================================================================
`;
-exports[`discard-binding-bindings.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (1:12)
-> 1 | const { p: void } = {};
+exports[`discard-binding-async-arrow-params.js format[acorn] 1`] = `
+"Unexpected token (1:12)
+> 1 | async (void) => {}
| ^
2 |
-Cause: Unexpected keyword 'void' (1:11)"
+Cause: Unexpected token (1:11)"
`;
-exports[`discard-binding-bindings.js [espree] format 1`] = `
-"Unexpected keyword 'void' (1:12)
-> 1 | const { p: void } = {};
+exports[`discard-binding-async-arrow-params.js format[espree] 1`] = `
+"Unexpected token ) (1:12)
+> 1 | async (void) => {}
| ^
2 |
-Cause: Unexpected keyword 'void'"
+Cause: Unexpected token )"
`;
-exports[`discard-binding-bindings.js [flow] format 1`] = `
-"Unexpected reserved word (1:12)
-> 1 | const { p: void } = {};
- | ^^^^
+exports[`discard-binding-async-arrow-params.js format[flow] 1`] = `
+"Unexpected token \`)\` (1:12)
+> 1 | async (void) => {}
+ | ^
2 |"
`;
-exports[`discard-binding-bindings.js [hermes] format 1`] = `
-"identifier, '{' or '[' expected in binding pattern (1:11)
-> 1 | const { p: void } = {};
+exports[`discard-binding-async-arrow-params.js format[hermes] 1`] = `
+"invalid expression (1:11)
+> 1 | async (void) => {}
| ^
2 |
-Cause: identifier, '{' or '[' expected in binding pattern (1:11)
-const { p: void } = {};
+Cause: invalid expression (1:11)
+async (void) => {}
^"
`;
-exports[`discard-binding-bindings.js [meriyah] format 1`] = `
-"Unexpected token: '}' (1:17)
-> 1 | const { p: void } = {};
- | ^
- 2 |
-Cause: [1:16-1:17]: Unexpected token: '}'"
-`;
-
-exports[`discard-binding-bindings.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:12)
-> 1 | const { p: void } = {};
- | ^^^^
- 2 |"
-`;
-
-exports[`discard-binding-bindings.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:12)
-> 1 | const { p: void } = {};
- | ^^^^
- 2 |"
-`;
-
-exports[`discard-binding-bindings.js [typescript] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:12)
-> 1 | const { p: void } = {};
+exports[`discard-binding-async-arrow-params.js format[meriyah] 1`] = `
+"Unexpected token: ')' (1:12)
+> 1 | async (void) => {}
| ^
2 |
-Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
+Cause: [1:11-1:12]: Unexpected token: ')'"
+`;
+
+exports[`discard-binding-async-arrow-params.js format[oxc] 1`] = `
+"Unexpected token (1:12)
+> 1 | async (void) => {}
+ | ^
+ 2 |"
+`;
+
+exports[`discard-binding-async-arrow-params.js format[oxc-ts] 1`] = `
+"Unexpected token (1:12)
+> 1 | async (void) => {}
+ | ^
+ 2 |"
+`;
+
+exports[`discard-binding-async-arrow-params.js format[typescript] 1`] = `
+"Expression expected. (1:12)
+> 1 | async (void) => {}
+ | ^
+ 2 |
+Cause: Expression expected."
`;
exports[`discard-binding-bindings.js format 1`] = `
@@ -593,83 +530,67 @@ const { p: void } = {};
================================================================================
`;
-exports[`discard-binding-for-await-using-binding.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^
- 3 | }
- 4 |
-Cause: Unexpected keyword 'void' (2:18)"
+exports[`discard-binding-bindings.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (1:12)
+> 1 | const { p: void } = {};
+ | ^
+ 2 |
+Cause: Unexpected keyword 'void' (1:11)"
`;
-exports[`discard-binding-for-await-using-binding.js [espree] format 1`] = `
-"Unexpected keyword 'void' (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^
- 3 | }
- 4 |
+exports[`discard-binding-bindings.js format[espree] 1`] = `
+"Unexpected keyword 'void' (1:12)
+> 1 | const { p: void } = {};
+ | ^
+ 2 |
Cause: Unexpected keyword 'void'"
`;
-exports[`discard-binding-for-await-using-binding.js [flow] format 1`] = `
-"Unexpected token \`void\`, expected the token \`;\` (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^^^^
- 3 | }
- 4 |"
+exports[`discard-binding-bindings.js format[flow] 1`] = `
+"Unexpected reserved word (1:12)
+> 1 | const { p: void } = {};
+ | ^^^^
+ 2 |"
`;
-exports[`discard-binding-for-await-using-binding.js [hermes] format 1`] = `
-"';' or 'in' expected inside 'for' (2:18)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^
- 3 | }
- 4 |
-Cause: ';' or 'in' expected inside 'for' (2:18)
- for(await using void of []);
- ~~~~~~~~~~~~~~~~^"
+exports[`discard-binding-bindings.js format[hermes] 1`] = `
+"identifier, '{' or '[' expected in binding pattern (1:11)
+> 1 | const { p: void } = {};
+ | ^
+ 2 |
+Cause: identifier, '{' or '[' expected in binding pattern (1:11)
+const { p: void } = {};
+ ^"
`;
-exports[`discard-binding-for-await-using-binding.js [meriyah] format 1`] = `
-"Expected ';' (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^^^^
- 3 | }
- 4 |
-Cause: [2:18-2:22]: Expected ';'"
+exports[`discard-binding-bindings.js format[meriyah] 1`] = `
+"Unexpected token: '}' (1:17)
+> 1 | const { p: void } = {};
+ | ^
+ 2 |
+Cause: [1:16-1:17]: Unexpected token: '}'"
`;
-exports[`discard-binding-for-await-using-binding.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^^^^
- 3 | }
- 4 |"
+exports[`discard-binding-bindings.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:12)
+> 1 | const { p: void } = {};
+ | ^^^^
+ 2 |"
`;
-exports[`discard-binding-for-await-using-binding.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^^^^
- 3 | }
- 4 |"
+exports[`discard-binding-bindings.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:12)
+> 1 | const { p: void } = {};
+ | ^^^^
+ 2 |"
`;
-exports[`discard-binding-for-await-using-binding.js [typescript] format 1`] = `
-"';' expected. (2:19)
- 1 | async () => {
-> 2 | for(await using void of []);
- | ^
- 3 | }
- 4 |
-Cause: ';' expected."
+exports[`discard-binding-bindings.js format[typescript] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:12)
+> 1 | const { p: void } = {};
+ | ^
+ 2 |
+Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
exports[`discard-binding-for-await-using-binding.js format 1`] = `
@@ -690,67 +611,83 @@ async () => {
================================================================================
`;
-exports[`discard-binding-for-bindings.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (1:16)
-> 1 | for(const { p: void } of []);
- | ^
- 2 |
-Cause: Unexpected keyword 'void' (1:15)"
+exports[`discard-binding-for-await-using-binding.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected keyword 'void' (2:18)"
`;
-exports[`discard-binding-for-bindings.js [espree] format 1`] = `
-"Unexpected keyword 'void' (1:16)
-> 1 | for(const { p: void } of []);
- | ^
- 2 |
+exports[`discard-binding-for-await-using-binding.js format[espree] 1`] = `
+"Unexpected keyword 'void' (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^
+ 3 | }
+ 4 |
Cause: Unexpected keyword 'void'"
`;
-exports[`discard-binding-for-bindings.js [flow] format 1`] = `
-"Unexpected reserved word (1:16)
-> 1 | for(const { p: void } of []);
- | ^^^^
- 2 |"
+exports[`discard-binding-for-await-using-binding.js format[flow] 1`] = `
+"Unexpected token \`void\`, expected the token \`;\` (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^^^^
+ 3 | }
+ 4 |"
`;
-exports[`discard-binding-for-bindings.js [hermes] format 1`] = `
-"identifier, '{' or '[' expected in binding pattern (1:15)
-> 1 | for(const { p: void } of []);
- | ^
- 2 |
-Cause: identifier, '{' or '[' expected in binding pattern (1:15)
-for(const { p: void } of []);
- ^"
+exports[`discard-binding-for-await-using-binding.js format[hermes] 1`] = `
+"';' or 'in' expected inside 'for' (2:18)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^
+ 3 | }
+ 4 |
+Cause: ';' or 'in' expected inside 'for' (2:18)
+ for(await using void of []);
+ ~~~~~~~~~~~~~~~~^"
`;
-exports[`discard-binding-for-bindings.js [meriyah] format 1`] = `
-"Unexpected token: '}' (1:21)
-> 1 | for(const { p: void } of []);
- | ^
- 2 |
-Cause: [1:20-1:21]: Unexpected token: '}'"
+exports[`discard-binding-for-await-using-binding.js format[meriyah] 1`] = `
+"Expected ';' (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^^^^
+ 3 | }
+ 4 |
+Cause: [2:18-2:22]: Expected ';'"
`;
-exports[`discard-binding-for-bindings.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:16)
-> 1 | for(const { p: void } of []);
- | ^^^^
- 2 |"
+exports[`discard-binding-for-await-using-binding.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^^^^
+ 3 | }
+ 4 |"
`;
-exports[`discard-binding-for-bindings.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:16)
-> 1 | for(const { p: void } of []);
- | ^^^^
- 2 |"
+exports[`discard-binding-for-await-using-binding.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^^^^
+ 3 | }
+ 4 |"
`;
-exports[`discard-binding-for-bindings.js [typescript] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (1:16)
-> 1 | for(const { p: void } of []);
- | ^
- 2 |
-Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
+exports[`discard-binding-for-await-using-binding.js format[typescript] 1`] = `
+"';' expected. (2:19)
+ 1 | async () => {
+> 2 | for(await using void of []);
+ | ^
+ 3 | }
+ 4 |
+Cause: ';' expected."
`;
exports[`discard-binding-for-bindings.js format 1`] = `
@@ -767,67 +704,67 @@ for (const { p: void } of []);
================================================================================
`;
-exports[`discard-binding-for-lhs.js [acorn] format 1`] = `
-"Unexpected token (1:15)
-> 1 | for({ p: void } of []);
- | ^
+exports[`discard-binding-for-bindings.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (1:16)
+> 1 | for(const { p: void } of []);
+ | ^
2 |
-Cause: Unexpected token (1:14)"
+Cause: Unexpected keyword 'void' (1:15)"
`;
-exports[`discard-binding-for-lhs.js [espree] format 1`] = `
-"Unexpected token } (1:15)
-> 1 | for({ p: void } of []);
- | ^
+exports[`discard-binding-for-bindings.js format[espree] 1`] = `
+"Unexpected keyword 'void' (1:16)
+> 1 | for(const { p: void } of []);
+ | ^
2 |
-Cause: Unexpected token }"
+Cause: Unexpected keyword 'void'"
`;
-exports[`discard-binding-for-lhs.js [flow] format 1`] = `
-"Unexpected token \`}\` (1:15)
-> 1 | for({ p: void } of []);
- | ^
+exports[`discard-binding-for-bindings.js format[flow] 1`] = `
+"Unexpected reserved word (1:16)
+> 1 | for(const { p: void } of []);
+ | ^^^^
2 |"
`;
-exports[`discard-binding-for-lhs.js [hermes] format 1`] = `
-"invalid expression (1:14)
-> 1 | for({ p: void } of []);
- | ^
- 2 |
-Cause: invalid expression (1:14)
-for({ p: void } of []);
- ^"
-`;
-
-exports[`discard-binding-for-lhs.js [meriyah] format 1`] = `
-"Unexpected token: '}' (1:15)
-> 1 | for({ p: void } of []);
+exports[`discard-binding-for-bindings.js format[hermes] 1`] = `
+"identifier, '{' or '[' expected in binding pattern (1:15)
+> 1 | for(const { p: void } of []);
| ^
2 |
-Cause: [1:14-1:15]: Unexpected token: '}'"
+Cause: identifier, '{' or '[' expected in binding pattern (1:15)
+for(const { p: void } of []);
+ ^"
`;
-exports[`discard-binding-for-lhs.js [oxc] format 1`] = `
-"Unexpected token (1:15)
-> 1 | for({ p: void } of []);
- | ^
+exports[`discard-binding-for-bindings.js format[meriyah] 1`] = `
+"Unexpected token: '}' (1:21)
+> 1 | for(const { p: void } of []);
+ | ^
+ 2 |
+Cause: [1:20-1:21]: Unexpected token: '}'"
+`;
+
+exports[`discard-binding-for-bindings.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:16)
+> 1 | for(const { p: void } of []);
+ | ^^^^
2 |"
`;
-exports[`discard-binding-for-lhs.js [oxc-ts] format 1`] = `
-"Unexpected token (1:15)
-> 1 | for({ p: void } of []);
- | ^
+exports[`discard-binding-for-bindings.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:16)
+> 1 | for(const { p: void } of []);
+ | ^^^^
2 |"
`;
-exports[`discard-binding-for-lhs.js [typescript] format 1`] = `
-"Expression expected. (1:15)
-> 1 | for({ p: void } of []);
- | ^
+exports[`discard-binding-for-bindings.js format[typescript] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:16)
+> 1 | for(const { p: void } of []);
+ | ^
2 |
-Cause: Expression expected."
+Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
exports[`discard-binding-for-lhs.js format 1`] = `
@@ -844,83 +781,67 @@ for ({ p: void } of []);
================================================================================
`;
-exports[`discard-binding-for-using-binding.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^
- 3 | }
- 4 |
-Cause: Unexpected keyword 'void' (2:12)"
+exports[`discard-binding-for-lhs.js format[acorn] 1`] = `
+"Unexpected token (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |
+Cause: Unexpected token (1:14)"
`;
-exports[`discard-binding-for-using-binding.js [espree] format 1`] = `
-"Unexpected keyword 'void' (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^
- 3 | }
- 4 |
-Cause: Unexpected keyword 'void'"
+exports[`discard-binding-for-lhs.js format[espree] 1`] = `
+"Unexpected token } (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |
+Cause: Unexpected token }"
`;
-exports[`discard-binding-for-using-binding.js [flow] format 1`] = `
-"Unexpected token \`void\`, expected the token \`;\` (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^^^^
- 3 | }
- 4 |"
+exports[`discard-binding-for-lhs.js format[flow] 1`] = `
+"Unexpected token \`}\` (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |"
`;
-exports[`discard-binding-for-using-binding.js [hermes] format 1`] = `
-"';' or 'in' expected inside 'for' (2:12)
- 1 | {
-> 2 | for(using void of []);
- | ^
- 3 | }
- 4 |
-Cause: ';' or 'in' expected inside 'for' (2:12)
- for(using void of []);
- ~~~~~~~~~~^"
+exports[`discard-binding-for-lhs.js format[hermes] 1`] = `
+"invalid expression (1:14)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |
+Cause: invalid expression (1:14)
+for({ p: void } of []);
+ ^"
`;
-exports[`discard-binding-for-using-binding.js [meriyah] format 1`] = `
-"Expected ';' (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^^^^
- 3 | }
- 4 |
-Cause: [2:12-2:16]: Expected ';'"
+exports[`discard-binding-for-lhs.js format[meriyah] 1`] = `
+"Unexpected token: '}' (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |
+Cause: [1:14-1:15]: Unexpected token: '}'"
`;
-exports[`discard-binding-for-using-binding.js [oxc] format 1`] = `
-"Expected \`;\` but found \`void\` (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^^^^
- 3 | }
- 4 |"
+exports[`discard-binding-for-lhs.js format[oxc] 1`] = `
+"Unexpected token (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |"
`;
-exports[`discard-binding-for-using-binding.js [oxc-ts] format 1`] = `
-"Expected \`;\` but found \`void\` (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^^^^
- 3 | }
- 4 |"
+exports[`discard-binding-for-lhs.js format[oxc-ts] 1`] = `
+"Unexpected token (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |"
`;
-exports[`discard-binding-for-using-binding.js [typescript] format 1`] = `
-"';' expected. (2:13)
- 1 | {
-> 2 | for(using void of []);
- | ^
- 3 | }
- 4 |
-Cause: ';' expected."
+exports[`discard-binding-for-lhs.js format[typescript] 1`] = `
+"Expression expected. (1:15)
+> 1 | for({ p: void } of []);
+ | ^
+ 2 |
+Cause: Expression expected."
`;
exports[`discard-binding-for-using-binding.js format 1`] = `
@@ -941,99 +862,83 @@ printWidth: 80
================================================================================
`;
-exports[`function-parameter.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (3:14)
+exports[`discard-binding-for-using-binding.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (2:13)
1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^
- 4 | }
- 5 | {
- 6 | // arrow function parameter
-Cause: Unexpected keyword 'void' (3:13)"
+> 2 | for(using void of []);
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected keyword 'void' (2:12)"
`;
-exports[`function-parameter.js [espree] format 1`] = `
-"Unexpected keyword 'void' (3:14)
+exports[`discard-binding-for-using-binding.js format[espree] 1`] = `
+"Unexpected keyword 'void' (2:13)
1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^
- 4 | }
- 5 | {
- 6 | // arrow function parameter
+> 2 | for(using void of []);
+ | ^
+ 3 | }
+ 4 |
Cause: Unexpected keyword 'void'"
`;
-exports[`function-parameter.js [flow] format 1`] = `
-"Unexpected reserved word (3:14)
+exports[`discard-binding-for-using-binding.js format[flow] 1`] = `
+"Unexpected token \`void\`, expected the token \`;\` (2:13)
1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^^^^
- 4 | }
- 5 | {
- 6 | // arrow function parameter"
+> 2 | for(using void of []);
+ | ^^^^
+ 3 | }
+ 4 |"
`;
-exports[`function-parameter.js [hermes] format 1`] = `
-"identifier, '{' or '[' expected in binding pattern (3:13)
+exports[`discard-binding-for-using-binding.js format[hermes] 1`] = `
+"';' or 'in' expected inside 'for' (2:12)
1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
+> 2 | for(using void of []);
+ | ^
+ 3 | }
+ 4 |
+Cause: ';' or 'in' expected inside 'for' (2:12)
+ for(using void of []);
+ ~~~~~~~~~~^"
+`;
+
+exports[`discard-binding-for-using-binding.js format[meriyah] 1`] = `
+"Expected ';' (2:13)
+ 1 | {
+> 2 | for(using void of []);
+ | ^^^^
+ 3 | }
+ 4 |
+Cause: [2:12-2:16]: Expected ';'"
+`;
+
+exports[`discard-binding-for-using-binding.js format[oxc] 1`] = `
+"Expected \`;\` but found \`void\` (2:13)
+ 1 | {
+> 2 | for(using void of []);
+ | ^^^^
+ 3 | }
+ 4 |"
+`;
+
+exports[`discard-binding-for-using-binding.js format[oxc-ts] 1`] = `
+"Expected \`;\` but found \`void\` (2:13)
+ 1 | {
+> 2 | for(using void of []);
+ | ^^^^
+ 3 | }
+ 4 |"
+`;
+
+exports[`discard-binding-for-using-binding.js format[typescript] 1`] = `
+"';' expected. (2:13)
+ 1 | {
+> 2 | for(using void of []);
| ^
- 4 | }
- 5 | {
- 6 | // arrow function parameter
-Cause: identifier, '{' or '[' expected in binding pattern (3:13)
- function f(void) {}
- ^"
-`;
-
-exports[`function-parameter.js [meriyah] format 1`] = `
-"Invalid keyword (3:14)
- 1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^^^^
- 4 | }
- 5 | {
- 6 | // arrow function parameter
-Cause: [3:13-3:17]: Invalid keyword"
-`;
-
-exports[`function-parameter.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
- 1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^^^^
- 4 | }
- 5 | {
- 6 | // arrow function parameter"
-`;
-
-exports[`function-parameter.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
- 1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^^^^
- 4 | }
- 5 | {
- 6 | // arrow function parameter"
-`;
-
-exports[`function-parameter.js [typescript] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
- 1 | {
- 2 | // function parameter
-> 3 | function f(void) {}
- | ^
- 4 | }
- 5 | {
- 6 | // arrow function parameter
-Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
+ 3 | }
+ 4 |
+Cause: ';' expected."
`;
exports[`function-parameter.js format 1`] = `
@@ -1090,98 +995,98 @@ printWidth: 80
================================================================================
`;
-exports[`object-pattern.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (3:17)
+exports[`function-parameter.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^
4 | }
5 | {
- 6 | // for-of destructuring binding
-Cause: Unexpected keyword 'void' (3:16)"
+ 6 | // arrow function parameter
+Cause: Unexpected keyword 'void' (3:13)"
`;
-exports[`object-pattern.js [espree] format 1`] = `
-"Unexpected keyword 'void' (3:17)
+exports[`function-parameter.js format[espree] 1`] = `
+"Unexpected keyword 'void' (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^
4 | }
5 | {
- 6 | // for-of destructuring binding
+ 6 | // arrow function parameter
Cause: Unexpected keyword 'void'"
`;
-exports[`object-pattern.js [flow] format 1`] = `
-"Unexpected reserved word (3:17)
+exports[`function-parameter.js format[flow] 1`] = `
+"Unexpected reserved word (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^^^^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^^^^
4 | }
5 | {
- 6 | // for-of destructuring binding"
+ 6 | // arrow function parameter"
`;
-exports[`object-pattern.js [hermes] format 1`] = `
-"identifier, '{' or '[' expected in binding pattern (3:16)
+exports[`function-parameter.js format[hermes] 1`] = `
+"identifier, '{' or '[' expected in binding pattern (3:13)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^
4 | }
5 | {
- 6 | // for-of destructuring binding
-Cause: identifier, '{' or '[' expected in binding pattern (3:16)
- const { void: void } = value;
- ^"
+ 6 | // arrow function parameter
+Cause: identifier, '{' or '[' expected in binding pattern (3:13)
+ function f(void) {}
+ ^"
`;
-exports[`object-pattern.js [meriyah] format 1`] = `
-"Unexpected token: '}' (3:22)
+exports[`function-parameter.js format[meriyah] 1`] = `
+"Invalid keyword (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^^^^
4 | }
5 | {
- 6 | // for-of destructuring binding
-Cause: [3:21-3:22]: Unexpected token: '}'"
+ 6 | // arrow function parameter
+Cause: [3:13-3:17]: Invalid keyword"
`;
-exports[`object-pattern.js [oxc] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:17)
+exports[`function-parameter.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^^^^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^^^^
4 | }
5 | {
- 6 | // for-of destructuring binding"
+ 6 | // arrow function parameter"
`;
-exports[`object-pattern.js [oxc-ts] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:17)
+exports[`function-parameter.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^^^^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^^^^
4 | }
5 | {
- 6 | // for-of destructuring binding"
+ 6 | // arrow function parameter"
`;
-exports[`object-pattern.js [typescript] format 1`] = `
-"Identifier expected. 'void' is a reserved word that cannot be used here. (3:17)
+exports[`function-parameter.js format[typescript] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:14)
1 | {
- 2 | // destructuring binding
-> 3 | const { void: void } = value;
- | ^
+ 2 | // function parameter
+> 3 | function f(void) {}
+ | ^
4 | }
5 | {
- 6 | // for-of destructuring binding
+ 6 | // arrow function parameter
Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
@@ -1288,99 +1193,99 @@ printWidth: 80
================================================================================
`;
-exports[`unary-expression-void.js [acorn] format 1`] = `
-"Unexpected token (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern
-Cause: Unexpected token (4:9)"
+exports[`object-pattern.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (3:17)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: Unexpected keyword 'void' (3:16)"
`;
-exports[`unary-expression-void.js [espree] format 1`] = `
-"Unexpected token ] (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern
-Cause: Unexpected token ]"
+exports[`object-pattern.js format[espree] 1`] = `
+"Unexpected keyword 'void' (3:17)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: Unexpected keyword 'void'"
`;
-exports[`unary-expression-void.js [flow] format 1`] = `
-"Unexpected token \`]\` (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern"
+exports[`object-pattern.js format[flow] 1`] = `
+"Unexpected reserved word (3:17)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding"
`;
-exports[`unary-expression-void.js [hermes] format 1`] = `
-"invalid expression (4:9)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern
-Cause: invalid expression (4:9)
- [ void ] = [{
- ^"
+exports[`object-pattern.js format[hermes] 1`] = `
+"identifier, '{' or '[' expected in binding pattern (3:16)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: identifier, '{' or '[' expected in binding pattern (3:16)
+ const { void: void } = value;
+ ^"
`;
-exports[`unary-expression-void.js [meriyah] format 1`] = `
-"Unexpected token: ']' (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern
-Cause: [4:9-4:10]: Unexpected token: ']'"
+exports[`object-pattern.js format[meriyah] 1`] = `
+"Unexpected token: '}' (3:22)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: [3:21-3:22]: Unexpected token: '}'"
`;
-exports[`unary-expression-void.js [oxc] format 1`] = `
-"Unexpected token (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern"
+exports[`object-pattern.js format[oxc] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:17)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding"
`;
-exports[`unary-expression-void.js [oxc-ts] format 1`] = `
-"Unexpected token (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern"
+exports[`object-pattern.js format[oxc-ts] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:17)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding"
`;
-exports[`unary-expression-void.js [typescript] format 1`] = `
-"Expression expected. (4:10)
- 2 | void [
- 3 | // pattern
-> 4 | [ void ] = [{
- | ^
- 5 | // expr
- 6 | [ void [] ]:
- 7 | // pattern
-Cause: Expression expected."
+exports[`object-pattern.js format[typescript] 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (3:17)
+ 1 | {
+ 2 | // destructuring binding
+> 3 | const { void: void } = value;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // for-of destructuring binding
+Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
`;
exports[`unary-expression-void.js format 1`] = `
@@ -1429,91 +1334,99 @@ void [
================================================================================
`;
-exports[`using.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (2:9)
- 1 | {
-> 2 | using void = f();
+exports[`unary-expression-void.js format[acorn] 1`] = `
+"Unexpected token (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern
+Cause: Unexpected token (4:9)"
+`;
+
+exports[`unary-expression-void.js format[espree] 1`] = `
+"Unexpected token ] (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern
+Cause: Unexpected token ]"
+`;
+
+exports[`unary-expression-void.js format[flow] 1`] = `
+"Unexpected token \`]\` (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern"
+`;
+
+exports[`unary-expression-void.js format[hermes] 1`] = `
+"invalid expression (4:9)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
| ^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();
-Cause: Unexpected keyword 'void' (2:8)"
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern
+Cause: invalid expression (4:9)
+ [ void ] = [{
+ ^"
`;
-exports[`using.js [espree] format 1`] = `
-"Unexpected keyword 'void' (2:9)
- 1 | {
-> 2 | using void = f();
- | ^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();
-Cause: Unexpected keyword 'void'"
+exports[`unary-expression-void.js format[meriyah] 1`] = `
+"Unexpected token: ']' (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern
+Cause: [4:9-4:10]: Unexpected token: ']'"
`;
-exports[`using.js [flow] format 1`] = `
-"Unexpected token \`void\`, expected the end of an expression statement (\`;\`) (2:9)
- 1 | {
-> 2 | using void = f();
- | ^^^^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();"
+exports[`unary-expression-void.js format[oxc] 1`] = `
+"Unexpected token (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern"
`;
-exports[`using.js [hermes] format 1`] = `
-"';' expected (2:8)
- 1 | {
-> 2 | using void = f();
- | ^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();
-Cause: ';' expected (2:8)
- using void = f();
- ^"
+exports[`unary-expression-void.js format[oxc-ts] 1`] = `
+"Unexpected token (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern"
`;
-exports[`using.js [meriyah] format 1`] = `
-"Unexpected token: 'void' (2:9)
- 1 | {
-> 2 | using void = f();
- | ^^^^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();
-Cause: [2:8-2:12]: Unexpected token: 'void'"
-`;
-
-exports[`using.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (2:8)
- 1 | {
-> 2 | using void = f();
- | ^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();"
-`;
-
-exports[`using.js [oxc-ts] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (2:8)
- 1 | {
-> 2 | using void = f();
- | ^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();"
-`;
-
-exports[`using.js [typescript] format 1`] = `
-"Unexpected keyword or identifier. (2:3)
- 1 | {
-> 2 | using void = f();
- | ^
- 3 | }
- 4 | async (void) => {
- 5 | await using void = f();
-Cause: Unexpected keyword or identifier."
+exports[`unary-expression-void.js format[typescript] 1`] = `
+"Expression expected. (4:10)
+ 2 | void [
+ 3 | // pattern
+> 4 | [ void ] = [{
+ | ^
+ 5 | // expr
+ 6 | [ void [] ]:
+ 7 | // pattern
+Cause: Expression expected."
`;
exports[`using.js format 1`] = `
@@ -1540,98 +1453,90 @@ async (void) => {
================================================================================
`;
-exports[`using-variable-declarator.js [acorn] format 1`] = `
-"Unexpected keyword 'void' (3:9)
+exports[`using.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (2:9)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^
- 4 | }
- 5 | {
- 6 | // using 2 declarators
-Cause: Unexpected keyword 'void' (3:8)"
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();
+Cause: Unexpected keyword 'void' (2:8)"
`;
-exports[`using-variable-declarator.js [espree] format 1`] = `
-"Unexpected keyword 'void' (3:9)
+exports[`using.js format[espree] 1`] = `
+"Unexpected keyword 'void' (2:9)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^
- 4 | }
- 5 | {
- 6 | // using 2 declarators
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();
Cause: Unexpected keyword 'void'"
`;
-exports[`using-variable-declarator.js [flow] format 1`] = `
-"Unexpected token \`void\`, expected the end of an expression statement (\`;\`) (3:9)
+exports[`using.js format[flow] 1`] = `
+"Unexpected token \`void\`, expected the end of an expression statement (\`;\`) (2:9)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^^^^
- 4 | }
- 5 | {
- 6 | // using 2 declarators"
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();"
`;
-exports[`using-variable-declarator.js [hermes] format 1`] = `
-"';' expected (3:8)
+exports[`using.js format[hermes] 1`] = `
+"';' expected (2:8)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^
- 4 | }
- 5 | {
- 6 | // using 2 declarators
-Cause: ';' expected (3:8)
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();
+Cause: ';' expected (2:8)
using void = f();
^"
`;
-exports[`using-variable-declarator.js [meriyah] format 1`] = `
-"Unexpected token: 'void' (3:9)
+exports[`using.js format[meriyah] 1`] = `
+"Unexpected token: 'void' (2:9)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^^^^
- 4 | }
- 5 | {
- 6 | // using 2 declarators
-Cause: [3:8-3:12]: Unexpected token: 'void'"
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();
+Cause: [2:8-2:12]: Unexpected token: 'void'"
`;
-exports[`using-variable-declarator.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (3:8)
+exports[`using.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (2:8)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^
- 4 | }
- 5 | {
- 6 | // using 2 declarators"
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();"
`;
-exports[`using-variable-declarator.js [oxc-ts] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (3:8)
+exports[`using.js format[oxc-ts] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (2:8)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^
- 4 | }
- 5 | {
- 6 | // using 2 declarators"
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();"
`;
-exports[`using-variable-declarator.js [typescript] format 1`] = `
-"Unexpected keyword or identifier. (3:3)
+exports[`using.js format[typescript] 1`] = `
+"Unexpected keyword or identifier. (2:3)
1 | {
- 2 | // using 1 declarator
-> 3 | using void = f();
+> 2 | using void = f();
| ^
- 4 | }
- 5 | {
- 6 | // using 2 declarators
+ 3 | }
+ 4 | async (void) => {
+ 5 | await using void = f();
Cause: Unexpected keyword or identifier."
`;
@@ -1718,3 +1623,98 @@ async () => {
================================================================================
`;
+
+exports[`using-variable-declarator.js format[acorn] 1`] = `
+"Unexpected keyword 'void' (3:9)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators
+Cause: Unexpected keyword 'void' (3:8)"
+`;
+
+exports[`using-variable-declarator.js format[espree] 1`] = `
+"Unexpected keyword 'void' (3:9)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`using-variable-declarator.js format[flow] 1`] = `
+"Unexpected token \`void\`, expected the end of an expression statement (\`;\`) (3:9)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators"
+`;
+
+exports[`using-variable-declarator.js format[hermes] 1`] = `
+"';' expected (3:8)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators
+Cause: ';' expected (3:8)
+ using void = f();
+ ^"
+`;
+
+exports[`using-variable-declarator.js format[meriyah] 1`] = `
+"Unexpected token: 'void' (3:9)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^^^^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators
+Cause: [3:8-3:12]: Unexpected token: 'void'"
+`;
+
+exports[`using-variable-declarator.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (3:8)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators"
+`;
+
+exports[`using-variable-declarator.js format[oxc-ts] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (3:8)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators"
+`;
+
+exports[`using-variable-declarator.js format[typescript] 1`] = `
+"Unexpected keyword or identifier. (3:3)
+ 1 | {
+ 2 | // using 1 declarator
+> 3 | using void = f();
+ | ^
+ 4 | }
+ 5 | {
+ 6 | // using 2 declarators
+Cause: Unexpected keyword or identifier."
+`;
diff --git a/tests/format/js/do/__snapshots__/format.test.js.snap b/tests/format/js/do/__snapshots__/format.test.js.snap
index a8674d1aa..219de51ce 100644
--- a/tests/format/js/do/__snapshots__/format.test.js.snap
+++ b/tests/format/js/do/__snapshots__/format.test.js.snap
@@ -1,52 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`call-arguments.js [acorn] format 1`] = `
-"Unexpected token (3:3)
- 1 | // from https://github.com/babel/babel/pull/13122/
- 2 | expect(
-> 3 | do {
- | ^
- 4 | var bar = "foo";
- 5 | if (!bar) throw new Error(
- 6 | "unreachable"
-Cause: Unexpected token (3:2)"
-`;
-
-exports[`call-arguments.js [espree] format 1`] = `
-"Unexpected token do (3:3)
- 1 | // from https://github.com/babel/babel/pull/13122/
- 2 | expect(
-> 3 | do {
- | ^
- 4 | var bar = "foo";
- 5 | if (!bar) throw new Error(
- 6 | "unreachable"
-Cause: Unexpected token do"
-`;
-
-exports[`call-arguments.js [meriyah] format 1`] = `
-"Unexpected token: 'do' (3:3)
- 1 | // from https://github.com/babel/babel/pull/13122/
- 2 | expect(
-> 3 | do {
- | ^^
- 4 | var bar = "foo";
- 5 | if (!bar) throw new Error(
- 6 | "unreachable"
-Cause: [3:2-3:4]: Unexpected token: 'do'"
-`;
-
-exports[`call-arguments.js [oxc] format 1`] = `
-"Unexpected token (3:3)
- 1 | // from https://github.com/babel/babel/pull/13122/
- 2 | expect(
-> 3 | do {
- | ^^
- 4 | var bar = "foo";
- 5 | if (!bar) throw new Error(
- 6 | "unreachable""
-`;
-
exports[`call-arguments.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -133,51 +86,51 @@ expect(
================================================================================
`;
-exports[`do.js [acorn] format 1`] = `
-"Unexpected token (3:5)
- 1 | const envSpecific = {
- 2 | domain:
-> 3 | do {
- | ^
- 4 | if(env === 'production') 'https://abc.mno.com/';
- 5 | else if(env === 'development') 'http://localhost:4000';
- 6 | }
-Cause: Unexpected token (3:4)"
+exports[`call-arguments.js format[acorn] 1`] = `
+"Unexpected token (3:3)
+ 1 | // from https://github.com/babel/babel/pull/13122/
+ 2 | expect(
+> 3 | do {
+ | ^
+ 4 | var bar = "foo";
+ 5 | if (!bar) throw new Error(
+ 6 | "unreachable"
+Cause: Unexpected token (3:2)"
`;
-exports[`do.js [espree] format 1`] = `
-"Unexpected token do (3:5)
- 1 | const envSpecific = {
- 2 | domain:
-> 3 | do {
- | ^
- 4 | if(env === 'production') 'https://abc.mno.com/';
- 5 | else if(env === 'development') 'http://localhost:4000';
- 6 | }
+exports[`call-arguments.js format[espree] 1`] = `
+"Unexpected token do (3:3)
+ 1 | // from https://github.com/babel/babel/pull/13122/
+ 2 | expect(
+> 3 | do {
+ | ^
+ 4 | var bar = "foo";
+ 5 | if (!bar) throw new Error(
+ 6 | "unreachable"
Cause: Unexpected token do"
`;
-exports[`do.js [meriyah] format 1`] = `
-"Unexpected token: 'do' (3:5)
- 1 | const envSpecific = {
- 2 | domain:
-> 3 | do {
- | ^^
- 4 | if(env === 'production') 'https://abc.mno.com/';
- 5 | else if(env === 'development') 'http://localhost:4000';
- 6 | }
-Cause: [3:4-3:6]: Unexpected token: 'do'"
+exports[`call-arguments.js format[meriyah] 1`] = `
+"Unexpected token: 'do' (3:3)
+ 1 | // from https://github.com/babel/babel/pull/13122/
+ 2 | expect(
+> 3 | do {
+ | ^^
+ 4 | var bar = "foo";
+ 5 | if (!bar) throw new Error(
+ 6 | "unreachable"
+Cause: [3:2-3:4]: Unexpected token: 'do'"
`;
-exports[`do.js [oxc] format 1`] = `
-"Unexpected token (3:5)
- 1 | const envSpecific = {
- 2 | domain:
-> 3 | do {
- | ^^
- 4 | if(env === 'production') 'https://abc.mno.com/';
- 5 | else if(env === 'development') 'http://localhost:4000';
- 6 | }"
+exports[`call-arguments.js format[oxc] 1`] = `
+"Unexpected token (3:3)
+ 1 | // from https://github.com/babel/babel/pull/13122/
+ 2 | expect(
+> 3 | do {
+ | ^^
+ 4 | var bar = "foo";
+ 5 | if (!bar) throw new Error(
+ 6 | "unreachable""
`;
exports[`do.js format 1`] = `
@@ -330,3 +283,50 @@ function foo() {
================================================================================
`;
+
+exports[`do.js format[acorn] 1`] = `
+"Unexpected token (3:5)
+ 1 | const envSpecific = {
+ 2 | domain:
+> 3 | do {
+ | ^
+ 4 | if(env === 'production') 'https://abc.mno.com/';
+ 5 | else if(env === 'development') 'http://localhost:4000';
+ 6 | }
+Cause: Unexpected token (3:4)"
+`;
+
+exports[`do.js format[espree] 1`] = `
+"Unexpected token do (3:5)
+ 1 | const envSpecific = {
+ 2 | domain:
+> 3 | do {
+ | ^
+ 4 | if(env === 'production') 'https://abc.mno.com/';
+ 5 | else if(env === 'development') 'http://localhost:4000';
+ 6 | }
+Cause: Unexpected token do"
+`;
+
+exports[`do.js format[meriyah] 1`] = `
+"Unexpected token: 'do' (3:5)
+ 1 | const envSpecific = {
+ 2 | domain:
+> 3 | do {
+ | ^^
+ 4 | if(env === 'production') 'https://abc.mno.com/';
+ 5 | else if(env === 'development') 'http://localhost:4000';
+ 6 | }
+Cause: [3:4-3:6]: Unexpected token: 'do'"
+`;
+
+exports[`do.js format[oxc] 1`] = `
+"Unexpected token (3:5)
+ 1 | const envSpecific = {
+ 2 | domain:
+> 3 | do {
+ | ^^
+ 4 | if(env === 'production') 'https://abc.mno.com/';
+ 5 | else if(env === 'development') 'http://localhost:4000';
+ 6 | }"
+`;
diff --git a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap
index 35702f306..ee13396c6 100644
--- a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap
+++ b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap
@@ -14,60 +14,6 @@ import("./foo.json", { assert: { type: "json" } });
================================================================================
`;
-exports[`import-phase.js [acorn] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source(\`data:text/javascript,
- | ^
- 2 | console.log("RUN");
- 3 | \`)
- 4 |
-Cause: The only valid meta property for import is 'import.meta' (1:7)"
-`;
-
-exports[`import-phase.js [espree] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source(\`data:text/javascript,
- | ^
- 2 | console.log("RUN");
- 3 | \`)
- 4 |
-Cause: The only valid meta property for import is 'import.meta'"
-`;
-
-exports[`import-phase.js [flow] format 1`] = `
-"Unexpected identifier, expected the identifier \`meta\` (1:8)
-> 1 | import.source(\`data:text/javascript,
- | ^^^^^^
- 2 | console.log("RUN");
- 3 | \`)
- 4 |"
-`;
-
-exports[`import-phase.js [hermes] format 1`] = `
-"'meta' expected in member expression (1:7)
-> 1 | import.source(\`data:text/javascript,
- | ^
- 2 | console.log("RUN");
- 3 | \`)
- 4 |
-Cause: 'meta' expected in member expression (1:7)
-import.source(\`data:text/javascript,
- ^~~~~~
-note: start of member expression (1:0)
-import.source(\`data:text/javascript,
-^"
-`;
-
-exports[`import-phase.js [meriyah] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source(\`data:text/javascript,
- | ^^^^^^
- 2 | console.log("RUN");
- 3 | \`)
- 4 |
-Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
-`;
-
exports[`import-phase.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -94,25 +40,58 @@ import.source(String.raw\`data:text/javascript,
================================================================================
`;
-exports[`template-literal.js [flow] format 1`] = `
-"Unexpected token \`import\`, expected the end of an expression statement (\`;\`) (1:20)
-> 1 | module = await import(\`data:text/javascript,
- | ^^^^^^
+exports[`import-phase.js format[acorn] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source(\`data:text/javascript,
+ | ^
2 | console.log("RUN");
- 3 | \`);
+ 3 | \`)
+ 4 |
+Cause: The only valid meta property for import is 'import.meta' (1:7)"
+`;
+
+exports[`import-phase.js format[espree] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source(\`data:text/javascript,
+ | ^
+ 2 | console.log("RUN");
+ 3 | \`)
+ 4 |
+Cause: The only valid meta property for import is 'import.meta'"
+`;
+
+exports[`import-phase.js format[flow] 1`] = `
+"Unexpected identifier, expected the identifier \`meta\` (1:8)
+> 1 | import.source(\`data:text/javascript,
+ | ^^^^^^
+ 2 | console.log("RUN");
+ 3 | \`)
4 |"
`;
-exports[`template-literal.js [hermes] format 1`] = `
-"unexpected token after assignment expression (1:19)
-> 1 | module = await import(\`data:text/javascript,
- | ^
+exports[`import-phase.js format[hermes] 1`] = `
+"'meta' expected in member expression (1:7)
+> 1 | import.source(\`data:text/javascript,
+ | ^
2 | console.log("RUN");
- 3 | \`);
+ 3 | \`)
4 |
-Cause: unexpected token after assignment expression (1:19)
-module = await import(\`data:text/javascript,
- ^"
+Cause: 'meta' expected in member expression (1:7)
+import.source(\`data:text/javascript,
+ ^~~~~~
+note: start of member expression (1:0)
+import.source(\`data:text/javascript,
+^"
+`;
+
+exports[`import-phase.js format[meriyah] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source(\`data:text/javascript,
+ | ^^^^^^
+ 2 | console.log("RUN");
+ 3 | \`)
+ 4 |
+Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
`;
exports[`template-literal.js format 1`] = `
@@ -141,6 +120,27 @@ module = await import(String.raw\`data:text/javascript,
================================================================================
`;
+exports[`template-literal.js format[flow] 1`] = `
+"Unexpected token \`import\`, expected the end of an expression statement (\`;\`) (1:20)
+> 1 | module = await import(\`data:text/javascript,
+ | ^^^^^^
+ 2 | console.log("RUN");
+ 3 | \`);
+ 4 |"
+`;
+
+exports[`template-literal.js format[hermes] 1`] = `
+"unexpected token after assignment expression (1:19)
+> 1 | module = await import(\`data:text/javascript,
+ | ^
+ 2 | console.log("RUN");
+ 3 | \`);
+ 4 |
+Cause: unexpected token after assignment expression (1:19)
+module = await import(\`data:text/javascript,
+ ^"
+`;
+
exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
diff --git a/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap b/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap
index 717dde628..3146563ce 100644
--- a/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap
+++ b/tests/format/js/explicit-resource-management/__snapshots__/format.test.js.snap
@@ -1,30 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`for-await-using-of-comments.js [flow] format 1`] = `
-"Unexpected token \`await\`, expected the token \`(\` (1:19)
-> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
- | ^^^^^
- 2 |"
-`;
-
-exports[`for-await-using-of-comments.js [hermes] format 1`] = `
-"'(' expected after 'for' (1:18)
-> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
- | ^
- 2 |
-Cause: '(' expected after 'for' (1:18)
-/*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
- ~~~~~~~~~~~~^"
-`;
-
-exports[`for-await-using-of-comments.js [meriyah] format 1`] = `
-"for await (... of ...) is only valid in async functions and async generators (1:51)
-> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
- | ^^
- 2 |
-Cause: [1:50-1:52]: for await (... of ...) is only valid in async functions and async generators"
-`;
-
exports[`for-await-using-of-comments.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -39,60 +14,29 @@ printWidth: 80
================================================================================
`;
-exports[`invalid-duplicate-using-bindings.js [acorn] format 1`] = `
-"Identifier 'f' has already been declared (2:20)
- 1 | {
-> 2 | using f = foo(), f = foo();
- | ^
- 3 | }
- 4 | {
- 5 | using g = foo();
-Cause: Identifier 'f' has already been declared (2:19)"
+exports[`for-await-using-of-comments.js format[flow] 1`] = `
+"Unexpected token \`await\`, expected the token \`(\` (1:19)
+> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
+ | ^^^^^
+ 2 |"
`;
-exports[`invalid-duplicate-using-bindings.js [espree] format 1`] = `
-"Identifier 'f' has already been declared (2:20)
- 1 | {
-> 2 | using f = foo(), f = foo();
- | ^
- 3 | }
- 4 | {
- 5 | using g = foo();
-Cause: Identifier 'f' has already been declared"
+exports[`for-await-using-of-comments.js format[hermes] 1`] = `
+"'(' expected after 'for' (1:18)
+> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
+ | ^
+ 2 |
+Cause: '(' expected after 'for' (1:18)
+/*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
+ ~~~~~~~~~~~~^"
`;
-exports[`invalid-duplicate-using-bindings.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
- 1 | {
-> 2 | using f = foo(), f = foo();
- | ^
- 3 | }
- 4 | {
- 5 | using g = foo();"
-`;
-
-exports[`invalid-duplicate-using-bindings.js [hermes] format 1`] = `
-"';' expected (2:8)
- 1 | {
-> 2 | using f = foo(), f = foo();
- | ^
- 3 | }
- 4 | {
- 5 | using g = foo();
-Cause: ';' expected (2:8)
- using f = foo(), f = foo();
- ^"
-`;
-
-exports[`invalid-duplicate-using-bindings.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:9)
- 1 | {
-> 2 | using f = foo(), f = foo();
- | ^
- 3 | }
- 4 | {
- 5 | using g = foo();
-Cause: [2:8-2:9]: Unexpected token: 'identifier'"
+exports[`for-await-using-of-comments.js format[meriyah] 1`] = `
+"for await (... of ...) is only valid in async functions and async generators (1:51)
+> 1 | /*1*/ for /* 2 */ await /*3*/ ( /*4*/ using /*5*/ fo /*6*/ of /*7*/ of /*8*/) /*9*/;
+ | ^^
+ 2 |
+Cause: [1:50-1:52]: for await (... of ...) is only valid in async functions and async generators"
`;
exports[`invalid-duplicate-using-bindings.js format 1`] = `
@@ -122,29 +66,60 @@ printWidth: 80
================================================================================
`;
-exports[`invalid-script-top-level-using-binding.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:7)
-> 1 | using x = bar();
- | ^
- 2 |"
+exports[`invalid-duplicate-using-bindings.js format[acorn] 1`] = `
+"Identifier 'f' has already been declared (2:20)
+ 1 | {
+> 2 | using f = foo(), f = foo();
+ | ^
+ 3 | }
+ 4 | {
+ 5 | using g = foo();
+Cause: Identifier 'f' has already been declared (2:19)"
`;
-exports[`invalid-script-top-level-using-binding.js [hermes] format 1`] = `
-"';' expected (1:6)
-> 1 | using x = bar();
- | ^
- 2 |
-Cause: ';' expected (1:6)
-using x = bar();
- ^"
+exports[`invalid-duplicate-using-bindings.js format[espree] 1`] = `
+"Identifier 'f' has already been declared (2:20)
+ 1 | {
+> 2 | using f = foo(), f = foo();
+ | ^
+ 3 | }
+ 4 | {
+ 5 | using g = foo();
+Cause: Identifier 'f' has already been declared"
`;
-exports[`invalid-script-top-level-using-binding.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (1:7)
-> 1 | using x = bar();
- | ^
- 2 |
-Cause: [1:6-1:7]: Unexpected token: 'identifier'"
+exports[`invalid-duplicate-using-bindings.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
+ 1 | {
+> 2 | using f = foo(), f = foo();
+ | ^
+ 3 | }
+ 4 | {
+ 5 | using g = foo();"
+`;
+
+exports[`invalid-duplicate-using-bindings.js format[hermes] 1`] = `
+"';' expected (2:8)
+ 1 | {
+> 2 | using f = foo(), f = foo();
+ | ^
+ 3 | }
+ 4 | {
+ 5 | using g = foo();
+Cause: ';' expected (2:8)
+ using f = foo(), f = foo();
+ ^"
+`;
+
+exports[`invalid-duplicate-using-bindings.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:9)
+ 1 | {
+> 2 | using f = foo(), f = foo();
+ | ^
+ 3 | }
+ 4 | {
+ 5 | using g = foo();
+Cause: [2:8-2:9]: Unexpected token: 'identifier'"
`;
exports[`invalid-script-top-level-using-binding.js format 1`] = `
@@ -161,38 +136,29 @@ using x = bar();
================================================================================
`;
-exports[`using-declarations.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:17)
- 1 | {
-> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo()
- | ^
- 3 | }
- 4 |
- 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);"
+exports[`invalid-script-top-level-using-binding.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:7)
+> 1 | using x = bar();
+ | ^
+ 2 |"
`;
-exports[`using-declarations.js [hermes] format 1`] = `
-"';' expected (2:16)
- 1 | {
-> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo()
- | ^
- 3 | }
- 4 |
- 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);
-Cause: ';' expected (2:16)
- using /* 1 */ a = foo(), /* 2 */ b = foo()
- ^"
+exports[`invalid-script-top-level-using-binding.js format[hermes] 1`] = `
+"';' expected (1:6)
+> 1 | using x = bar();
+ | ^
+ 2 |
+Cause: ';' expected (1:6)
+using x = bar();
+ ^"
`;
-exports[`using-declarations.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:17)
- 1 | {
-> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo()
- | ^
- 3 | }
- 4 |
- 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);
-Cause: [2:16-2:17]: Unexpected token: 'identifier'"
+exports[`invalid-script-top-level-using-binding.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (1:7)
+> 1 | using x = bar();
+ | ^
+ 2 |
+Cause: [1:6-1:7]: Unexpected token: 'identifier'"
`;
exports[`using-declarations.js format 1`] = `
@@ -222,26 +188,38 @@ for (using /* 1 */ foo of bar());
================================================================================
`;
-exports[`valid-await-expr-using.js [acorn] format 1`] = `
-"Unexpected token (2:14)
- 1 | async function f() {
-> 2 | await using[x];
- | ^
- 3 | await using.x + await using(x) ? await using?.x : await using\`x\`;
- 4 | }
- 5 |
-Cause: Unexpected token (2:13)"
+exports[`using-declarations.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:17)
+ 1 | {
+> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo()
+ | ^
+ 3 | }
+ 4 |
+ 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);"
`;
-exports[`valid-await-expr-using.js [espree] format 1`] = `
-"Unexpected token [ (2:14)
- 1 | async function f() {
-> 2 | await using[x];
- | ^
- 3 | await using.x + await using(x) ? await using?.x : await using\`x\`;
- 4 | }
- 5 |
-Cause: Unexpected token ["
+exports[`using-declarations.js format[hermes] 1`] = `
+"';' expected (2:16)
+ 1 | {
+> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo()
+ | ^
+ 3 | }
+ 4 |
+ 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);
+Cause: ';' expected (2:16)
+ using /* 1 */ a = foo(), /* 2 */ b = foo()
+ ^"
+`;
+
+exports[`using-declarations.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:17)
+ 1 | {
+> 2 | using /* 1 */ a = foo(), /* 2 */ b = foo()
+ | ^
+ 3 | }
+ 4 |
+ 5 | for(using /* 1 */ a = foo(), /* 2 */ b = foo();;);
+Cause: [2:16-2:17]: Unexpected token: 'identifier'"
`;
exports[`valid-await-expr-using.js format 1`] = `
@@ -264,24 +242,26 @@ async function f() {
================================================================================
`;
-exports[`valid-await-expr-using-in.js [acorn] format 1`] = `
-"Unexpected keyword 'in' (2:15)
+exports[`valid-await-expr-using.js format[acorn] 1`] = `
+"Unexpected token (2:14)
1 | async function f() {
-> 2 | await using in foo;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected keyword 'in' (2:14)"
+> 2 | await using[x];
+ | ^
+ 3 | await using.x + await using(x) ? await using?.x : await using\`x\`;
+ 4 | }
+ 5 |
+Cause: Unexpected token (2:13)"
`;
-exports[`valid-await-expr-using-in.js [espree] format 1`] = `
-"Unexpected keyword 'in' (2:15)
+exports[`valid-await-expr-using.js format[espree] 1`] = `
+"Unexpected token [ (2:14)
1 | async function f() {
-> 2 | await using in foo;
- | ^
- 3 | }
- 4 |
-Cause: Unexpected keyword 'in'"
+> 2 | await using[x];
+ | ^
+ 3 | await using.x + await using(x) ? await using?.x : await using\`x\`;
+ 4 | }
+ 5 |
+Cause: Unexpected token ["
`;
exports[`valid-await-expr-using-in.js format 1`] = `
@@ -302,24 +282,24 @@ async function f() {
================================================================================
`;
-exports[`valid-await-expr-using-instanceof.js [acorn] format 1`] = `
-"Unexpected keyword 'instanceof' (2:15)
+exports[`valid-await-expr-using-in.js format[acorn] 1`] = `
+"Unexpected keyword 'in' (2:15)
1 | async function f() {
-> 2 | await using instanceof foo;
+> 2 | await using in foo;
| ^
3 | }
4 |
-Cause: Unexpected keyword 'instanceof' (2:14)"
+Cause: Unexpected keyword 'in' (2:14)"
`;
-exports[`valid-await-expr-using-instanceof.js [espree] format 1`] = `
-"Unexpected keyword 'instanceof' (2:15)
+exports[`valid-await-expr-using-in.js format[espree] 1`] = `
+"Unexpected keyword 'in' (2:15)
1 | async function f() {
-> 2 | await using instanceof foo;
+> 2 | await using in foo;
| ^
3 | }
4 |
-Cause: Unexpected keyword 'instanceof'"
+Cause: Unexpected keyword 'in'"
`;
exports[`valid-await-expr-using-instanceof.js format 1`] = `
@@ -340,6 +320,26 @@ async function f() {
================================================================================
`;
+exports[`valid-await-expr-using-instanceof.js format[acorn] 1`] = `
+"Unexpected keyword 'instanceof' (2:15)
+ 1 | async function f() {
+> 2 | await using instanceof foo;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected keyword 'instanceof' (2:14)"
+`;
+
+exports[`valid-await-expr-using-instanceof.js format[espree] 1`] = `
+"Unexpected keyword 'instanceof' (2:15)
+ 1 | async function f() {
+> 2 | await using instanceof foo;
+ | ^
+ 3 | }
+ 4 |
+Cause: Unexpected keyword 'instanceof'"
+`;
+
exports[`valid-await-using-asi-assignment.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -360,37 +360,6 @@ async function f() {
================================================================================
`;
-exports[`valid-await-using-binding-basic.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15)
- 1 | async function f() {
-> 2 | await using basic = getReader();
- | ^^^^^
- 3 | }
- 4 |"
-`;
-
-exports[`valid-await-using-binding-basic.js [hermes] format 1`] = `
-"';' expected (2:14)
- 1 | async function f() {
-> 2 | await using basic = getReader();
- | ^
- 3 | }
- 4 |
-Cause: ';' expected (2:14)
- await using basic = getReader();
- ^"
-`;
-
-exports[`valid-await-using-binding-basic.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:15)
- 1 | async function f() {
-> 2 | await using basic = getReader();
- | ^^^^^
- 3 | }
- 4 |
-Cause: [2:14-2:19]: Unexpected token: 'identifier'"
-`;
-
exports[`valid-await-using-binding-basic.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -409,35 +378,35 @@ async function f() {
================================================================================
`;
-exports[`valid-await-using-binding-escaped.js [flow] format 1`] = `
+exports[`valid-await-using-binding-basic.js format[flow] 1`] = `
"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15)
1 | async function f() {
-> 2 | await using \\u0061b = c;
- | ^^^^^^^
+> 2 | await using basic = getReader();
+ | ^^^^^
3 | }
4 |"
`;
-exports[`valid-await-using-binding-escaped.js [hermes] format 1`] = `
+exports[`valid-await-using-binding-basic.js format[hermes] 1`] = `
"';' expected (2:14)
1 | async function f() {
-> 2 | await using \\u0061b = c;
+> 2 | await using basic = getReader();
| ^
3 | }
4 |
Cause: ';' expected (2:14)
- await using \\u0061b = c;
+ await using basic = getReader();
^"
`;
-exports[`valid-await-using-binding-escaped.js [meriyah] format 1`] = `
+exports[`valid-await-using-binding-basic.js format[meriyah] 1`] = `
"Unexpected token: 'identifier' (2:15)
1 | async function f() {
-> 2 | await using \\u0061b = c;
- | ^^^^^^^
+> 2 | await using basic = getReader();
+ | ^^^^^
3 | }
4 |
-Cause: [2:14-2:21]: Unexpected token: 'identifier'"
+Cause: [2:14-2:19]: Unexpected token: 'identifier'"
`;
exports[`valid-await-using-binding-escaped.js format 1`] = `
@@ -458,34 +427,35 @@ async function f() {
================================================================================
`;
-exports[`valid-await-using-binding-non-bmp.js [flow] format 1`] = `
+exports[`valid-await-using-binding-escaped.js format[flow] 1`] = `
"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15)
1 | async function f() {
-> 2 | await using ð ®· = foo();
- | ^
+> 2 | await using \\u0061b = c;
+ | ^^^^^^^
3 | }
4 |"
`;
-exports[`valid-await-using-binding-non-bmp.js [hermes] format 1`] = `
+exports[`valid-await-using-binding-escaped.js format[hermes] 1`] = `
"';' expected (2:14)
1 | async function f() {
-> 2 | await using ð ®· = foo();
+> 2 | await using \\u0061b = c;
| ^
3 | }
4 |
Cause: ';' expected (2:14)
- await using ð ®· = foo();"
+ await using \\u0061b = c;
+ ^"
`;
-exports[`valid-await-using-binding-non-bmp.js [meriyah] format 1`] = `
+exports[`valid-await-using-binding-escaped.js format[meriyah] 1`] = `
"Unexpected token: 'identifier' (2:15)
1 | async function f() {
-> 2 | await using ð ®· = foo();
- | ^^
+> 2 | await using \\u0061b = c;
+ | ^^^^^^^
3 | }
4 |
-Cause: [2:14-2:16]: Unexpected token: 'identifier'"
+Cause: [2:14-2:21]: Unexpected token: 'identifier'"
`;
exports[`valid-await-using-binding-non-bmp.js format 1`] = `
@@ -506,38 +476,34 @@ async function f() {
================================================================================
`;
-exports[`valid-await-using-binding-using.js [flow] format 1`] = `
+exports[`valid-await-using-binding-non-bmp.js format[flow] 1`] = `
"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15)
1 | async function f() {
-> 2 | await using using = of;
- | ^^^^^
- 3 | for (await using using of of);
- 4 | }
- 5 |"
+> 2 | await using ð ®· = foo();
+ | ^
+ 3 | }
+ 4 |"
`;
-exports[`valid-await-using-binding-using.js [hermes] format 1`] = `
+exports[`valid-await-using-binding-non-bmp.js format[hermes] 1`] = `
"';' expected (2:14)
1 | async function f() {
-> 2 | await using using = of;
+> 2 | await using ð ®· = foo();
| ^
- 3 | for (await using using of of);
- 4 | }
- 5 |
+ 3 | }
+ 4 |
Cause: ';' expected (2:14)
- await using using = of;
- ^"
+ await using ð ®· = foo();"
`;
-exports[`valid-await-using-binding-using.js [meriyah] format 1`] = `
+exports[`valid-await-using-binding-non-bmp.js format[meriyah] 1`] = `
"Unexpected token: 'identifier' (2:15)
1 | async function f() {
-> 2 | await using using = of;
- | ^^^^^
- 3 | for (await using using of of);
- 4 | }
- 5 |
-Cause: [2:14-2:19]: Unexpected token: 'identifier'"
+> 2 | await using ð ®· = foo();
+ | ^^
+ 3 | }
+ 4 |
+Cause: [2:14-2:16]: Unexpected token: 'identifier'"
`;
exports[`valid-await-using-binding-using.js format 1`] = `
@@ -560,41 +526,38 @@ async function f() {
================================================================================
`;
-exports[`valid-await-using-comments.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (3:28)
+exports[`valid-await-using-binding-using.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:15)
1 | async function f() {
- 2 | {
-> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
- | ^
+> 2 | await using using = of;
+ | ^^^^^
+ 3 | for (await using using of of);
4 | }
- 5 | {
- 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;"
+ 5 |"
`;
-exports[`valid-await-using-comments.js [hermes] format 1`] = `
-"';' expected (3:27)
+exports[`valid-await-using-binding-using.js format[hermes] 1`] = `
+"';' expected (2:14)
1 | async function f() {
- 2 | {
-> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
- | ^
+> 2 | await using using = of;
+ | ^
+ 3 | for (await using using of of);
4 | }
- 5 | {
- 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;
-Cause: ';' expected (3:27)
- /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
- ^"
+ 5 |
+Cause: ';' expected (2:14)
+ await using using = of;
+ ^"
`;
-exports[`valid-await-using-comments.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (3:28)
+exports[`valid-await-using-binding-using.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:15)
1 | async function f() {
- 2 | {
-> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
- | ^
+> 2 | await using using = of;
+ | ^^^^^
+ 3 | for (await using using of of);
4 | }
- 5 | {
- 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;
-Cause: [3:27-3:28]: Unexpected token: 'identifier'"
+ 5 |
+Cause: [2:14-2:19]: Unexpected token: 'identifier'"
`;
exports[`valid-await-using-comments.js format 1`] = `
@@ -640,6 +603,43 @@ async function f() {
================================================================================
`;
+exports[`valid-await-using-comments.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (3:28)
+ 1 | async function f() {
+ 2 | {
+> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;"
+`;
+
+exports[`valid-await-using-comments.js format[hermes] 1`] = `
+"';' expected (3:27)
+ 1 | async function f() {
+ 2 | {
+> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;
+Cause: ';' expected (3:27)
+ /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
+ ^"
+`;
+
+exports[`valid-await-using-comments.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (3:28)
+ 1 | async function f() {
+ 2 | {
+> 3 | /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/;
+ | ^
+ 4 | }
+ 5 | {
+ 6 | /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/;
+Cause: [3:27-3:28]: Unexpected token: 'identifier'"
+`;
+
exports[`valid-for-await-using-binding-escaped-of-of.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -672,40 +672,6 @@ printWidth: 80
================================================================================
`;
-exports[`valid-for-using-binding-of-of.js [flow] format 1`] = `
-"Invalid left-hand side in for-of (2:8)
- 1 | async function f() {
-> 2 | for (await using of of of);
- | ^^^^^^^^^^^
- 3 | for await (await using of of of);
- 4 | }
- 5 |"
-`;
-
-exports[`valid-for-using-binding-of-of.js [hermes] format 1`] = `
-"')' expected after 'for(... in/of ...' (2:25)
- 1 | async function f() {
-> 2 | for (await using of of of);
- | ^
- 3 | for await (await using of of of);
- 4 | }
- 5 |
-Cause: ')' expected after 'for(... in/of ...' (2:25)
- for (await using of of of);
- ~~~~~~~~~~~~~~~~~~~^"
-`;
-
-exports[`valid-for-using-binding-of-of.js [meriyah] format 1`] = `
-"Invalid left-hand side in for-of (2:20)
- 1 | async function f() {
-> 2 | for (await using of of of);
- | ^^
- 3 | for await (await using of of of);
- 4 | }
- 5 |
-Cause: [2:19-2:21]: Invalid left-hand side in for-of"
-`;
-
exports[`valid-for-using-binding-of-of.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -726,35 +692,38 @@ async function f() {
================================================================================
`;
-exports[`valid-for-using-declaration.js [flow] format 1`] = `
-"Unexpected identifier, expected the token \`;\` (2:20)
+exports[`valid-for-using-binding-of-of.js format[flow] 1`] = `
+"Invalid left-hand side in for-of (2:8)
1 | async function f() {
-> 2 | for (await using basic = reader();;);
- | ^^^^^
- 3 | }
- 4 |"
+> 2 | for (await using of of of);
+ | ^^^^^^^^^^^
+ 3 | for await (await using of of of);
+ 4 | }
+ 5 |"
`;
-exports[`valid-for-using-declaration.js [hermes] format 1`] = `
-"';' or 'in' expected inside 'for' (2:19)
+exports[`valid-for-using-binding-of-of.js format[hermes] 1`] = `
+"')' expected after 'for(... in/of ...' (2:25)
1 | async function f() {
-> 2 | for (await using basic = reader();;);
- | ^
- 3 | }
- 4 |
-Cause: ';' or 'in' expected inside 'for' (2:19)
- for (await using basic = reader();;);
- ~~~~~~~~~~~~~~~~~^"
+> 2 | for (await using of of of);
+ | ^
+ 3 | for await (await using of of of);
+ 4 | }
+ 5 |
+Cause: ')' expected after 'for(... in/of ...' (2:25)
+ for (await using of of of);
+ ~~~~~~~~~~~~~~~~~~~^"
`;
-exports[`valid-for-using-declaration.js [meriyah] format 1`] = `
-"Expected ';' (2:20)
+exports[`valid-for-using-binding-of-of.js format[meriyah] 1`] = `
+"Invalid left-hand side in for-of (2:20)
1 | async function f() {
-> 2 | for (await using basic = reader();;);
- | ^^^^^
- 3 | }
- 4 |
-Cause: [2:19-2:24]: Expected ';'"
+> 2 | for (await using of of of);
+ | ^^
+ 3 | for await (await using of of of);
+ 4 | }
+ 5 |
+Cause: [2:19-2:21]: Invalid left-hand side in for-of"
`;
exports[`valid-for-using-declaration.js format 1`] = `
@@ -775,83 +744,35 @@ async function f() {
================================================================================
`;
-exports[`valid-module-block-top-level-await-using-binding.js [acorn] format 1`] = `
-"Unexpected token (1:18)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
- 3 | }
- 4 |
-Cause: Unexpected token (1:17)"
-`;
-
-exports[`valid-module-block-top-level-await-using-binding.js [espree] format 1`] = `
-"Unexpected token { (1:18)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
- 3 | }
- 4 |
-Cause: Unexpected token {"
-`;
-
-exports[`valid-module-block-top-level-await-using-binding.js [flow] format 1`] = `
-"Unexpected token \`{\`, expected the token \`;\` (1:18)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
+exports[`valid-for-using-declaration.js format[flow] 1`] = `
+"Unexpected identifier, expected the token \`;\` (2:20)
+ 1 | async function f() {
+> 2 | for (await using basic = reader();;);
+ | ^^^^^
3 | }
4 |"
`;
-exports[`valid-module-block-top-level-await-using-binding.js [hermes] format 1`] = `
-"';' expected (1:17)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
+exports[`valid-for-using-declaration.js format[hermes] 1`] = `
+"';' or 'in' expected inside 'for' (2:19)
+ 1 | async function f() {
+> 2 | for (await using basic = reader();;);
+ | ^
3 | }
4 |
-Cause: ';' expected (1:17)
-const m = module {
- ^"
+Cause: ';' or 'in' expected inside 'for' (2:19)
+ for (await using basic = reader();;);
+ ~~~~~~~~~~~~~~~~~^"
`;
-exports[`valid-module-block-top-level-await-using-binding.js [meriyah] format 1`] = `
-"Unexpected token: '{' (1:18)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
+exports[`valid-for-using-declaration.js format[meriyah] 1`] = `
+"Expected ';' (2:20)
+ 1 | async function f() {
+> 2 | for (await using basic = reader();;);
+ | ^^^^^
3 | }
4 |
-Cause: [1:17-1:18]: Unexpected token: '{'"
-`;
-
-exports[`valid-module-block-top-level-await-using-binding.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:17)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
- 3 | }
- 4 |"
-`;
-
-exports[`valid-module-block-top-level-await-using-binding.js [oxc-ts] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:17)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
- 3 | }
- 4 |"
-`;
-
-exports[`valid-module-block-top-level-await-using-binding.js [typescript] format 1`] = `
-"',' expected. (1:18)
-> 1 | const m = module {
- | ^
- 2 | await using foo = bar();
- 3 | }
- 4 |
-Cause: ',' expected."
+Cause: [2:19-2:24]: Expected ';'"
`;
exports[`valid-module-block-top-level-await-using-binding.js format 1`] = `
@@ -872,83 +793,83 @@ const m = module {
================================================================================
`;
-exports[`valid-module-block-top-level-using-binding.js [acorn] format 1`] = `
-"Unexpected token (1:8)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[acorn] 1`] = `
+"Unexpected token (1:18)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |
-Cause: Unexpected token (1:7)"
+Cause: Unexpected token (1:17)"
`;
-exports[`valid-module-block-top-level-using-binding.js [espree] format 1`] = `
-"Unexpected token { (1:8)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[espree] 1`] = `
+"Unexpected token { (1:18)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |
Cause: Unexpected token {"
`;
-exports[`valid-module-block-top-level-using-binding.js [flow] format 1`] = `
-"Unexpected token \`{\`, expected the end of an expression statement (\`;\`) (1:8)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[flow] 1`] = `
+"Unexpected token \`{\`, expected the token \`;\` (1:18)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |"
`;
-exports[`valid-module-block-top-level-using-binding.js [hermes] format 1`] = `
-"';' expected (1:7)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[hermes] 1`] = `
+"';' expected (1:17)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |
-Cause: ';' expected (1:7)
-module {
- ^"
+Cause: ';' expected (1:17)
+const m = module {
+ ^"
`;
-exports[`valid-module-block-top-level-using-binding.js [meriyah] format 1`] = `
-"Unexpected token: '{' (1:8)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[meriyah] 1`] = `
+"Unexpected token: '{' (1:18)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |
-Cause: [1:7-1:8]: Unexpected token: '{'"
+Cause: [1:17-1:18]: Unexpected token: '{'"
`;
-exports[`valid-module-block-top-level-using-binding.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:17)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |"
`;
-exports[`valid-module-block-top-level-using-binding.js [oxc-ts] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[oxc-ts] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:17)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |"
`;
-exports[`valid-module-block-top-level-using-binding.js [typescript] format 1`] = `
-"Namespace must be given a name. (1:8)
-> 1 | module {
- | ^
- 2 | using foo = bar();
+exports[`valid-module-block-top-level-await-using-binding.js format[typescript] 1`] = `
+"',' expected. (1:18)
+> 1 | const m = module {
+ | ^
+ 2 | await using foo = bar();
3 | }
4 |
-Cause: Namespace must be given a name."
+Cause: ',' expected."
`;
exports[`valid-module-block-top-level-using-binding.js format 1`] = `
@@ -969,6 +890,85 @@ module {
================================================================================
`;
+exports[`valid-module-block-top-level-using-binding.js format[acorn] 1`] = `
+"Unexpected token (1:8)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |
+Cause: Unexpected token (1:7)"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[espree] 1`] = `
+"Unexpected token { (1:8)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |
+Cause: Unexpected token {"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[flow] 1`] = `
+"Unexpected token \`{\`, expected the end of an expression statement (\`;\`) (1:8)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[hermes] 1`] = `
+"';' expected (1:7)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |
+Cause: ';' expected (1:7)
+module {
+ ^"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[meriyah] 1`] = `
+"Unexpected token: '{' (1:8)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |
+Cause: [1:7-1:8]: Unexpected token: '{'"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[oxc-ts] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |"
+`;
+
+exports[`valid-module-block-top-level-using-binding.js format[typescript] 1`] = `
+"Namespace must be given a name. (1:8)
+> 1 | module {
+ | ^
+ 2 | using foo = bar();
+ 3 | }
+ 4 |
+Cause: Namespace must be given a name."
+`;
+
exports[`valid-using-as-identifier-computed-member.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1001,23 +1001,6 @@ reader = getReader();
================================================================================
`;
-exports[`valid-using-as-identifier-for-await-of.js [flow] format 1`] = `
-"Unexpected token \`await\`, expected the token \`(\` (1:5)
-> 1 | for await (using of of);
- | ^^^^^
- 2 |"
-`;
-
-exports[`valid-using-as-identifier-for-await-of.js [hermes] format 1`] = `
-"'(' expected after 'for' (1:4)
-> 1 | for await (using of of);
- | ^
- 2 |
-Cause: '(' expected after 'for' (1:4)
-for await (using of of);
-~~~~^"
-`;
-
exports[`valid-using-as-identifier-for-await-of.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1032,24 +1015,21 @@ for await (using of of);
================================================================================
`;
-exports[`valid-using-as-identifier-for-in.js [acorn] format 1`] = `
-"Unexpected keyword 'in' (1:12)
-> 1 | for (using in []);
- | ^
- 2 | for (using.foo in []);
- 3 | for (using().foo in []);
- 4 | for (using\`\`.foo in []);
-Cause: Unexpected keyword 'in' (1:11)"
+exports[`valid-using-as-identifier-for-await-of.js format[flow] 1`] = `
+"Unexpected token \`await\`, expected the token \`(\` (1:5)
+> 1 | for await (using of of);
+ | ^^^^^
+ 2 |"
`;
-exports[`valid-using-as-identifier-for-in.js [espree] format 1`] = `
-"Unexpected keyword 'in' (1:12)
-> 1 | for (using in []);
- | ^
- 2 | for (using.foo in []);
- 3 | for (using().foo in []);
- 4 | for (using\`\`.foo in []);
-Cause: Unexpected keyword 'in'"
+exports[`valid-using-as-identifier-for-await-of.js format[hermes] 1`] = `
+"'(' expected after 'for' (1:4)
+> 1 | for await (using of of);
+ | ^
+ 2 |
+Cause: '(' expected after 'for' (1:4)
+for await (using of of);
+~~~~^"
`;
exports[`valid-using-as-identifier-for-in.js format 1`] = `
@@ -1072,6 +1052,26 @@ for (using\`\`.foo in []);
================================================================================
`;
+exports[`valid-using-as-identifier-for-in.js format[acorn] 1`] = `
+"Unexpected keyword 'in' (1:12)
+> 1 | for (using in []);
+ | ^
+ 2 | for (using.foo in []);
+ 3 | for (using().foo in []);
+ 4 | for (using\`\`.foo in []);
+Cause: Unexpected keyword 'in' (1:11)"
+`;
+
+exports[`valid-using-as-identifier-for-in.js format[espree] 1`] = `
+"Unexpected keyword 'in' (1:12)
+> 1 | for (using in []);
+ | ^
+ 2 | for (using.foo in []);
+ 3 | for (using().foo in []);
+ 4 | for (using\`\`.foo in []);
+Cause: Unexpected keyword 'in'"
+`;
+
exports[`valid-using-as-identifier-for-init.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1108,22 +1108,6 @@ for (using\`\`.foo of of);
================================================================================
`;
-exports[`valid-using-as-identifier-in.js [acorn] format 1`] = `
-"Unexpected keyword 'in' (1:7)
-> 1 | using in using instanceof using;
- | ^
- 2 |
-Cause: Unexpected keyword 'in' (1:6)"
-`;
-
-exports[`valid-using-as-identifier-in.js [espree] format 1`] = `
-"Unexpected keyword 'in' (1:7)
-> 1 | using in using instanceof using;
- | ^
- 2 |
-Cause: Unexpected keyword 'in'"
-`;
-
exports[`valid-using-as-identifier-in.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1138,35 +1122,20 @@ using in using instanceof using;
================================================================================
`;
-exports[`valid-using-binding-basic.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
- 1 | {
-> 2 | using basic = getReader();
- | ^^^^^
- 3 | }
- 4 |"
+exports[`valid-using-as-identifier-in.js format[acorn] 1`] = `
+"Unexpected keyword 'in' (1:7)
+> 1 | using in using instanceof using;
+ | ^
+ 2 |
+Cause: Unexpected keyword 'in' (1:6)"
`;
-exports[`valid-using-binding-basic.js [hermes] format 1`] = `
-"';' expected (2:8)
- 1 | {
-> 2 | using basic = getReader();
- | ^
- 3 | }
- 4 |
-Cause: ';' expected (2:8)
- using basic = getReader();
- ^"
-`;
-
-exports[`valid-using-binding-basic.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:9)
- 1 | {
-> 2 | using basic = getReader();
- | ^^^^^
- 3 | }
- 4 |
-Cause: [2:8-2:13]: Unexpected token: 'identifier'"
+exports[`valid-using-as-identifier-in.js format[espree] 1`] = `
+"Unexpected keyword 'in' (1:7)
+> 1 | using in using instanceof using;
+ | ^
+ 2 |
+Cause: Unexpected keyword 'in'"
`;
exports[`valid-using-binding-basic.js format 1`] = `
@@ -1187,29 +1156,35 @@ printWidth: 80
================================================================================
`;
-exports[`valid-using-binding-escaped.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:9)
-> 1 | { using \\u0061b = c; }
- | ^^^^^^^
- 2 |"
+exports[`valid-using-binding-basic.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
+ 1 | {
+> 2 | using basic = getReader();
+ | ^^^^^
+ 3 | }
+ 4 |"
`;
-exports[`valid-using-binding-escaped.js [hermes] format 1`] = `
-"';' expected (1:8)
-> 1 | { using \\u0061b = c; }
+exports[`valid-using-binding-basic.js format[hermes] 1`] = `
+"';' expected (2:8)
+ 1 | {
+> 2 | using basic = getReader();
| ^
- 2 |
-Cause: ';' expected (1:8)
-{ using \\u0061b = c; }
+ 3 | }
+ 4 |
+Cause: ';' expected (2:8)
+ using basic = getReader();
^"
`;
-exports[`valid-using-binding-escaped.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (1:9)
-> 1 | { using \\u0061b = c; }
- | ^^^^^^^
- 2 |
-Cause: [1:8-1:15]: Unexpected token: 'identifier'"
+exports[`valid-using-binding-basic.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:9)
+ 1 | {
+> 2 | using basic = getReader();
+ | ^^^^^
+ 3 | }
+ 4 |
+Cause: [2:8-2:13]: Unexpected token: 'identifier'"
`;
exports[`valid-using-binding-escaped.js format 1`] = `
@@ -1228,44 +1203,29 @@ printWidth: 80
================================================================================
`;
-exports[`valid-using-binding-non-bmp.js [acorn] format 1`] = `
-"Unexpected token (1:9)
-> 1 | { using ð ®· = foo(); }
- | ^
- 2 |
-Cause: Unexpected token (1:8)"
-`;
-
-exports[`valid-using-binding-non-bmp.js [espree] format 1`] = `
-"Unexpected token ð ®· (1:9)
-> 1 | { using ð ®· = foo(); }
- | ^
- 2 |
-Cause: Unexpected token ð ®·"
-`;
-
-exports[`valid-using-binding-non-bmp.js [flow] format 1`] = `
+exports[`valid-using-binding-escaped.js format[flow] 1`] = `
"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:9)
-> 1 | { using ð ®· = foo(); }
- | ^
+> 1 | { using \\u0061b = c; }
+ | ^^^^^^^
2 |"
`;
-exports[`valid-using-binding-non-bmp.js [hermes] format 1`] = `
+exports[`valid-using-binding-escaped.js format[hermes] 1`] = `
"';' expected (1:8)
-> 1 | { using ð ®· = foo(); }
+> 1 | { using \\u0061b = c; }
| ^
2 |
Cause: ';' expected (1:8)
-{ using ð ®· = foo(); }"
+{ using \\u0061b = c; }
+ ^"
`;
-exports[`valid-using-binding-non-bmp.js [meriyah] format 1`] = `
+exports[`valid-using-binding-escaped.js format[meriyah] 1`] = `
"Unexpected token: 'identifier' (1:9)
-> 1 | { using ð ®· = foo(); }
- | ^^
+> 1 | { using \\u0061b = c; }
+ | ^^^^^^^
2 |
-Cause: [1:8-1:10]: Unexpected token: 'identifier'"
+Cause: [1:8-1:15]: Unexpected token: 'identifier'"
`;
exports[`valid-using-binding-non-bmp.js format 1`] = `
@@ -1284,38 +1244,44 @@ printWidth: 80
================================================================================
`;
-exports[`valid-using-binding-using.js [flow] format 1`] = `
-"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
- 1 | {
-> 2 | using using = of;
- | ^^^^^
- 3 | for (using using of of);
- 4 | }
- 5 |"
+exports[`valid-using-binding-non-bmp.js format[acorn] 1`] = `
+"Unexpected token (1:9)
+> 1 | { using ð ®· = foo(); }
+ | ^
+ 2 |
+Cause: Unexpected token (1:8)"
`;
-exports[`valid-using-binding-using.js [hermes] format 1`] = `
-"';' expected (2:8)
- 1 | {
-> 2 | using using = of;
+exports[`valid-using-binding-non-bmp.js format[espree] 1`] = `
+"Unexpected token ð ®· (1:9)
+> 1 | { using ð ®· = foo(); }
+ | ^
+ 2 |
+Cause: Unexpected token ð ®·"
+`;
+
+exports[`valid-using-binding-non-bmp.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (1:9)
+> 1 | { using ð ®· = foo(); }
+ | ^
+ 2 |"
+`;
+
+exports[`valid-using-binding-non-bmp.js format[hermes] 1`] = `
+"';' expected (1:8)
+> 1 | { using ð ®· = foo(); }
| ^
- 3 | for (using using of of);
- 4 | }
- 5 |
-Cause: ';' expected (2:8)
- using using = of;
- ^"
+ 2 |
+Cause: ';' expected (1:8)
+{ using ð ®· = foo(); }"
`;
-exports[`valid-using-binding-using.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:9)
- 1 | {
-> 2 | using using = of;
- | ^^^^^
- 3 | for (using using of of);
- 4 | }
- 5 |
-Cause: [2:8-2:13]: Unexpected token: 'identifier'"
+exports[`valid-using-binding-non-bmp.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (1:9)
+> 1 | { using ð ®· = foo(); }
+ | ^^
+ 2 |
+Cause: [1:8-1:10]: Unexpected token: 'identifier'"
`;
exports[`valid-using-binding-using.js format 1`] = `
@@ -1337,3 +1303,37 @@ printWidth: 80
================================================================================
`;
+
+exports[`valid-using-binding-using.js format[flow] 1`] = `
+"Unexpected identifier, expected the end of an expression statement (\`;\`) (2:9)
+ 1 | {
+> 2 | using using = of;
+ | ^^^^^
+ 3 | for (using using of of);
+ 4 | }
+ 5 |"
+`;
+
+exports[`valid-using-binding-using.js format[hermes] 1`] = `
+"';' expected (2:8)
+ 1 | {
+> 2 | using using = of;
+ | ^
+ 3 | for (using using of of);
+ 4 | }
+ 5 |
+Cause: ';' expected (2:8)
+ using using = of;
+ ^"
+`;
+
+exports[`valid-using-binding-using.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:9)
+ 1 | {
+> 2 | using using = of;
+ | ^^^^^
+ 3 | for (using using of of);
+ 4 | }
+ 5 |
+Cause: [2:8-2:13]: Unexpected token: 'identifier'"
+`;
diff --git a/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap b/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap
index 5c45036eb..9ff116ad5 100644
--- a/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap
+++ b/tests/format/js/export-default/escaped/__snapshots__/format.test.js.snap
@@ -1,53 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`default-escaped.js [acorn] format 1`] = `
-"Unexpected token (2:8)
- 1 | // export asyn\\u{63} from "async";
-> 2 | export n\\u{63} from "async";
- | ^
-Cause: Unexpected token (2:7)"
-`;
-
-exports[`default-escaped.js [espree] format 1`] = `
-"Unexpected token n\\u{63} (2:8)
- 1 | // export asyn\\u{63} from "async";
-> 2 | export n\\u{63} from "async";
- | ^
-Cause: Unexpected token n\\u{63}"
-`;
-
-exports[`default-escaped.js [flow] format 1`] = `
-"Unexpected identifier, expected a declaration, statement or export specifiers (2:8)
- 1 | // export asyn\\u{63} from "async";
-> 2 | export n\\u{63} from "async";
- | ^^^^^^^"
-`;
-
-exports[`default-escaped.js [hermes] format 1`] = `
-"expected declaration in export (2:7)
- 1 | // export asyn\\u{63} from "async";
-> 2 | export n\\u{63} from "async";
- | ^
-Cause: expected declaration in export (2:7)
-export n\\u{63} from "async";
- ^~~~~~~"
-`;
-
-exports[`default-escaped.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:8)
- 1 | // export asyn\\u{63} from "async";
-> 2 | export n\\u{63} from "async";
- | ^^^^^^^
-Cause: [2:7-2:14]: Unexpected token: 'identifier'"
-`;
-
-exports[`default-escaped.js [oxc] format 1`] = `
-"Unexpected token (2:8)
- 1 | // export asyn\\u{63} from "async";
-> 2 | export n\\u{63} from "async";
- | ^^^^^^^"
-`;
-
exports[`default-escaped.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow"]
@@ -62,3 +14,51 @@ export nc from "async";
================================================================================
`;
+
+exports[`default-escaped.js format[acorn] 1`] = `
+"Unexpected token (2:8)
+ 1 | // export asyn\\u{63} from "async";
+> 2 | export n\\u{63} from "async";
+ | ^
+Cause: Unexpected token (2:7)"
+`;
+
+exports[`default-escaped.js format[espree] 1`] = `
+"Unexpected token n\\u{63} (2:8)
+ 1 | // export asyn\\u{63} from "async";
+> 2 | export n\\u{63} from "async";
+ | ^
+Cause: Unexpected token n\\u{63}"
+`;
+
+exports[`default-escaped.js format[flow] 1`] = `
+"Unexpected identifier, expected a declaration, statement or export specifiers (2:8)
+ 1 | // export asyn\\u{63} from "async";
+> 2 | export n\\u{63} from "async";
+ | ^^^^^^^"
+`;
+
+exports[`default-escaped.js format[hermes] 1`] = `
+"expected declaration in export (2:7)
+ 1 | // export asyn\\u{63} from "async";
+> 2 | export n\\u{63} from "async";
+ | ^
+Cause: expected declaration in export (2:7)
+export n\\u{63} from "async";
+ ^~~~~~~"
+`;
+
+exports[`default-escaped.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:8)
+ 1 | // export asyn\\u{63} from "async";
+> 2 | export n\\u{63} from "async";
+ | ^^^^^^^
+Cause: [2:7-2:14]: Unexpected token: 'identifier'"
+`;
+
+exports[`default-escaped.js format[oxc] 1`] = `
+"Unexpected token (2:8)
+ 1 | // export asyn\\u{63} from "async";
+> 2 | export n\\u{63} from "async";
+ | ^^^^^^^"
+`;
diff --git a/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap b/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap
index a0a8968f2..58bf77994 100644
--- a/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap
+++ b/tests/format/js/export-default/export-default-from/__snapshots__/format.test.js.snap
@@ -1,48 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`export.js [acorn] format 1`] = `
-"Unexpected token (2:8)
- 1 | export * as ns from 'mod';
-> 2 | export v from 'mod';
- | ^
- 3 | export a, * as b from 'mod';
- 4 | export c, { foo } from 'mod';
- 5 | export * as d from 'mod';
-Cause: Unexpected token (2:7)"
-`;
-
-exports[`export.js [espree] format 1`] = `
-"Unexpected token v (2:8)
- 1 | export * as ns from 'mod';
-> 2 | export v from 'mod';
- | ^
- 3 | export a, * as b from 'mod';
- 4 | export c, { foo } from 'mod';
- 5 | export * as d from 'mod';
-Cause: Unexpected token v"
-`;
-
-exports[`export.js [meriyah] format 1`] = `
-"Unexpected token: 'identifier' (2:8)
- 1 | export * as ns from 'mod';
-> 2 | export v from 'mod';
- | ^
- 3 | export a, * as b from 'mod';
- 4 | export c, { foo } from 'mod';
- 5 | export * as d from 'mod';
-Cause: [2:7-2:8]: Unexpected token: 'identifier'"
-`;
-
-exports[`export.js [oxc] format 1`] = `
-"Unexpected token (2:8)
- 1 | export * as ns from 'mod';
-> 2 | export v from 'mod';
- | ^
- 3 | export a, * as b from 'mod';
- 4 | export c, { foo } from 'mod';
- 5 | export * as d from 'mod';"
-`;
-
exports[`export.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -73,3 +30,46 @@ export {
================================================================================
`;
+
+exports[`export.js format[acorn] 1`] = `
+"Unexpected token (2:8)
+ 1 | export * as ns from 'mod';
+> 2 | export v from 'mod';
+ | ^
+ 3 | export a, * as b from 'mod';
+ 4 | export c, { foo } from 'mod';
+ 5 | export * as d from 'mod';
+Cause: Unexpected token (2:7)"
+`;
+
+exports[`export.js format[espree] 1`] = `
+"Unexpected token v (2:8)
+ 1 | export * as ns from 'mod';
+> 2 | export v from 'mod';
+ | ^
+ 3 | export a, * as b from 'mod';
+ 4 | export c, { foo } from 'mod';
+ 5 | export * as d from 'mod';
+Cause: Unexpected token v"
+`;
+
+exports[`export.js format[meriyah] 1`] = `
+"Unexpected token: 'identifier' (2:8)
+ 1 | export * as ns from 'mod';
+> 2 | export v from 'mod';
+ | ^
+ 3 | export a, * as b from 'mod';
+ 4 | export c, { foo } from 'mod';
+ 5 | export * as d from 'mod';
+Cause: [2:7-2:8]: Unexpected token: 'identifier'"
+`;
+
+exports[`export.js format[oxc] 1`] = `
+"Unexpected token (2:8)
+ 1 | export * as ns from 'mod';
+> 2 | export v from 'mod';
+ | ^
+ 3 | export a, * as b from 'mod';
+ 4 | export c, { foo } from 'mod';
+ 5 | export * as d from 'mod';"
+`;
diff --git a/tests/format/js/export-star/__snapshots__/format.test.js.snap b/tests/format/js/export-star/__snapshots__/format.test.js.snap
index c74df6b2c..d176ab275 100644
--- a/tests/format/js/export-star/__snapshots__/format.test.js.snap
+++ b/tests/format/js/export-star/__snapshots__/format.test.js.snap
@@ -64,23 +64,6 @@ export * as from from "foo";
================================================================================
`;
-exports[`export-star-as-string.js [flow] format 1`] = `
-"Unexpected string, expected an identifier (1:13)
-> 1 | export * as 'foo' from 'foo'
- | ^^^^^
- 2 |"
-`;
-
-exports[`export-star-as-string.js [hermes] format 1`] = `
-"'identifier' expected in export clause (1:12)
-> 1 | export * as 'foo' from 'foo'
- | ^
- 2 |
-Cause: 'identifier' expected in export clause (1:12)
-export * as 'foo' from 'foo'
-~~~~~~~~~~~~^"
-`;
-
exports[`export-star-as-string.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -95,20 +78,20 @@ export * as "foo" from "foo";
================================================================================
`;
-exports[`export-star-as-string2.js [flow] format 1`] = `
+exports[`export-star-as-string.js format[flow] 1`] = `
"Unexpected string, expected an identifier (1:13)
-> 1 | export * as "foo" from 'foo'
+> 1 | export * as 'foo' from 'foo'
| ^^^^^
2 |"
`;
-exports[`export-star-as-string2.js [hermes] format 1`] = `
+exports[`export-star-as-string.js format[hermes] 1`] = `
"'identifier' expected in export clause (1:12)
-> 1 | export * as "foo" from 'foo'
+> 1 | export * as 'foo' from 'foo'
| ^
2 |
Cause: 'identifier' expected in export clause (1:12)
-export * as "foo" from 'foo'
+export * as 'foo' from 'foo'
~~~~~~~~~~~~^"
`;
@@ -125,3 +108,20 @@ export * as "foo" from "foo";
================================================================================
`;
+
+exports[`export-star-as-string2.js format[flow] 1`] = `
+"Unexpected string, expected an identifier (1:13)
+> 1 | export * as "foo" from 'foo'
+ | ^^^^^
+ 2 |"
+`;
+
+exports[`export-star-as-string2.js format[hermes] 1`] = `
+"'identifier' expected in export clause (1:12)
+> 1 | export * as "foo" from 'foo'
+ | ^
+ 2 |
+Cause: 'identifier' expected in export clause (1:12)
+export * as "foo" from 'foo'
+~~~~~~~~~~~~^"
+`;
diff --git a/tests/format/js/export/__snapshots__/format.test.js.snap b/tests/format/js/export/__snapshots__/format.test.js.snap
index f34f423e8..3eb18c810 100644
--- a/tests/format/js/export/__snapshots__/format.test.js.snap
+++ b/tests/format/js/export/__snapshots__/format.test.js.snap
@@ -345,38 +345,6 @@ export * as foo from "./baz";
================================================================================
`;
-exports[`undefined.js [acorn] format 1`] = `
-"Export 'undefinedExport' is not defined (1:10)
-> 1 | export { undefinedExport };
- | ^
- 2 |
-Cause: Export 'undefinedExport' is not defined (1:9)"
-`;
-
-exports[`undefined.js [espree] format 1`] = `
-"Export 'undefinedExport' is not defined (1:10)
-> 1 | export { undefinedExport };
- | ^
- 2 |
-Cause: Export 'undefinedExport' is not defined"
-`;
-
-exports[`undefined.js - {"bracketSpacing":false} [acorn] format 1`] = `
-"Export 'undefinedExport' is not defined (1:10)
-> 1 | export { undefinedExport };
- | ^
- 2 |
-Cause: Export 'undefinedExport' is not defined (1:9)"
-`;
-
-exports[`undefined.js - {"bracketSpacing":false} [espree] format 1`] = `
-"Export 'undefinedExport' is not defined (1:10)
-> 1 | export { undefinedExport };
- | ^
- 2 |
-Cause: Export 'undefinedExport' is not defined"
-`;
-
exports[`undefined.js - {"bracketSpacing":false} format 1`] = `
====================================options=====================================
bracketSpacing: false
@@ -392,6 +360,22 @@ export {undefinedExport};
================================================================================
`;
+exports[`undefined.js - {"bracketSpacing":false} format[acorn] 1`] = `
+"Export 'undefinedExport' is not defined (1:10)
+> 1 | export { undefinedExport };
+ | ^
+ 2 |
+Cause: Export 'undefinedExport' is not defined (1:9)"
+`;
+
+exports[`undefined.js - {"bracketSpacing":false} format[espree] 1`] = `
+"Export 'undefinedExport' is not defined (1:10)
+> 1 | export { undefinedExport };
+ | ^
+ 2 |
+Cause: Export 'undefinedExport' is not defined"
+`;
+
exports[`undefined.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -405,3 +389,19 @@ export { undefinedExport };
================================================================================
`;
+
+exports[`undefined.js format[acorn] 1`] = `
+"Export 'undefinedExport' is not defined (1:10)
+> 1 | export { undefinedExport };
+ | ^
+ 2 |
+Cause: Export 'undefinedExport' is not defined (1:9)"
+`;
+
+exports[`undefined.js format[espree] 1`] = `
+"Export 'undefinedExport' is not defined (1:10)
+> 1 | export { undefinedExport };
+ | ^
+ 2 |
+Cause: Export 'undefinedExport' is not defined"
+`;
diff --git a/tests/format/js/for-of/__snapshots__/format.test.js.snap b/tests/format/js/for-of/__snapshots__/format.test.js.snap
index 76e0e5b49..1345f9cb2 100644
--- a/tests/format/js/for-of/__snapshots__/format.test.js.snap
+++ b/tests/format/js/for-of/__snapshots__/format.test.js.snap
@@ -1,17 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`async-identifier.js [meriyah] format 1`] = `
-"Expected '=>' (6:23)
- 4 |
- 5 | async function f() {
-> 6 | for await (async of []);
- | ^
- 7 | for await ((async) of []);
- 8 | for await ((foo) of async);
- 9 | for await ((foo) of []) async;
-Cause: [6:22-6:23]: Expected '=>'"
-`;
-
exports[`async-identifier.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -43,3 +31,15 @@ async function f() {
================================================================================
`;
+
+exports[`async-identifier.js format[meriyah] 1`] = `
+"Expected '=>' (6:23)
+ 4 |
+ 5 | async function f() {
+> 6 | for await (async of []);
+ | ^
+ 7 | for await ((async) of []);
+ 8 | for await ((foo) of async);
+ 9 | for await ((foo) of []) async;
+Cause: [6:22-6:23]: Expected '=>'"
+`;
diff --git a/tests/format/js/for/__snapshots__/format.test.js.snap b/tests/format/js/for/__snapshots__/format.test.js.snap
index efbe39dc0..4fbe4630e 100644
--- a/tests/format/js/for/__snapshots__/format.test.js.snap
+++ b/tests/format/js/for/__snapshots__/format.test.js.snap
@@ -947,29 +947,6 @@ for (var i = 0; i < 10; ++i) 0;
================================================================================
`;
-exports[`for-in-with-initializer.js [flow] format 1`] = `
-"Invalid left-hand side in for-in (3:6)
- 1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
- 2 |
-> 3 | for (var a = (b in c) in {});
- | ^^^^^^^^^^^^^^^^
- 4 | for (var a = 1 || (b in c) in {});
- 5 | for (var a = 1 + (2 || (b in c)) in {});
- 6 | for (var a = (() => b in c) in {});"
-`;
-
-exports[`for-in-with-initializer.js [typescript] format 1`] = `
-"',' expected. (9:17)
- 7 | for (var a = 1 || (() => b in c) in {});
- 8 | for (var a = (() => { b in c; }) in {});
-> 9 | for (var a = [b in c] in {});
- | ^
- 10 | for (var a = {b: b in c} in {});
- 11 | // Meriyah can't parse
- 12 | // for (var a = (x = b in c) => {} in {});
-Cause: ',' expected."
-`;
-
exports[`for-in-with-initializer.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1012,6 +989,29 @@ for (var a = (function (x = b in c) {}) in {});
================================================================================
`;
+exports[`for-in-with-initializer.js format[flow] 1`] = `
+"Invalid left-hand side in for-in (3:6)
+ 1 | // https://github.com/babel/babel/blob/HEAD/packages/babel-generator/test/fixtures/parentheses/in-inside-for/input.js
+ 2 |
+> 3 | for (var a = (b in c) in {});
+ | ^^^^^^^^^^^^^^^^
+ 4 | for (var a = 1 || (b in c) in {});
+ 5 | for (var a = 1 + (2 || (b in c)) in {});
+ 6 | for (var a = (() => b in c) in {});"
+`;
+
+exports[`for-in-with-initializer.js format[typescript] 1`] = `
+"',' expected. (9:17)
+ 7 | for (var a = 1 || (() => b in c) in {});
+ 8 | for (var a = (() => { b in c; }) in {});
+> 9 | for (var a = [b in c] in {});
+ | ^
+ 10 | for (var a = {b: b in c} in {});
+ 11 | // Meriyah can't parse
+ 12 | // for (var a = (x = b in c) => {} in {});
+Cause: ',' expected."
+`;
+
exports[`in.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1065,29 +1065,6 @@ for (
================================================================================
`;
-exports[`parentheses.js [flow] format 1`] = `
-"Unexpected token \`=>\`, expected the token \`;\` (11:27)
- 9 | for (var a = [b in c];;);
- 10 | for (var a = {b: b in c};;);
-> 11 | for (var a = (x = b in c) => {};;);
- | ^^
- 12 | for (var a = class extends (b in c) {};;);
- 13 | for (var a = function (x = b in c) {};;);
- 14 |"
-`;
-
-exports[`parentheses.js [typescript] format 1`] = `
-"',' expected. (9:17)
- 7 | for (var a = 1 || (() => b in c);;);
- 8 | for (var a = (() => { b in c; });;);
-> 9 | for (var a = [b in c];;);
- | ^
- 10 | for (var a = {b: b in c};;);
- 11 | for (var a = (x = b in c) => {};;);
- 12 | for (var a = class extends (b in c) {};;);
-Cause: ',' expected."
-`;
-
exports[`parentheses.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -1186,6 +1163,29 @@ for (; (a = function (x = b in c) {}); );
================================================================================
`;
+exports[`parentheses.js format[flow] 1`] = `
+"Unexpected token \`=>\`, expected the token \`;\` (11:27)
+ 9 | for (var a = [b in c];;);
+ 10 | for (var a = {b: b in c};;);
+> 11 | for (var a = (x = b in c) => {};;);
+ | ^^
+ 12 | for (var a = class extends (b in c) {};;);
+ 13 | for (var a = function (x = b in c) {};;);
+ 14 |"
+`;
+
+exports[`parentheses.js format[typescript] 1`] = `
+"',' expected. (9:17)
+ 7 | for (var a = 1 || (() => b in c);;);
+ 8 | for (var a = (() => { b in c; });;);
+> 9 | for (var a = [b in c];;);
+ | ^
+ 10 | for (var a = {b: b in c};;);
+ 11 | for (var a = (x = b in c) => {};;);
+ 12 | for (var a = class extends (b in c) {};;);
+Cause: ',' expected."
+`;
+
exports[`var.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
diff --git a/tests/format/js/ignore/__snapshots__/format.test.js.snap b/tests/format/js/ignore/__snapshots__/format.test.js.snap
index c6b21a949..6cd1bcac0 100644
--- a/tests/format/js/ignore/__snapshots__/format.test.js.snap
+++ b/tests/format/js/ignore/__snapshots__/format.test.js.snap
@@ -1,54 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`class-expression-decorator.js [acorn] format 1`] = `
-"Unexpected character '@' (3:3)
- 1 | (
- 2 | // prettier-ignore
-> 3 | @decorator
- | ^
- 4 | class {}
- 5 | );
- 6 |
-Cause: Unexpected character '@' (3:2)"
-`;
-
-exports[`class-expression-decorator.js [espree] format 1`] = `
-"Unexpected character '@' (3:3)
- 1 | (
- 2 | // prettier-ignore
-> 3 | @decorator
- | ^
- 4 | class {}
- 5 | );
- 6 |
-Cause: Unexpected character '@'"
-`;
-
-exports[`class-expression-decorator.js [flow] format 1`] = `
-"Unexpected token \`@\` (3:3)
- 1 | (
- 2 | // prettier-ignore
-> 3 | @decorator
- | ^
- 4 | class {}
- 5 | );
- 6 |"
-`;
-
-exports[`class-expression-decorator.js [hermes] format 1`] = `
-"unrecognized character '@' (3:2)
- 1 | (
- 2 | // prettier-ignore
-> 3 | @decorator
- | ^
- 4 | class {}
- 5 | );
- 6 |
-Cause: unrecognized character '@' (3:2)
- @decorator
- ^"
-`;
-
exports[`class-expression-decorator.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -71,35 +22,53 @@ printWidth: 80
================================================================================
`;
-exports[`decorator.js [acorn] format 1`] = `
-"Unexpected character '@' (2:1)
- 1 | // prettier-ignore
-> 2 | @decorator
- | ^
- 3 | class A {}
- 4 |
-Cause: Unexpected character '@' (2:0)"
+exports[`class-expression-decorator.js format[acorn] 1`] = `
+"Unexpected character '@' (3:3)
+ 1 | (
+ 2 | // prettier-ignore
+> 3 | @decorator
+ | ^
+ 4 | class {}
+ 5 | );
+ 6 |
+Cause: Unexpected character '@' (3:2)"
`;
-exports[`decorator.js [espree] format 1`] = `
-"Unexpected character '@' (2:1)
- 1 | // prettier-ignore
-> 2 | @decorator
- | ^
- 3 | class A {}
- 4 |
+exports[`class-expression-decorator.js format[espree] 1`] = `
+"Unexpected character '@' (3:3)
+ 1 | (
+ 2 | // prettier-ignore
+> 3 | @decorator
+ | ^
+ 4 | class {}
+ 5 | );
+ 6 |
Cause: Unexpected character '@'"
`;
-exports[`decorator.js [hermes] format 1`] = `
-"unrecognized character '@' (2:0)
- 1 | // prettier-ignore
-> 2 | @decorator
- 3 | class A {}
- 4 |
-Cause: unrecognized character '@' (2:0)
-@decorator
-^"
+exports[`class-expression-decorator.js format[flow] 1`] = `
+"Unexpected token \`@\` (3:3)
+ 1 | (
+ 2 | // prettier-ignore
+> 3 | @decorator
+ | ^
+ 4 | class {}
+ 5 | );
+ 6 |"
+`;
+
+exports[`class-expression-decorator.js format[hermes] 1`] = `
+"unrecognized character '@' (3:2)
+ 1 | (
+ 2 | // prettier-ignore
+> 3 | @decorator
+ | ^
+ 4 | class {}
+ 5 | );
+ 6 |
+Cause: unrecognized character '@' (3:2)
+ @decorator
+ ^"
`;
exports[`decorator.js format 1`] = `
@@ -120,6 +89,37 @@ class A {}
================================================================================
`;
+exports[`decorator.js format[acorn] 1`] = `
+"Unexpected character '@' (2:1)
+ 1 | // prettier-ignore
+> 2 | @decorator
+ | ^
+ 3 | class A {}
+ 4 |
+Cause: Unexpected character '@' (2:0)"
+`;
+
+exports[`decorator.js format[espree] 1`] = `
+"Unexpected character '@' (2:1)
+ 1 | // prettier-ignore
+> 2 | @decorator
+ | ^
+ 3 | class A {}
+ 4 |
+Cause: Unexpected character '@'"
+`;
+
+exports[`decorator.js format[hermes] 1`] = `
+"unrecognized character '@' (2:0)
+ 1 | // prettier-ignore
+> 2 | @decorator
+ 3 | class A {}
+ 4 |
+Cause: unrecognized character '@' (2:0)
+@decorator
+^"
+`;
+
exports[`ignore.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
diff --git a/tests/format/js/import-assertions/__snapshots__/format.test.js.snap b/tests/format/js/import-assertions/__snapshots__/format.test.js.snap
index a84bb05e3..65af70a2e 100644
--- a/tests/format/js/import-assertions/__snapshots__/format.test.js.snap
+++ b/tests/format/js/import-assertions/__snapshots__/format.test.js.snap
@@ -14,30 +14,6 @@ import("./foo.json", { assert: { type: "json" } });
================================================================================
`;
-exports[`empty.js [babel-ts] format 1`] = `
-"Missing semicolon. (2:32)
- 1 | export * as foo from "foo.json"
-> 2 | export * as bar from "bar.json" assert { }
- | ^
- 3 | export * as baz from "baz.json" assert { /* comment */ }
- 4 |
- 5 | import * as foo from "foo.json"
-Cause: Missing semicolon. (2:31)"
-`;
-
-exports[`empty.js [hermes] format 1`] = `
-"';' expected (2:32)
- 1 | export * as foo from "foo.json"
-> 2 | export * as bar from "bar.json" assert { }
- | ^
- 3 | export * as baz from "baz.json" assert { /* comment */ }
- 4 |
- 5 | import * as foo from "foo.json"
-Cause: ';' expected (2:32)
-export * as bar from "bar.json" assert { }
- ^"
-`;
-
exports[`empty.js format 1`] = `
====================================options=====================================
parsers: ["oxc", "typescript", "hermes"]
@@ -63,28 +39,28 @@ import * as baz from "baz.json" /* comment */ assert {};
================================================================================
`;
-exports[`keyword-detect.js [babel-ts] format 1`] = `
-"Missing semicolon. (1:21)
-> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" }
- | ^
- 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
- 3 |
- 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
-Cause: Missing semicolon. (1:20)"
+exports[`empty.js format[babel-ts] 1`] = `
+"Missing semicolon. (2:32)
+ 1 | export * as foo from "foo.json"
+> 2 | export * as bar from "bar.json" assert { }
+ | ^
+ 3 | export * as baz from "baz.json" assert { /* comment */ }
+ 4 |
+ 5 | import * as foo from "foo.json"
+Cause: Missing semicolon. (2:31)"
`;
-exports[`keyword-detect.js [hermes] format 1`] = `
-"';' expected (4:52)
- 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
- 3 |
-> 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
- | ^
- 5 |
- 6 | export * from "./test.json" /* with */ assert /* with */ { type: "json" }
- 7 |
-Cause: ';' expected (4:52)
-export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
- ^"
+exports[`empty.js format[hermes] 1`] = `
+"';' expected (2:32)
+ 1 | export * as foo from "foo.json"
+> 2 | export * as bar from "bar.json" assert { }
+ | ^
+ 3 | export * as baz from "baz.json" assert { /* comment */ }
+ 4 |
+ 5 | import * as foo from "foo.json"
+Cause: ';' expected (2:32)
+export * as bar from "bar.json" assert { }
+ ^"
`;
exports[`keyword-detect.js format 1`] = `
@@ -111,12 +87,28 @@ export * from "./test.json" /* with */ /* with */ assert { type: "json" };
================================================================================
`;
-exports[`multi-types.js [babel-ts] format 1`] = `
-"Unexpected token (1:58)
-> 1 | import json from "./foo.json" assert { type: "json", type: "bar" };
- | ^
- 2 |
-Cause: Unexpected token (1:57)"
+exports[`keyword-detect.js format[babel-ts] 1`] = `
+"Missing semicolon. (1:21)
+> 1 | import "./test.json" /* with */ assert /* with */ { type: "json" }
+ | ^
+ 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
+ 3 |
+ 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
+Cause: Missing semicolon. (1:20)"
+`;
+
+exports[`keyword-detect.js format[hermes] 1`] = `
+"';' expected (4:52)
+ 2 | import {default as b} from "./test.json" /* with */ assert /* with */ { type: "json" }
+ 3 |
+> 4 | export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
+ | ^
+ 5 |
+ 6 | export * from "./test.json" /* with */ assert /* with */ { type: "json" }
+ 7 |
+Cause: ';' expected (4:52)
+export {default as e} from "./test.json" /* with */ assert /* with */ { type: "json" }
+ ^"
`;
exports[`multi-types.js format 1`] = `
@@ -133,12 +125,12 @@ import json from "./foo.json" assert { type: "json", type: "bar" };
================================================================================
`;
-exports[`non-type.js [babel-ts] format 1`] = `
-"Missing semicolon. (1:27)
-> 1 | import foo from "foo.json" assert { lazy: "true" };
- | ^
+exports[`multi-types.js format[babel-ts] 1`] = `
+"Unexpected token (1:58)
+> 1 | import json from "./foo.json" assert { type: "json", type: "bar" };
+ | ^
2 |
-Cause: Missing semicolon. (1:26)"
+Cause: Unexpected token (1:57)"
`;
exports[`non-type.js format 1`] = `
@@ -155,6 +147,14 @@ import foo from "foo.json" assert { lazy: "true" };
================================================================================
`;
+exports[`non-type.js format[babel-ts] 1`] = `
+"Missing semicolon. (1:27)
+> 1 | import foo from "foo.json" assert { lazy: "true" };
+ | ^
+ 2 |
+Cause: Missing semicolon. (1:26)"
+`;
+
exports[`not-import-assertions.js format 1`] = `
====================================options=====================================
parsers: ["oxc", "typescript", "hermes"]
@@ -171,28 +171,6 @@ assert({ type: "json" });
================================================================================
`;
-exports[`re-export.js [babel-ts] format 1`] = `
-"Missing semicolon. (1:43)
-> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
- | ^
- 2 | export * from "foo.json" assert { type: "json" };
- 3 | export * as foo3 from "foo.json" assert { type: "json" };
- 4 |
-Cause: Missing semicolon. (1:42)"
-`;
-
-exports[`re-export.js [hermes] format 1`] = `
-"';' expected (1:43)
-> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
- | ^
- 2 | export * from "foo.json" assert { type: "json" };
- 3 | export * as foo3 from "foo.json" assert { type: "json" };
- 4 |
-Cause: ';' expected (1:43)
-export { default as foo2 } from "foo.json" assert { type: "json" };
- ^"
-`;
-
exports[`re-export.js format 1`] = `
====================================options=====================================
parsers: ["oxc", "typescript", "hermes"]
@@ -211,12 +189,26 @@ export * as foo3 from "foo.json" assert { type: "json" };
================================================================================
`;
-exports[`static-import.js [babel-ts] format 1`] = `
-"Missing semicolon. (1:30)
-> 1 | import json from "./foo.json" assert { type: "json" };
- | ^
- 2 |
-Cause: Missing semicolon. (1:29)"
+exports[`re-export.js format[babel-ts] 1`] = `
+"Missing semicolon. (1:43)
+> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
+ | ^
+ 2 | export * from "foo.json" assert { type: "json" };
+ 3 | export * as foo3 from "foo.json" assert { type: "json" };
+ 4 |
+Cause: Missing semicolon. (1:42)"
+`;
+
+exports[`re-export.js format[hermes] 1`] = `
+"';' expected (1:43)
+> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
+ | ^
+ 2 | export * from "foo.json" assert { type: "json" };
+ 3 | export * as foo3 from "foo.json" assert { type: "json" };
+ 4 |
+Cause: ';' expected (1:43)
+export { default as foo2 } from "foo.json" assert { type: "json" };
+ ^"
`;
exports[`static-import.js format 1`] = `
@@ -233,12 +225,12 @@ import json from "./foo.json" assert { type: "json" };
================================================================================
`;
-exports[`without-from.js [babel-ts] format 1`] = `
-"Missing semicolon. (1:13)
-> 1 | import "foo" assert { type: "json" }
- | ^
+exports[`static-import.js format[babel-ts] 1`] = `
+"Missing semicolon. (1:30)
+> 1 | import json from "./foo.json" assert { type: "json" };
+ | ^
2 |
-Cause: Missing semicolon. (1:12)"
+Cause: Missing semicolon. (1:29)"
`;
exports[`without-from.js format 1`] = `
@@ -254,3 +246,11 @@ import "foo" assert { type: "json" };
================================================================================
`;
+
+exports[`without-from.js format[babel-ts] 1`] = `
+"Missing semicolon. (1:13)
+> 1 | import "foo" assert { type: "json" }
+ | ^
+ 2 |
+Cause: Missing semicolon. (1:12)"
+`;
diff --git a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap
index 4859d0cc9..cde1436f9 100644
--- a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap
+++ b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/format.test.js.snap
@@ -15,22 +15,6 @@ import("./foo.json", {assert: {type: "json"}});
================================================================================
`;
-exports[`empty.js - {"bracketSpacing":false} [babel-ts] format 1`] = `
-"Missing semicolon. (1:32)
-> 1 | export * as bar from "bar.json" assert { }
- | ^
-Cause: Missing semicolon. (1:31)"
-`;
-
-exports[`empty.js - {"bracketSpacing":false} [hermes] format 1`] = `
-"';' expected (1:32)
-> 1 | export * as bar from "bar.json" assert { }
- | ^
-Cause: ';' expected (1:32)
-export * as bar from "bar.json" assert { }
- ^"
-`;
-
exports[`empty.js - {"bracketSpacing":false} format 1`] = `
====================================options=====================================
bracketSpacing: false
@@ -45,22 +29,20 @@ export * as bar from "bar.json" assert {};
================================================================================
`;
-exports[`re-export.js - {"bracketSpacing":false} [babel-ts] format 1`] = `
-"Missing semicolon. (1:43)
-> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
- | ^
- 2 |
-Cause: Missing semicolon. (1:42)"
+exports[`empty.js - {"bracketSpacing":false} format[babel-ts] 1`] = `
+"Missing semicolon. (1:32)
+> 1 | export * as bar from "bar.json" assert { }
+ | ^
+Cause: Missing semicolon. (1:31)"
`;
-exports[`re-export.js - {"bracketSpacing":false} [hermes] format 1`] = `
-"';' expected (1:43)
-> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
- | ^
- 2 |
-Cause: ';' expected (1:43)
-export { default as foo2 } from "foo.json" assert { type: "json" };
- ^"
+exports[`empty.js - {"bracketSpacing":false} format[hermes] 1`] = `
+"';' expected (1:32)
+> 1 | export * as bar from "bar.json" assert { }
+ | ^
+Cause: ';' expected (1:32)
+export * as bar from "bar.json" assert { }
+ ^"
`;
exports[`re-export.js - {"bracketSpacing":false} format 1`] = `
@@ -78,12 +60,22 @@ export {default as foo2} from "foo.json" assert {type: "json"};
================================================================================
`;
-exports[`static-import.js - {"bracketSpacing":false} [babel-ts] format 1`] = `
-"Missing semicolon. (1:30)
-> 1 | import json from "./foo.json" assert { type: "json" };
- | ^
+exports[`re-export.js - {"bracketSpacing":false} format[babel-ts] 1`] = `
+"Missing semicolon. (1:43)
+> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
+ | ^
2 |
-Cause: Missing semicolon. (1:29)"
+Cause: Missing semicolon. (1:42)"
+`;
+
+exports[`re-export.js - {"bracketSpacing":false} format[hermes] 1`] = `
+"';' expected (1:43)
+> 1 | export { default as foo2 } from "foo.json" assert { type: "json" };
+ | ^
+ 2 |
+Cause: ';' expected (1:43)
+export { default as foo2 } from "foo.json" assert { type: "json" };
+ ^"
`;
exports[`static-import.js - {"bracketSpacing":false} format 1`] = `
@@ -100,3 +92,11 @@ import json from "./foo.json" assert {type: "json"};
================================================================================
`;
+
+exports[`static-import.js - {"bracketSpacing":false} format[babel-ts] 1`] = `
+"Missing semicolon. (1:30)
+> 1 | import json from "./foo.json" assert { type: "json" };
+ | ^
+ 2 |
+Cause: Missing semicolon. (1:29)"
+`;
diff --git a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap
index 337c3360a..5f06b6fde 100644
--- a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap
+++ b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap
@@ -178,30 +178,6 @@ import(
================================================================================
`;
-exports[`multi-types.js [acorn] format 1`] = `
-"Duplicate attribute key 'type' (1:52)
-> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
- | ^
- 2 |
-Cause: Duplicate attribute key 'type' (1:51)"
-`;
-
-exports[`multi-types.js [espree] format 1`] = `
-"Duplicate attribute key 'type' (1:52)
-> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
- | ^
- 2 |
-Cause: Duplicate attribute key 'type'"
-`;
-
-exports[`multi-types.js [meriyah] format 1`] = `
-"Duplicate binding 'type' (1:64)
-> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
- | ^
- 2 |
-Cause: [1:63-1:64]: Duplicate binding 'type'"
-`;
-
exports[`multi-types.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
@@ -216,6 +192,30 @@ import json from "./foo.json" with { type: "json", type: "bar" };
================================================================================
`;
+exports[`multi-types.js format[acorn] 1`] = `
+"Duplicate attribute key 'type' (1:52)
+> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
+ | ^
+ 2 |
+Cause: Duplicate attribute key 'type' (1:51)"
+`;
+
+exports[`multi-types.js format[espree] 1`] = `
+"Duplicate attribute key 'type' (1:52)
+> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
+ | ^
+ 2 |
+Cause: Duplicate attribute key 'type'"
+`;
+
+exports[`multi-types.js format[meriyah] 1`] = `
+"Duplicate binding 'type' (1:64)
+> 1 | import json from "./foo.json" with { type: "json", type: "bar" };
+ | ^
+ 2 |
+Cause: [1:63-1:64]: Duplicate binding 'type'"
+`;
+
exports[`multiple.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
diff --git a/tests/format/js/import/long-module-name/__snapshots__/format.test.js.snap b/tests/format/js/import/long-module-name/__snapshots__/format.test.js.snap
index b0063a9c0..84bb60cac 100644
--- a/tests/format/js/import/long-module-name/__snapshots__/format.test.js.snap
+++ b/tests/format/js/import/long-module-name/__snapshots__/format.test.js.snap
@@ -1,59 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`import-defer.js [acorn] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^
- 2 | import.defer(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: The only valid meta property for import is 'import.meta' (1:7)"
-`;
-
-exports[`import-defer.js [espree] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^
- 2 | import.defer(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: The only valid meta property for import is 'import.meta'"
-`;
-
-exports[`import-defer.js [flow] format 1`] = `
-"Unexpected identifier, expected the identifier \`meta\` (1:8)
-> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^^^^^
- 2 | import.defer(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
-`;
-
-exports[`import-defer.js [hermes] format 1`] = `
-"'meta' expected in member expression (1:7)
-> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^
- 2 | import.defer(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: 'meta' expected in member expression (1:7)
-import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- ^~~~~
-note: start of member expression (1:0)
-import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
-^"
-`;
-
-exports[`import-defer.js [meriyah] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^^^^^
- 2 | import.defer(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
-`;
-
exports[`import-defer.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -76,6 +22,60 @@ import.defer(
================================================================================
`;
+exports[`import-defer.js format[acorn] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^
+ 2 | import.defer(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: The only valid meta property for import is 'import.meta' (1:7)"
+`;
+
+exports[`import-defer.js format[espree] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^
+ 2 | import.defer(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: The only valid meta property for import is 'import.meta'"
+`;
+
+exports[`import-defer.js format[flow] 1`] = `
+"Unexpected identifier, expected the identifier \`meta\` (1:8)
+> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^^^^^
+ 2 | import.defer(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
+`;
+
+exports[`import-defer.js format[hermes] 1`] = `
+"'meta' expected in member expression (1:7)
+> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^
+ 2 | import.defer(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: 'meta' expected in member expression (1:7)
+import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ ^~~~~
+note: start of member expression (1:0)
+import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+^"
+`;
+
+exports[`import-defer.js format[meriyah] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.defer("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^^^^^
+ 2 | import.defer(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
+`;
+
exports[`import-expression.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -101,60 +101,6 @@ import.meta
================================================================================
`;
-exports[`import-source.js [acorn] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^
- 2 | import.source(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: The only valid meta property for import is 'import.meta' (1:7)"
-`;
-
-exports[`import-source.js [espree] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^
- 2 | import.source(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: The only valid meta property for import is 'import.meta'"
-`;
-
-exports[`import-source.js [flow] format 1`] = `
-"Unexpected identifier, expected the identifier \`meta\` (1:8)
-> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^^^^^^
- 2 | import.source(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
-`;
-
-exports[`import-source.js [hermes] format 1`] = `
-"'meta' expected in member expression (1:7)
-> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^
- 2 | import.source(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: 'meta' expected in member expression (1:7)
-import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- ^~~~~~
-note: start of member expression (1:0)
-import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
-^"
-`;
-
-exports[`import-source.js [meriyah] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
- | ^^^^^^
- 2 | import.source(
- 3 | // Comment
- 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
-Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
-`;
-
exports[`import-source.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -176,3 +122,57 @@ import.source(
================================================================================
`;
+
+exports[`import-source.js format[acorn] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^
+ 2 | import.source(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: The only valid meta property for import is 'import.meta' (1:7)"
+`;
+
+exports[`import-source.js format[espree] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^
+ 2 | import.source(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: The only valid meta property for import is 'import.meta'"
+`;
+
+exports[`import-source.js format[flow] 1`] = `
+"Unexpected identifier, expected the identifier \`meta\` (1:8)
+> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^^^^^^
+ 2 | import.source(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module""
+`;
+
+exports[`import-source.js format[hermes] 1`] = `
+"'meta' expected in member expression (1:7)
+> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^
+ 2 | import.source(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: 'meta' expected in member expression (1:7)
+import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ ^~~~~~
+note: start of member expression (1:0)
+import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+^"
+`;
+
+exports[`import-source.js format[meriyah] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module");
+ | ^^^^^^
+ 2 | import.source(
+ 3 | // Comment
+ 4 | "./a/long/long/long/long/long/long/long/long/long/long/long/long/path/to/module"
+Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
+`;
diff --git a/tests/format/js/invalid-code/__snapshots__/format.test.js.snap b/tests/format/js/invalid-code/__snapshots__/format.test.js.snap
index 9b0ba25d4..7e98748b6 100644
--- a/tests/format/js/invalid-code/__snapshots__/format.test.js.snap
+++ b/tests/format/js/invalid-code/__snapshots__/format.test.js.snap
@@ -1,21 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`duplicate_bindings.js [acorn] format 1`] = `
-"Identifier 'A' has already been declared (1:19)
-> 1 | class A{} class A{}
- | ^
- 2 |
-Cause: Identifier 'A' has already been declared (1:18)"
-`;
-
-exports[`duplicate_bindings.js [espree] format 1`] = `
-"Identifier 'A' has already been declared (1:19)
-> 1 | class A{} class A{}
- | ^
- 2 |
-Cause: Identifier 'A' has already been declared"
-`;
-
exports[`duplicate_bindings.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -30,3 +14,19 @@ class A {}
================================================================================
`;
+
+exports[`duplicate_bindings.js format[acorn] 1`] = `
+"Identifier 'A' has already been declared (1:19)
+> 1 | class A{} class A{}
+ | ^
+ 2 |
+Cause: Identifier 'A' has already been declared (1:18)"
+`;
+
+exports[`duplicate_bindings.js format[espree] 1`] = `
+"Identifier 'A' has already been declared (1:19)
+> 1 | class A{} class A{}
+ | ^
+ 2 |
+Cause: Identifier 'A' has already been declared"
+`;
diff --git a/tests/format/js/module-blocks/__snapshots__/format.test.js.snap b/tests/format/js/module-blocks/__snapshots__/format.test.js.snap
index 034ae7ac9..a2d5a7415 100644
--- a/tests/format/js/module-blocks/__snapshots__/format.test.js.snap
+++ b/tests/format/js/module-blocks/__snapshots__/format.test.js.snap
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`comments.js [acorn] format 1`] = `
-"Unexpected token (1:32)
-> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
- | ^
- 2 | /*A4*/
- 3 | export const foo = "foo";
- 4 | export { foo }; /*A5*/
-Cause: Unexpected token (1:31)"
-`;
-
-exports[`comments.js [espree] format 1`] = `
-"Unexpected token { (1:32)
-> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
- | ^
- 2 | /*A4*/
- 3 | export const foo = "foo";
- 4 | export { foo }; /*A5*/
-Cause: Unexpected token {"
-`;
-
-exports[`comments.js [meriyah] format 1`] = `
-"Unexpected token: '{' (1:32)
-> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
- | ^
- 2 | /*A4*/
- 3 | export const foo = "foo";
- 4 | export { foo }; /*A5*/
-Cause: [1:31-1:32]: Unexpected token: '{'"
-`;
-
-exports[`comments.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:24)
-> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
- | ^
- 2 | /*A4*/
- 3 | export const foo = "foo";
- 4 | export { foo }; /*A5*/"
-`;
-
exports[`comments.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -72,43 +33,43 @@ const m2 = module /* B1 */ {
================================================================================
`;
-exports[`module-blocks.js [acorn] format 1`] = `
-"Unexpected token (1:8)
-> 1 | module { await 3 };
- | ^
- 2 |
- 3 | class B {
- 4 | #p() {
-Cause: Unexpected token (1:7)"
+exports[`comments.js format[acorn] 1`] = `
+"Unexpected token (1:32)
+> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
+ | ^
+ 2 | /*A4*/
+ 3 | export const foo = "foo";
+ 4 | export { foo }; /*A5*/
+Cause: Unexpected token (1:31)"
`;
-exports[`module-blocks.js [espree] format 1`] = `
-"Unexpected token { (1:8)
-> 1 | module { await 3 };
- | ^
- 2 |
- 3 | class B {
- 4 | #p() {
+exports[`comments.js format[espree] 1`] = `
+"Unexpected token { (1:32)
+> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
+ | ^
+ 2 | /*A4*/
+ 3 | export const foo = "foo";
+ 4 | export { foo }; /*A5*/
Cause: Unexpected token {"
`;
-exports[`module-blocks.js [meriyah] format 1`] = `
-"Unexpected token: '{' (1:8)
-> 1 | module { await 3 };
- | ^
- 2 |
- 3 | class B {
- 4 | #p() {
-Cause: [1:7-1:8]: Unexpected token: '{'"
+exports[`comments.js format[meriyah] 1`] = `
+"Unexpected token: '{' (1:32)
+> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
+ | ^
+ 2 | /*A4*/
+ 3 | export const foo = "foo";
+ 4 | export { foo }; /*A5*/
+Cause: [1:31-1:32]: Unexpected token: '{'"
`;
-exports[`module-blocks.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
-> 1 | module { await 3 };
- | ^
- 2 |
- 3 | class B {
- 4 | #p() {"
+exports[`comments.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:24)
+> 1 | const m = /*A1*/ module /*A2*/ { /*A3*/
+ | ^
+ 2 | /*A4*/
+ 3 | export const foo = "foo";
+ 4 | export { foo }; /*A5*/"
`;
exports[`module-blocks.js format 1`] = `
@@ -211,6 +172,45 @@ let m = module {
================================================================================
`;
+exports[`module-blocks.js format[acorn] 1`] = `
+"Unexpected token (1:8)
+> 1 | module { await 3 };
+ | ^
+ 2 |
+ 3 | class B {
+ 4 | #p() {
+Cause: Unexpected token (1:7)"
+`;
+
+exports[`module-blocks.js format[espree] 1`] = `
+"Unexpected token { (1:8)
+> 1 | module { await 3 };
+ | ^
+ 2 |
+ 3 | class B {
+ 4 | #p() {
+Cause: Unexpected token {"
+`;
+
+exports[`module-blocks.js format[meriyah] 1`] = `
+"Unexpected token: '{' (1:8)
+> 1 | module { await 3 };
+ | ^
+ 2 |
+ 3 | class B {
+ 4 | #p() {
+Cause: [1:7-1:8]: Unexpected token: '{'"
+`;
+
+exports[`module-blocks.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
+> 1 | module { await 3 };
+ | ^
+ 2 |
+ 3 | class B {
+ 4 | #p() {"
+`;
+
exports[`non-module-blocks.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -228,45 +228,6 @@ const m = module;
================================================================================
`;
-exports[`range.js [acorn] format 1`] = `
-"Unexpected token (1:26)
-> 1 | let moduleBlock = module { export let y = 1;
- | ^
- 2 | };
- 3 |
- 4 | foo(module { export let foo = "foo"; })
-Cause: Unexpected token (1:25)"
-`;
-
-exports[`range.js [espree] format 1`] = `
-"Unexpected token { (1:26)
-> 1 | let moduleBlock = module { export let y = 1;
- | ^
- 2 | };
- 3 |
- 4 | foo(module { export let foo = "foo"; })
-Cause: Unexpected token {"
-`;
-
-exports[`range.js [meriyah] format 1`] = `
-"Unexpected token: '{' (1:26)
-> 1 | let moduleBlock = module { export let y = 1;
- | ^
- 2 | };
- 3 |
- 4 | foo(module { export let foo = "foo"; })
-Cause: [1:25-1:26]: Unexpected token: '{'"
-`;
-
-exports[`range.js [oxc] format 1`] = `
-"Expected a semicolon or an implicit semicolon after a statement, but found none (1:25)
-> 1 | let moduleBlock = module { export let y = 1;
- | ^
- 2 | };
- 3 |
- 4 | foo(module { export let foo = "foo"; })"
-`;
-
exports[`range.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -295,3 +256,42 @@ foo(module {
================================================================================
`;
+
+exports[`range.js format[acorn] 1`] = `
+"Unexpected token (1:26)
+> 1 | let moduleBlock = module { export let y = 1;
+ | ^
+ 2 | };
+ 3 |
+ 4 | foo(module { export let foo = "foo"; })
+Cause: Unexpected token (1:25)"
+`;
+
+exports[`range.js format[espree] 1`] = `
+"Unexpected token { (1:26)
+> 1 | let moduleBlock = module { export let y = 1;
+ | ^
+ 2 | };
+ 3 |
+ 4 | foo(module { export let foo = "foo"; })
+Cause: Unexpected token {"
+`;
+
+exports[`range.js format[meriyah] 1`] = `
+"Unexpected token: '{' (1:26)
+> 1 | let moduleBlock = module { export let y = 1;
+ | ^
+ 2 | };
+ 3 |
+ 4 | foo(module { export let foo = "foo"; })
+Cause: [1:25-1:26]: Unexpected token: '{'"
+`;
+
+exports[`range.js format[oxc] 1`] = `
+"Expected a semicolon or an implicit semicolon after a statement, but found none (1:25)
+> 1 | let moduleBlock = module { export let y = 1;
+ | ^
+ 2 | };
+ 3 |
+ 4 | foo(module { export let foo = "foo"; })"
+`;
diff --git a/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap b/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap
index 07ac575aa..50d44ba60 100644
--- a/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap
+++ b/tests/format/js/module-blocks/quote-props/__snapshots__/format.test.js.snap
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`worker.js [acorn] format 1`] = `
-"Unexpected token (1:28)
-> 1 | worker = new Worker(module {
- | ^
- 2 | onmessage = function({data}) {
- 3 | let mod = import(data);
- 4 | postMessage(mod.fn());
-Cause: Unexpected token (1:27)"
-`;
-
-exports[`worker.js [espree] format 1`] = `
-"Unexpected token { (1:28)
-> 1 | worker = new Worker(module {
- | ^
- 2 | onmessage = function({data}) {
- 3 | let mod = import(data);
- 4 | postMessage(mod.fn());
-Cause: Unexpected token {"
-`;
-
-exports[`worker.js [meriyah] format 1`] = `
-"Expected ')' (1:28)
-> 1 | worker = new Worker(module {
- | ^
- 2 | onmessage = function({data}) {
- 3 | let mod = import(data);
- 4 | postMessage(mod.fn());
-Cause: [1:27-1:28]: Expected ')'"
-`;
-
-exports[`worker.js [oxc] format 1`] = `
-"Expected \`,\` or \`)\` but found \`{\` (1:28)
-> 1 | worker = new Worker(module {
- | ^
- 2 | onmessage = function({data}) {
- 3 | let mod = import(data);
- 4 | postMessage(mod.fn());"
-`;
-
exports[`worker.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -135,3 +96,42 @@ worker.postMessage(module {
================================================================================
`;
+
+exports[`worker.js format[acorn] 1`] = `
+"Unexpected token (1:28)
+> 1 | worker = new Worker(module {
+ | ^
+ 2 | onmessage = function({data}) {
+ 3 | let mod = import(data);
+ 4 | postMessage(mod.fn());
+Cause: Unexpected token (1:27)"
+`;
+
+exports[`worker.js format[espree] 1`] = `
+"Unexpected token { (1:28)
+> 1 | worker = new Worker(module {
+ | ^
+ 2 | onmessage = function({data}) {
+ 3 | let mod = import(data);
+ 4 | postMessage(mod.fn());
+Cause: Unexpected token {"
+`;
+
+exports[`worker.js format[meriyah] 1`] = `
+"Expected ')' (1:28)
+> 1 | worker = new Worker(module {
+ | ^
+ 2 | onmessage = function({data}) {
+ 3 | let mod = import(data);
+ 4 | postMessage(mod.fn());
+Cause: [1:27-1:28]: Expected ')'"
+`;
+
+exports[`worker.js format[oxc] 1`] = `
+"Expected \`,\` or \`)\` but found \`{\` (1:28)
+> 1 | worker = new Worker(module {
+ | ^
+ 2 | onmessage = function({data}) {
+ 3 | let mod = import(data);
+ 4 | postMessage(mod.fn());"
+`;
diff --git a/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap b/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap
index 99a867623..41028c681 100644
--- a/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap
+++ b/tests/format/js/multiparser-invalid/__snapshots__/format.test.js.snap
@@ -1,98 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`text.js [acorn] format 1`] = `
-"Bad escape sequence in untagged template literal (6:18)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
-Cause: Bad escape sequence in untagged template literal (6:17)"
-`;
-
-exports[`text.js [espree] format 1`] = `
-"Bad escape sequence in untagged template literal (6:18)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
-Cause: Bad escape sequence in untagged template literal"
-`;
-
-exports[`text.js [flow] format 1`] = `
-"Unexpected token ILLEGAL (1:12)
-> 1 | foo = foo\`\\u{prettier}\\u{0065}\`;
- | ^
- 2 | foo = html\`\\u{prettier}\\u{0065}\`;
- 3 | foo = graphql\`\\u{prettier}\\u{0065}\`;
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;"
-`;
-
-exports[`text.js [hermes] format 1`] = `
-"untagged template literal contains invalid escape sequence (6:16)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
-Cause: untagged template literal contains invalid escape sequence (6:16)
-foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- ^~~~~~~~~~~~~~~~~~~~~~"
-`;
-
-exports[`text.js [meriyah] format 1`] = `
-"Invalid hexadecimal escape sequence (6:17)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^^^^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
-Cause: [6:16-6:20]: Invalid hexadecimal escape sequence"
-`;
-
-exports[`text.js [oxc] format 1`] = `
-"Bad escape sequence in untagged template literal (6:18)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^^^^^^^^^^^^^^^^^^^^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
-`;
-
-exports[`text.js [oxc-ts] format 1`] = `
-"Bad escape sequence in untagged template literal (6:18)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^^^^^^^^^^^^^^^^^^^^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
-`;
-
-exports[`text.js [typescript] format 1`] = `
-"Hexadecimal digit expected. (6:21)
- 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
- 5 | foo = css\`\\u{prettier}\\u{0065}\`;
-> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
- | ^
- 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
- 8 |
- 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
-Cause: Hexadecimal digit expected."
-`;
-
exports[`text.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -166,3 +73,96 @@ foo = /* GraphQL */ \`pr\\u{0065}ttier\${foo}\\u{prettier}\${bar}pr\\u{0065}ttie
================================================================================
`;
+
+exports[`text.js format[acorn] 1`] = `
+"Bad escape sequence in untagged template literal (6:18)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
+Cause: Bad escape sequence in untagged template literal (6:17)"
+`;
+
+exports[`text.js format[espree] 1`] = `
+"Bad escape sequence in untagged template literal (6:18)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
+Cause: Bad escape sequence in untagged template literal"
+`;
+
+exports[`text.js format[flow] 1`] = `
+"Unexpected token ILLEGAL (1:12)
+> 1 | foo = foo\`\\u{prettier}\\u{0065}\`;
+ | ^
+ 2 | foo = html\`\\u{prettier}\\u{0065}\`;
+ 3 | foo = graphql\`\\u{prettier}\\u{0065}\`;
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;"
+`;
+
+exports[`text.js format[hermes] 1`] = `
+"untagged template literal contains invalid escape sequence (6:16)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
+Cause: untagged template literal contains invalid escape sequence (6:16)
+foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ ^~~~~~~~~~~~~~~~~~~~~~"
+`;
+
+exports[`text.js format[meriyah] 1`] = `
+"Invalid hexadecimal escape sequence (6:17)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^^^^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
+Cause: [6:16-6:20]: Invalid hexadecimal escape sequence"
+`;
+
+exports[`text.js format[oxc] 1`] = `
+"Bad escape sequence in untagged template literal (6:18)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^^^^^^^^^^^^^^^^^^^^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
+`;
+
+exports[`text.js format[oxc-ts] 1`] = `
+"Bad escape sequence in untagged template literal (6:18)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^^^^^^^^^^^^^^^^^^^^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;"
+`;
+
+exports[`text.js format[typescript] 1`] = `
+"Hexadecimal digit expected. (6:21)
+ 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;
+ 5 | foo = css\`\\u{prettier}\\u{0065}\`;
+> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`;
+ | ^
+ 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`;
+ 8 |
+ 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;
+Cause: Hexadecimal digit expected."
+`;
diff --git a/tests/format/js/new-target/__snapshots__/format.test.js.snap b/tests/format/js/new-target/__snapshots__/format.test.js.snap
index 6b45d98b4..c4744d999 100644
--- a/tests/format/js/new-target/__snapshots__/format.test.js.snap
+++ b/tests/format/js/new-target/__snapshots__/format.test.js.snap
@@ -1,38 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`outside-functions.js [acorn] format 1`] = `
-"'new.target' can only be used in functions and class static block (1:11)
-> 1 | const x = new.target;
- | ^
- 2 |
-Cause: 'new.target' can only be used in functions and class static block (1:10)"
-`;
-
-exports[`outside-functions.js [espree] format 1`] = `
-"'new.target' can only be used in functions and class static block (1:11)
-> 1 | const x = new.target;
- | ^
- 2 |
-Cause: 'new.target' can only be used in functions and class static block"
-`;
-
-exports[`outside-functions.js [flow] format 1`] = `
-"Unexpected token \`.\` (1:14)
-> 1 | const x = new.target;
- | ^
- 2 |"
-`;
-
-exports[`outside-functions.js [hermes] format 1`] = `
-"'new.target' not in a function (1:10)
-> 1 | const x = new.target;
- | ^
- 2 |
-Cause: 'new.target' not in a function (1:10)
-const x = new.target;
- ^~~~~~~~~~"
-`;
-
exports[`outside-functions.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -47,36 +14,37 @@ const x = new.target;
================================================================================
`;
-exports[`range.js [acorn] format 1`] = `
-"'new.target' can only be used in functions and class static block (2:1)
- 1 | const x =
-> 2 | new.target;
- | ^
-Cause: 'new.target' can only be used in functions and class static block (2:0)"
+exports[`outside-functions.js format[acorn] 1`] = `
+"'new.target' can only be used in functions and class static block (1:11)
+> 1 | const x = new.target;
+ | ^
+ 2 |
+Cause: 'new.target' can only be used in functions and class static block (1:10)"
`;
-exports[`range.js [espree] format 1`] = `
-"'new.target' can only be used in functions and class static block (2:1)
- 1 | const x =
-> 2 | new.target;
- | ^
+exports[`outside-functions.js format[espree] 1`] = `
+"'new.target' can only be used in functions and class static block (1:11)
+> 1 | const x = new.target;
+ | ^
+ 2 |
Cause: 'new.target' can only be used in functions and class static block"
`;
-exports[`range.js [flow] format 1`] = `
-"Unexpected token \`.\` (2:4)
- 1 | const x =
-> 2 | new.target;
- | ^"
+exports[`outside-functions.js format[flow] 1`] = `
+"Unexpected token \`.\` (1:14)
+> 1 | const x = new.target;
+ | ^
+ 2 |"
`;
-exports[`range.js [hermes] format 1`] = `
-"'new.target' not in a function (2:0)
- 1 | const x =
-> 2 | new.target;
-Cause: 'new.target' not in a function (2:0)
-new.target;
-^~~~~~~~~~"
+exports[`outside-functions.js format[hermes] 1`] = `
+"'new.target' not in a function (1:10)
+> 1 | const x = new.target;
+ | ^
+ 2 |
+Cause: 'new.target' not in a function (1:10)
+const x = new.target;
+ ^~~~~~~~~~"
`;
exports[`range.js format 1`] = `
@@ -105,3 +73,35 @@ class A {
================================================================================
`;
+
+exports[`range.js format[acorn] 1`] = `
+"'new.target' can only be used in functions and class static block (2:1)
+ 1 | const x =
+> 2 | new.target;
+ | ^
+Cause: 'new.target' can only be used in functions and class static block (2:0)"
+`;
+
+exports[`range.js format[espree] 1`] = `
+"'new.target' can only be used in functions and class static block (2:1)
+ 1 | const x =
+> 2 | new.target;
+ | ^
+Cause: 'new.target' can only be used in functions and class static block"
+`;
+
+exports[`range.js format[flow] 1`] = `
+"Unexpected token \`.\` (2:4)
+ 1 | const x =
+> 2 | new.target;
+ | ^"
+`;
+
+exports[`range.js format[hermes] 1`] = `
+"'new.target' not in a function (2:0)
+ 1 | const x =
+> 2 | new.target;
+Cause: 'new.target' not in a function (2:0)
+new.target;
+^~~~~~~~~~"
+`;
diff --git a/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap b/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap
index 0b9e415b7..e97ed0387 100644
--- a/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap
+++ b/tests/format/js/no-semi-babylon-extensions/__snapshots__/format.test.js.snap
@@ -1,91 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`no-semi.js [acorn] format 1`] = `
-"Unexpected token (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;
-Cause: Unexpected token (2:1)"
-`;
-
-exports[`no-semi.js [espree] format 1`] = `
-"Unexpected token : (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;
-Cause: Unexpected token :"
-`;
-
-exports[`no-semi.js [meriyah] format 1`] = `
-"Unexpected token: ':' (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;
-Cause: [2:1-2:2]: Unexpected token: ':'"
-`;
-
-exports[`no-semi.js [oxc] format 1`] = `
-"Unexpected token (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;"
-`;
-
-exports[`no-semi.js - {"semi":false} [acorn] format 1`] = `
-"Unexpected token (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;
-Cause: Unexpected token (2:1)"
-`;
-
-exports[`no-semi.js - {"semi":false} [espree] format 1`] = `
-"Unexpected token : (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;
-Cause: Unexpected token :"
-`;
-
-exports[`no-semi.js - {"semi":false} [meriyah] format 1`] = `
-"Unexpected token: ':' (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;
-Cause: [2:1-2:2]: Unexpected token: ':'"
-`;
-
-exports[`no-semi.js - {"semi":false} [oxc] format 1`] = `
-"Unexpected token (2:2)
- 1 | a
-> 2 | ;::b.c
- | ^
- 3 |
- 4 | class A {
- 5 | a = b;"
-`;
-
exports[`no-semi.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -121,6 +35,49 @@ class A {
================================================================================
`;
+exports[`no-semi.js - {"semi":false} format[acorn] 1`] = `
+"Unexpected token (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;
+Cause: Unexpected token (2:1)"
+`;
+
+exports[`no-semi.js - {"semi":false} format[espree] 1`] = `
+"Unexpected token : (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;
+Cause: Unexpected token :"
+`;
+
+exports[`no-semi.js - {"semi":false} format[meriyah] 1`] = `
+"Unexpected token: ':' (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;
+Cause: [2:1-2:2]: Unexpected token: ':'"
+`;
+
+exports[`no-semi.js - {"semi":false} format[oxc] 1`] = `
+"Unexpected token (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;"
+`;
+
exports[`no-semi.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -154,3 +111,46 @@ class A {
================================================================================
`;
+
+exports[`no-semi.js format[acorn] 1`] = `
+"Unexpected token (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;
+Cause: Unexpected token (2:1)"
+`;
+
+exports[`no-semi.js format[espree] 1`] = `
+"Unexpected token : (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;
+Cause: Unexpected token :"
+`;
+
+exports[`no-semi.js format[meriyah] 1`] = `
+"Unexpected token: ':' (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;
+Cause: [2:1-2:2]: Unexpected token: ':'"
+`;
+
+exports[`no-semi.js format[oxc] 1`] = `
+"Unexpected token (2:2)
+ 1 | a
+> 2 | ;::b.c
+ | ^
+ 3 |
+ 4 | class A {
+ 5 | a = b;"
+`;
diff --git a/tests/format/js/non-strict/__snapshots__/format.test.js.snap b/tests/format/js/non-strict/__snapshots__/format.test.js.snap
index 2b2af0a95..aa5d00775 100644
--- a/tests/format/js/non-strict/__snapshots__/format.test.js.snap
+++ b/tests/format/js/non-strict/__snapshots__/format.test.js.snap
@@ -44,14 +44,6 @@ function myFunction() {
================================================================================
`;
-exports[`octal-number.js [typescript] format 1`] = `
-"Octal literals are not allowed. Use the syntax '0o777'. (1:1)
-> 1 | 0777
- | ^
- 2 |
-Cause: Octal literals are not allowed. Use the syntax '0o777'."
-`;
-
exports[`octal-number.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
@@ -65,3 +57,11 @@ printWidth: 80
================================================================================
`;
+
+exports[`octal-number.js format[typescript] 1`] = `
+"Octal literals are not allowed. Use the syntax '0o777'. (1:1)
+> 1 | 0777
+ | ^
+ 2 |
+Cause: Octal literals are not allowed. Use the syntax '0o777'."
+`;
diff --git a/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap b/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap
index 261f56135..fe70c1196 100644
--- a/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap
+++ b/tests/format/js/numeric-separators/__snapshots__/format.test.js.snap
@@ -1,16 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`number.js [typescript] format 1`] = `
-"Decimals with leading zeros are not allowed. (3:5)
- 1 | // https://github.com/babel/babel/pull/11854
- 2 |
-> 3 | a = 09e1_1;
- | ^
- 4 | a = 09.1_1;
- 5 |
-Cause: Decimals with leading zeros are not allowed."
-`;
-
exports[`number.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
@@ -30,3 +19,14 @@ a = 09.1_1;
================================================================================
`;
+
+exports[`number.js format[typescript] 1`] = `
+"Decimals with leading zeros are not allowed. (3:5)
+ 1 | // https://github.com/babel/babel/pull/11854
+ 2 |
+> 3 | a = 09e1_1;
+ | ^
+ 4 | a = 09.1_1;
+ 5 |
+Cause: Decimals with leading zeros are not allowed."
+`;
diff --git a/tests/format/js/objects/__snapshots__/format.test.js.snap b/tests/format/js/objects/__snapshots__/format.test.js.snap
index d5b0abffa..29fe6a084 100644
--- a/tests/format/js/objects/__snapshots__/format.test.js.snap
+++ b/tests/format/js/objects/__snapshots__/format.test.js.snap
@@ -70,101 +70,6 @@ const Component2 = ({ props }) => Test;
================================================================================
`;
-exports[`expression.js [acorn] format 1`] = `
-"Unexpected token (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);
-Cause: Unexpected token (5:3)"
-`;
-
-exports[`expression.js [espree] format 1`] = `
-"Unexpected token : (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);
-Cause: Unexpected token :"
-`;
-
-exports[`expression.js [flow] format 1`] = `
-"Unexpected token \`:\`, expected a type (5:5)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);"
-`;
-
-exports[`expression.js [hermes] format 1`] = `
-"unexpected token in type annotation (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);
-Cause: unexpected token in type annotation (5:4)
-({}::b, 0);
- ^"
-`;
-
-exports[`expression.js [meriyah] format 1`] = `
-"Expected ')' (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);
-Cause: [5:3-5:4]: Expected ')'"
-`;
-
-exports[`expression.js [oxc] format 1`] = `
-"Expected \`,\` or \`)\` but found \`:\` (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);"
-`;
-
-exports[`expression.js [oxc-ts] format 1`] = `
-"Expected \`,\` or \`)\` but found \`:\` (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);"
-`;
-
-exports[`expression.js [typescript] format 1`] = `
-"')' expected. (5:4)
- 3 | a = () => ({}).x;
- 4 | ({} && a, b);
-> 5 | ({}::b, 0);
- | ^
- 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
- 7 | ({}(), 0);
- 8 | ({} = 0);
-Cause: ')' expected."
-`;
-
exports[`expression.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "flow"]
@@ -226,6 +131,101 @@ const a3 = {
================================================================================
`;
+exports[`expression.js format[acorn] 1`] = `
+"Unexpected token (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);
+Cause: Unexpected token (5:3)"
+`;
+
+exports[`expression.js format[espree] 1`] = `
+"Unexpected token : (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);
+Cause: Unexpected token :"
+`;
+
+exports[`expression.js format[flow] 1`] = `
+"Unexpected token \`:\`, expected a type (5:5)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);"
+`;
+
+exports[`expression.js format[hermes] 1`] = `
+"unexpected token in type annotation (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);
+Cause: unexpected token in type annotation (5:4)
+({}::b, 0);
+ ^"
+`;
+
+exports[`expression.js format[meriyah] 1`] = `
+"Expected ')' (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);
+Cause: [5:3-5:4]: Expected ')'"
+`;
+
+exports[`expression.js format[oxc] 1`] = `
+"Expected \`,\` or \`)\` but found \`:\` (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);"
+`;
+
+exports[`expression.js format[oxc-ts] 1`] = `
+"Expected \`,\` or \`)\` but found \`:\` (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);"
+`;
+
+exports[`expression.js format[typescript] 1`] = `
+"')' expected. (5:4)
+ 3 | a = () => ({}).x;
+ 4 | ({} && a, b);
+> 5 | ({}::b, 0);
+ | ^
+ 6 | ({}::b()\`\`[''].c++ && 0 ? 0 : 0, 0);
+ 7 | ({}(), 0);
+ 8 | ({} = 0);
+Cause: ')' expected."
+`;
+
exports[`getter-setter.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript", "flow"]
diff --git a/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap b/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap
index 897e8b1d5..052c01de2 100644
--- a/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap
+++ b/tests/format/js/optional-chaining-assignment/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-destructuring-arr.js [__babel_estree] format 1`] = `
+exports[`invalid-destructuring-arr.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2)
> 1 | [a?.b] = [];
| ^
@@ -8,7 +8,7 @@ exports[`invalid-destructuring-arr.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)"
`;
-exports[`invalid-destructuring-arr.js [acorn] format 1`] = `
+exports[`invalid-destructuring-arr.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:2)
> 1 | [a?.b] = [];
| ^
@@ -16,7 +16,7 @@ exports[`invalid-destructuring-arr.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:1)"
`;
-exports[`invalid-destructuring-arr.js [babel] format 1`] = `
+exports[`invalid-destructuring-arr.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of array destructuring pattern. (1:2)
> 1 | [a?.b] = [];
| ^
@@ -24,7 +24,7 @@ exports[`invalid-destructuring-arr.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of array destructuring pattern. (1:1)"
`;
-exports[`invalid-destructuring-arr.js [espree] format 1`] = `
+exports[`invalid-destructuring-arr.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:2)
> 1 | [a?.b] = [];
| ^
@@ -32,7 +32,7 @@ exports[`invalid-destructuring-arr.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-destructuring-arr.js [meriyah] format 1`] = `
+exports[`invalid-destructuring-arr.js format[meriyah] 1`] = `
"Invalid left-hand side in assignment (1:10)
> 1 | [a?.b] = [];
| ^
@@ -40,14 +40,14 @@ exports[`invalid-destructuring-arr.js [meriyah] format 1`] = `
Cause: [1:9-1:10]: Invalid left-hand side in assignment"
`;
-exports[`invalid-destructuring-arr.js [oxc] format 1`] = `
+exports[`invalid-destructuring-arr.js format[oxc] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | [a?.b] = [];
| ^^^^
2 |"
`;
-exports[`invalid-destructuring-obj.js [__babel_estree] format 1`] = `
+exports[`invalid-destructuring-obj.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10)
> 1 | ({ prop: a?.b } = {});
| ^
@@ -55,7 +55,7 @@ exports[`invalid-destructuring-obj.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)"
`;
-exports[`invalid-destructuring-obj.js [acorn] format 1`] = `
+exports[`invalid-destructuring-obj.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:10)
> 1 | ({ prop: a?.b } = {});
| ^
@@ -63,7 +63,7 @@ exports[`invalid-destructuring-obj.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:9)"
`;
-exports[`invalid-destructuring-obj.js [babel] format 1`] = `
+exports[`invalid-destructuring-obj.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of object destructuring pattern. (1:10)
> 1 | ({ prop: a?.b } = {});
| ^
@@ -71,7 +71,7 @@ exports[`invalid-destructuring-obj.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of object destructuring pattern. (1:9)"
`;
-exports[`invalid-destructuring-obj.js [espree] format 1`] = `
+exports[`invalid-destructuring-obj.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:10)
> 1 | ({ prop: a?.b } = {});
| ^
@@ -79,7 +79,7 @@ exports[`invalid-destructuring-obj.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-destructuring-obj.js [meriyah] format 1`] = `
+exports[`invalid-destructuring-obj.js format[meriyah] 1`] = `
"Invalid left-hand side in assignment (1:19)
> 1 | ({ prop: a?.b } = {});
| ^
@@ -87,14 +87,14 @@ exports[`invalid-destructuring-obj.js [meriyah] format 1`] = `
Cause: [1:18-1:19]: Invalid left-hand side in assignment"
`;
-exports[`invalid-destructuring-obj.js [oxc] format 1`] = `
+exports[`invalid-destructuring-obj.js format[oxc] 1`] = `
"Cannot assign to this expression (1:10)
> 1 | ({ prop: a?.b } = {});
| ^^^^
2 |"
`;
-exports[`invalid-fn-param.js [__babel_estree] format 1`] = `
+exports[`invalid-fn-param.js format[__babel_estree] 1`] = `
"Unexpected token, expected "," (1:13)
> 1 | function f(a?.b) {}
| ^
@@ -102,7 +102,7 @@ exports[`invalid-fn-param.js [__babel_estree] format 1`] = `
Cause: Unexpected token, expected "," (1:12)"
`;
-exports[`invalid-fn-param.js [acorn] format 1`] = `
+exports[`invalid-fn-param.js format[acorn] 1`] = `
"Unexpected token (1:13)
> 1 | function f(a?.b) {}
| ^
@@ -110,7 +110,7 @@ exports[`invalid-fn-param.js [acorn] format 1`] = `
Cause: Unexpected token (1:12)"
`;
-exports[`invalid-fn-param.js [babel] format 1`] = `
+exports[`invalid-fn-param.js format[babel] 1`] = `
"Unexpected token, expected "," (1:13)
> 1 | function f(a?.b) {}
| ^
@@ -118,7 +118,7 @@ exports[`invalid-fn-param.js [babel] format 1`] = `
Cause: Unexpected token, expected "," (1:12)"
`;
-exports[`invalid-fn-param.js [espree] format 1`] = `
+exports[`invalid-fn-param.js format[espree] 1`] = `
"Unexpected token ?. (1:13)
> 1 | function f(a?.b) {}
| ^
@@ -126,7 +126,7 @@ exports[`invalid-fn-param.js [espree] format 1`] = `
Cause: Unexpected token ?."
`;
-exports[`invalid-fn-param.js [meriyah] format 1`] = `
+exports[`invalid-fn-param.js format[meriyah] 1`] = `
"Expected ')' (1:13)
> 1 | function f(a?.b) {}
| ^^
@@ -134,14 +134,14 @@ exports[`invalid-fn-param.js [meriyah] format 1`] = `
Cause: [1:12-1:14]: Expected ')'"
`;
-exports[`invalid-fn-param.js [oxc] format 1`] = `
+exports[`invalid-fn-param.js format[oxc] 1`] = `
"Expected \`,\` or \`)\` but found \`?.\` (1:13)
> 1 | function f(a?.b) {}
| ^^
2 |"
`;
-exports[`invalid-fn-param-arrow.js [__babel_estree] format 1`] = `
+exports[`invalid-fn-param-arrow.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of function parameter list. (1:2)
> 1 | (a?.b) => {}
| ^
@@ -149,7 +149,7 @@ exports[`invalid-fn-param-arrow.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)"
`;
-exports[`invalid-fn-param-arrow.js [acorn] format 1`] = `
+exports[`invalid-fn-param-arrow.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:2)
> 1 | (a?.b) => {}
| ^
@@ -157,7 +157,7 @@ exports[`invalid-fn-param-arrow.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:1)"
`;
-exports[`invalid-fn-param-arrow.js [babel] format 1`] = `
+exports[`invalid-fn-param-arrow.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of function parameter list. (1:2)
> 1 | (a?.b) => {}
| ^
@@ -165,7 +165,7 @@ exports[`invalid-fn-param-arrow.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of function parameter list. (1:1)"
`;
-exports[`invalid-fn-param-arrow.js [espree] format 1`] = `
+exports[`invalid-fn-param-arrow.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:2)
> 1 | (a?.b) => {}
| ^
@@ -173,7 +173,7 @@ exports[`invalid-fn-param-arrow.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-fn-param-arrow.js [meriyah] format 1`] = `
+exports[`invalid-fn-param-arrow.js format[meriyah] 1`] = `
"The left-hand side of the arrow can only be destructed through assignment (1:8)
> 1 | (a?.b) => {}
| ^^
@@ -181,14 +181,14 @@ exports[`invalid-fn-param-arrow.js [meriyah] format 1`] = `
Cause: [1:7-1:9]: The left-hand side of the arrow can only be destructed through assignment"
`;
-exports[`invalid-fn-param-arrow.js [oxc] format 1`] = `
+exports[`invalid-fn-param-arrow.js format[oxc] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:7)
> 1 | (a?.b) => {}
| ^
2 |"
`;
-exports[`invalid-fn-param-assign.js [__babel_estree] format 1`] = `
+exports[`invalid-fn-param-assign.js format[__babel_estree] 1`] = `
"Unexpected token, expected "," (1:13)
> 1 | function f(a?.b = c) {}
| ^
@@ -196,7 +196,7 @@ exports[`invalid-fn-param-assign.js [__babel_estree] format 1`] = `
Cause: Unexpected token, expected "," (1:12)"
`;
-exports[`invalid-fn-param-assign.js [acorn] format 1`] = `
+exports[`invalid-fn-param-assign.js format[acorn] 1`] = `
"Unexpected token (1:13)
> 1 | function f(a?.b = c) {}
| ^
@@ -204,7 +204,7 @@ exports[`invalid-fn-param-assign.js [acorn] format 1`] = `
Cause: Unexpected token (1:12)"
`;
-exports[`invalid-fn-param-assign.js [babel] format 1`] = `
+exports[`invalid-fn-param-assign.js format[babel] 1`] = `
"Unexpected token, expected "," (1:13)
> 1 | function f(a?.b = c) {}
| ^
@@ -212,7 +212,7 @@ exports[`invalid-fn-param-assign.js [babel] format 1`] = `
Cause: Unexpected token, expected "," (1:12)"
`;
-exports[`invalid-fn-param-assign.js [espree] format 1`] = `
+exports[`invalid-fn-param-assign.js format[espree] 1`] = `
"Unexpected token ?. (1:13)
> 1 | function f(a?.b = c) {}
| ^
@@ -220,7 +220,7 @@ exports[`invalid-fn-param-assign.js [espree] format 1`] = `
Cause: Unexpected token ?."
`;
-exports[`invalid-fn-param-assign.js [meriyah] format 1`] = `
+exports[`invalid-fn-param-assign.js format[meriyah] 1`] = `
"Expected ')' (1:13)
> 1 | function f(a?.b = c) {}
| ^^
@@ -228,14 +228,14 @@ exports[`invalid-fn-param-assign.js [meriyah] format 1`] = `
Cause: [1:12-1:14]: Expected ')'"
`;
-exports[`invalid-fn-param-assign.js [oxc] format 1`] = `
+exports[`invalid-fn-param-assign.js format[oxc] 1`] = `
"Expected \`,\` or \`)\` but found \`?.\` (1:13)
> 1 | function f(a?.b = c) {}
| ^^
2 |"
`;
-exports[`invalid-for-await-of.js [__babel_estree] format 1`] = `
+exports[`invalid-for-await-of.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
> 1 | for (a?.b of x);
| ^
@@ -243,7 +243,7 @@ exports[`invalid-for-await-of.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
`;
-exports[`invalid-for-await-of.js [acorn] format 1`] = `
+exports[`invalid-for-await-of.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:6)
> 1 | for (a?.b of x);
| ^
@@ -251,7 +251,7 @@ exports[`invalid-for-await-of.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:5)"
`;
-exports[`invalid-for-await-of.js [babel] format 1`] = `
+exports[`invalid-for-await-of.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
> 1 | for (a?.b of x);
| ^
@@ -259,7 +259,7 @@ exports[`invalid-for-await-of.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
`;
-exports[`invalid-for-await-of.js [espree] format 1`] = `
+exports[`invalid-for-await-of.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:6)
> 1 | for (a?.b of x);
| ^
@@ -267,7 +267,7 @@ exports[`invalid-for-await-of.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-for-await-of.js [meriyah] format 1`] = `
+exports[`invalid-for-await-of.js format[meriyah] 1`] = `
"Invalid left-hand side in for-of (1:11)
> 1 | for (a?.b of x);
| ^^
@@ -275,14 +275,14 @@ exports[`invalid-for-await-of.js [meriyah] format 1`] = `
Cause: [1:10-1:12]: Invalid left-hand side in for-of"
`;
-exports[`invalid-for-await-of.js [oxc] format 1`] = `
+exports[`invalid-for-await-of.js format[oxc] 1`] = `
"Cannot assign to this expression (1:6)
> 1 | for (a?.b of x);
| ^^^^
2 |"
`;
-exports[`invalid-for-in.js [__babel_estree] format 1`] = `
+exports[`invalid-for-in.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of for-in statement. (1:6)
> 1 | for (a?.b in x);
| ^
@@ -290,7 +290,7 @@ exports[`invalid-for-in.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)"
`;
-exports[`invalid-for-in.js [acorn] format 1`] = `
+exports[`invalid-for-in.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:6)
> 1 | for (a?.b in x);
| ^
@@ -298,7 +298,7 @@ exports[`invalid-for-in.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:5)"
`;
-exports[`invalid-for-in.js [babel] format 1`] = `
+exports[`invalid-for-in.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of for-in statement. (1:6)
> 1 | for (a?.b in x);
| ^
@@ -306,7 +306,7 @@ exports[`invalid-for-in.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of for-in statement. (1:5)"
`;
-exports[`invalid-for-in.js [espree] format 1`] = `
+exports[`invalid-for-in.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:6)
> 1 | for (a?.b in x);
| ^
@@ -314,7 +314,7 @@ exports[`invalid-for-in.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-for-in.js [meriyah] format 1`] = `
+exports[`invalid-for-in.js format[meriyah] 1`] = `
"Invalid left-hand side in for-in (1:11)
> 1 | for (a?.b in x);
| ^^
@@ -322,14 +322,14 @@ exports[`invalid-for-in.js [meriyah] format 1`] = `
Cause: [1:10-1:12]: Invalid left-hand side in for-in"
`;
-exports[`invalid-for-in.js [oxc] format 1`] = `
+exports[`invalid-for-in.js format[oxc] 1`] = `
"Cannot assign to this expression (1:6)
> 1 | for (a?.b in x);
| ^^^^
2 |"
`;
-exports[`invalid-for-of.js [__babel_estree] format 1`] = `
+exports[`invalid-for-of.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
> 1 | for (a?.b of x);
| ^
@@ -337,7 +337,7 @@ exports[`invalid-for-of.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
`;
-exports[`invalid-for-of.js [acorn] format 1`] = `
+exports[`invalid-for-of.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:6)
> 1 | for (a?.b of x);
| ^
@@ -345,7 +345,7 @@ exports[`invalid-for-of.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:5)"
`;
-exports[`invalid-for-of.js [babel] format 1`] = `
+exports[`invalid-for-of.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of for-of statement. (1:6)
> 1 | for (a?.b of x);
| ^
@@ -353,7 +353,7 @@ exports[`invalid-for-of.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of for-of statement. (1:5)"
`;
-exports[`invalid-for-of.js [espree] format 1`] = `
+exports[`invalid-for-of.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:6)
> 1 | for (a?.b of x);
| ^
@@ -361,7 +361,7 @@ exports[`invalid-for-of.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-for-of.js [meriyah] format 1`] = `
+exports[`invalid-for-of.js format[meriyah] 1`] = `
"Invalid left-hand side in for-of (1:11)
> 1 | for (a?.b of x);
| ^^
@@ -369,14 +369,14 @@ exports[`invalid-for-of.js [meriyah] format 1`] = `
Cause: [1:10-1:12]: Invalid left-hand side in for-of"
`;
-exports[`invalid-for-of.js [oxc] format 1`] = `
+exports[`invalid-for-of.js format[oxc] 1`] = `
"Cannot assign to this expression (1:6)
> 1 | for (a?.b of x);
| ^^^^
2 |"
`;
-exports[`invalid-inc-postfix.js [__babel_estree] format 1`] = `
+exports[`invalid-inc-postfix.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
> 1 | a?.b++;
| ^
@@ -384,7 +384,7 @@ exports[`invalid-inc-postfix.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
`;
-exports[`invalid-inc-postfix.js [acorn] format 1`] = `
+exports[`invalid-inc-postfix.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:1)
> 1 | a?.b++;
| ^
@@ -392,7 +392,7 @@ exports[`invalid-inc-postfix.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:0)"
`;
-exports[`invalid-inc-postfix.js [babel] format 1`] = `
+exports[`invalid-inc-postfix.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
> 1 | a?.b++;
| ^
@@ -400,7 +400,7 @@ exports[`invalid-inc-postfix.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
`;
-exports[`invalid-inc-postfix.js [espree] format 1`] = `
+exports[`invalid-inc-postfix.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:1)
> 1 | a?.b++;
| ^
@@ -408,7 +408,7 @@ exports[`invalid-inc-postfix.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-inc-postfix.js [meriyah] format 1`] = `
+exports[`invalid-inc-postfix.js format[meriyah] 1`] = `
"Invalid increment/decrement operand (1:5)
> 1 | a?.b++;
| ^^
@@ -416,14 +416,14 @@ exports[`invalid-inc-postfix.js [meriyah] format 1`] = `
Cause: [1:4-1:6]: Invalid increment/decrement operand"
`;
-exports[`invalid-inc-postfix.js [oxc] format 1`] = `
+exports[`invalid-inc-postfix.js format[oxc] 1`] = `
"Cannot assign to this expression (1:1)
> 1 | a?.b++;
| ^^^^
2 |"
`;
-exports[`invalid-inc-prefix.js [__babel_estree] format 1`] = `
+exports[`invalid-inc-prefix.js format[__babel_estree] 1`] = `
"Invalid optional chaining in the left-hand side of prefix operation. (1:3)
> 1 | ++a?.b;
| ^
@@ -431,7 +431,7 @@ exports[`invalid-inc-prefix.js [__babel_estree] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)"
`;
-exports[`invalid-inc-prefix.js [acorn] format 1`] = `
+exports[`invalid-inc-prefix.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:3)
> 1 | ++a?.b;
| ^
@@ -439,7 +439,7 @@ exports[`invalid-inc-prefix.js [acorn] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side (1:2)"
`;
-exports[`invalid-inc-prefix.js [babel] format 1`] = `
+exports[`invalid-inc-prefix.js format[babel] 1`] = `
"Invalid optional chaining in the left-hand side of prefix operation. (1:3)
> 1 | ++a?.b;
| ^
@@ -447,7 +447,7 @@ exports[`invalid-inc-prefix.js [babel] format 1`] = `
Cause: Invalid optional chaining in the left-hand side of prefix operation. (1:2)"
`;
-exports[`invalid-inc-prefix.js [espree] format 1`] = `
+exports[`invalid-inc-prefix.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:3)
> 1 | ++a?.b;
| ^
@@ -455,7 +455,7 @@ exports[`invalid-inc-prefix.js [espree] format 1`] = `
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`invalid-inc-prefix.js [meriyah] format 1`] = `
+exports[`invalid-inc-prefix.js format[meriyah] 1`] = `
"Invalid increment/decrement operand (1:7)
> 1 | ++a?.b;
| ^
@@ -463,48 +463,13 @@ exports[`invalid-inc-prefix.js [meriyah] format 1`] = `
Cause: [1:6-1:7]: Invalid increment/decrement operand"
`;
-exports[`invalid-inc-prefix.js [oxc] format 1`] = `
+exports[`invalid-inc-prefix.js format[oxc] 1`] = `
"Cannot assign to this expression (1:3)
> 1 | ++a?.b;
| ^^^^
2 |"
`;
-exports[`valid-complex-case.js [acorn] format 1`] = `
-"The keyword 'let' is reserved (1:1)
-> 1 | let?.()[a] =1;
- | ^
- 2 | let?.[a] = 1;
- 3 |
-Cause: The keyword 'let' is reserved (1:0)"
-`;
-
-exports[`valid-complex-case.js [espree] format 1`] = `
-"The keyword 'let' is reserved (1:1)
-> 1 | let?.()[a] =1;
- | ^
- 2 | let?.[a] = 1;
- 3 |
-Cause: The keyword 'let' is reserved"
-`;
-
-exports[`valid-complex-case.js [meriyah] format 1`] = `
-"\`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode (1:4)
-> 1 | let?.()[a] =1;
- | ^^
- 2 | let?.[a] = 1;
- 3 |
-Cause: [1:3-1:5]: \`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode"
-`;
-
-exports[`valid-complex-case.js [oxc] format 1`] = `
-"Cannot assign to this expression (1:1)
-> 1 | let?.()[a] =1;
- | ^^^^^^^^^^
- 2 | let?.[a] = 1;
- 3 |"
-`;
-
exports[`valid-complex-case.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -521,27 +486,39 @@ let?.[a] = 1;
================================================================================
`;
-exports[`valid-lhs-eq.js [acorn] format 1`] = `
-"Optional chaining cannot appear in left-hand side (1:1)
-> 1 | a?.b.c = d;
+exports[`valid-complex-case.js format[acorn] 1`] = `
+"The keyword 'let' is reserved (1:1)
+> 1 | let?.()[a] =1;
| ^
- 2 |
-Cause: Optional chaining cannot appear in left-hand side (1:0)"
+ 2 | let?.[a] = 1;
+ 3 |
+Cause: The keyword 'let' is reserved (1:0)"
`;
-exports[`valid-lhs-eq.js [espree] format 1`] = `
-"Optional chaining cannot appear in left-hand side (1:1)
-> 1 | a?.b.c = d;
+exports[`valid-complex-case.js format[espree] 1`] = `
+"The keyword 'let' is reserved (1:1)
+> 1 | let?.()[a] =1;
| ^
- 2 |
-Cause: Optional chaining cannot appear in left-hand side"
+ 2 | let?.[a] = 1;
+ 3 |
+Cause: The keyword 'let' is reserved"
`;
-exports[`valid-lhs-eq.js [oxc] format 1`] = `
+exports[`valid-complex-case.js format[meriyah] 1`] = `
+"\`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode (1:4)
+> 1 | let?.()[a] =1;
+ | ^^
+ 2 | let?.[a] = 1;
+ 3 |
+Cause: [1:3-1:5]: \`let\` declaration not allowed here and \`let\` cannot be a regular var name in strict mode"
+`;
+
+exports[`valid-complex-case.js format[oxc] 1`] = `
"Cannot assign to this expression (1:1)
-> 1 | a?.b.c = d;
- | ^^^^^^
- 2 |"
+> 1 | let?.()[a] =1;
+ | ^^^^^^^^^^
+ 2 | let?.[a] = 1;
+ 3 |"
`;
exports[`valid-lhs-eq.js format 1`] = `
@@ -558,25 +535,25 @@ a?.b.c = d;
================================================================================
`;
-exports[`valid-lhs-plus-eq.js [acorn] format 1`] = `
+exports[`valid-lhs-eq.js format[acorn] 1`] = `
"Optional chaining cannot appear in left-hand side (1:1)
-> 1 | a?.b.c += d;
+> 1 | a?.b.c = d;
| ^
2 |
Cause: Optional chaining cannot appear in left-hand side (1:0)"
`;
-exports[`valid-lhs-plus-eq.js [espree] format 1`] = `
+exports[`valid-lhs-eq.js format[espree] 1`] = `
"Optional chaining cannot appear in left-hand side (1:1)
-> 1 | a?.b.c += d;
+> 1 | a?.b.c = d;
| ^
2 |
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`valid-lhs-plus-eq.js [oxc] format 1`] = `
+exports[`valid-lhs-eq.js format[oxc] 1`] = `
"Cannot assign to this expression (1:1)
-> 1 | a?.b.c += d;
+> 1 | a?.b.c = d;
| ^^^^^^
2 |"
`;
@@ -595,34 +572,26 @@ a?.b.c += d;
================================================================================
`;
-exports[`valid-parenthesized.js [acorn] format 1`] = `
-"Optional chaining cannot appear in left-hand side (1:2)
-> 1 | (a?.b) = c;
- | ^
+exports[`valid-lhs-plus-eq.js format[acorn] 1`] = `
+"Optional chaining cannot appear in left-hand side (1:1)
+> 1 | a?.b.c += d;
+ | ^
2 |
-Cause: Optional chaining cannot appear in left-hand side (1:1)"
+Cause: Optional chaining cannot appear in left-hand side (1:0)"
`;
-exports[`valid-parenthesized.js [espree] format 1`] = `
-"Optional chaining cannot appear in left-hand side (1:2)
-> 1 | (a?.b) = c;
- | ^
+exports[`valid-lhs-plus-eq.js format[espree] 1`] = `
+"Optional chaining cannot appear in left-hand side (1:1)
+> 1 | a?.b.c += d;
+ | ^
2 |
Cause: Optional chaining cannot appear in left-hand side"
`;
-exports[`valid-parenthesized.js [meriyah] format 1`] = `
-"Invalid left-hand side in assignment (1:8)
-> 1 | (a?.b) = c;
- | ^
- 2 |
-Cause: [1:7-1:8]: Invalid left-hand side in assignment"
-`;
-
-exports[`valid-parenthesized.js [oxc] format 1`] = `
-"Cannot assign to this expression (1:2)
-> 1 | (a?.b) = c;
- | ^^^^
+exports[`valid-lhs-plus-eq.js format[oxc] 1`] = `
+"Cannot assign to this expression (1:1)
+> 1 | a?.b.c += d;
+ | ^^^^^^
2 |"
`;
@@ -639,3 +608,34 @@ a?.b = c;
================================================================================
`;
+
+exports[`valid-parenthesized.js format[acorn] 1`] = `
+"Optional chaining cannot appear in left-hand side (1:2)
+> 1 | (a?.b) = c;
+ | ^
+ 2 |
+Cause: Optional chaining cannot appear in left-hand side (1:1)"
+`;
+
+exports[`valid-parenthesized.js format[espree] 1`] = `
+"Optional chaining cannot appear in left-hand side (1:2)
+> 1 | (a?.b) = c;
+ | ^
+ 2 |
+Cause: Optional chaining cannot appear in left-hand side"
+`;
+
+exports[`valid-parenthesized.js format[meriyah] 1`] = `
+"Invalid left-hand side in assignment (1:8)
+> 1 | (a?.b) = c;
+ | ^
+ 2 |
+Cause: [1:7-1:8]: Invalid left-hand side in assignment"
+`;
+
+exports[`valid-parenthesized.js format[oxc] 1`] = `
+"Cannot assign to this expression (1:2)
+> 1 | (a?.b) = c;
+ | ^^^^
+ 2 |"
+`;
diff --git a/tests/format/js/partial-application/__snapshots__/format.test.js.snap b/tests/format/js/partial-application/__snapshots__/format.test.js.snap
index b6570e7ca..30a66ed22 100644
--- a/tests/format/js/partial-application/__snapshots__/format.test.js.snap
+++ b/tests/format/js/partial-application/__snapshots__/format.test.js.snap
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`test.js [acorn] format 1`] = `
-"Unexpected token (1:23)
-> 1 | const addOne = add(1, ?); // apply from the left
- | ^
- 2 | addOne(2); // 3
- 3 |
- 4 | const addTen = add(?, 10); // apply from the right
-Cause: Unexpected token (1:22)"
-`;
-
-exports[`test.js [espree] format 1`] = `
-"Unexpected token ? (1:23)
-> 1 | const addOne = add(1, ?); // apply from the left
- | ^
- 2 | addOne(2); // 3
- 3 |
- 4 | const addTen = add(?, 10); // apply from the right
-Cause: Unexpected token ?"
-`;
-
-exports[`test.js [meriyah] format 1`] = `
-"Unexpected token: '?' (1:23)
-> 1 | const addOne = add(1, ?); // apply from the left
- | ^
- 2 | addOne(2); // 3
- 3 |
- 4 | const addTen = add(?, 10); // apply from the right
-Cause: [1:22-1:23]: Unexpected token: '?'"
-`;
-
-exports[`test.js [oxc] format 1`] = `
-"Unexpected token (1:23)
-> 1 | const addOne = add(1, ?); // apply from the left
- | ^
- 2 | addOne(2); // 3
- 3 |
- 4 | const addTen = add(?, 10); // apply from the right"
-`;
-
exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -68,3 +29,42 @@ let newScore = player.score |> add(7, ?) |> clamp(0, 100, ?); // shallow stack,
================================================================================
`;
+
+exports[`test.js format[acorn] 1`] = `
+"Unexpected token (1:23)
+> 1 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 2 | addOne(2); // 3
+ 3 |
+ 4 | const addTen = add(?, 10); // apply from the right
+Cause: Unexpected token (1:22)"
+`;
+
+exports[`test.js format[espree] 1`] = `
+"Unexpected token ? (1:23)
+> 1 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 2 | addOne(2); // 3
+ 3 |
+ 4 | const addTen = add(?, 10); // apply from the right
+Cause: Unexpected token ?"
+`;
+
+exports[`test.js format[meriyah] 1`] = `
+"Unexpected token: '?' (1:23)
+> 1 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 2 | addOne(2); // 3
+ 3 |
+ 4 | const addTen = add(?, 10); // apply from the right
+Cause: [1:22-1:23]: Unexpected token: '?'"
+`;
+
+exports[`test.js format[oxc] 1`] = `
+"Unexpected token (1:23)
+> 1 | const addOne = add(1, ?); // apply from the left
+ | ^
+ 2 | addOne(2); // 3
+ 3 |
+ 4 | const addTen = add(?, 10); // apply from the right"
+`;
diff --git a/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap b/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap
index 2acb3d230..f43e2cfad 100644
--- a/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap
+++ b/tests/format/js/pipeline-operator/__snapshots__/format.test.js.snap
@@ -1,48 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`block-comments.js [acorn] format 1`] = `
-"Unexpected token (2:2)
- 1 | bifornCringerMoshedPerplexSawder
-> 2 | |> foo1
- | ^
- 3 | |> foo2 /* comment1 */
- 4 | |> foo3 /* comment2 */
- 5 | |> kochabCooieGameOnOboleUnweave
-Cause: Unexpected token (2:1)"
-`;
-
-exports[`block-comments.js [espree] format 1`] = `
-"Unexpected token > (2:2)
- 1 | bifornCringerMoshedPerplexSawder
-> 2 | |> foo1
- | ^
- 3 | |> foo2 /* comment1 */
- 4 | |> foo3 /* comment2 */
- 5 | |> kochabCooieGameOnOboleUnweave
-Cause: Unexpected token >"
-`;
-
-exports[`block-comments.js [meriyah] format 1`] = `
-"Unexpected token: '>' (2:2)
- 1 | bifornCringerMoshedPerplexSawder
-> 2 | |> foo1
- | ^
- 3 | |> foo2 /* comment1 */
- 4 | |> foo3 /* comment2 */
- 5 | |> kochabCooieGameOnOboleUnweave
-Cause: [2:1-2:2]: Unexpected token: '>'"
-`;
-
-exports[`block-comments.js [oxc] format 1`] = `
-"Unexpected token (2:2)
- 1 | bifornCringerMoshedPerplexSawder
-> 2 | |> foo1
- | ^
- 3 | |> foo2 /* comment1 */
- 4 | |> foo3 /* comment2 */
- 5 | |> kochabCooieGameOnOboleUnweave"
-`;
-
exports[`block-comments.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -67,47 +24,47 @@ bifornCringerMoshedPerplexSawder
================================================================================
`;
-exports[`fsharp_style_pipeline_operator.js [acorn] format 1`] = `
-"Unexpected token (2:4)
- 1 | promise
-> 2 | |> await
- | ^
- 3 | |> x => doubleSay(x, ', ')
- 4 | |> capitalize
- 5 | |> x => x + '!'
-Cause: Unexpected token (2:3)"
+exports[`block-comments.js format[acorn] 1`] = `
+"Unexpected token (2:2)
+ 1 | bifornCringerMoshedPerplexSawder
+> 2 | |> foo1
+ | ^
+ 3 | |> foo2 /* comment1 */
+ 4 | |> foo3 /* comment2 */
+ 5 | |> kochabCooieGameOnOboleUnweave
+Cause: Unexpected token (2:1)"
`;
-exports[`fsharp_style_pipeline_operator.js [espree] format 1`] = `
-"Unexpected token > (2:4)
- 1 | promise
-> 2 | |> await
- | ^
- 3 | |> x => doubleSay(x, ', ')
- 4 | |> capitalize
- 5 | |> x => x + '!'
+exports[`block-comments.js format[espree] 1`] = `
+"Unexpected token > (2:2)
+ 1 | bifornCringerMoshedPerplexSawder
+> 2 | |> foo1
+ | ^
+ 3 | |> foo2 /* comment1 */
+ 4 | |> foo3 /* comment2 */
+ 5 | |> kochabCooieGameOnOboleUnweave
Cause: Unexpected token >"
`;
-exports[`fsharp_style_pipeline_operator.js [meriyah] format 1`] = `
-"Unexpected token: '>' (2:4)
- 1 | promise
-> 2 | |> await
- | ^
- 3 | |> x => doubleSay(x, ', ')
- 4 | |> capitalize
- 5 | |> x => x + '!'
-Cause: [2:3-2:4]: Unexpected token: '>'"
+exports[`block-comments.js format[meriyah] 1`] = `
+"Unexpected token: '>' (2:2)
+ 1 | bifornCringerMoshedPerplexSawder
+> 2 | |> foo1
+ | ^
+ 3 | |> foo2 /* comment1 */
+ 4 | |> foo3 /* comment2 */
+ 5 | |> kochabCooieGameOnOboleUnweave
+Cause: [2:1-2:2]: Unexpected token: '>'"
`;
-exports[`fsharp_style_pipeline_operator.js [oxc] format 1`] = `
-"Unexpected token (2:4)
- 1 | promise
-> 2 | |> await
- | ^
- 3 | |> x => doubleSay(x, ', ')
- 4 | |> capitalize
- 5 | |> x => x + '!'"
+exports[`block-comments.js format[oxc] 1`] = `
+"Unexpected token (2:2)
+ 1 | bifornCringerMoshedPerplexSawder
+> 2 | |> foo1
+ | ^
+ 3 | |> foo2 /* comment1 */
+ 4 | |> foo3 /* comment2 */
+ 5 | |> kochabCooieGameOnOboleUnweave"
`;
exports[`fsharp_style_pipeline_operator.js format 1`] = `
@@ -205,43 +162,47 @@ const f = x |> (f) => f |> f;
================================================================================
`;
-exports[`hack_pipeline_operator.js [acorn] format 1`] = `
-"Unexpected token (1:4)
-> 1 | a |> await % |> % * 3;
+exports[`fsharp_style_pipeline_operator.js format[acorn] 1`] = `
+"Unexpected token (2:4)
+ 1 | promise
+> 2 | |> await
| ^
- 2 |
- 3 | foo
- 4 | |> await %
-Cause: Unexpected token (1:3)"
+ 3 | |> x => doubleSay(x, ', ')
+ 4 | |> capitalize
+ 5 | |> x => x + '!'
+Cause: Unexpected token (2:3)"
`;
-exports[`hack_pipeline_operator.js [espree] format 1`] = `
-"Unexpected token > (1:4)
-> 1 | a |> await % |> % * 3;
+exports[`fsharp_style_pipeline_operator.js format[espree] 1`] = `
+"Unexpected token > (2:4)
+ 1 | promise
+> 2 | |> await
| ^
- 2 |
- 3 | foo
- 4 | |> await %
+ 3 | |> x => doubleSay(x, ', ')
+ 4 | |> capitalize
+ 5 | |> x => x + '!'
Cause: Unexpected token >"
`;
-exports[`hack_pipeline_operator.js [meriyah] format 1`] = `
-"Unexpected token: '>' (1:4)
-> 1 | a |> await % |> % * 3;
+exports[`fsharp_style_pipeline_operator.js format[meriyah] 1`] = `
+"Unexpected token: '>' (2:4)
+ 1 | promise
+> 2 | |> await
| ^
- 2 |
- 3 | foo
- 4 | |> await %
-Cause: [1:3-1:4]: Unexpected token: '>'"
+ 3 | |> x => doubleSay(x, ', ')
+ 4 | |> capitalize
+ 5 | |> x => x + '!'
+Cause: [2:3-2:4]: Unexpected token: '>'"
`;
-exports[`hack_pipeline_operator.js [oxc] format 1`] = `
-"Unexpected token (1:4)
-> 1 | a |> await % |> % * 3;
+exports[`fsharp_style_pipeline_operator.js format[oxc] 1`] = `
+"Unexpected token (2:4)
+ 1 | promise
+> 2 | |> await
| ^
- 2 |
- 3 | foo
- 4 | |> await %"
+ 3 | |> x => doubleSay(x, ', ')
+ 4 | |> capitalize
+ 5 | |> x => x + '!'"
`;
exports[`hack_pipeline_operator.js format 1`] = `
@@ -358,43 +319,43 @@ async function* f() {
================================================================================
`;
-exports[`minimal_pipeline_operator.js [acorn] format 1`] = `
+exports[`hack_pipeline_operator.js format[acorn] 1`] = `
"Unexpected token (1:4)
-> 1 | a |> b |> c;
+> 1 | a |> await % |> % * 3;
| ^
2 |
- 3 | a |> (b |> c);
- 4 |
+ 3 | foo
+ 4 | |> await %
Cause: Unexpected token (1:3)"
`;
-exports[`minimal_pipeline_operator.js [espree] format 1`] = `
+exports[`hack_pipeline_operator.js format[espree] 1`] = `
"Unexpected token > (1:4)
-> 1 | a |> b |> c;
+> 1 | a |> await % |> % * 3;
| ^
2 |
- 3 | a |> (b |> c);
- 4 |
+ 3 | foo
+ 4 | |> await %
Cause: Unexpected token >"
`;
-exports[`minimal_pipeline_operator.js [meriyah] format 1`] = `
+exports[`hack_pipeline_operator.js format[meriyah] 1`] = `
"Unexpected token: '>' (1:4)
-> 1 | a |> b |> c;
+> 1 | a |> await % |> % * 3;
| ^
2 |
- 3 | a |> (b |> c);
- 4 |
+ 3 | foo
+ 4 | |> await %
Cause: [1:3-1:4]: Unexpected token: '>'"
`;
-exports[`minimal_pipeline_operator.js [oxc] format 1`] = `
+exports[`hack_pipeline_operator.js format[oxc] 1`] = `
"Unexpected token (1:4)
-> 1 | a |> b |> c;
+> 1 | a |> await % |> % * 3;
| ^
2 |
- 3 | a |> (b |> c);
- 4 |"
+ 3 | foo
+ 4 | |> await %"
`;
exports[`minimal_pipeline_operator.js format 1`] = `
@@ -507,3 +468,42 @@ const result2 = [4, 9].map((x) => x |> inc |> double);
================================================================================
`;
+
+exports[`minimal_pipeline_operator.js format[acorn] 1`] = `
+"Unexpected token (1:4)
+> 1 | a |> b |> c;
+ | ^
+ 2 |
+ 3 | a |> (b |> c);
+ 4 |
+Cause: Unexpected token (1:3)"
+`;
+
+exports[`minimal_pipeline_operator.js format[espree] 1`] = `
+"Unexpected token > (1:4)
+> 1 | a |> b |> c;
+ | ^
+ 2 |
+ 3 | a |> (b |> c);
+ 4 |
+Cause: Unexpected token >"
+`;
+
+exports[`minimal_pipeline_operator.js format[meriyah] 1`] = `
+"Unexpected token: '>' (1:4)
+> 1 | a |> b |> c;
+ | ^
+ 2 |
+ 3 | a |> (b |> c);
+ 4 |
+Cause: [1:3-1:4]: Unexpected token: '>'"
+`;
+
+exports[`minimal_pipeline_operator.js format[oxc] 1`] = `
+"Unexpected token (1:4)
+> 1 | a |> b |> c;
+ | ^
+ 2 |
+ 3 | a |> (b |> c);
+ 4 |"
+`;
diff --git a/tests/format/js/private-in/__snapshots__/format.test.js.snap b/tests/format/js/private-in/__snapshots__/format.test.js.snap
index 7d52da1b5..d3889e1bf 100644
--- a/tests/format/js/private-in/__snapshots__/format.test.js.snap
+++ b/tests/format/js/private-in/__snapshots__/format.test.js.snap
@@ -1,15 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`private-in.js [espree] format 1`] = `
-"Unexpected token #prop (1:5)
-> 1 | if (#prop in obj) {
- | ^
- 2 | }
- 3 |
- 4 | #prop in obj;
-Cause: Unexpected token #prop"
-`;
-
exports[`private-in.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -49,3 +39,13 @@ if (#prop in obj) {
================================================================================
`;
+
+exports[`private-in.js format[espree] 1`] = `
+"Unexpected token #prop (1:5)
+> 1 | if (#prop in obj) {
+ | ^
+ 2 | }
+ 3 |
+ 4 | #prop in obj;
+Cause: Unexpected token #prop"
+`;
diff --git a/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap b/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap
index 674811dc1..1476d3263 100644
--- a/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap
+++ b/tests/format/js/sloppy-mode/__snapshots__/format.test.js.snap
@@ -19,19 +19,6 @@ function foo() {
================================================================================
`;
-exports[`eval-arguments.js [hermes] format 1`] = `
-"invalid assignment left-hand side (3:2)
- 1 | function myfunc() {
- 2 | eval = 1
-> 3 | arguments = arguments;
- | ^
- 4 | }
- 5 |
-Cause: invalid assignment left-hand side (3:2)
- arguments = arguments;
- ^~~~~~~~~"
-`;
-
exports[`eval-arguments.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -52,6 +39,19 @@ function myfunc() {
================================================================================
`;
+exports[`eval-arguments.js format[hermes] 1`] = `
+"invalid assignment left-hand side (3:2)
+ 1 | function myfunc() {
+ 2 | eval = 1
+> 3 | arguments = arguments;
+ | ^
+ 4 | }
+ 5 |
+Cause: invalid assignment left-hand side (3:2)
+ arguments = arguments;
+ ^~~~~~~~~"
+`;
+
exports[`eval-arguments-binding.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -86,47 +86,6 @@ if (false) function foo() {}
================================================================================
`;
-exports[`function-declaration-in-while.js [acorn] format 1`] = `
-"Unexpected token (1:15)
-> 1 | while (false) function foo(){}
- | ^
- 2 |
-Cause: Unexpected token (1:14)"
-`;
-
-exports[`function-declaration-in-while.js [espree] format 1`] = `
-"Unexpected token function (1:15)
-> 1 | while (false) function foo(){}
- | ^
- 2 |
-Cause: Unexpected token function"
-`;
-
-exports[`function-declaration-in-while.js [flow] format 1`] = `
-"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:15)
-> 1 | while (false) function foo(){}
- | ^^^^^^^^^^^^^^^^
- 2 |"
-`;
-
-exports[`function-declaration-in-while.js [hermes] format 1`] = `
-"declaration not allowed as expression statement (1:14)
-> 1 | while (false) function foo(){}
- | ^
- 2 |
-Cause: declaration not allowed as expression statement (1:14)
-while (false) function foo(){}
- ^~~~~~~~"
-`;
-
-exports[`function-declaration-in-while.js [meriyah] format 1`] = `
-"In strict mode code, functions can only be declared at top level or inside a block (1:15)
-> 1 | while (false) function foo(){}
- | ^^^^^^^^
- 2 |
-Cause: [1:14-1:22]: In strict mode code, functions can only be declared at top level or inside a block"
-`;
-
exports[`function-declaration-in-while.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -141,14 +100,45 @@ while (false) function foo() {}
================================================================================
`;
-exports[`labeled-function-declaration.js [hermes] format 1`] = `
-"Function declaration not allowed as body of labeled statement (1:5)
-> 1 | foo: function bar() {}
- | ^
+exports[`function-declaration-in-while.js format[acorn] 1`] = `
+"Unexpected token (1:15)
+> 1 | while (false) function foo(){}
+ | ^
2 |
-Cause: Function declaration not allowed as body of labeled statement (1:5)
-foo: function bar() {}
- ^"
+Cause: Unexpected token (1:14)"
+`;
+
+exports[`function-declaration-in-while.js format[espree] 1`] = `
+"Unexpected token function (1:15)
+> 1 | while (false) function foo(){}
+ | ^
+ 2 |
+Cause: Unexpected token function"
+`;
+
+exports[`function-declaration-in-while.js format[flow] 1`] = `
+"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement. (1:15)
+> 1 | while (false) function foo(){}
+ | ^^^^^^^^^^^^^^^^
+ 2 |"
+`;
+
+exports[`function-declaration-in-while.js format[hermes] 1`] = `
+"declaration not allowed as expression statement (1:14)
+> 1 | while (false) function foo(){}
+ | ^
+ 2 |
+Cause: declaration not allowed as expression statement (1:14)
+while (false) function foo(){}
+ ^~~~~~~~"
+`;
+
+exports[`function-declaration-in-while.js format[meriyah] 1`] = `
+"In strict mode code, functions can only be declared at top level or inside a block (1:15)
+> 1 | while (false) function foo(){}
+ | ^^^^^^^^
+ 2 |
+Cause: [1:14-1:22]: In strict mode code, functions can only be declared at top level or inside a block"
`;
exports[`labeled-function-declaration.js format 1`] = `
@@ -164,3 +154,13 @@ foo: function bar() {}
================================================================================
`;
+
+exports[`labeled-function-declaration.js format[hermes] 1`] = `
+"Function declaration not allowed as body of labeled statement (1:5)
+> 1 | foo: function bar() {}
+ | ^
+ 2 |
+Cause: Function declaration not allowed as body of labeled statement (1:5)
+foo: function bar() {}
+ ^"
+`;
diff --git a/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap b/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap
index 7b3b41cd4..0667414aa 100644
--- a/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap
+++ b/tests/format/js/source-phase-imports/__snapshots__/format.test.js.snap
@@ -14,30 +14,6 @@ import source from "x";
================================================================================
`;
-exports[`import-source.js [acorn] format 1`] = `
-"Unexpected token (1:15)
-> 1 | import source x from "x";
- | ^
- 2 |
-Cause: Unexpected token (1:14)"
-`;
-
-exports[`import-source.js [espree] format 1`] = `
-"Unexpected token x (1:15)
-> 1 | import source x from "x";
- | ^
- 2 |
-Cause: Unexpected token x"
-`;
-
-exports[`import-source.js [meriyah] format 1`] = `
-"Expected 'from' (1:15)
-> 1 | import source x from "x";
- | ^
- 2 |
-Cause: [1:14-1:15]: Expected 'from'"
-`;
-
exports[`import-source.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -52,25 +28,25 @@ import source x from "x";
================================================================================
`;
-exports[`import-source-attributes-declaration.js [acorn] format 1`] = `
+exports[`import-source.js format[acorn] 1`] = `
"Unexpected token (1:15)
-> 1 | import source s from "x" with { attr: "val" };
+> 1 | import source x from "x";
| ^
2 |
Cause: Unexpected token (1:14)"
`;
-exports[`import-source-attributes-declaration.js [espree] format 1`] = `
-"Unexpected token s (1:15)
-> 1 | import source s from "x" with { attr: "val" };
+exports[`import-source.js format[espree] 1`] = `
+"Unexpected token x (1:15)
+> 1 | import source x from "x";
| ^
2 |
-Cause: Unexpected token s"
+Cause: Unexpected token x"
`;
-exports[`import-source-attributes-declaration.js [meriyah] format 1`] = `
+exports[`import-source.js format[meriyah] 1`] = `
"Expected 'from' (1:15)
-> 1 | import source s from "x" with { attr: "val" };
+> 1 | import source x from "x";
| ^
2 |
Cause: [1:14-1:15]: Expected 'from'"
@@ -90,28 +66,28 @@ import source s from "x" with { attr: "val" };
================================================================================
`;
-exports[`import-source-attributes-expression.js [acorn] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("x", { with: { attr: "val" } });
- | ^
+exports[`import-source-attributes-declaration.js format[acorn] 1`] = `
+"Unexpected token (1:15)
+> 1 | import source s from "x" with { attr: "val" };
+ | ^
2 |
-Cause: The only valid meta property for import is 'import.meta' (1:7)"
+Cause: Unexpected token (1:14)"
`;
-exports[`import-source-attributes-expression.js [espree] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("x", { with: { attr: "val" } });
- | ^
+exports[`import-source-attributes-declaration.js format[espree] 1`] = `
+"Unexpected token s (1:15)
+> 1 | import source s from "x" with { attr: "val" };
+ | ^
2 |
-Cause: The only valid meta property for import is 'import.meta'"
+Cause: Unexpected token s"
`;
-exports[`import-source-attributes-expression.js [meriyah] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("x", { with: { attr: "val" } });
- | ^^^^^^
+exports[`import-source-attributes-declaration.js format[meriyah] 1`] = `
+"Expected 'from' (1:15)
+> 1 | import source s from "x" with { attr: "val" };
+ | ^
2 |
-Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
+Cause: [1:14-1:15]: Expected 'from'"
`;
exports[`import-source-attributes-expression.js format 1`] = `
@@ -128,28 +104,28 @@ import.source("x", { with: { attr: "val" } });
================================================================================
`;
-exports[`import-source-binding-from.js [acorn] format 1`] = `
-"Unexpected token (1:20)
-> 1 | import source from from "x";
- | ^
+exports[`import-source-attributes-expression.js format[acorn] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("x", { with: { attr: "val" } });
+ | ^
2 |
-Cause: Unexpected token (1:19)"
+Cause: The only valid meta property for import is 'import.meta' (1:7)"
`;
-exports[`import-source-binding-from.js [espree] format 1`] = `
-"Unexpected token from (1:20)
-> 1 | import source from from "x";
- | ^
+exports[`import-source-attributes-expression.js format[espree] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("x", { with: { attr: "val" } });
+ | ^
2 |
-Cause: Unexpected token from"
+Cause: The only valid meta property for import is 'import.meta'"
`;
-exports[`import-source-binding-from.js [meriyah] format 1`] = `
-"Import source must be string (1:20)
-> 1 | import source from from "x";
- | ^^^^
+exports[`import-source-attributes-expression.js format[meriyah] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("x", { with: { attr: "val" } });
+ | ^^^^^^
2 |
-Cause: [1:19-1:23]: Import source must be string"
+Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
`;
exports[`import-source-binding-from.js format 1`] = `
@@ -166,28 +142,28 @@ import source from from "x";
================================================================================
`;
-exports[`import-source-binding-source.js [acorn] format 1`] = `
-"Unexpected token (1:15)
-> 1 | import source source from "x";
- | ^
+exports[`import-source-binding-from.js format[acorn] 1`] = `
+"Unexpected token (1:20)
+> 1 | import source from from "x";
+ | ^
2 |
-Cause: Unexpected token (1:14)"
+Cause: Unexpected token (1:19)"
`;
-exports[`import-source-binding-source.js [espree] format 1`] = `
-"Unexpected token source (1:15)
-> 1 | import source source from "x";
- | ^
+exports[`import-source-binding-from.js format[espree] 1`] = `
+"Unexpected token from (1:20)
+> 1 | import source from from "x";
+ | ^
2 |
-Cause: Unexpected token source"
+Cause: Unexpected token from"
`;
-exports[`import-source-binding-source.js [meriyah] format 1`] = `
-"Expected 'from' (1:15)
-> 1 | import source source from "x";
- | ^^^^^^
+exports[`import-source-binding-from.js format[meriyah] 1`] = `
+"Import source must be string (1:20)
+> 1 | import source from from "x";
+ | ^^^^
2 |
-Cause: [1:14-1:20]: Expected 'from'"
+Cause: [1:19-1:23]: Import source must be string"
`;
exports[`import-source-binding-source.js format 1`] = `
@@ -204,28 +180,28 @@ import source source from "x";
================================================================================
`;
-exports[`import-source-dynamic-import.js [acorn] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("foo");
- | ^
+exports[`import-source-binding-source.js format[acorn] 1`] = `
+"Unexpected token (1:15)
+> 1 | import source source from "x";
+ | ^
2 |
-Cause: The only valid meta property for import is 'import.meta' (1:7)"
+Cause: Unexpected token (1:14)"
`;
-exports[`import-source-dynamic-import.js [espree] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("foo");
- | ^
+exports[`import-source-binding-source.js format[espree] 1`] = `
+"Unexpected token source (1:15)
+> 1 | import source source from "x";
+ | ^
2 |
-Cause: The only valid meta property for import is 'import.meta'"
+Cause: Unexpected token source"
`;
-exports[`import-source-dynamic-import.js [meriyah] format 1`] = `
-"The only valid meta property for import is 'import.meta' (1:8)
-> 1 | import.source("foo");
- | ^^^^^^
+exports[`import-source-binding-source.js format[meriyah] 1`] = `
+"Expected 'from' (1:15)
+> 1 | import source source from "x";
+ | ^^^^^^
2 |
-Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
+Cause: [1:14-1:20]: Expected 'from'"
`;
exports[`import-source-dynamic-import.js format 1`] = `
@@ -242,7 +218,31 @@ import.source("foo");
================================================================================
`;
-exports[`no-named.js [__babel_estree] format 1`] = `
+exports[`import-source-dynamic-import.js format[acorn] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("foo");
+ | ^
+ 2 |
+Cause: The only valid meta property for import is 'import.meta' (1:7)"
+`;
+
+exports[`import-source-dynamic-import.js format[espree] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("foo");
+ | ^
+ 2 |
+Cause: The only valid meta property for import is 'import.meta'"
+`;
+
+exports[`import-source-dynamic-import.js format[meriyah] 1`] = `
+"The only valid meta property for import is 'import.meta' (1:8)
+> 1 | import.source("foo");
+ | ^^^^^^
+ 2 |
+Cause: [1:7-1:13]: The only valid meta property for import is 'import.meta'"
+`;
+
+exports[`no-named.js format[__babel_estree] 1`] = `
"Only \`import source x from "./module"\` is valid. (1:17)
> 1 | import source { x } from "x";
| ^
@@ -250,7 +250,7 @@ exports[`no-named.js [__babel_estree] format 1`] = `
Cause: Only \`import source x from "./module"\` is valid. (1:16)"
`;
-exports[`no-named.js [acorn] format 1`] = `
+exports[`no-named.js format[acorn] 1`] = `
"Unexpected token (1:15)
> 1 | import source { x } from "x";
| ^
@@ -258,7 +258,7 @@ exports[`no-named.js [acorn] format 1`] = `
Cause: Unexpected token (1:14)"
`;
-exports[`no-named.js [babel] format 1`] = `
+exports[`no-named.js format[babel] 1`] = `
"Only \`import source x from "./module"\` is valid. (1:17)
> 1 | import source { x } from "x";
| ^
@@ -266,7 +266,7 @@ exports[`no-named.js [babel] format 1`] = `
Cause: Only \`import source x from "./module"\` is valid. (1:16)"
`;
-exports[`no-named.js [espree] format 1`] = `
+exports[`no-named.js format[espree] 1`] = `
"Unexpected token { (1:15)
> 1 | import source { x } from "x";
| ^
@@ -274,7 +274,7 @@ exports[`no-named.js [espree] format 1`] = `
Cause: Unexpected token {"
`;
-exports[`no-named.js [meriyah] format 1`] = `
+exports[`no-named.js format[meriyah] 1`] = `
"Expected 'from' (1:15)
> 1 | import source { x } from "x";
| ^
@@ -282,14 +282,14 @@ exports[`no-named.js [meriyah] format 1`] = `
Cause: [1:14-1:15]: Expected 'from'"
`;
-exports[`no-named.js [oxc] format 1`] = `
+exports[`no-named.js format[oxc] 1`] = `
"Only a single default import is allowed in a source phase import. (1:8)
> 1 | import source { x } from "x";
| ^^^^^^
2 |"
`;
-exports[`no-namespace.js [__babel_estree] format 1`] = `
+exports[`no-namespace.js format[__babel_estree] 1`] = `
"Only \`import source x from "./module"\` is valid. (1:15)
> 1 | import source * as x from "x";
| ^
@@ -297,7 +297,7 @@ exports[`no-namespace.js [__babel_estree] format 1`] = `
Cause: Only \`import source x from "./module"\` is valid. (1:14)"
`;
-exports[`no-namespace.js [acorn] format 1`] = `
+exports[`no-namespace.js format[acorn] 1`] = `
"Unexpected token (1:15)
> 1 | import source * as x from "x";
| ^
@@ -305,7 +305,7 @@ exports[`no-namespace.js [acorn] format 1`] = `
Cause: Unexpected token (1:14)"
`;
-exports[`no-namespace.js [babel] format 1`] = `
+exports[`no-namespace.js format[babel] 1`] = `
"Only \`import source x from "./module"\` is valid. (1:15)
> 1 | import source * as x from "x";
| ^
@@ -313,7 +313,7 @@ exports[`no-namespace.js [babel] format 1`] = `
Cause: Only \`import source x from "./module"\` is valid. (1:14)"
`;
-exports[`no-namespace.js [espree] format 1`] = `
+exports[`no-namespace.js format[espree] 1`] = `
"Unexpected token * (1:15)
> 1 | import source * as x from "x";
| ^
@@ -321,7 +321,7 @@ exports[`no-namespace.js [espree] format 1`] = `
Cause: Unexpected token *"
`;
-exports[`no-namespace.js [meriyah] format 1`] = `
+exports[`no-namespace.js format[meriyah] 1`] = `
"Expected 'from' (1:15)
> 1 | import source * as x from "x";
| ^
@@ -329,7 +329,7 @@ exports[`no-namespace.js [meriyah] format 1`] = `
Cause: [1:14-1:15]: Expected 'from'"
`;
-exports[`no-namespace.js [oxc] format 1`] = `
+exports[`no-namespace.js format[oxc] 1`] = `
"Only a single default import is allowed in a source phase import. (1:8)
> 1 | import source * as x from "x";
| ^^^^^^
diff --git a/tests/format/js/strings/__snapshots__/format.test.js.snap b/tests/format/js/strings/__snapshots__/format.test.js.snap
index 569342074..4f698d463 100644
--- a/tests/format/js/strings/__snapshots__/format.test.js.snap
+++ b/tests/format/js/strings/__snapshots__/format.test.js.snap
@@ -126,42 +126,6 @@ const loremIpsumFooBazBar2 =
================================================================================
`;
-exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1`] = `
-"Invalid escape sequence (3:3)
- 1 | // https://github.com/babel/babel/pull/11852
- 2 |
-> 3 | "\\8","\\9";
- | ^
- 4 | () => {
- 5 | "use strict";
- 6 | "\\8", "\\9";
-Cause: Invalid escape sequence (3:2)"
-`;
-
-exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1`] = `
-"Invalid escape sequence (3:3)
- 1 | // https://github.com/babel/babel/pull/11852
- 2 |
-> 3 | "\\8","\\9";
- | ^
- 4 | () => {
- 5 | "use strict";
- 6 | "\\8", "\\9";
-Cause: Invalid escape sequence"
-`;
-
-exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [meriyah] format 1`] = `
-"Escapes \\8 or \\9 are not syntactically valid escapes (3:1)
- 1 | // https://github.com/babel/babel/pull/11852
- 2 |
-> 3 | "\\8","\\9";
- | ^^
- 4 | () => {
- 5 | "use strict";
- 6 | "\\8", "\\9";
-Cause: [3:0-3:2]: Escapes \\8 or \\9 are not syntactically valid escapes"
-`;
-
exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow"]
@@ -189,7 +153,7 @@ trailingComma: "all"
================================================================================
`;
-exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [acorn] format 1`] = `
+exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format[acorn] 1`] = `
"Invalid escape sequence (3:3)
1 | // https://github.com/babel/babel/pull/11852
2 |
@@ -201,7 +165,7 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [acorn] format 1`
Cause: Invalid escape sequence (3:2)"
`;
-exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1`] = `
+exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format[espree] 1`] = `
"Invalid escape sequence (3:3)
1 | // https://github.com/babel/babel/pull/11852
2 |
@@ -213,7 +177,7 @@ exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [espree] format 1
Cause: Invalid escape sequence"
`;
-exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} [meriyah] format 1`] = `
+exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format[meriyah] 1`] = `
"Escapes \\8 or \\9 are not syntactically valid escapes (3:1)
1 | // https://github.com/babel/babel/pull/11852
2 |
@@ -252,6 +216,42 @@ trailingComma: "es5"
================================================================================
`;
+exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format[acorn] 1`] = `
+"Invalid escape sequence (3:3)
+ 1 | // https://github.com/babel/babel/pull/11852
+ 2 |
+> 3 | "\\8","\\9";
+ | ^
+ 4 | () => {
+ 5 | "use strict";
+ 6 | "\\8", "\\9";
+Cause: Invalid escape sequence (3:2)"
+`;
+
+exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format[espree] 1`] = `
+"Invalid escape sequence (3:3)
+ 1 | // https://github.com/babel/babel/pull/11852
+ 2 |
+> 3 | "\\8","\\9";
+ | ^
+ 4 | () => {
+ 5 | "use strict";
+ 6 | "\\8", "\\9";
+Cause: Invalid escape sequence"
+`;
+
+exports[`non-octal-eight-and-nine.js - {"trailingComma":"es5"} format[meriyah] 1`] = `
+"Escapes \\8 or \\9 are not syntactically valid escapes (3:1)
+ 1 | // https://github.com/babel/babel/pull/11852
+ 2 |
+> 3 | "\\8","\\9";
+ | ^^
+ 4 | () => {
+ 5 | "use strict";
+ 6 | "\\8", "\\9";
+Cause: [3:0-3:2]: Escapes \\8 or \\9 are not syntactically valid escapes"
+`;
+
exports[`strings.js - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow"]
diff --git a/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap b/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap
index 82706fd7d..4151844b0 100644
--- a/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap
+++ b/tests/format/js/throw_expressions/__snapshots__/format.test.js.snap
@@ -1,44 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`throw_expression.js [acorn] format 1`] = `
-"Unexpected token (1:26)
-> 1 | function save(filename = throw new TypeError("Argument required")) {}
- | ^
- 2 |
- 3 | lint(ast, {
- 4 | with: () => throw new Error("avoid using 'with' statements.")
-Cause: Unexpected token (1:25)"
-`;
-
-exports[`throw_expression.js [espree] format 1`] = `
-"Unexpected token throw (1:26)
-> 1 | function save(filename = throw new TypeError("Argument required")) {}
- | ^
- 2 |
- 3 | lint(ast, {
- 4 | with: () => throw new Error("avoid using 'with' statements.")
-Cause: Unexpected token throw"
-`;
-
-exports[`throw_expression.js [meriyah] format 1`] = `
-"Unexpected token: 'throw' (1:26)
-> 1 | function save(filename = throw new TypeError("Argument required")) {}
- | ^^^^^
- 2 |
- 3 | lint(ast, {
- 4 | with: () => throw new Error("avoid using 'with' statements.")
-Cause: [1:25-1:30]: Unexpected token: 'throw'"
-`;
-
-exports[`throw_expression.js [oxc] format 1`] = `
-"Unexpected token (1:26)
-> 1 | function save(filename = throw new TypeError("Argument required")) {}
- | ^^^^^
- 2 |
- 3 | lint(ast, {
- 4 | with: () => throw new Error("avoid using 'with' statements.")"
-`;
-
exports[`throw_expression.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -92,3 +53,42 @@ class Product {
================================================================================
`;
+
+exports[`throw_expression.js format[acorn] 1`] = `
+"Unexpected token (1:26)
+> 1 | function save(filename = throw new TypeError("Argument required")) {}
+ | ^
+ 2 |
+ 3 | lint(ast, {
+ 4 | with: () => throw new Error("avoid using 'with' statements.")
+Cause: Unexpected token (1:25)"
+`;
+
+exports[`throw_expression.js format[espree] 1`] = `
+"Unexpected token throw (1:26)
+> 1 | function save(filename = throw new TypeError("Argument required")) {}
+ | ^
+ 2 |
+ 3 | lint(ast, {
+ 4 | with: () => throw new Error("avoid using 'with' statements.")
+Cause: Unexpected token throw"
+`;
+
+exports[`throw_expression.js format[meriyah] 1`] = `
+"Unexpected token: 'throw' (1:26)
+> 1 | function save(filename = throw new TypeError("Argument required")) {}
+ | ^^^^^
+ 2 |
+ 3 | lint(ast, {
+ 4 | with: () => throw new Error("avoid using 'with' statements.")
+Cause: [1:25-1:30]: Unexpected token: 'throw'"
+`;
+
+exports[`throw_expression.js format[oxc] 1`] = `
+"Unexpected token (1:26)
+> 1 | function save(filename = throw new TypeError("Argument required")) {}
+ | ^^^^^
+ 2 |
+ 3 | lint(ast, {
+ 4 | with: () => throw new Error("avoid using 'with' statements.")"
+`;
diff --git a/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap b/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap
index 97668819f..3503f802c 100644
--- a/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap
+++ b/tests/format/js/v8_intrinsic/__snapshots__/format.test.js.snap
@@ -1,40 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`avoid-conflicts-to-pipeline.js [acorn] format 1`] = `
-"Unexpected token (2:16)
- 1 | // |>
-> 2 | const status = %GetOptimizationStatus(fn);
- | ^
- 3 |
-Cause: Unexpected token (2:15)"
-`;
-
-exports[`avoid-conflicts-to-pipeline.js [espree] format 1`] = `
-"Unexpected token % (2:16)
- 1 | // |>
-> 2 | const status = %GetOptimizationStatus(fn);
- | ^
- 3 |
-Cause: Unexpected token %"
-`;
-
-exports[`avoid-conflicts-to-pipeline.js [meriyah] format 1`] = `
-"Unexpected token: '%' (2:16)
- 1 | // |>
-> 2 | const status = %GetOptimizationStatus(fn);
- | ^
- 3 |
-Cause: [2:15-2:16]: Unexpected token: '%'"
-`;
-
-exports[`avoid-conflicts-to-pipeline.js [oxc] format 1`] = `
-"Unexpected token (2:16)
- 1 | // |>
-> 2 | const status = %GetOptimizationStatus(fn);
- | ^
- 3 |"
-`;
-
exports[`avoid-conflicts-to-pipeline.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -51,47 +16,39 @@ const status = %GetOptimizationStatus(fn);
================================================================================
`;
-exports[`intrinsic_call.js [acorn] format 1`] = `
-"Unexpected token (2:13)
- 1 | function doSmth() {
-> 2 | %DebugPrint
- | ^
- 3 | (
- 4 | foo )
- 5 | }
-Cause: Unexpected token (2:12)"
+exports[`avoid-conflicts-to-pipeline.js format[acorn] 1`] = `
+"Unexpected token (2:16)
+ 1 | // |>
+> 2 | const status = %GetOptimizationStatus(fn);
+ | ^
+ 3 |
+Cause: Unexpected token (2:15)"
`;
-exports[`intrinsic_call.js [espree] format 1`] = `
-"Unexpected token % (2:13)
- 1 | function doSmth() {
-> 2 | %DebugPrint
- | ^
- 3 | (
- 4 | foo )
- 5 | }
+exports[`avoid-conflicts-to-pipeline.js format[espree] 1`] = `
+"Unexpected token % (2:16)
+ 1 | // |>
+> 2 | const status = %GetOptimizationStatus(fn);
+ | ^
+ 3 |
Cause: Unexpected token %"
`;
-exports[`intrinsic_call.js [meriyah] format 1`] = `
-"Unexpected token: '%' (2:13)
- 1 | function doSmth() {
-> 2 | %DebugPrint
- | ^
- 3 | (
- 4 | foo )
- 5 | }
-Cause: [2:12-2:13]: Unexpected token: '%'"
+exports[`avoid-conflicts-to-pipeline.js format[meriyah] 1`] = `
+"Unexpected token: '%' (2:16)
+ 1 | // |>
+> 2 | const status = %GetOptimizationStatus(fn);
+ | ^
+ 3 |
+Cause: [2:15-2:16]: Unexpected token: '%'"
`;
-exports[`intrinsic_call.js [oxc] format 1`] = `
-"Unexpected token (2:13)
- 1 | function doSmth() {
-> 2 | %DebugPrint
- | ^
- 3 | (
- 4 | foo )
- 5 | }"
+exports[`avoid-conflicts-to-pipeline.js format[oxc] 1`] = `
+"Unexpected token (2:16)
+ 1 | // |>
+> 2 | const status = %GetOptimizationStatus(fn);
+ | ^
+ 3 |"
`;
exports[`intrinsic_call.js format 1`] = `
@@ -139,3 +96,46 @@ function printFunc(f) {
================================================================================
`;
+
+exports[`intrinsic_call.js format[acorn] 1`] = `
+"Unexpected token (2:13)
+ 1 | function doSmth() {
+> 2 | %DebugPrint
+ | ^
+ 3 | (
+ 4 | foo )
+ 5 | }
+Cause: Unexpected token (2:12)"
+`;
+
+exports[`intrinsic_call.js format[espree] 1`] = `
+"Unexpected token % (2:13)
+ 1 | function doSmth() {
+> 2 | %DebugPrint
+ | ^
+ 3 | (
+ 4 | foo )
+ 5 | }
+Cause: Unexpected token %"
+`;
+
+exports[`intrinsic_call.js format[meriyah] 1`] = `
+"Unexpected token: '%' (2:13)
+ 1 | function doSmth() {
+> 2 | %DebugPrint
+ | ^
+ 3 | (
+ 4 | foo )
+ 5 | }
+Cause: [2:12-2:13]: Unexpected token: '%'"
+`;
+
+exports[`intrinsic_call.js format[oxc] 1`] = `
+"Unexpected token (2:13)
+ 1 | function doSmth() {
+> 2 | %DebugPrint
+ | ^
+ 3 | (
+ 4 | foo )
+ 5 | }"
+`;
diff --git a/tests/format/json/_errors_/__snapshots__/format.test.js.snap b/tests/format/json/_errors_/__snapshots__/format.test.js.snap
index 752b5c323..32ab3577e 100644
--- a/tests/format/json/_errors_/__snapshots__/format.test.js.snap
+++ b/tests/format/json/_errors_/__snapshots__/format.test.js.snap
@@ -1,51 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [json] format 1`] = `
-"Shorthand property is not allowed in JSON. (1:2)
-> 1 | {foo}
- | ^^^"
-`;
-
-exports[`snippet: #0 [json] format 2`] = `
-"Unexpected token (1:2)
-> 1 | [
- | ^
-Cause: Unexpected token (1:1)"
-`;
-
-exports[`snippet: #0 [json-stringify] format 1`] = `
-"Shorthand property is not allowed in JSON. (1:2)
-> 1 | {foo}
- | ^^^"
-`;
-
-exports[`snippet: #0 [json-stringify] format 2`] = `
-"Unexpected token (1:2)
-> 1 | [
- | ^
-Cause: Unexpected token (1:1)"
-`;
-
-exports[`snippet: #0 [json5] format 1`] = `
-"Shorthand property is not allowed in JSON. (1:2)
-> 1 | {foo}
- | ^^^"
-`;
-
-exports[`snippet: #0 [json5] format 2`] = `
-"Unexpected token (1:2)
-> 1 | [
- | ^
-Cause: Unexpected token (1:1)"
-`;
-
-exports[`snippet: #0 [jsonc] format 1`] = `
-"Unexpected token (1:2)
-> 1 | [
- | ^
-Cause: Unexpected token (1:1)"
-`;
-
exports[`snippet: #0 format 1`] = `
"A 'set' accessor must have exactly one formal parameter. (1:9)
> 1 | [class {set foo() {}}]
@@ -53,50 +7,50 @@ exports[`snippet: #0 format 1`] = `
Cause: A 'set' accessor must have exactly one formal parameter. (1:8)"
`;
-exports[`snippet: #1 [json] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {["foo"]:"bar"}
- | ^^^^^"
+exports[`snippet: #0 format[json] 1`] = `
+"Shorthand property is not allowed in JSON. (1:2)
+> 1 | {foo}
+ | ^^^"
`;
-exports[`snippet: #1 [json] format 2`] = `
-"Unexpected token (1:1)
-> 1 | ;
- | ^
-Cause: Unexpected token (1:0)"
+exports[`snippet: #0 format[json] 2`] = `
+"Unexpected token (1:2)
+> 1 | [
+ | ^
+Cause: Unexpected token (1:1)"
`;
-exports[`snippet: #1 [json-stringify] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {["foo"]:"bar"}
- | ^^^^^"
+exports[`snippet: #0 format[json-stringify] 1`] = `
+"Shorthand property is not allowed in JSON. (1:2)
+> 1 | {foo}
+ | ^^^"
`;
-exports[`snippet: #1 [json-stringify] format 2`] = `
-"Unexpected token (1:1)
-> 1 | ;
- | ^
-Cause: Unexpected token (1:0)"
+exports[`snippet: #0 format[json-stringify] 2`] = `
+"Unexpected token (1:2)
+> 1 | [
+ | ^
+Cause: Unexpected token (1:1)"
`;
-exports[`snippet: #1 [json5] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {["foo"]:"bar"}
- | ^^^^^"
+exports[`snippet: #0 format[json5] 1`] = `
+"Shorthand property is not allowed in JSON. (1:2)
+> 1 | {foo}
+ | ^^^"
`;
-exports[`snippet: #1 [json5] format 2`] = `
-"Unexpected token (1:1)
-> 1 | ;
- | ^
-Cause: Unexpected token (1:0)"
+exports[`snippet: #0 format[json5] 2`] = `
+"Unexpected token (1:2)
+> 1 | [
+ | ^
+Cause: Unexpected token (1:1)"
`;
-exports[`snippet: #1 [jsonc] format 1`] = `
-"Unexpected token (1:1)
-> 1 | ;
- | ^
-Cause: Unexpected token (1:0)"
+exports[`snippet: #0 format[jsonc] 1`] = `
+"Unexpected token (1:2)
+> 1 | [
+ | ^
+Cause: Unexpected token (1:1)"
`;
exports[`snippet: #1 format 1`] = `
@@ -106,50 +60,50 @@ exports[`snippet: #1 format 1`] = `
Cause: Private name #bar is not defined. (1:20)"
`;
-exports[`snippet: #2 [json] format 1`] = `
-"Operator '~' is not allowed in JSON. (1:9)
-> 1 | {"foo": ~1}
- | ^^"
+exports[`snippet: #1 format[json] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {["foo"]:"bar"}
+ | ^^^^^"
`;
-exports[`snippet: #2 [json] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
-> 1 | "string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
+exports[`snippet: #1 format[json] 2`] = `
+"Unexpected token (1:1)
+> 1 | ;
+ | ^
+Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #2 [json-stringify] format 1`] = `
-"Operator '~' is not allowed in JSON. (1:9)
-> 1 | {"foo": ~1}
- | ^^"
+exports[`snippet: #1 format[json-stringify] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {["foo"]:"bar"}
+ | ^^^^^"
`;
-exports[`snippet: #2 [json-stringify] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
-> 1 | "string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
+exports[`snippet: #1 format[json-stringify] 2`] = `
+"Unexpected token (1:1)
+> 1 | ;
+ | ^
+Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #2 [json5] format 1`] = `
-"Operator '~' is not allowed in JSON. (1:9)
-> 1 | {"foo": ~1}
- | ^^"
+exports[`snippet: #1 format[json5] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {["foo"]:"bar"}
+ | ^^^^^"
`;
-exports[`snippet: #2 [json5] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
-> 1 | "string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
+exports[`snippet: #1 format[json5] 2`] = `
+"Unexpected token (1:1)
+> 1 | ;
+ | ^
+Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #2 [jsonc] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
-> 1 | "string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
+exports[`snippet: #1 format[jsonc] 1`] = `
+"Unexpected token (1:1)
+> 1 | ;
+ | ^
+Cause: Unexpected token (1:0)"
`;
exports[`snippet: #2 format 1`] = `
@@ -159,54 +113,50 @@ exports[`snippet: #2 format 1`] = `
Cause: 'await' is only allowed within async functions and at the top levels of modules. (1:13)"
`;
-exports[`snippet: #3 [json] format 1`] = `
-"'LogicalExpression' is not allowed in JSON. (1:9)
-> 1 | {"foo": false || "bar"}
- | ^^^^^^^^^^^^^^"
+exports[`snippet: #2 format[json] 1`] = `
+"Operator '~' is not allowed in JSON. (1:9)
+> 1 | {"foo": ~1}
+ | ^^"
`;
-exports[`snippet: #3 [json] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | "string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #2 format[json] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
+> 1 | "string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
`;
-exports[`snippet: #3 [json-stringify] format 1`] = `
-"'LogicalExpression' is not allowed in JSON. (1:9)
-> 1 | {"foo": false || "bar"}
- | ^^^^^^^^^^^^^^"
+exports[`snippet: #2 format[json-stringify] 1`] = `
+"Operator '~' is not allowed in JSON. (1:9)
+> 1 | {"foo": ~1}
+ | ^^"
`;
-exports[`snippet: #3 [json-stringify] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | "string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #2 format[json-stringify] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
+> 1 | "string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
`;
-exports[`snippet: #3 [json5] format 1`] = `
-"'LogicalExpression' is not allowed in JSON. (1:9)
-> 1 | {"foo": false || "bar"}
- | ^^^^^^^^^^^^^^"
+exports[`snippet: #2 format[json5] 1`] = `
+"Operator '~' is not allowed in JSON. (1:9)
+> 1 | {"foo": ~1}
+ | ^^"
`;
-exports[`snippet: #3 [json5] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | "string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #2 format[json5] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
+> 1 | "string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
`;
-exports[`snippet: #3 [jsonc] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | "string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #2 format[jsonc] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:9)
+> 1 | "string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:8)"
`;
exports[`snippet: #3 format 1`] = `
@@ -215,50 +165,54 @@ exports[`snippet: #3 format 1`] = `
| ^"
`;
-exports[`snippet: #4 [json] format 1`] = `
-"'ArrowFunctionExpression' is not allowed in JSON. (1:9)
-> 1 | {"foo": () => {}}
- | ^^^^^^^^"
+exports[`snippet: #3 format[json] 1`] = `
+"'LogicalExpression' is not allowed in JSON. (1:9)
+> 1 | {"foo": false || "bar"}
+ | ^^^^^^^^^^^^^^"
`;
-exports[`snippet: #4 [json] format 2`] = `
-"Unexpected token (1:15)
-> 1 | /* comment */[
- | ^
-Cause: Unexpected token (1:14)"
+exports[`snippet: #3 format[json] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | "string"
+> 2 | ;
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
-exports[`snippet: #4 [json-stringify] format 1`] = `
-"'ArrowFunctionExpression' is not allowed in JSON. (1:9)
-> 1 | {"foo": () => {}}
- | ^^^^^^^^"
+exports[`snippet: #3 format[json-stringify] 1`] = `
+"'LogicalExpression' is not allowed in JSON. (1:9)
+> 1 | {"foo": false || "bar"}
+ | ^^^^^^^^^^^^^^"
`;
-exports[`snippet: #4 [json-stringify] format 2`] = `
-"Unexpected token (1:15)
-> 1 | /* comment */[
- | ^
-Cause: Unexpected token (1:14)"
+exports[`snippet: #3 format[json-stringify] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | "string"
+> 2 | ;
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
-exports[`snippet: #4 [json5] format 1`] = `
-"'ArrowFunctionExpression' is not allowed in JSON. (1:9)
-> 1 | {"foo": () => {}}
- | ^^^^^^^^"
+exports[`snippet: #3 format[json5] 1`] = `
+"'LogicalExpression' is not allowed in JSON. (1:9)
+> 1 | {"foo": false || "bar"}
+ | ^^^^^^^^^^^^^^"
`;
-exports[`snippet: #4 [json5] format 2`] = `
-"Unexpected token (1:15)
-> 1 | /* comment */[
- | ^
-Cause: Unexpected token (1:14)"
+exports[`snippet: #3 format[json5] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | "string"
+> 2 | ;
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
-exports[`snippet: #4 [jsonc] format 1`] = `
-"Unexpected token (1:15)
-> 1 | /* comment */[
- | ^
-Cause: Unexpected token (1:14)"
+exports[`snippet: #3 format[jsonc] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | "string"
+> 2 | ;
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
exports[`snippet: #4 format 1`] = `
@@ -268,53 +222,50 @@ exports[`snippet: #4 format 1`] = `
Cause: 'import' and 'export' may only appear at the top level. (1:13)"
`;
-exports[`snippet: #5 [json] format 1`] = `
-"Expecting Unicode escape sequence \\uXXXX. (1:10)
-> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json
- | ^
-Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)"
+exports[`snippet: #4 format[json] 1`] = `
+"'ArrowFunctionExpression' is not allowed in JSON. (1:9)
+> 1 | {"foo": () => {}}
+ | ^^^^^^^^"
`;
-exports[`snippet: #5 [json] format 2`] = `
-"Unexpected token (1:14)
-> 1 | /* comment */;
- | ^
-Cause: Unexpected token (1:13)"
+exports[`snippet: #4 format[json] 2`] = `
+"Unexpected token (1:15)
+> 1 | /* comment */[
+ | ^
+Cause: Unexpected token (1:14)"
`;
-exports[`snippet: #5 [json-stringify] format 1`] = `
-"Expecting Unicode escape sequence \\uXXXX. (1:10)
-> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json
- | ^
-Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)"
+exports[`snippet: #4 format[json-stringify] 1`] = `
+"'ArrowFunctionExpression' is not allowed in JSON. (1:9)
+> 1 | {"foo": () => {}}
+ | ^^^^^^^^"
`;
-exports[`snippet: #5 [json-stringify] format 2`] = `
-"Unexpected token (1:14)
-> 1 | /* comment */;
- | ^
-Cause: Unexpected token (1:13)"
+exports[`snippet: #4 format[json-stringify] 2`] = `
+"Unexpected token (1:15)
+> 1 | /* comment */[
+ | ^
+Cause: Unexpected token (1:14)"
`;
-exports[`snippet: #5 [json5] format 1`] = `
-"Expecting Unicode escape sequence \\uXXXX. (1:10)
-> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json
- | ^
-Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)"
+exports[`snippet: #4 format[json5] 1`] = `
+"'ArrowFunctionExpression' is not allowed in JSON. (1:9)
+> 1 | {"foo": () => {}}
+ | ^^^^^^^^"
`;
-exports[`snippet: #5 [json5] format 2`] = `
-"Unexpected token (1:14)
-> 1 | /* comment */;
- | ^
-Cause: Unexpected token (1:13)"
+exports[`snippet: #4 format[json5] 2`] = `
+"Unexpected token (1:15)
+> 1 | /* comment */[
+ | ^
+Cause: Unexpected token (1:14)"
`;
-exports[`snippet: #5 [jsonc] format 1`] = `
-"Unexpected token (1:14)
-> 1 | /* comment */;
- | ^
-Cause: Unexpected token (1:13)"
+exports[`snippet: #4 format[jsonc] 1`] = `
+"Unexpected token (1:15)
+> 1 | /* comment */[
+ | ^
+Cause: Unexpected token (1:14)"
`;
exports[`snippet: #5 format 1`] = `
@@ -324,50 +275,53 @@ exports[`snippet: #5 format 1`] = `
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #6 [json] format 1`] = `
-"'BinaryExpression' is not allowed in JSON. (1:1)
-> 1 | 1+2
- | ^^^"
+exports[`snippet: #5 format[json] 1`] = `
+"Expecting Unicode escape sequence \\uXXXX. (1:10)
+> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json
+ | ^
+Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)"
`;
-exports[`snippet: #6 [json] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
-> 1 | /* comment */"string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
+exports[`snippet: #5 format[json] 2`] = `
+"Unexpected token (1:14)
+> 1 | /* comment */;
+ | ^
+Cause: Unexpected token (1:13)"
`;
-exports[`snippet: #6 [json-stringify] format 1`] = `
-"'BinaryExpression' is not allowed in JSON. (1:1)
-> 1 | 1+2
- | ^^^"
+exports[`snippet: #5 format[json-stringify] 1`] = `
+"Expecting Unicode escape sequence \\uXXXX. (1:10)
+> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json
+ | ^
+Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)"
`;
-exports[`snippet: #6 [json-stringify] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
-> 1 | /* comment */"string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
+exports[`snippet: #5 format[json-stringify] 2`] = `
+"Unexpected token (1:14)
+> 1 | /* comment */;
+ | ^
+Cause: Unexpected token (1:13)"
`;
-exports[`snippet: #6 [json5] format 1`] = `
-"'BinaryExpression' is not allowed in JSON. (1:1)
-> 1 | 1+2
- | ^^^"
+exports[`snippet: #5 format[json5] 1`] = `
+"Expecting Unicode escape sequence \\uXXXX. (1:10)
+> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json
+ | ^
+Cause: Expecting Unicode escape sequence \\uXXXX. (1:9)"
`;
-exports[`snippet: #6 [json5] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
-> 1 | /* comment */"string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
+exports[`snippet: #5 format[json5] 2`] = `
+"Unexpected token (1:14)
+> 1 | /* comment */;
+ | ^
+Cause: Unexpected token (1:13)"
`;
-exports[`snippet: #6 [jsonc] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
-> 1 | /* comment */"string";
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
+exports[`snippet: #5 format[jsonc] 1`] = `
+"Unexpected token (1:14)
+> 1 | /* comment */;
+ | ^
+Cause: Unexpected token (1:13)"
`;
exports[`snippet: #6 format 1`] = `
@@ -377,54 +331,50 @@ exports[`snippet: #6 format 1`] = `
Cause: Unexpected token, expected "," (1:2)"
`;
-exports[`snippet: #7 [json] format 1`] = `
-"Shorthand property is not allowed in JSON. (1:2)
-> 1 | {Infinity}
- | ^^^^^^^^"
+exports[`snippet: #6 format[json] 1`] = `
+"'BinaryExpression' is not allowed in JSON. (1:1)
+> 1 | 1+2
+ | ^^^"
`;
-exports[`snippet: #7 [json] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | /* comment */"string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #6 format[json] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
+> 1 | /* comment */"string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
`;
-exports[`snippet: #7 [json-stringify] format 1`] = `
-"Shorthand property is not allowed in JSON. (1:2)
-> 1 | {Infinity}
- | ^^^^^^^^"
+exports[`snippet: #6 format[json-stringify] 1`] = `
+"'BinaryExpression' is not allowed in JSON. (1:1)
+> 1 | 1+2
+ | ^^^"
`;
-exports[`snippet: #7 [json-stringify] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | /* comment */"string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #6 format[json-stringify] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
+> 1 | /* comment */"string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
`;
-exports[`snippet: #7 [json5] format 1`] = `
-"Shorthand property is not allowed in JSON. (1:2)
-> 1 | {Infinity}
- | ^^^^^^^^"
+exports[`snippet: #6 format[json5] 1`] = `
+"'BinaryExpression' is not allowed in JSON. (1:1)
+> 1 | 1+2
+ | ^^^"
`;
-exports[`snippet: #7 [json5] format 2`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | /* comment */"string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #6 format[json5] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
+> 1 | /* comment */"string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
`;
-exports[`snippet: #7 [jsonc] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
- 1 | /* comment */"string"
-> 2 | ;
- | ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
+exports[`snippet: #6 format[jsonc] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:22)
+> 1 | /* comment */"string";
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (1:21)"
`;
exports[`snippet: #7 format 1`] = `
@@ -433,50 +383,54 @@ exports[`snippet: #7 format 1`] = `
| ^"
`;
-exports[`snippet: #8 [json] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {[key]: 1}
- | ^^^"
+exports[`snippet: #7 format[json] 1`] = `
+"Shorthand property is not allowed in JSON. (1:2)
+> 1 | {Infinity}
+ | ^^^^^^^^"
`;
-exports[`snippet: #8 [json] format 2`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
+exports[`snippet: #7 format[json] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | /* comment */"string"
+> 2 | ;
| ^
-Cause: Unexpected token (1:0)"
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
-exports[`snippet: #8 [json-stringify] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {[key]: 1}
- | ^^^"
+exports[`snippet: #7 format[json-stringify] 1`] = `
+"Shorthand property is not allowed in JSON. (1:2)
+> 1 | {Infinity}
+ | ^^^^^^^^"
`;
-exports[`snippet: #8 [json-stringify] format 2`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
+exports[`snippet: #7 format[json-stringify] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | /* comment */"string"
+> 2 | ;
| ^
-Cause: Unexpected token (1:0)"
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
-exports[`snippet: #8 [json5] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {[key]: 1}
- | ^^^"
+exports[`snippet: #7 format[json5] 1`] = `
+"Shorthand property is not allowed in JSON. (1:2)
+> 1 | {Infinity}
+ | ^^^^^^^^"
`;
-exports[`snippet: #8 [json5] format 2`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
+exports[`snippet: #7 format[json5] 2`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | /* comment */"string"
+> 2 | ;
| ^
-Cause: Unexpected token (1:0)"
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
-exports[`snippet: #8 [jsonc] format 1`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
+exports[`snippet: #7 format[jsonc] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:1)
+ 1 | /* comment */"string"
+> 2 | ;
| ^
-Cause: Unexpected token (1:0)"
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`;\`. (2:0)"
`;
exports[`snippet: #8 format 1`] = `
@@ -485,53 +439,49 @@ exports[`snippet: #8 format 1`] = `
| ^"
`;
-exports[`snippet: #9 [json] format 1`] = `
+exports[`snippet: #8 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[key()]: 1}
- | ^^^^^"
+> 1 | {[key]: 1}
+ | ^^^"
`;
-exports[`snippet: #9 [json] format 2`] = `
+exports[`snippet: #8 format[json] 2`] = `
"Unexpected token (1:1)
> 1 | #!/usr/bin/env node
| ^
- 2 | []
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #9 [json-stringify] format 1`] = `
+exports[`snippet: #8 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[key()]: 1}
- | ^^^^^"
+> 1 | {[key]: 1}
+ | ^^^"
`;
-exports[`snippet: #9 [json-stringify] format 2`] = `
+exports[`snippet: #8 format[json-stringify] 2`] = `
"Unexpected token (1:1)
> 1 | #!/usr/bin/env node
| ^
- 2 | []
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #9 [json5] format 1`] = `
+exports[`snippet: #8 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[key()]: 1}
- | ^^^^^"
+> 1 | {[key]: 1}
+ | ^^^"
`;
-exports[`snippet: #9 [json5] format 2`] = `
+exports[`snippet: #8 format[json5] 2`] = `
"Unexpected token (1:1)
> 1 | #!/usr/bin/env node
| ^
- 2 | []
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #9 [jsonc] format 1`] = `
+exports[`snippet: #8 format[jsonc] 1`] = `
"Unexpected token (1:1)
> 1 | #!/usr/bin/env node
| ^
- 2 | []
Cause: Unexpected token (1:0)"
`;
@@ -541,22 +491,54 @@ exports[`snippet: #9 format 1`] = `
| ^"
`;
-exports[`snippet: #10 [json] format 1`] = `
+exports[`snippet: #9 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['CallExpression']: 1}
- | ^^^^^^^^^^^^^^^^"
+> 1 | {[key()]: 1}
+ | ^^^^^"
`;
-exports[`snippet: #10 [json-stringify] format 1`] = `
-"Computed key is not allowed in JSON. (1:3)
-> 1 | {['CallExpression']: 1}
- | ^^^^^^^^^^^^^^^^"
+exports[`snippet: #9 format[json] 2`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
+ | ^
+ 2 | []
+Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #10 [json5] format 1`] = `
+exports[`snippet: #9 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['CallExpression']: 1}
- | ^^^^^^^^^^^^^^^^"
+> 1 | {[key()]: 1}
+ | ^^^^^"
+`;
+
+exports[`snippet: #9 format[json-stringify] 2`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
+ | ^
+ 2 | []
+Cause: Unexpected token (1:0)"
+`;
+
+exports[`snippet: #9 format[json5] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {[key()]: 1}
+ | ^^^^^"
+`;
+
+exports[`snippet: #9 format[json5] 2`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
+ | ^
+ 2 | []
+Cause: Unexpected token (1:0)"
+`;
+
+exports[`snippet: #9 format[jsonc] 1`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
+ | ^
+ 2 | []
+Cause: Unexpected token (1:0)"
`;
exports[`snippet: #10 format 1`] = `
@@ -565,22 +547,22 @@ exports[`snippet: #10 format 1`] = `
| ^"
`;
-exports[`snippet: #11 [json] format 1`] = `
+exports[`snippet: #10 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['StringLiteral']: 1}
- | ^^^^^^^^^^^^^^^"
+> 1 | {['CallExpression']: 1}
+ | ^^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #11 [json-stringify] format 1`] = `
+exports[`snippet: #10 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['StringLiteral']: 1}
- | ^^^^^^^^^^^^^^^"
+> 1 | {['CallExpression']: 1}
+ | ^^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #11 [json5] format 1`] = `
+exports[`snippet: #10 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['StringLiteral']: 1}
- | ^^^^^^^^^^^^^^^"
+> 1 | {['CallExpression']: 1}
+ | ^^^^^^^^^^^^^^^^"
`;
exports[`snippet: #11 format 1`] = `
@@ -589,22 +571,22 @@ exports[`snippet: #11 format 1`] = `
| ^^^^^^^^^^^^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #12 [json] format 1`] = `
+exports[`snippet: #11 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['string']: 1}
- | ^^^^^^^^"
+> 1 | {['StringLiteral']: 1}
+ | ^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #12 [json-stringify] format 1`] = `
+exports[`snippet: #11 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['string']: 1}
- | ^^^^^^^^"
+> 1 | {['StringLiteral']: 1}
+ | ^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #12 [json5] format 1`] = `
+exports[`snippet: #11 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {['string']: 1}
- | ^^^^^^^^"
+> 1 | {['StringLiteral']: 1}
+ | ^^^^^^^^^^^^^^^"
`;
exports[`snippet: #12 format 1`] = `
@@ -614,22 +596,22 @@ exports[`snippet: #12 format 1`] = `
Cause: Identifier directly after number. (1:2)"
`;
-exports[`snippet: #13 [json] format 1`] = `
+exports[`snippet: #12 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[1]: 1}
- | ^"
+> 1 | {['string']: 1}
+ | ^^^^^^^^"
`;
-exports[`snippet: #13 [json-stringify] format 1`] = `
+exports[`snippet: #12 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[1]: 1}
- | ^"
+> 1 | {['string']: 1}
+ | ^^^^^^^^"
`;
-exports[`snippet: #13 [json5] format 1`] = `
+exports[`snippet: #12 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[1]: 1}
- | ^"
+> 1 | {['string']: 1}
+ | ^^^^^^^^"
`;
exports[`snippet: #13 format 1`] = `
@@ -638,22 +620,22 @@ exports[`snippet: #13 format 1`] = `
| ^"
`;
-exports[`snippet: #14 [json] format 1`] = `
+exports[`snippet: #13 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[Infinity]: 1}
- | ^^^^^^^^"
+> 1 | {[1]: 1}
+ | ^"
`;
-exports[`snippet: #14 [json-stringify] format 1`] = `
+exports[`snippet: #13 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[Infinity]: 1}
- | ^^^^^^^^"
+> 1 | {[1]: 1}
+ | ^"
`;
-exports[`snippet: #14 [json5] format 1`] = `
+exports[`snippet: #13 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[Infinity]: 1}
- | ^^^^^^^^"
+> 1 | {[1]: 1}
+ | ^"
`;
exports[`snippet: #14 format 1`] = `
@@ -662,22 +644,22 @@ exports[`snippet: #14 format 1`] = `
| ^"
`;
-exports[`snippet: #15 [json] format 1`] = `
+exports[`snippet: #14 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[-Infinity]: 1}
- | ^^^^^^^^^"
+> 1 | {[Infinity]: 1}
+ | ^^^^^^^^"
`;
-exports[`snippet: #15 [json-stringify] format 1`] = `
+exports[`snippet: #14 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[-Infinity]: 1}
- | ^^^^^^^^^"
+> 1 | {[Infinity]: 1}
+ | ^^^^^^^^"
`;
-exports[`snippet: #15 [json5] format 1`] = `
+exports[`snippet: #14 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[-Infinity]: 1}
- | ^^^^^^^^^"
+> 1 | {[Infinity]: 1}
+ | ^^^^^^^^"
`;
exports[`snippet: #15 format 1`] = `
@@ -686,22 +668,22 @@ exports[`snippet: #15 format 1`] = `
| ^^^^"
`;
-exports[`snippet: #16 [json] format 1`] = `
+exports[`snippet: #15 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[{key: 'value'}]: 1}
- | ^^^^^^^^^^^^^^"
+> 1 | {[-Infinity]: 1}
+ | ^^^^^^^^^"
`;
-exports[`snippet: #16 [json-stringify] format 1`] = `
+exports[`snippet: #15 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[{key: 'value'}]: 1}
- | ^^^^^^^^^^^^^^"
+> 1 | {[-Infinity]: 1}
+ | ^^^^^^^^^"
`;
-exports[`snippet: #16 [json5] format 1`] = `
+exports[`snippet: #15 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[{key: 'value'}]: 1}
- | ^^^^^^^^^^^^^^"
+> 1 | {[-Infinity]: 1}
+ | ^^^^^^^^^"
`;
exports[`snippet: #16 format 1`] = `
@@ -710,22 +692,22 @@ exports[`snippet: #16 format 1`] = `
| ^"
`;
-exports[`snippet: #17 [json] format 1`] = `
+exports[`snippet: #16 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[[]]: 1}
- | ^^"
+> 1 | {[{key: 'value'}]: 1}
+ | ^^^^^^^^^^^^^^"
`;
-exports[`snippet: #17 [json-stringify] format 1`] = `
+exports[`snippet: #16 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[[]]: 1}
- | ^^"
+> 1 | {[{key: 'value'}]: 1}
+ | ^^^^^^^^^^^^^^"
`;
-exports[`snippet: #17 [json5] format 1`] = `
+exports[`snippet: #16 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[[]]: 1}
- | ^^"
+> 1 | {[{key: 'value'}]: 1}
+ | ^^^^^^^^^^^^^^"
`;
exports[`snippet: #17 format 1`] = `
@@ -734,22 +716,22 @@ exports[`snippet: #17 format 1`] = `
| ^"
`;
-exports[`snippet: #18 [json] format 1`] = `
+exports[`snippet: #17 format[json] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[null]: 1}
- | ^^^^"
+> 1 | {[[]]: 1}
+ | ^^"
`;
-exports[`snippet: #18 [json-stringify] format 1`] = `
+exports[`snippet: #17 format[json-stringify] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[null]: 1}
- | ^^^^"
+> 1 | {[[]]: 1}
+ | ^^"
`;
-exports[`snippet: #18 [json5] format 1`] = `
+exports[`snippet: #17 format[json5] 1`] = `
"Computed key is not allowed in JSON. (1:3)
-> 1 | {[null]: 1}
- | ^^^^"
+> 1 | {[[]]: 1}
+ | ^^"
`;
exports[`snippet: #18 format 1`] = `
@@ -758,22 +740,22 @@ exports[`snippet: #18 format 1`] = `
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #19 [json] format 1`] = `
-"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8)
-> 1 | {key: +foo()}
- | ^^^^^"
+exports[`snippet: #18 format[json] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {[null]: 1}
+ | ^^^^"
`;
-exports[`snippet: #19 [json-stringify] format 1`] = `
-"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8)
-> 1 | {key: +foo()}
- | ^^^^^"
+exports[`snippet: #18 format[json-stringify] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {[null]: 1}
+ | ^^^^"
`;
-exports[`snippet: #19 [json5] format 1`] = `
-"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8)
-> 1 | {key: +foo()}
- | ^^^^^"
+exports[`snippet: #18 format[json5] 1`] = `
+"Computed key is not allowed in JSON. (1:3)
+> 1 | {[null]: 1}
+ | ^^^^"
`;
exports[`snippet: #19 format 1`] = `
@@ -783,22 +765,22 @@ exports[`snippet: #19 format 1`] = `
Cause: \`import\` can only be used in \`import()\` or \`import.meta\`. (1:0)"
`;
-exports[`snippet: #20 [json] format 1`] = `
-"Operator 'void' is not allowed in JSON. (1:7)
-> 1 | {key: void foo()}
- | ^^^^^^^^^^"
+exports[`snippet: #19 format[json] 1`] = `
+"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8)
+> 1 | {key: +foo()}
+ | ^^^^^"
`;
-exports[`snippet: #20 [json-stringify] format 1`] = `
-"Operator 'void' is not allowed in JSON. (1:7)
-> 1 | {key: void foo()}
- | ^^^^^^^^^^"
+exports[`snippet: #19 format[json-stringify] 1`] = `
+"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8)
+> 1 | {key: +foo()}
+ | ^^^^^"
`;
-exports[`snippet: #20 [json5] format 1`] = `
-"Operator 'void' is not allowed in JSON. (1:7)
-> 1 | {key: void foo()}
- | ^^^^^^^^^^"
+exports[`snippet: #19 format[json5] 1`] = `
+"Operator '+' before 'CallExpression' is not allowed in JSON. (1:8)
+> 1 | {key: +foo()}
+ | ^^^^^"
`;
exports[`snippet: #20 format 1`] = `
@@ -807,28 +789,22 @@ exports[`snippet: #20 format 1`] = `
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
`;
-exports[`snippet: #21 [json] format 1`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
- | ^
- 2 | {}
-Cause: Unexpected token (1:0)"
+exports[`snippet: #20 format[json] 1`] = `
+"Operator 'void' is not allowed in JSON. (1:7)
+> 1 | {key: void foo()}
+ | ^^^^^^^^^^"
`;
-exports[`snippet: #21 [json-stringify] format 1`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
- | ^
- 2 | {}
-Cause: Unexpected token (1:0)"
+exports[`snippet: #20 format[json-stringify] 1`] = `
+"Operator 'void' is not allowed in JSON. (1:7)
+> 1 | {key: void foo()}
+ | ^^^^^^^^^^"
`;
-exports[`snippet: #21 [json5] format 1`] = `
-"Unexpected token (1:1)
-> 1 | #!/usr/bin/env node
- | ^
- 2 | {}
-Cause: Unexpected token (1:0)"
+exports[`snippet: #20 format[json5] 1`] = `
+"Operator 'void' is not allowed in JSON. (1:7)
+> 1 | {key: void foo()}
+ | ^^^^^^^^^^"
`;
exports[`snippet: #21 format 1`] = `
@@ -838,28 +814,28 @@ exports[`snippet: #21 format 1`] = `
Cause: Unexpected token, expected "," (1:7)"
`;
-exports[`snippet: #22 [json] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1)
- 1 | "use strict"
-> 2 | {}
+exports[`snippet: #21 format[json] 1`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
| ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)"
+ 2 | {}
+Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #22 [json-stringify] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1)
- 1 | "use strict"
-> 2 | {}
+exports[`snippet: #21 format[json-stringify] 1`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
| ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)"
+ 2 | {}
+Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #22 [json5] format 1`] = `
-"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1)
- 1 | "use strict"
-> 2 | {}
+exports[`snippet: #21 format[json5] 1`] = `
+"Unexpected token (1:1)
+> 1 | #!/usr/bin/env node
| ^
-Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)"
+ 2 | {}
+Cause: Unexpected token (1:0)"
`;
exports[`snippet: #22 format 1`] = `
@@ -869,25 +845,28 @@ exports[`snippet: #22 format 1`] = `
Cause: Unexpected token (1:1)"
`;
-exports[`snippet: #23 [json] format 1`] = `
-"The input is empty or contains only comments. (1:14)
-> 1 | /* comment */
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)"
+exports[`snippet: #22 format[json] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1)
+ 1 | "use strict"
+> 2 | {}
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)"
`;
-exports[`snippet: #23 [json-stringify] format 1`] = `
-"The input is empty or contains only comments. (1:14)
-> 1 | /* comment */
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)"
+exports[`snippet: #22 format[json-stringify] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1)
+ 1 | "use strict"
+> 2 | {}
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)"
`;
-exports[`snippet: #23 [json5] format 1`] = `
-"The input is empty or contains only comments. (1:14)
-> 1 | /* comment */
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)"
+exports[`snippet: #22 format[json5] 1`] = `
+"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:1)
+ 1 | "use strict"
+> 2 | {}
+ | ^
+Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`{\`. (2:0)"
`;
exports[`snippet: #23 format 1`] = `
@@ -897,25 +876,25 @@ exports[`snippet: #23 format 1`] = `
Cause: Unexpected token (1:1)"
`;
-exports[`snippet: #24 [json] format 1`] = `
-"The input is empty or contains only comments. (1:11)
-> 1 | // comment
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)"
+exports[`snippet: #23 format[json] 1`] = `
+"The input is empty or contains only comments. (1:14)
+> 1 | /* comment */
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)"
`;
-exports[`snippet: #24 [json-stringify] format 1`] = `
-"The input is empty or contains only comments. (1:11)
-> 1 | // comment
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)"
+exports[`snippet: #23 format[json-stringify] 1`] = `
+"The input is empty or contains only comments. (1:14)
+> 1 | /* comment */
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)"
`;
-exports[`snippet: #24 [json5] format 1`] = `
-"The input is empty or contains only comments. (1:11)
-> 1 | // comment
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)"
+exports[`snippet: #23 format[json5] 1`] = `
+"The input is empty or contains only comments. (1:14)
+> 1 | /* comment */
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:13)"
`;
exports[`snippet: #24 format 1`] = `
@@ -924,22 +903,25 @@ exports[`snippet: #24 format 1`] = `
| ^^^^^^^^^"
`;
-exports[`snippet: #25 [json] format 1`] = `
-"'TemplateLiteral' with expression is not allowed in JSON. (1:7)
-> 1 | \`foo\${1}bar\`
- | ^"
+exports[`snippet: #24 format[json] 1`] = `
+"The input is empty or contains only comments. (1:11)
+> 1 | // comment
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)"
`;
-exports[`snippet: #25 [json-stringify] format 1`] = `
-"'TemplateLiteral' with expression is not allowed in JSON. (1:7)
-> 1 | \`foo\${1}bar\`
- | ^"
+exports[`snippet: #24 format[json-stringify] 1`] = `
+"The input is empty or contains only comments. (1:11)
+> 1 | // comment
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)"
`;
-exports[`snippet: #25 [json5] format 1`] = `
-"'TemplateLiteral' with expression is not allowed in JSON. (1:7)
-> 1 | \`foo\${1}bar\`
- | ^"
+exports[`snippet: #24 format[json5] 1`] = `
+"The input is empty or contains only comments. (1:11)
+> 1 | // comment
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (1:10)"
`;
exports[`snippet: #25 format 1`] = `
@@ -948,22 +930,22 @@ exports[`snippet: #25 format 1`] = `
| ^"
`;
-exports[`snippet: #26 [json] format 1`] = `
-"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
-> 1 | -+1
- | ^^"
+exports[`snippet: #25 format[json] 1`] = `
+"'TemplateLiteral' with expression is not allowed in JSON. (1:7)
+> 1 | \`foo\${1}bar\`
+ | ^"
`;
-exports[`snippet: #26 [json-stringify] format 1`] = `
-"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
-> 1 | -+1
- | ^^"
+exports[`snippet: #25 format[json-stringify] 1`] = `
+"'TemplateLiteral' with expression is not allowed in JSON. (1:7)
+> 1 | \`foo\${1}bar\`
+ | ^"
`;
-exports[`snippet: #26 [json5] format 1`] = `
-"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
-> 1 | -+1
- | ^^"
+exports[`snippet: #25 format[json5] 1`] = `
+"'TemplateLiteral' with expression is not allowed in JSON. (1:7)
+> 1 | \`foo\${1}bar\`
+ | ^"
`;
exports[`snippet: #26 format 1`] = `
@@ -972,22 +954,22 @@ exports[`snippet: #26 format 1`] = `
| ^"
`;
-exports[`snippet: #27 [json] format 1`] = `
+exports[`snippet: #26 format[json] 1`] = `
"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
-> 1 | -+Infinity
- | ^^^^^^^^^"
+> 1 | -+1
+ | ^^"
`;
-exports[`snippet: #27 [json-stringify] format 1`] = `
+exports[`snippet: #26 format[json-stringify] 1`] = `
"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
-> 1 | -+Infinity
- | ^^^^^^^^^"
+> 1 | -+1
+ | ^^"
`;
-exports[`snippet: #27 [json5] format 1`] = `
+exports[`snippet: #26 format[json5] 1`] = `
"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
-> 1 | -+Infinity
- | ^^^^^^^^^"
+> 1 | -+1
+ | ^^"
`;
exports[`snippet: #27 format 1`] = `
@@ -996,201 +978,219 @@ exports[`snippet: #27 format 1`] = `
| ^"
`;
-exports[`snippet: #28 [json] format 1`] = `
+exports[`snippet: #27 format[json] 1`] = `
+"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
+> 1 | -+Infinity
+ | ^^^^^^^^^"
+`;
+
+exports[`snippet: #27 format[json-stringify] 1`] = `
+"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
+> 1 | -+Infinity
+ | ^^^^^^^^^"
+`;
+
+exports[`snippet: #27 format[json5] 1`] = `
+"Operator '-' before 'UnaryExpression' is not allowed in JSON. (1:2)
+> 1 | -+Infinity
+ | ^^^^^^^^^"
+`;
+
+exports[`snippet: #28 format[json] 1`] = `
"Operator '-' before 'Identifier' is not allowed in JSON. (1:2)
> 1 | -undefined
| ^^^^^^^^^"
`;
-exports[`snippet: #28 [json-stringify] format 1`] = `
+exports[`snippet: #28 format[json-stringify] 1`] = `
"Operator '-' before 'Identifier' is not allowed in JSON. (1:2)
> 1 | -undefined
| ^^^^^^^^^"
`;
-exports[`snippet: #28 [json5] format 1`] = `
+exports[`snippet: #28 format[json5] 1`] = `
"Operator '-' before 'Identifier' is not allowed in JSON. (1:2)
> 1 | -undefined
| ^^^^^^^^^"
`;
-exports[`snippet: #29 [json] format 1`] = `
+exports[`snippet: #29 format[json] 1`] = `
"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2)
> 1 | -null
| ^^^^"
`;
-exports[`snippet: #29 [json-stringify] format 1`] = `
+exports[`snippet: #29 format[json-stringify] 1`] = `
"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2)
> 1 | -null
| ^^^^"
`;
-exports[`snippet: #29 [json5] format 1`] = `
+exports[`snippet: #29 format[json5] 1`] = `
"Operator '-' before 'NullLiteral' is not allowed in JSON. (1:2)
> 1 | -null
| ^^^^"
`;
-exports[`snippet: #30 [json] format 1`] = `
+exports[`snippet: #30 format[json] 1`] = `
"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2)
> 1 | -false
| ^^^^^"
`;
-exports[`snippet: #30 [json-stringify] format 1`] = `
+exports[`snippet: #30 format[json-stringify] 1`] = `
"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2)
> 1 | -false
| ^^^^^"
`;
-exports[`snippet: #30 [json5] format 1`] = `
+exports[`snippet: #30 format[json5] 1`] = `
"Operator '-' before 'BooleanLiteral' is not allowed in JSON. (1:2)
> 1 | -false
| ^^^^^"
`;
-exports[`snippet: #31 [json] format 1`] = `
+exports[`snippet: #31 format[json] 1`] = `
"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2)
> 1 | +'string'
| ^^^^^^^^"
`;
-exports[`snippet: #31 [json-stringify] format 1`] = `
+exports[`snippet: #31 format[json-stringify] 1`] = `
"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2)
> 1 | +'string'
| ^^^^^^^^"
`;
-exports[`snippet: #31 [json5] format 1`] = `
+exports[`snippet: #31 format[json5] 1`] = `
"Operator '+' before 'StringLiteral' is not allowed in JSON. (1:2)
> 1 | +'string'
| ^^^^^^^^"
`;
-exports[`snippet: #32 [json] format 1`] = `
+exports[`snippet: #32 format[json] 1`] = `
"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8)
> 1 | {key: +{}}
| ^^"
`;
-exports[`snippet: #32 [json-stringify] format 1`] = `
+exports[`snippet: #32 format[json-stringify] 1`] = `
"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8)
> 1 | {key: +{}}
| ^^"
`;
-exports[`snippet: #32 [json5] format 1`] = `
+exports[`snippet: #32 format[json5] 1`] = `
"Operator '+' before 'ObjectExpression' is not allowed in JSON. (1:8)
> 1 | {key: +{}}
| ^^"
`;
-exports[`snippet: #33 [json] format 1`] = `
+exports[`snippet: #33 format[json] 1`] = `
"Identifier 'identifier' is not allowed in JSON. (1:16)
> 1 | {"identifier": identifier}
| ^^^^^^^^^^"
`;
-exports[`snippet: #33 [json-stringify] format 1`] = `
+exports[`snippet: #33 format[json-stringify] 1`] = `
"Identifier 'identifier' is not allowed in JSON. (1:16)
> 1 | {"identifier": identifier}
| ^^^^^^^^^^"
`;
-exports[`snippet: #33 [json5] format 1`] = `
+exports[`snippet: #33 format[json5] 1`] = `
"Identifier 'identifier' is not allowed in JSON. (1:16)
> 1 | {"identifier": identifier}
| ^^^^^^^^^^"
`;
-exports[`snippet: #34 [json] format 1`] = `
+exports[`snippet: #34 format[json] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:1)
> 1 | (1)
| ^^^"
`;
-exports[`snippet: #34 [json-stringify] format 1`] = `
+exports[`snippet: #34 format[json-stringify] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:1)
> 1 | (1)
| ^^^"
`;
-exports[`snippet: #34 [json5] format 1`] = `
+exports[`snippet: #34 format[json5] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:1)
> 1 | (1)
| ^^^"
`;
-exports[`snippet: #35 [json] format 1`] = `
+exports[`snippet: #35 format[json] 1`] = `
"Operator '+' before 'ParenthesizedExpression' is not allowed in JSON. (1:2)
> 1 | +(1)
| ^^^"
`;
-exports[`snippet: #35 [json-stringify] format 1`] = `
+exports[`snippet: #35 format[json-stringify] 1`] = `
"Operator '+' before 'ParenthesizedExpression' is not allowed in JSON. (1:2)
> 1 | +(1)
| ^^^"
`;
-exports[`snippet: #35 [json5] format 1`] = `
+exports[`snippet: #35 format[json5] 1`] = `
"Operator '+' before 'ParenthesizedExpression' is not allowed in JSON. (1:2)
> 1 | +(1)
| ^^^"
`;
-exports[`snippet: #36 [json] format 1`] = `
+exports[`snippet: #36 format[json] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:1)
> 1 | ([1,])
| ^^^^^^"
`;
-exports[`snippet: #36 [json-stringify] format 1`] = `
+exports[`snippet: #36 format[json-stringify] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:1)
> 1 | ([1,])
| ^^^^^^"
`;
-exports[`snippet: #36 [json5] format 1`] = `
+exports[`snippet: #36 format[json5] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:1)
> 1 | ([1,])
| ^^^^^^"
`;
-exports[`snippet: #37 [json] format 1`] = `
+exports[`snippet: #37 format[json] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:5)
> 1 | [1, (2)]
| ^^^"
`;
-exports[`snippet: #37 [json-stringify] format 1`] = `
+exports[`snippet: #37 format[json-stringify] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:5)
> 1 | [1, (2)]
| ^^^"
`;
-exports[`snippet: #37 [json5] format 1`] = `
+exports[`snippet: #37 format[json5] 1`] = `
"'ParenthesizedExpression' is not allowed in JSON. (1:5)
> 1 | [1, (2)]
| ^^^"
`;
-exports[`snippet: #38 [json] format 1`] = `
+exports[`snippet: #38 format[json] 1`] = `
"Invalid left-hand side in prefix operation. (1:5)
> 1 | ----123
| ^
Cause: Invalid left-hand side in prefix operation. (1:4)"
`;
-exports[`snippet: #38 [json-stringify] format 1`] = `
+exports[`snippet: #38 format[json-stringify] 1`] = `
"Invalid left-hand side in prefix operation. (1:5)
> 1 | ----123
| ^
Cause: Invalid left-hand side in prefix operation. (1:4)"
`;
-exports[`snippet: #38 [json5] format 1`] = `
+exports[`snippet: #38 format[json5] 1`] = `
"Invalid left-hand side in prefix operation. (1:5)
> 1 | ----123
| ^
diff --git a/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap b/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap
index 7f4a608ce..8b222bc7c 100644
--- a/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap
+++ b/tests/format/json/jsonc/empty/__snapshots__/format.test.js.snap
@@ -1,32 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [json] format 1`] = `
-"The input is empty or contains only comments. (4:29)
- 2 | /** Block comment 1 */
- 3 | // Line comment 2
-> 4 | /** Block comment 3 */
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
-`;
-
-exports[`snippet: #0 [json-stringify] format 1`] = `
-"The input is empty or contains only comments. (4:29)
- 2 | /** Block comment 1 */
- 3 | // Line comment 2
-> 4 | /** Block comment 3 */
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
-`;
-
-exports[`snippet: #0 [json5] format 1`] = `
-"The input is empty or contains only comments. (4:29)
- 2 | /** Block comment 1 */
- 3 | // Line comment 2
-> 4 | /** Block comment 3 */
- | ^
-Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
-`;
-
exports[`snippet: #0 format 1`] = `
====================================options=====================================
parsers: ["jsonc", "json", "json5", "json-stringify"]
@@ -45,3 +18,30 @@ printWidth: 80
================================================================================
`;
+
+exports[`snippet: #0 format[json] 1`] = `
+"The input is empty or contains only comments. (4:29)
+ 2 | /** Block comment 1 */
+ 3 | // Line comment 2
+> 4 | /** Block comment 3 */
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
+`;
+
+exports[`snippet: #0 format[json-stringify] 1`] = `
+"The input is empty or contains only comments. (4:29)
+ 2 | /** Block comment 1 */
+ 3 | // Line comment 2
+> 4 | /** Block comment 3 */
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
+`;
+
+exports[`snippet: #0 format[json5] 1`] = `
+"The input is empty or contains only comments. (4:29)
+ 2 | /** Block comment 1 */
+ 3 | // Line comment 2
+> 4 | /** Block comment 3 */
+ | ^
+Cause: Unexpected parseExpression() input: The input is empty or contains only comments. (4:28)"
+`;
diff --git a/tests/format/jsx/_errors_/invalid-jsx-text/__snapshots__/format.test.js.snap b/tests/format/jsx/_errors_/invalid-jsx-text/__snapshots__/format.test.js.snap
index 744f98fee..2d2ee0fa1 100644
--- a/tests/format/jsx/_errors_/invalid-jsx-text/__snapshots__/format.test.js.snap
+++ b/tests/format/jsx/_errors_/invalid-jsx-text/__snapshots__/format.test.js.snap
@@ -1,476 +1,476 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [acorn] format 1`] = `
+exports[`snippet: #0 format[acorn] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
> 1 | let x1 = }
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:14)"
`;
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
> 1 | let x1 = }
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
> 1 | let x1 = }
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
`;
-exports[`snippet: #0 [espree] format 1`] = `
+exports[`snippet: #0 format[espree] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
> 1 | let x1 = }
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`?"
`;
-exports[`snippet: #0 [flow] format 1`] = `
+exports[`snippet: #0 format[flow] 1`] = `
"Unexpected token \`}\`. Did you mean \`{'}'}\`? (1:15)
> 1 | let x1 = }
;
| ^"
`;
-exports[`snippet: #0 [oxc] format 1`] = `
+exports[`snippet: #0 format[oxc] 1`] = `
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
> 1 | let x1 = }
;
| ^"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
> 1 | let x1 = }
;
| ^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
> 1 | let x1 = }
;
| ^
Cause: Unexpected token. Did you mean \`{'}'}\` or \`}\`?"
`;
-exports[`snippet: #1 [acorn] format 1`] = `
+exports[`snippet: #1 format[acorn] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
> 1 | let x2 = >
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:14)"
`;
-exports[`snippet: #1 [babel] format 1`] = `
+exports[`snippet: #1 format[babel] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
> 1 | let x2 = >
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
> 1 | let x2 = >
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
`;
-exports[`snippet: #1 [espree] format 1`] = `
+exports[`snippet: #1 format[espree] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
> 1 | let x2 = >
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`?"
`;
-exports[`snippet: #1 [flow] format 1`] = `
+exports[`snippet: #1 format[flow] 1`] = `
"Unexpected token \`>\`. Did you mean \`{'>'}\`? (1:15)
> 1 | let x2 = >
;
| ^"
`;
-exports[`snippet: #1 [oxc] format 1`] = `
+exports[`snippet: #1 format[oxc] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
> 1 | let x2 = >
;
| ^"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
> 1 | let x2 = >
;
| ^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
> 1 | let x2 = >
;
| ^
Cause: Unexpected token. Did you mean \`{'>'}\` or \`>\`?"
`;
-exports[`snippet: #2 [acorn] format 1`] = `
+exports[`snippet: #2 format[acorn] 1`] = `
"Unexpected token (1:16)
> 1 | let x2 = <
;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #2 [babel] format 1`] = `
+exports[`snippet: #2 format[babel] 1`] = `
"Unexpected token (1:16)
> 1 | let x2 = <
;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected token (1:16)
> 1 | let x2 = <
;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #2 [espree] format 1`] = `
+exports[`snippet: #2 format[espree] 1`] = `
"Unexpected token < (1:16)
> 1 | let x2 = <
;
| ^
Cause: Unexpected token <"
`;
-exports[`snippet: #2 [flow] format 1`] = `
+exports[`snippet: #2 format[flow] 1`] = `
"Unexpected token \`<\`, expected the token \`>\` (1:16)
> 1 | let x2 = <
;
| ^"
`;
-exports[`snippet: #2 [oxc] format 1`] = `
+exports[`snippet: #2 format[oxc] 1`] = `
"Unexpected token (1:16)
> 1 | let x2 = <
;
| ^"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Unexpected token (1:16)
> 1 | let x2 = <
;
| ^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Identifier expected. (1:16)
> 1 | let x2 = <
;
| ^
Cause: Identifier expected."
`;
-exports[`snippet: #3 [acorn] format 1`] = `
+exports[`snippet: #3 format[acorn] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:22)
> 1 | let x3 = {"foo"}}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:21)"
`;
-exports[`snippet: #3 [babel] format 1`] = `
+exports[`snippet: #3 format[babel] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:22)
> 1 | let x3 = {"foo"}}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:21)"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:22)
> 1 | let x3 = {"foo"}}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:21)"
`;
-exports[`snippet: #3 [espree] format 1`] = `
+exports[`snippet: #3 format[espree] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:22)
> 1 | let x3 = {"foo"}}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`?"
`;
-exports[`snippet: #3 [flow] format 1`] = `
+exports[`snippet: #3 format[flow] 1`] = `
"Unexpected token \`}\`. Did you mean \`{'}'}\`? (1:22)
> 1 | let x3 = {"foo"}}
;
| ^"
`;
-exports[`snippet: #3 [oxc] format 1`] = `
+exports[`snippet: #3 format[oxc] 1`] = `
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:22)
> 1 | let x3 = {"foo"}}
;
| ^"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Expected \`:\` but found \`}\` (1:21)
> 1 | let x3 = {"foo"}}
;
| ^"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"':' expected. (1:21)
> 1 | let x3 = {"foo"}}
;
| ^
Cause: ':' expected."
`;
-exports[`snippet: #4 [acorn] format 1`] = `
+exports[`snippet: #4 format[acorn] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:22)
> 1 | let x4 = {"foo"}>
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:21)"
`;
-exports[`snippet: #4 [babel] format 1`] = `
+exports[`snippet: #4 format[babel] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:22)
> 1 | let x4 = {"foo"}>
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:21)"
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:22)
> 1 | let x4 = {"foo"}>
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:21)"
`;
-exports[`snippet: #4 [espree] format 1`] = `
+exports[`snippet: #4 format[espree] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:22)
> 1 | let x4 = {"foo"}>
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`?"
`;
-exports[`snippet: #4 [flow] format 1`] = `
+exports[`snippet: #4 format[flow] 1`] = `
"Unexpected token \`>\`. Did you mean \`{'>'}\`? (1:22)
> 1 | let x4 = {"foo"}>
;
| ^"
`;
-exports[`snippet: #4 [oxc] format 1`] = `
+exports[`snippet: #4 format[oxc] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:22)
> 1 | let x4 = {"foo"}>
;
| ^"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"Expected \`:\` but found \`}\` (1:21)
> 1 | let x4 = {"foo"}>
;
| ^"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"':' expected. (1:21)
> 1 | let x4 = {"foo"}>
;
| ^
Cause: ':' expected."
`;
-exports[`snippet: #5 [acorn] format 1`] = `
+exports[`snippet: #5 format[acorn] 1`] = `
"Unexpected token (1:23)
> 1 | let x4 = {"foo"}<
;
| ^
Cause: Unexpected token (1:22)"
`;
-exports[`snippet: #5 [babel] format 1`] = `
+exports[`snippet: #5 format[babel] 1`] = `
"Unexpected token (1:23)
> 1 | let x4 = {"foo"}<
;
| ^
Cause: Unexpected token (1:22)"
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"Unexpected token (1:23)
> 1 | let x4 = {"foo"}<
;
| ^
Cause: Unexpected token (1:22)"
`;
-exports[`snippet: #5 [espree] format 1`] = `
+exports[`snippet: #5 format[espree] 1`] = `
"Unexpected token < (1:23)
> 1 | let x4 = {"foo"}<
;
| ^
Cause: Unexpected token <"
`;
-exports[`snippet: #5 [flow] format 1`] = `
+exports[`snippet: #5 format[flow] 1`] = `
"Unexpected token \`<\`, expected the token \`>\` (1:23)
> 1 | let x4 = {"foo"}<
;
| ^"
`;
-exports[`snippet: #5 [oxc] format 1`] = `
+exports[`snippet: #5 format[oxc] 1`] = `
"Unexpected token (1:23)
> 1 | let x4 = {"foo"}<
;
| ^"
`;
-exports[`snippet: #5 [oxc-ts] format 1`] = `
+exports[`snippet: #5 format[oxc-ts] 1`] = `
"Expected \`:\` but found \`}\` (1:21)
> 1 | let x4 = {"foo"}<
;
| ^"
`;
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"':' expected. (1:21)
> 1 | let x4 = {"foo"}<
;
| ^
Cause: ':' expected."
`;
-exports[`snippet: #6 [acorn] format 1`] = `
+exports[`snippet: #6 format[acorn] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
> 1 | let x5 = }{"foo"}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:14)"
`;
-exports[`snippet: #6 [babel] format 1`] = `
+exports[`snippet: #6 format[babel] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
> 1 | let x5 = }{"foo"}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
`;
-exports[`snippet: #6 [babel-ts] format 1`] = `
+exports[`snippet: #6 format[babel-ts] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:15)
> 1 | let x5 = }{"foo"}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{'}'}\`? (1:14)"
`;
-exports[`snippet: #6 [espree] format 1`] = `
+exports[`snippet: #6 format[espree] 1`] = `
"Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`? (1:15)
> 1 | let x5 = }{"foo"}
;
| ^
Cause: Unexpected token \`}\`. Did you mean \`}\` or \`{"}"}\`?"
`;
-exports[`snippet: #6 [flow] format 1`] = `
+exports[`snippet: #6 format[flow] 1`] = `
"Unexpected token \`}\`. Did you mean \`{'}'}\`? (1:15)
> 1 | let x5 = }{"foo"}
;
| ^"
`;
-exports[`snippet: #6 [oxc] format 1`] = `
+exports[`snippet: #6 format[oxc] 1`] = `
"Unexpected token. Did you mean \`{'}'}\` or \`}\`? (1:15)
> 1 | let x5 = }{"foo"}
;
| ^"
`;
-exports[`snippet: #6 [oxc-ts] format 1`] = `
+exports[`snippet: #6 format[oxc-ts] 1`] = `
"Unexpected token (1:15)
> 1 | let x5 = }{"foo"}
;
| ^"
`;
-exports[`snippet: #6 [typescript] format 1`] = `
+exports[`snippet: #6 format[typescript] 1`] = `
"Expression expected. (1:15)
> 1 | let x5 = }{"foo"}
;
| ^
Cause: Expression expected."
`;
-exports[`snippet: #7 [acorn] format 1`] = `
+exports[`snippet: #7 format[acorn] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
> 1 | let x6 = >{"foo"}
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:14)"
`;
-exports[`snippet: #7 [babel] format 1`] = `
+exports[`snippet: #7 format[babel] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
> 1 | let x6 = >{"foo"}
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
`;
-exports[`snippet: #7 [babel-ts] format 1`] = `
+exports[`snippet: #7 format[babel-ts] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:15)
> 1 | let x6 = >{"foo"}
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (1:14)"
`;
-exports[`snippet: #7 [espree] format 1`] = `
+exports[`snippet: #7 format[espree] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`? (1:15)
> 1 | let x6 = >{"foo"}
;
| ^
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{">"}\`?"
`;
-exports[`snippet: #7 [flow] format 1`] = `
+exports[`snippet: #7 format[flow] 1`] = `
"Unexpected token \`>\`. Did you mean \`{'>'}\`? (1:15)
> 1 | let x6 = >{"foo"}
;
| ^"
`;
-exports[`snippet: #7 [oxc] format 1`] = `
+exports[`snippet: #7 format[oxc] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (1:15)
> 1 | let x6 = >{"foo"}
;
| ^"
`;
-exports[`snippet: #7 [oxc-ts] format 1`] = `
+exports[`snippet: #7 format[oxc-ts] 1`] = `
"Unexpected token (1:15)
> 1 | let x6 = >{"foo"}
;
| ^"
`;
-exports[`snippet: #7 [typescript] format 1`] = `
+exports[`snippet: #7 format[typescript] 1`] = `
"Expression expected. (1:15)
> 1 | let x6 = >{"foo"}
;
| ^
Cause: Expression expected."
`;
-exports[`snippet: #8 [acorn] format 1`] = `
+exports[`snippet: #8 format[acorn] 1`] = `
"Unexpected token (1:16)
> 1 | let x6 = <{"foo"}
;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #8 [babel] format 1`] = `
+exports[`snippet: #8 format[babel] 1`] = `
"Unexpected token (1:16)
> 1 | let x6 = <{"foo"}
;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #8 [babel-ts] format 1`] = `
+exports[`snippet: #8 format[babel-ts] 1`] = `
"Unexpected token (1:16)
> 1 | let x6 = <{"foo"}
;
| ^
Cause: Unexpected token (1:15)"
`;
-exports[`snippet: #8 [espree] format 1`] = `
+exports[`snippet: #8 format[espree] 1`] = `
"Unexpected token { (1:16)
> 1 | let x6 = <{"foo"}
;
| ^
Cause: Unexpected token {"
`;
-exports[`snippet: #8 [flow] format 1`] = `
+exports[`snippet: #8 format[flow] 1`] = `
"Unexpected token \`{\`, expected the token \`>\` (1:16)
> 1 | let x6 = <{"foo"}
;
| ^"
`;
-exports[`snippet: #8 [oxc] format 1`] = `
+exports[`snippet: #8 format[oxc] 1`] = `
"Unexpected token (1:16)
> 1 | let x6 = <{"foo"}
;
| ^"
`;
-exports[`snippet: #8 [oxc-ts] format 1`] = `
+exports[`snippet: #8 format[oxc-ts] 1`] = `
"Expected \`>\` but found \`<\` (1:23)
> 1 | let x6 = <{"foo"}
;
| ^"
`;
-exports[`snippet: #8 [typescript] format 1`] = `
+exports[`snippet: #8 format[typescript] 1`] = `
"'>' expected. (1:23)
> 1 | let x6 = <{"foo"}
;
| ^
diff --git a/tests/format/jsx/_errors_/unparenthesized-sequence-expression/__snapshots__/format.test.js.snap b/tests/format/jsx/_errors_/unparenthesized-sequence-expression/__snapshots__/format.test.js.snap
index aee4b30f8..08721b27d 100644
--- a/tests/format/jsx/_errors_/unparenthesized-sequence-expression/__snapshots__/format.test.js.snap
+++ b/tests/format/jsx/_errors_/unparenthesized-sequence-expression/__snapshots__/format.test.js.snap
@@ -1,20 +1,20 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel] format 1`] = `
+exports[`snippet: #0 format[babel] 1`] = `
"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:18)
> 1 | let x1 = {a,b}
| ^
Cause: Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:17)"
`;
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:18)
> 1 | let x1 = {a,b}
| ^
Cause: Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)? (1:17)"
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`snippet: #0 format[hermes] 1`] = `
"'}' expected in JSX child expression (1:16)
> 1 | let x1 = {a,b}
| ^
@@ -23,7 +23,7 @@ let x1 = {a,b}
~~^"
`;
-exports[`snippet: #0 [meriyah] format 1`] = `
+exports[`snippet: #0 format[meriyah] 1`] = `
"Expected '}' (1:17)
> 1 | let x1 = {a,b}
| ^
diff --git a/tests/format/jsx/comments/__snapshots__/format.test.js.snap b/tests/format/jsx/comments/__snapshots__/format.test.js.snap
index 71f1d4d55..4266ad46b 100644
--- a/tests/format/jsx/comments/__snapshots__/format.test.js.snap
+++ b/tests/format/jsx/comments/__snapshots__/format.test.js.snap
@@ -83,17 +83,6 @@ printWidth: 80
================================================================================
`;
-exports[`in-end-tag.js - {"bracketSameLine":true} [typescript] format 1`] = `
-"Identifier expected. (2:6)
- 1 | /* =========== before slash =========== */
-> 2 | / line
- | ^
- 3 | /a>;
- 4 | * block */
- 5 | /a>;
-Cause: Identifier expected."
-`;
-
exports[`in-end-tag.js - {"bracketSameLine":true} format 1`] = `
====================================options=====================================
bracketSameLine: true
@@ -212,6 +201,17 @@ a>;
================================================================================
`;
+exports[`in-end-tag.js - {"bracketSameLine":true} format[typescript] 1`] = `
+"Identifier expected. (2:6)
+ 1 | /* =========== before slash =========== */
+> 2 | / line
+ | ^
+ 3 | /a>;
+ 4 | * block */
+ 5 | /a>;
+Cause: Identifier expected."
+`;
+
exports[`in-tags.js - {"bracketSameLine":true} format 1`] = `
====================================options=====================================
bracketSameLine: true
diff --git a/tests/format/jsx/do/__snapshots__/format.test.js.snap b/tests/format/jsx/do/__snapshots__/format.test.js.snap
index 16b4edb3d..1ca75dede 100644
--- a/tests/format/jsx/do/__snapshots__/format.test.js.snap
+++ b/tests/format/jsx/do/__snapshots__/format.test.js.snap
@@ -1,48 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`do.js [acorn] format 1`] = `
-"Unexpected token (2:4)
- 1 |
-> 2 | {do {
- | ^
- 3 | 1
- 4 | }}
- 5 |
-Cause: Unexpected token (2:3)"
-`;
-
-exports[`do.js [espree] format 1`] = `
-"Unexpected token do (2:4)
- 1 |
-> 2 | {do {
- | ^
- 3 | 1
- 4 | }}
- 5 |
-Cause: Unexpected token do"
-`;
-
-exports[`do.js [meriyah] format 1`] = `
-"Unexpected token: 'do' (2:4)
- 1 |
-> 2 | {do {
- | ^^
- 3 | 1
- 4 | }}
- 5 |
-Cause: [2:3-2:5]: Unexpected token: 'do'"
-`;
-
-exports[`do.js [oxc] format 1`] = `
-"Unexpected token (2:4)
- 1 |
-> 2 | {do {
- | ^^
- 3 | 1
- 4 | }}
- 5 |
"
-`;
-
exports[`do.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
@@ -64,3 +21,46 @@ printWidth: 80
================================================================================
`;
+
+exports[`do.js format[acorn] 1`] = `
+"Unexpected token (2:4)
+ 1 |
+> 2 | {do {
+ | ^
+ 3 | 1
+ 4 | }}
+ 5 |
+Cause: Unexpected token (2:3)"
+`;
+
+exports[`do.js format[espree] 1`] = `
+"Unexpected token do (2:4)
+ 1 |
+> 2 | {do {
+ | ^
+ 3 | 1
+ 4 | }}
+ 5 |
+Cause: Unexpected token do"
+`;
+
+exports[`do.js format[meriyah] 1`] = `
+"Unexpected token: 'do' (2:4)
+ 1 |
+> 2 | {do {
+ | ^^
+ 3 | 1
+ 4 | }}
+ 5 |
+Cause: [2:3-2:5]: Unexpected token: 'do'"
+`;
+
+exports[`do.js format[oxc] 1`] = `
+"Unexpected token (2:4)
+ 1 |
+> 2 | {do {
+ | ^^
+ 3 | 1
+ 4 | }}
+ 5 |
"
+`;
diff --git a/tests/format/jsx/spread/__snapshots__/format.test.js.snap b/tests/format/jsx/spread/__snapshots__/format.test.js.snap
index 46bda7edf..6f72f06b2 100644
--- a/tests/format/jsx/spread/__snapshots__/format.test.js.snap
+++ b/tests/format/jsx/spread/__snapshots__/format.test.js.snap
@@ -73,26 +73,6 @@ printWidth: 80
================================================================================
`;
-exports[`child.js [acorn] format 1`] = `
-"Unexpected token (1:7)
-> 1 | {...a}
;
- | ^
- 2 |
- 3 | {...a /* comment */}
;
- 4 |
-Cause: Unexpected token (1:6)"
-`;
-
-exports[`child.js [espree] format 1`] = `
-"Unexpected token ... (1:7)
-> 1 | {...a}
;
- | ^
- 2 |
- 3 | {...a /* comment */}
;
- 4 |
-Cause: Unexpected token ..."
-`;
-
exports[`child.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -157,3 +137,23 @@ printWidth: 80
================================================================================
`;
+
+exports[`child.js format[acorn] 1`] = `
+"Unexpected token (1:7)
+> 1 | {...a}
;
+ | ^
+ 2 |
+ 3 | {...a /* comment */}
;
+ 4 |
+Cause: Unexpected token (1:6)"
+`;
+
+exports[`child.js format[espree] 1`] = `
+"Unexpected token ... (1:7)
+> 1 | {...a}
;
+ | ^
+ 2 |
+ 3 | {...a /* comment */}
;
+ 4 |
+Cause: Unexpected token ..."
+`;
diff --git a/tests/format/less/_errors_/__snapshots__/format.test.js.snap b/tests/format/less/_errors_/__snapshots__/format.test.js.snap
index 1539f6042..e5c8e4c2f 100644
--- a/tests/format/less/_errors_/__snapshots__/format.test.js.snap
+++ b/tests/format/less/_errors_/__snapshots__/format.test.js.snap
@@ -32,7 +32,7 @@ exports[`open-sigle-quote.less format 1`] = `
Cause: :2:17: Unclosed string"
`;
-exports[`scss-syntax.scss format 1`] = `
+exports[`scss-syntax.unknown format 1`] = `
"CssSyntaxError: Unknown word $foo (1:15)
> 1 | a {content: #{$foo}}
| ^
diff --git a/tests/format/less/_errors_/scss-syntax.scss b/tests/format/less/_errors_/scss-syntax.unknown
similarity index 100%
rename from tests/format/less/_errors_/scss-syntax.scss
rename to tests/format/less/_errors_/scss-syntax.unknown
diff --git a/tests/format/misc/_errors_/front-matter/__snapshots__/format.test.js.snap b/tests/format/misc/_errors_/front-matter/__snapshots__/format.test.js.snap
index 2804e7a0b..34094fc17 100644
--- a/tests/format/misc/_errors_/front-matter/__snapshots__/format.test.js.snap
+++ b/tests/format/misc/_errors_/front-matter/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: Should not support front matter [__babel_estree] format 1`] = `
+exports[`snippet: Should not support front matter format[__babel_estree] 1`] = `
"Unexpected token (3:4)
1 | ---
2 | Front Matter content
@@ -9,7 +9,7 @@ exports[`snippet: Should not support front matter [__babel_estree] format 1`] =
Cause: Unexpected token (3:3)"
`;
-exports[`snippet: Should not support front matter [__js_expression] format 1`] = `
+exports[`snippet: Should not support front matter format[__js_expression] 1`] = `
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
1 | ---
> 2 | Front Matter content
@@ -18,7 +18,7 @@ exports[`snippet: Should not support front matter [__js_expression] format 1`] =
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
`;
-exports[`snippet: Should not support front matter [__ng_action] format 1`] = `
+exports[`snippet: Should not support front matter format[__ng_action] 1`] = `
"Parser Error: Unexpected token 'Matter' (2:7)
1 | ---
> 2 | Front Matter content
@@ -30,7 +30,7 @@ Front Matter content
---] in test.html@0:0"
`;
-exports[`snippet: Should not support front matter [__ng_binding] format 1`] = `
+exports[`snippet: Should not support front matter format[__ng_binding] 1`] = `
"Parser Error: Unexpected token 'Matter' (2:7)
1 | ---
> 2 | Front Matter content
@@ -42,7 +42,7 @@ Front Matter content
---] in test.html@0:0"
`;
-exports[`snippet: Should not support front matter [__ng_directive] format 1`] = `
+exports[`snippet: Should not support front matter format[__ng_directive] 1`] = `
"Parser Error: Unexpected end of expression: ---
Front Matter content
--- at the end of the expression [---
@@ -63,7 +63,7 @@ Front Matter content
---] in test.html@0:0"
`;
-exports[`snippet: Should not support front matter [__ng_interpolation] format 1`] = `
+exports[`snippet: Should not support front matter format[__ng_interpolation] 1`] = `
"Parser Error: Unexpected token 'Matter' (2:7)
1 | ---
> 2 | Front Matter content
@@ -75,7 +75,7 @@ Front Matter content
---] in test.html@0:0"
`;
-exports[`snippet: Should not support front matter [__ts_expression] format 1`] = `
+exports[`snippet: Should not support front matter format[__ts_expression] 1`] = `
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
1 | ---
> 2 | Front Matter content
@@ -84,7 +84,7 @@ exports[`snippet: Should not support front matter [__ts_expression] format 1`] =
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
`;
-exports[`snippet: Should not support front matter [__vue_event_binding] format 1`] = `
+exports[`snippet: Should not support front matter format[__vue_event_binding] 1`] = `
"Unexpected token (3:4)
1 | ---
2 | Front Matter content
@@ -93,7 +93,7 @@ exports[`snippet: Should not support front matter [__vue_event_binding] format 1
Cause: Unexpected token (3:3)"
`;
-exports[`snippet: Should not support front matter [__vue_expression] format 1`] = `
+exports[`snippet: Should not support front matter format[__vue_expression] 1`] = `
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
1 | ---
> 2 | Front Matter content
@@ -102,7 +102,7 @@ exports[`snippet: Should not support front matter [__vue_expression] format 1`]
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
`;
-exports[`snippet: Should not support front matter [__vue_ts_event_binding] format 1`] = `
+exports[`snippet: Should not support front matter format[__vue_ts_event_binding] 1`] = `
"Unexpected token (3:4)
1 | ---
2 | Front Matter content
@@ -111,7 +111,7 @@ exports[`snippet: Should not support front matter [__vue_ts_event_binding] forma
Cause: Unexpected token (3:3)"
`;
-exports[`snippet: Should not support front matter [__vue_ts_expression] format 1`] = `
+exports[`snippet: Should not support front matter format[__vue_ts_expression] 1`] = `
"The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:7)
1 | ---
> 2 | Front Matter content
@@ -120,7 +120,7 @@ exports[`snippet: Should not support front matter [__vue_ts_expression] format 1
Cause: Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`M\`. (2:6)"
`;
-exports[`snippet: Should not support front matter [acorn] format 1`] = `
+exports[`snippet: Should not support front matter format[acorn] 1`] = `
"Assigning to rvalue (1:3)
> 1 | ---
| ^
@@ -129,7 +129,7 @@ exports[`snippet: Should not support front matter [acorn] format 1`] = `
Cause: Assigning to rvalue (1:2)"
`;
-exports[`snippet: Should not support front matter [babel] format 1`] = `
+exports[`snippet: Should not support front matter format[babel] 1`] = `
"Unexpected token (3:4)
1 | ---
2 | Front Matter content
@@ -138,7 +138,7 @@ exports[`snippet: Should not support front matter [babel] format 1`] = `
Cause: Unexpected token (3:3)"
`;
-exports[`snippet: Should not support front matter [babel-flow] format 1`] = `
+exports[`snippet: Should not support front matter format[babel-flow] 1`] = `
"Unexpected token (3:4)
1 | ---
2 | Front Matter content
@@ -147,7 +147,7 @@ exports[`snippet: Should not support front matter [babel-flow] format 1`] = `
Cause: Unexpected token (3:3)"
`;
-exports[`snippet: Should not support front matter [babel-ts] format 1`] = `
+exports[`snippet: Should not support front matter format[babel-ts] 1`] = `
"Unexpected token (3:4)
1 | ---
2 | Front Matter content
@@ -156,7 +156,7 @@ exports[`snippet: Should not support front matter [babel-ts] format 1`] = `
Cause: Unexpected token (3:3)"
`;
-exports[`snippet: Should not support front matter [espree] format 1`] = `
+exports[`snippet: Should not support front matter format[espree] 1`] = `
"Assigning to rvalue (1:3)
> 1 | ---
| ^
@@ -165,7 +165,7 @@ exports[`snippet: Should not support front matter [espree] format 1`] = `
Cause: Assigning to rvalue"
`;
-exports[`snippet: Should not support front matter [flow] format 1`] = `
+exports[`snippet: Should not support front matter format[flow] 1`] = `
"Invalid left-hand side in assignment (1:3)
> 1 | ---
| ^
@@ -174,7 +174,7 @@ exports[`snippet: Should not support front matter [flow] format 1`] = `
3 | ---"
`;
-exports[`snippet: Should not support front matter [graphql] format 1`] = `
+exports[`snippet: Should not support front matter format[graphql] 1`] = `
"Syntax Error: Invalid number, expected digit but got: "-". (1:2)
> 1 | ---
| ^
@@ -183,7 +183,7 @@ exports[`snippet: Should not support front matter [graphql] format 1`] = `
Cause: Syntax Error: Invalid number, expected digit but got: "-"."
`;
-exports[`snippet: Should not support front matter [json] format 1`] = `
+exports[`snippet: Should not support front matter format[json] 1`] = `
"Invalid left-hand side in prefix operation. (1:3)
> 1 | ---
| ^
@@ -192,7 +192,7 @@ exports[`snippet: Should not support front matter [json] format 1`] = `
Cause: Invalid left-hand side in prefix operation. (1:2)"
`;
-exports[`snippet: Should not support front matter [json-stringify] format 1`] = `
+exports[`snippet: Should not support front matter format[json-stringify] 1`] = `
"Invalid left-hand side in prefix operation. (1:3)
> 1 | ---
| ^
@@ -201,7 +201,7 @@ exports[`snippet: Should not support front matter [json-stringify] format 1`] =
Cause: Invalid left-hand side in prefix operation. (1:2)"
`;
-exports[`snippet: Should not support front matter [json5] format 1`] = `
+exports[`snippet: Should not support front matter format[json5] 1`] = `
"Invalid left-hand side in prefix operation. (1:3)
> 1 | ---
| ^
@@ -210,7 +210,7 @@ exports[`snippet: Should not support front matter [json5] format 1`] = `
Cause: Invalid left-hand side in prefix operation. (1:2)"
`;
-exports[`snippet: Should not support front matter [jsonc] format 1`] = `
+exports[`snippet: Should not support front matter format[jsonc] 1`] = `
"Invalid left-hand side in prefix operation. (1:3)
> 1 | ---
| ^
@@ -219,7 +219,7 @@ exports[`snippet: Should not support front matter [jsonc] format 1`] = `
Cause: Invalid left-hand side in prefix operation. (1:2)"
`;
-exports[`snippet: Should not support front matter [meriyah] format 1`] = `
+exports[`snippet: Should not support front matter format[meriyah] 1`] = `
"Invalid increment/decrement operand (2:7)
1 | ---
> 2 | Front Matter content
@@ -228,7 +228,7 @@ exports[`snippet: Should not support front matter [meriyah] format 1`] = `
Cause: [2:6-2:12]: Invalid increment/decrement operand"
`;
-exports[`snippet: Should not support front matter [typescript] format 1`] = `
+exports[`snippet: Should not support front matter format[typescript] 1`] = `
"Expression expected. (1:3)
> 1 | ---
| ^
diff --git a/tests/format/misc/filename-matters/flow-ambient/__snapshots__/format.test.js.snap b/tests/format/misc/filename-matters/flow-ambient/__snapshots__/format.test.js.snap
index bb35664f6..35e97c928 100644
--- a/tests/format/misc/filename-matters/flow-ambient/__snapshots__/format.test.js.snap
+++ b/tests/format/misc/filename-matters/flow-ambient/__snapshots__/format.test.js.snap
@@ -1,15 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`ambient.js.flow [hermes] format 1`] = `
-"missing initializer in const declaration (1:6)
-> 1 | const foo: string;
- | ^
- 2 |
-Cause: missing initializer in const declaration (1:6)
-const foo: string;
- ^~~~~~~~~~~"
-`;
-
exports[`ambient.js.flow format 1`] = `
====================================options=====================================
parsers: ["flow"]
@@ -24,10 +14,11 @@ const foo: string;
================================================================================
`;
-exports[`snippet: #0 [hermes] format 1`] = `
+exports[`ambient.js.flow format[hermes] 1`] = `
"missing initializer in const declaration (1:6)
> 1 | const foo: string;
| ^
+ 2 |
Cause: missing initializer in const declaration (1:6)
const foo: string;
^~~~~~~~~~~"
@@ -45,3 +36,12 @@ const foo: string;
================================================================================
`;
+
+exports[`snippet: #0 format[hermes] 1`] = `
+"missing initializer in const declaration (1:6)
+> 1 | const foo: string;
+ | ^
+Cause: missing initializer in const declaration (1:6)
+const foo: string;
+ ^~~~~~~~~~~"
+`;
diff --git a/tests/format/misc/shared-fixtures/.not-test-directory b/tests/format/misc/shared-fixtures/.not-test-directory
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/format/misc/shared-fixtures/class-property-named-constructor.js b/tests/format/misc/shared-fixtures/class-property-named-constructor.js
new file mode 100644
index 000000000..f4498c19b
--- /dev/null
+++ b/tests/format/misc/shared-fixtures/class-property-named-constructor.js
@@ -0,0 +1,36 @@
+import { outdent } from "outdent";
+
+const testCases = [
+ outdent`
+ class Foo {
+ constructor
+ }
+ `,
+ outdent`
+ class Foo {
+ 'construct\u{6f}r'
+ }
+ `,
+ outdent`
+ class Foo {
+ 'constructor'
+ }
+ `,
+ outdent`
+ class Foo {
+ accessor 'construct\u{6f}r'
+ }
+ `,
+ outdent`
+ class Foo {
+ accessor 'constructor'
+ }
+ `,
+ outdent`
+ class Foo {
+ accessor constructor
+ }
+ `,
+];
+
+export { testCases };
diff --git a/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap b/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap
index 1442531ab..bea5aff65 100644
--- a/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap
+++ b/tests/format/mjml/parse/mj-raw/__snapshots__/format.test.js.snap
@@ -1,17 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-in-html.mjml [html] format 1`] = `
-"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (3:9)
- 1 |
- 2 | Wrapped
-> 3 |
- | ^^^^
- 4 |
- 5 |
- 6 | WRAPPED
-Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
-`;
-
exports[`invalid-in-html.mjml format 1`] = `
====================================options=====================================
parsers: ["mjml", "html"]
@@ -37,3 +25,15 @@ printWidth: 80
================================================================================
`;
+
+exports[`invalid-in-html.mjml format[html] 1`] = `
+"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (3:9)
+ 1 |
+ 2 | Wrapped
+> 3 |
+ | ^^^^
+ 4 |
+ 5 |
+ 6 | WRAPPED
+Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
+`;
diff --git a/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap b/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap
index 2e57c92fc..da9629c3c 100644
--- a/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap
+++ b/tests/format/mjml/parse/mj-style/__snapshots__/format.test.js.snap
@@ -1,16 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-in-html.mjml [html] format 1`] = `
-"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (2:25)
- 1 |
-> 2 | a::before { content: "";
- | ^^^^
- 3 | }
- 4 |
- 5 |
-Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
-`;
-
exports[`invalid-in-html.mjml format 1`] = `
====================================options=====================================
parsers: ["mjml", "html"]
@@ -38,3 +27,14 @@ printWidth: 80
================================================================================
`;
+
+exports[`invalid-in-html.mjml format[html] 1`] = `
+"Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (2:25)
+ 1 |
+> 2 | a::before { content: "";
+ | ^^^^
+ 3 | }
+ 4 |
+ 5 |
+Cause: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags"
+`;
diff --git a/tests/format/scss/_errors_/__snapshots__/format.test.js.snap b/tests/format/scss/_errors_/__snapshots__/format.test.js.snap
index 8a53a937a..33c7914e1 100644
--- a/tests/format/scss/_errors_/__snapshots__/format.test.js.snap
+++ b/tests/format/scss/_errors_/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`less-syntax.less format 1`] = `
+exports[`less-syntax.unknown format 1`] = `
"CssSyntaxError: Unknown word .bordered (1:4)
> 1 | a {.bordered();}
| ^
diff --git a/tests/format/scss/_errors_/less-syntax.less b/tests/format/scss/_errors_/less-syntax.unknown
similarity index 100%
rename from tests/format/scss/_errors_/less-syntax.less
rename to tests/format/scss/_errors_/less-syntax.unknown
diff --git a/tests/format/css/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap b/tests/format/scss/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap
similarity index 93%
rename from tests/format/css/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap
rename to tests/format/scss/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap
index 75d0ae4dd..2c4c66449 100644
--- a/tests/format/css/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap
+++ b/tests/format/scss/stylefmt-repo/inline-comment/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`inline-comment.css format 1`] = `
+exports[`inline-comment.scss format 1`] = `
====================================options=====================================
parsers: ["scss"]
printWidth: 80
diff --git a/tests/format/css/stylefmt-repo/inline-comment/format.test.js b/tests/format/scss/stylefmt-repo/inline-comment/format.test.js
similarity index 100%
rename from tests/format/css/stylefmt-repo/inline-comment/format.test.js
rename to tests/format/scss/stylefmt-repo/inline-comment/format.test.js
diff --git a/tests/format/css/stylefmt-repo/inline-comment/inline-comment.css b/tests/format/scss/stylefmt-repo/inline-comment/inline-comment.scss
similarity index 100%
rename from tests/format/css/stylefmt-repo/inline-comment/inline-comment.css
rename to tests/format/scss/stylefmt-repo/inline-comment/inline-comment.scss
diff --git a/tests/format/css/stylefmt-repo/readme/__snapshots__/format.test.js.snap b/tests/format/scss/stylefmt-repo/readme/__snapshots__/format.test.js.snap
similarity index 97%
rename from tests/format/css/stylefmt-repo/readme/__snapshots__/format.test.js.snap
rename to tests/format/scss/stylefmt-repo/readme/__snapshots__/format.test.js.snap
index b1a23bf61..ff7d1e041 100644
--- a/tests/format/css/stylefmt-repo/readme/__snapshots__/format.test.js.snap
+++ b/tests/format/scss/stylefmt-repo/readme/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`readme.css format 1`] = `
+exports[`readme.scss format 1`] = `
====================================options=====================================
parsers: ["scss"]
printWidth: 80
diff --git a/tests/format/css/stylefmt-repo/readme/format.test.js b/tests/format/scss/stylefmt-repo/readme/format.test.js
similarity index 100%
rename from tests/format/css/stylefmt-repo/readme/format.test.js
rename to tests/format/scss/stylefmt-repo/readme/format.test.js
diff --git a/tests/format/css/stylefmt-repo/readme/readme.css b/tests/format/scss/stylefmt-repo/readme/readme.scss
similarity index 100%
rename from tests/format/css/stylefmt-repo/readme/readme.css
rename to tests/format/scss/stylefmt-repo/readme/readme.scss
diff --git a/tests/format/typescript/_errors_/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/__snapshots__/format.test.js.snap
index ce2dc8cd3..8b7497fab 100644
--- a/tests/format/typescript/_errors_/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`declare-getter.ts [babel-ts] format 1`] = `
+exports[`declare-getter.ts format[babel-ts] 1`] = `
"'declare' is not allowed in getters. (2:3)
1 | class Foo {
> 2 | declare get foo()
@@ -10,7 +10,7 @@ exports[`declare-getter.ts [babel-ts] format 1`] = `
Cause: 'declare' is not allowed in getters. (2:2)"
`;
-exports[`declare-getter.ts [oxc-ts] format 1`] = `
+exports[`declare-getter.ts format[oxc-ts] 1`] = `
"'declare' modifier cannot be used here. (2:3)
1 | class Foo {
> 2 | declare get foo()
@@ -19,7 +19,7 @@ exports[`declare-getter.ts [oxc-ts] format 1`] = `
4 |"
`;
-exports[`declare-getter.ts [typescript] format 1`] = `
+exports[`declare-getter.ts format[typescript] 1`] = `
"'declare' modifier cannot appear on class elements of this kind. (2:3)
1 | class Foo {
> 2 | declare get foo()
@@ -29,7 +29,7 @@ exports[`declare-getter.ts [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on class elements of this kind."
`;
-exports[`declare-setter.ts [babel-ts] format 1`] = `
+exports[`declare-setter.ts format[babel-ts] 1`] = `
"'declare' is not allowed in setters. (2:3)
1 | class Foo {
> 2 | declare set foo(v)
@@ -39,7 +39,7 @@ exports[`declare-setter.ts [babel-ts] format 1`] = `
Cause: 'declare' is not allowed in setters. (2:2)"
`;
-exports[`declare-setter.ts [oxc-ts] format 1`] = `
+exports[`declare-setter.ts format[oxc-ts] 1`] = `
"'declare' modifier cannot be used here. (2:3)
1 | class Foo {
> 2 | declare set foo(v)
@@ -48,7 +48,7 @@ exports[`declare-setter.ts [oxc-ts] format 1`] = `
4 |"
`;
-exports[`declare-setter.ts [typescript] format 1`] = `
+exports[`declare-setter.ts format[typescript] 1`] = `
"'declare' modifier cannot appear on class elements of this kind. (2:3)
1 | class Foo {
> 2 | declare set foo(v)
@@ -58,7 +58,7 @@ exports[`declare-setter.ts [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on class elements of this kind."
`;
-exports[`export-declare.ts [babel-ts] format 1`] = `
+exports[`export-declare.ts format[babel-ts] 1`] = `
"'export declare' must be followed by an ambient declaration. (1:16)
> 1 | export declare foo;
| ^
@@ -66,14 +66,14 @@ exports[`export-declare.ts [babel-ts] format 1`] = `
Cause: 'export declare' must be followed by an ambient declaration. (1:15)"
`;
-exports[`export-declare.ts [oxc-ts] format 1`] = `
+exports[`export-declare.ts format[oxc-ts] 1`] = `
"Unexpected token (1:16)
> 1 | export declare foo;
| ^^^
2 |"
`;
-exports[`export-declare.ts [typescript] format 1`] = `
+exports[`export-declare.ts format[typescript] 1`] = `
"Declaration or statement expected. (1:1)
> 1 | export declare foo;
| ^
@@ -81,7 +81,7 @@ exports[`export-declare.ts [typescript] format 1`] = `
Cause: Declaration or statement expected."
`;
-exports[`invalid-jsx-1.tsx [babel-ts] format 1`] = `
+exports[`invalid-jsx-1.tsx format[babel-ts] 1`] = `
"Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (3:45)
1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters
2 |
@@ -91,7 +91,7 @@ exports[`invalid-jsx-1.tsx [babel-ts] format 1`] = `
Cause: Unexpected token \`>\`. Did you mean \`>\` or \`{'>'}\`? (3:44)"
`;
-exports[`invalid-jsx-1.tsx [oxc-ts] format 1`] = `
+exports[`invalid-jsx-1.tsx format[oxc-ts] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (3:45)
1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters
2 |
@@ -100,7 +100,7 @@ exports[`invalid-jsx-1.tsx [oxc-ts] format 1`] = `
4 |"
`;
-exports[`invalid-jsx-1.tsx [typescript] format 1`] = `
+exports[`invalid-jsx-1.tsx format[typescript] 1`] = `
"Unexpected token. Did you mean \`{'>'}\` or \`>\`? (3:45)
1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters
2 |
@@ -110,7 +110,7 @@ exports[`invalid-jsx-1.tsx [typescript] format 1`] = `
Cause: Unexpected token. Did you mean \`{'>'}\` or \`>\`?"
`;
-exports[`module-attributes-static.ts [babel-ts] format 1`] = `
+exports[`module-attributes-static.ts format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:33)
> 1 | import foo from "foo.json" with type: "json";
| ^
@@ -118,14 +118,14 @@ exports[`module-attributes-static.ts [babel-ts] format 1`] = `
Cause: Unexpected token, expected "{" (1:32)"
`;
-exports[`module-attributes-static.ts [oxc-ts] format 1`] = `
+exports[`module-attributes-static.ts format[oxc-ts] 1`] = `
"Expected \`{\` but found \`type\` (1:33)
> 1 | import foo from "foo.json" with type: "json";
| ^^^^
2 |"
`;
-exports[`module-attributes-static.ts [typescript] format 1`] = `
+exports[`module-attributes-static.ts format[typescript] 1`] = `
"'{' expected. (1:33)
> 1 | import foo from "foo.json" with type: "json";
| ^
@@ -133,7 +133,7 @@ exports[`module-attributes-static.ts [typescript] format 1`] = `
Cause: '{' expected."
`;
-exports[`newline-before-arrow.ts [babel-ts] format 1`] = `
+exports[`newline-before-arrow.ts format[babel-ts] 1`] = `
"No line break is allowed before '=>'. (2:3)
1 | async x
> 2 | => x
@@ -142,7 +142,7 @@ exports[`newline-before-arrow.ts [babel-ts] format 1`] = `
Cause: No line break is allowed before '=>'. (2:2)"
`;
-exports[`newline-before-arrow.ts [oxc-ts] format 1`] = `
+exports[`newline-before-arrow.ts format[oxc-ts] 1`] = `
"Line terminator not permitted before arrow (2:1)
1 | async x
> 2 | => x
@@ -150,7 +150,7 @@ exports[`newline-before-arrow.ts [oxc-ts] format 1`] = `
3 |"
`;
-exports[`newline-before-arrow.ts [typescript] format 1`] = `
+exports[`newline-before-arrow.ts format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | async x
| ^
@@ -159,7 +159,7 @@ exports[`newline-before-arrow.ts [typescript] format 1`] = `
Cause: Unexpected keyword or identifier."
`;
-exports[`value-of-abstract-property.ts [babel-ts] format 1`] = `
+exports[`value-of-abstract-property.ts format[babel-ts] 1`] = `
"Property 'prop' cannot have an initializer because it is marked abstract. (2:17)
1 | abstract class Foo {
> 2 | abstract prop = 3;
@@ -169,7 +169,7 @@ exports[`value-of-abstract-property.ts [babel-ts] format 1`] = `
Cause: Property 'prop' cannot have an initializer because it is marked abstract. (2:16)"
`;
-exports[`value-of-abstract-property.ts [oxc-ts] format 1`] = `
+exports[`value-of-abstract-property.ts format[oxc-ts] 1`] = `
"Property 'prop' cannot have an initializer because it is marked abstract. (2:12)
1 | abstract class Foo {
> 2 | abstract prop = 3;
@@ -178,7 +178,7 @@ exports[`value-of-abstract-property.ts [oxc-ts] format 1`] = `
4 |"
`;
-exports[`value-of-abstract-property.ts [typescript] format 1`] = `
+exports[`value-of-abstract-property.ts format[typescript] 1`] = `
"Abstract property cannot have an initializer. (2:19)
1 | abstract class Foo {
> 2 | abstract prop = 3;
diff --git a/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap
index 5e99b0ff6..22c3e3363 100644
--- a/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Method 'getter' cannot have an implementation because it is marked abstract. (2:3)
1 | abstract class Foo {
> 2 | abstract get getter() { }
@@ -9,7 +9,7 @@ exports[`snippet: #0 [babel-ts] format 1`] = `
Cause: Method 'getter' cannot have an implementation because it is marked abstract. (2:2)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Accessor 'getter' cannot have an implementation because it is marked abstract. (2:16)
1 | abstract class Foo {
> 2 | abstract get getter() { }
@@ -17,7 +17,7 @@ exports[`snippet: #0 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"An abstract accessor cannot have an implementation. (2:16)
1 | abstract class Foo {
> 2 | abstract get getter() { }
@@ -26,7 +26,7 @@ exports[`snippet: #0 [typescript] format 1`] = `
Cause: An abstract accessor cannot have an implementation."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Method 'setter' cannot have an implementation because it is marked abstract. (2:3)
1 | abstract class Foo {
> 2 | abstract set setter(v) { }
@@ -35,7 +35,7 @@ exports[`snippet: #1 [babel-ts] format 1`] = `
Cause: Method 'setter' cannot have an implementation because it is marked abstract. (2:2)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Accessor 'setter' cannot have an implementation because it is marked abstract. (2:16)
1 | abstract class Foo {
> 2 | abstract set setter(v) { }
@@ -43,7 +43,7 @@ exports[`snippet: #1 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"An abstract accessor cannot have an implementation. (2:16)
1 | abstract class Foo {
> 2 | abstract set setter(v) { }
diff --git a/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap
index 524cfdbf6..f1ee0216c 100644
--- a/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Method 'method' cannot have an implementation because it is marked abstract. (2:3)
1 | abstract class Foo {
> 2 | abstract method() { }
@@ -9,7 +9,7 @@ exports[`snippet: #0 [babel-ts] format 1`] = `
Cause: Method 'method' cannot have an implementation because it is marked abstract. (2:2)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Method 'method' cannot have an implementation because it is marked abstract. (2:12)
1 | abstract class Foo {
> 2 | abstract method() { }
@@ -17,7 +17,7 @@ exports[`snippet: #0 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Method 'method' cannot have an implementation because it is marked abstract. (2:12)
1 | abstract class Foo {
> 2 | abstract method() { }
diff --git a/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap
index 21e07be74..14f5bbbca 100644
--- a/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`catch-clause-with-initializer.ts [babel-ts] format 1`] = `
+exports[`catch-clause-with-initializer.ts format[babel-ts] 1`] = `
"Unexpected token, expected ")" (3:10)
1 | try {
2 | }
@@ -11,7 +11,7 @@ exports[`catch-clause-with-initializer.ts [babel-ts] format 1`] = `
Cause: Unexpected token, expected ")" (3:9)"
`;
-exports[`catch-clause-with-initializer.ts [oxc-ts] format 1`] = `
+exports[`catch-clause-with-initializer.ts format[oxc-ts] 1`] = `
"Expected \`)\` but found \`=\` (3:10)
1 | try {
2 | }
@@ -21,7 +21,7 @@ exports[`catch-clause-with-initializer.ts [oxc-ts] format 1`] = `
5 |"
`;
-exports[`catch-clause-with-initializer.ts [typescript] format 1`] = `
+exports[`catch-clause-with-initializer.ts format[typescript] 1`] = `
"Catch clause variable cannot have an initializer. (3:12)
1 | try {
2 | }
diff --git a/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap
new file mode 100644
index 000000000..235f85227
--- /dev/null
+++ b/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap
@@ -0,0 +1,157 @@
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
+
+exports[`snippet: #0 format[babel-ts] 1`] = `
+"Classes may not have a field named 'constructor'. (2:3)
+ 1 | abstract class Foo {
+> 2 | constructor
+ | ^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'. (2:2)"
+`;
+
+exports[`snippet: #0 format[oxc-ts] 1`] = `
+"Expected \`(\` but found \`}\` (3:1)
+ 1 | abstract class Foo {
+ 2 | constructor
+> 3 | }
+ | ^"
+`;
+
+exports[`snippet: #0 format[typescript] 1`] = `
+"'(' expected. (3:1)
+ 1 | abstract class Foo {
+ 2 | constructor
+> 3 | }
+ | ^
+Cause: '(' expected."
+`;
+
+exports[`snippet: #1 format[babel-ts] 1`] = `
+"Classes may not have a field named 'constructor'. (2:3)
+ 1 | abstract class Foo {
+> 2 | 'constructor'
+ | ^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'. (2:2)"
+`;
+
+exports[`snippet: #1 format[oxc-ts] 1`] = `
+"Classes can't have a field named 'constructor' (2:3)
+ 1 | abstract class Foo {
+> 2 | 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }"
+`;
+
+exports[`snippet: #1 format[typescript] 1`] = `
+"Classes may not have a field named 'constructor'. (2:3)
+ 1 | abstract class Foo {
+> 2 | 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'."
+`;
+
+exports[`snippet: #2 format[babel-ts] 1`] = `
+"Classes may not have a field named 'constructor'. (2:3)
+ 1 | abstract class Foo {
+> 2 | 'constructor'
+ | ^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'. (2:2)"
+`;
+
+exports[`snippet: #2 format[oxc-ts] 1`] = `
+"Classes can't have a field named 'constructor' (2:3)
+ 1 | abstract class Foo {
+> 2 | 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }"
+`;
+
+exports[`snippet: #2 format[typescript] 1`] = `
+"Classes may not have a field named 'constructor'. (2:3)
+ 1 | abstract class Foo {
+> 2 | 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'."
+`;
+
+exports[`snippet: #3 format[babel-ts] 1`] = `
+"Classes may not have a field named 'constructor'. (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor 'constructor'
+ | ^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'. (2:11)"
+`;
+
+exports[`snippet: #3 format[oxc-ts] 1`] = `
+"Classes may not have a field named 'constructor' (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }"
+`;
+
+exports[`snippet: #3 format[typescript] 1`] = `
+"Classes may not have a field named 'constructor'. (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'."
+`;
+
+exports[`snippet: #4 format[babel-ts] 1`] = `
+"Classes may not have a field named 'constructor'. (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor 'constructor'
+ | ^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'. (2:11)"
+`;
+
+exports[`snippet: #4 format[oxc-ts] 1`] = `
+"Classes may not have a field named 'constructor' (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }"
+`;
+
+exports[`snippet: #4 format[typescript] 1`] = `
+"Classes may not have a field named 'constructor'. (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor 'constructor'
+ | ^^^^^^^^^^^^^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'."
+`;
+
+exports[`snippet: #5 format[babel-ts] 1`] = `
+"Classes may not have a field named 'constructor'. (2:12)
+ 1 | abstract class Foo {
+> 2 | accessor constructor
+ | ^
+ 3 | }
+Cause: Classes may not have a field named 'constructor'. (2:11)"
+`;
+
+exports[`snippet: #5 format[oxc-ts] 1`] = `
+"Expected \`(\` but found \`}\` (3:1)
+ 1 | abstract class Foo {
+ 2 | accessor constructor
+> 3 | }
+ | ^"
+`;
+
+exports[`snippet: #5 format[typescript] 1`] = `
+"'(' expected. (3:1)
+ 1 | abstract class Foo {
+ 2 | accessor constructor
+> 3 | }
+ | ^
+Cause: '(' expected."
+`;
diff --git a/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js b/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js
new file mode 100644
index 000000000..71add1816
--- /dev/null
+++ b/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js
@@ -0,0 +1,9 @@
+import { testCases } from "../../../misc/shared-fixtures/class-property-named-constructor.js";
+
+runFormatTest(
+ {
+ importMeta: import.meta,
+ snippets: testCases.map((code) => `abstract ${code}`),
+ },
+ ["typescript", "babel-ts", "oxc-ts"],
+);
diff --git a/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap
index 10ff66431..edbf352bb 100644
--- a/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap
@@ -1,19 +1,19 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"An implementation cannot be declared in ambient contexts. (1:1)
> 1 | declare function foo() {}
| ^
Cause: An implementation cannot be declared in ambient contexts. (1:0)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"An implementation cannot be declared in ambient contexts. (1:24)
> 1 | declare function foo() {}
| ^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"An implementation cannot be declared in ambient contexts. (1:1)
> 1 | declare function foo() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap
index ecc6aa18a..68f2c978b 100644
--- a/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap
@@ -1,359 +1,359 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:1)
> 1 | 1 ++
| ^
Cause: Invalid left-hand side in postfix operation. (1:0)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:1)
> 1 | 1 ++
| ^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | 1 ++
| ^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (1)++
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (1)++
| ^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (1)++
| ^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (1)--
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (1)--
| ^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (1)--
| ^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Invalid left-hand side in prefix operation. (1:4)
> 1 | ++(1)
| ^
Cause: Invalid left-hand side in prefix operation. (1:3)"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:4)
> 1 | ++(1)
| ^"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:3)
> 1 | ++(1)
| ^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Invalid left-hand side in prefix operation. (1:4)
> 1 | --(1)
| ^
Cause: Invalid left-hand side in prefix operation. (1:3)"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:4)
> 1 | --(1)
| ^"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:3)
> 1 | --(1)
| ^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (1 + 2)++
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #5 [oxc-ts] format 1`] = `
+exports[`snippet: #5 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (1 + 2)++
| ^^^^^"
`;
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (1 + 2)++
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #6 [babel-ts] format 1`] = `
+exports[`snippet: #6 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (1 + 2)--
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #6 [oxc-ts] format 1`] = `
+exports[`snippet: #6 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (1 + 2)--
| ^^^^^"
`;
-exports[`snippet: #6 [typescript] format 1`] = `
+exports[`snippet: #6 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (1 + 2)--
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #7 [babel-ts] format 1`] = `
+exports[`snippet: #7 format[babel-ts] 1`] = `
"Invalid left-hand side in prefix operation. (1:4)
> 1 | ++(1 + 2)
| ^
Cause: Invalid left-hand side in prefix operation. (1:3)"
`;
-exports[`snippet: #7 [oxc-ts] format 1`] = `
+exports[`snippet: #7 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:4)
> 1 | ++(1 + 2)
| ^^^^^"
`;
-exports[`snippet: #7 [typescript] format 1`] = `
+exports[`snippet: #7 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:3)
> 1 | ++(1 + 2)
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #8 [babel-ts] format 1`] = `
+exports[`snippet: #8 format[babel-ts] 1`] = `
"Invalid left-hand side in prefix operation. (1:4)
> 1 | --(1 + 2)
| ^
Cause: Invalid left-hand side in prefix operation. (1:3)"
`;
-exports[`snippet: #8 [oxc-ts] format 1`] = `
+exports[`snippet: #8 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:4)
> 1 | --(1 + 2)
| ^^^^^"
`;
-exports[`snippet: #8 [typescript] format 1`] = `
+exports[`snippet: #8 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:3)
> 1 | --(1 + 2)
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #9 [babel-ts] format 1`] = `
+exports[`snippet: #9 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (x + x)++
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #9 [oxc-ts] format 1`] = `
+exports[`snippet: #9 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (x + x)++
| ^^^^^"
`;
-exports[`snippet: #9 [typescript] format 1`] = `
+exports[`snippet: #9 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (x + x)++
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #10 [babel-ts] format 1`] = `
+exports[`snippet: #10 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (x + x)--
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #10 [oxc-ts] format 1`] = `
+exports[`snippet: #10 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (x + x)--
| ^^^^^"
`;
-exports[`snippet: #10 [typescript] format 1`] = `
+exports[`snippet: #10 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (x + x)--
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #11 [babel-ts] format 1`] = `
+exports[`snippet: #11 format[babel-ts] 1`] = `
"Invalid left-hand side in prefix operation. (1:4)
> 1 | ++(x + x)
| ^
Cause: Invalid left-hand side in prefix operation. (1:3)"
`;
-exports[`snippet: #11 [oxc-ts] format 1`] = `
+exports[`snippet: #11 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:4)
> 1 | ++(x + x)
| ^^^^^"
`;
-exports[`snippet: #11 [typescript] format 1`] = `
+exports[`snippet: #11 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:3)
> 1 | ++(x + x)
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #12 [babel-ts] format 1`] = `
+exports[`snippet: #12 format[babel-ts] 1`] = `
"Invalid left-hand side in prefix operation. (1:4)
> 1 | --(x + x)
| ^
Cause: Invalid left-hand side in prefix operation. (1:3)"
`;
-exports[`snippet: #12 [oxc-ts] format 1`] = `
+exports[`snippet: #12 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:4)
> 1 | --(x + x)
| ^^^^^"
`;
-exports[`snippet: #12 [typescript] format 1`] = `
+exports[`snippet: #12 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:3)
> 1 | --(x + x)
| ^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #13 [babel-ts] format 1`] = `
+exports[`snippet: #13 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:1)
> 1 | a()++
| ^
Cause: Invalid left-hand side in postfix operation. (1:0)"
`;
-exports[`snippet: #13 [oxc-ts] format 1`] = `
+exports[`snippet: #13 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:1)
> 1 | a()++
| ^^^"
`;
-exports[`snippet: #13 [typescript] format 1`] = `
+exports[`snippet: #13 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | a()++
| ^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #14 [babel-ts] format 1`] = `
+exports[`snippet: #14 format[babel-ts] 1`] = `
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
> 1 | x?.y++
| ^
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
`;
-exports[`snippet: #14 [oxc-ts] format 1`] = `
+exports[`snippet: #14 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:1)
> 1 | x?.y++
| ^^^^"
`;
-exports[`snippet: #14 [typescript] format 1`] = `
+exports[`snippet: #14 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | x?.y++
| ^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #15 [babel-ts] format 1`] = `
+exports[`snippet: #15 format[babel-ts] 1`] = `
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
> 1 | x?.y.z++
| ^
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
`;
-exports[`snippet: #15 [oxc-ts] format 1`] = `
+exports[`snippet: #15 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:1)
> 1 | x?.y.z++
| ^^^^^^"
`;
-exports[`snippet: #15 [typescript] format 1`] = `
+exports[`snippet: #15 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | x?.y.z++
| ^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #16 [babel-ts] format 1`] = `
+exports[`snippet: #16 format[babel-ts] 1`] = `
"Invalid optional chaining in the left-hand side of postfix operation. (1:1)
> 1 | x?.y().z++
| ^
Cause: Invalid optional chaining in the left-hand side of postfix operation. (1:0)"
`;
-exports[`snippet: #16 [oxc-ts] format 1`] = `
+exports[`snippet: #16 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:1)
> 1 | x?.y().z++
| ^^^^^^^^"
`;
-exports[`snippet: #16 [typescript] format 1`] = `
+exports[`snippet: #16 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | x?.y().z++
| ^^^^^^^^
Cause: Invalid left-hand side expression in unary operation"
`;
-exports[`snippet: #17 [babel-ts] format 1`] = `
+exports[`snippet: #17 format[babel-ts] 1`] = `
"Invalid left-hand side in postfix operation. (1:2)
> 1 | (a())++
| ^
Cause: Invalid left-hand side in postfix operation. (1:1)"
`;
-exports[`snippet: #17 [oxc-ts] format 1`] = `
+exports[`snippet: #17 format[oxc-ts] 1`] = `
"Cannot assign to this expression (1:2)
> 1 | (a())++
| ^^^"
`;
-exports[`snippet: #17 [typescript] format 1`] = `
+exports[`snippet: #17 format[typescript] 1`] = `
"Invalid left-hand side expression in unary operation (1:1)
> 1 | (a())++
| ^^^^^
diff --git a/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap
index 90fdfac06..de483011a 100644
--- a/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap
@@ -1,119 +1,119 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Accessibility modifier already seen: 'protected'. (1:18)
> 1 | class A {private protected method(){}}
| ^
Cause: Accessibility modifier already seen: 'protected'. (1:17)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private protected method(){}}
| ^^^^^^^^^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private protected method(){}}
| ^^^^^^^^^
Cause: Accessibility modifier already seen."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Accessibility modifier already seen: 'public'. (1:20)
> 1 | class A {protected public method(){}}
| ^
Cause: Accessibility modifier already seen: 'public'. (1:19)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Accessibility modifier already seen. (1:20)
> 1 | class A {protected public method(){}}
| ^^^^^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Accessibility modifier already seen. (1:20)
> 1 | class A {protected public method(){}}
| ^^^^^^
Cause: Accessibility modifier already seen."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Accessibility modifier already seen: 'private'. (1:18)
> 1 | class A {private private method(){}}
| ^
Cause: Accessibility modifier already seen: 'private'. (1:17)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private private method(){}}
| ^^^^^^^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private private method(){}}
| ^^^^^^^
Cause: Accessibility modifier already seen."
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Accessibility modifier already seen: 'protected'. (1:18)
> 1 | class A {private protected property}
| ^
Cause: Accessibility modifier already seen: 'protected'. (1:17)"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private protected property}
| ^^^^^^^^^"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private protected property}
| ^^^^^^^^^
Cause: Accessibility modifier already seen."
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Accessibility modifier already seen: 'public'. (1:20)
> 1 | class A {protected public property}
| ^
Cause: Accessibility modifier already seen: 'public'. (1:19)"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"Accessibility modifier already seen. (1:20)
> 1 | class A {protected public property}
| ^^^^^^"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"Accessibility modifier already seen. (1:20)
> 1 | class A {protected public property}
| ^^^^^^
Cause: Accessibility modifier already seen."
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"Accessibility modifier already seen: 'private'. (1:18)
> 1 | class A {private private property}
| ^
Cause: Accessibility modifier already seen: 'private'. (1:17)"
`;
-exports[`snippet: #5 [oxc-ts] format 1`] = `
+exports[`snippet: #5 format[oxc-ts] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private private property}
| ^^^^^^^"
`;
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"Accessibility modifier already seen. (1:18)
> 1 | class A {private private property}
| ^^^^^^^
diff --git a/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap
index 0210e0425..d50c06f3a 100644
--- a/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap
@@ -1,399 +1,399 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Type argument list cannot be empty. (1:4)
> 1 | foo<>()
| ^
Cause: Type argument list cannot be empty. (1:3)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Type argument list cannot be empty. (1:4)
> 1 | foo<>()
| ^^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Type argument list cannot be empty. (1:4)
> 1 | foo<>()
| ^^
Cause: Type argument list cannot be empty."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Type argument list cannot be empty. (1:5)
> 1 | (foo<>())
| ^
Cause: Type argument list cannot be empty. (1:4)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Type argument list cannot be empty. (1:5)
> 1 | (foo<>())
| ^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Type argument list cannot be empty. (1:5)
> 1 | (foo<>())
| ^^
Cause: Type argument list cannot be empty."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Type argument list cannot be empty. (1:8)
> 1 | new Foo<>()
| ^
Cause: Type argument list cannot be empty. (1:7)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Type argument list cannot be empty. (1:8)
> 1 | new Foo<>()
| ^^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Type argument list cannot be empty. (1:8)
> 1 | new Foo<>()
| ^^
Cause: Type argument list cannot be empty."
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:13)
> 1 | function foo<>(){}
| ^
Cause: Type parameter list cannot be empty. (1:12)"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:13)
> 1 | function foo<>(){}
| ^^"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:13)
> 1 | function foo<>(){}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:14)
> 1 | (function foo<>(){})
| ^
Cause: Type parameter list cannot be empty. (1:13)"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:14)
> 1 | (function foo<>(){})
| ^^"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:14)
> 1 | (function foo<>(){})
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:10)
> 1 | class Foo<> {}
| ^
Cause: Type parameter list cannot be empty. (1:9)"
`;
-exports[`snippet: #5 [oxc-ts] format 1`] = `
+exports[`snippet: #5 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:10)
> 1 | class Foo<> {}
| ^^"
`;
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:10)
> 1 | class Foo<> {}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #6 [babel-ts] format 1`] = `
+exports[`snippet: #6 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:11)
> 1 | (class Foo<> {})
| ^
Cause: Type parameter list cannot be empty. (1:10)"
`;
-exports[`snippet: #6 [oxc-ts] format 1`] = `
+exports[`snippet: #6 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:11)
> 1 | (class Foo<> {})
| ^^"
`;
-exports[`snippet: #6 [typescript] format 1`] = `
+exports[`snippet: #6 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:11)
> 1 | (class Foo<> {})
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #7 [babel-ts] format 1`] = `
+exports[`snippet: #7 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:23)
> 1 | class Foo {constructor<>()}
| ^
Cause: Type parameter list cannot be empty. (1:22)"
`;
-exports[`snippet: #7 [oxc-ts] format 1`] = `
+exports[`snippet: #7 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:23)
> 1 | class Foo {constructor<>()}
| ^^"
`;
-exports[`snippet: #7 [typescript] format 1`] = `
+exports[`snippet: #7 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:23)
> 1 | class Foo {constructor<>()}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #8 [babel-ts] format 1`] = `
+exports[`snippet: #8 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:24)
> 1 | (class Foo {constructor<>()})
| ^
Cause: Type parameter list cannot be empty. (1:23)"
`;
-exports[`snippet: #8 [oxc-ts] format 1`] = `
+exports[`snippet: #8 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:24)
> 1 | (class Foo {constructor<>()})
| ^^"
`;
-exports[`snippet: #8 [typescript] format 1`] = `
+exports[`snippet: #8 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:24)
> 1 | (class Foo {constructor<>()})
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #9 [babel-ts] format 1`] = `
+exports[`snippet: #9 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:18)
> 1 | class Foo {method<>()}
| ^
Cause: Type parameter list cannot be empty. (1:17)"
`;
-exports[`snippet: #9 [oxc-ts] format 1`] = `
+exports[`snippet: #9 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:18)
> 1 | class Foo {method<>()}
| ^^"
`;
-exports[`snippet: #9 [typescript] format 1`] = `
+exports[`snippet: #9 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:18)
> 1 | class Foo {method<>()}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #10 [babel-ts] format 1`] = `
+exports[`snippet: #10 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:19)
> 1 | (class Foo {method<>()})
| ^
Cause: Type parameter list cannot be empty. (1:18)"
`;
-exports[`snippet: #10 [oxc-ts] format 1`] = `
+exports[`snippet: #10 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:19)
> 1 | (class Foo {method<>()})
| ^^"
`;
-exports[`snippet: #10 [typescript] format 1`] = `
+exports[`snippet: #10 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:19)
> 1 | (class Foo {method<>()})
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #11 [babel-ts] format 1`] = `
+exports[`snippet: #11 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:22)
> 1 | class Foo {get getter<>()}
| ^
Cause: Type parameter list cannot be empty. (1:21)"
`;
-exports[`snippet: #11 [oxc-ts] format 1`] = `
+exports[`snippet: #11 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:22)
> 1 | class Foo {get getter<>()}
| ^^"
`;
-exports[`snippet: #11 [typescript] format 1`] = `
+exports[`snippet: #11 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:22)
> 1 | class Foo {get getter<>()}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #12 [babel-ts] format 1`] = `
+exports[`snippet: #12 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:23)
> 1 | (class Foo {get getter<>()})
| ^
Cause: Type parameter list cannot be empty. (1:22)"
`;
-exports[`snippet: #12 [oxc-ts] format 1`] = `
+exports[`snippet: #12 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:23)
> 1 | (class Foo {get getter<>()})
| ^^"
`;
-exports[`snippet: #12 [typescript] format 1`] = `
+exports[`snippet: #12 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:23)
> 1 | (class Foo {get getter<>()})
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #13 [babel-ts] format 1`] = `
+exports[`snippet: #13 format[babel-ts] 1`] = `
"Type argument list cannot be empty. (1:25)
> 1 | class Foo {property: Bar<> = 1}
| ^
Cause: Type argument list cannot be empty. (1:24)"
`;
-exports[`snippet: #13 [oxc-ts] format 1`] = `
+exports[`snippet: #13 format[oxc-ts] 1`] = `
"Type argument list cannot be empty. (1:25)
> 1 | class Foo {property: Bar<> = 1}
| ^^"
`;
-exports[`snippet: #13 [typescript] format 1`] = `
+exports[`snippet: #13 format[typescript] 1`] = `
"Type argument list cannot be empty. (1:25)
> 1 | class Foo {property: Bar<> = 1}
| ^^
Cause: Type argument list cannot be empty."
`;
-exports[`snippet: #14 [babel-ts] format 1`] = `
+exports[`snippet: #14 format[babel-ts] 1`] = `
"Type argument list cannot be empty. (1:26)
> 1 | (class Foo {property: Bar<> = 1})
| ^
Cause: Type argument list cannot be empty. (1:25)"
`;
-exports[`snippet: #14 [oxc-ts] format 1`] = `
+exports[`snippet: #14 format[oxc-ts] 1`] = `
"Type argument list cannot be empty. (1:26)
> 1 | (class Foo {property: Bar<> = 1})
| ^^"
`;
-exports[`snippet: #14 [typescript] format 1`] = `
+exports[`snippet: #14 format[typescript] 1`] = `
"Type argument list cannot be empty. (1:26)
> 1 | (class Foo {property: Bar<> = 1})
| ^^
Cause: Type argument list cannot be empty."
`;
-exports[`snippet: #15 [babel-ts] format 1`] = `
+exports[`snippet: #15 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:14)
> 1 | interface Foo<> {}
| ^
Cause: Type parameter list cannot be empty. (1:13)"
`;
-exports[`snippet: #15 [oxc-ts] format 1`] = `
+exports[`snippet: #15 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:14)
> 1 | interface Foo<> {}
| ^^"
`;
-exports[`snippet: #15 [typescript] format 1`] = `
+exports[`snippet: #15 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:14)
> 1 | interface Foo<> {}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #16 [babel-ts] format 1`] = `
+exports[`snippet: #16 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:19)
> 1 | interface Foo {bar<>()}
| ^
Cause: Type parameter list cannot be empty. (1:18)"
`;
-exports[`snippet: #16 [oxc-ts] format 1`] = `
+exports[`snippet: #16 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:19)
> 1 | interface Foo {bar<>()}
| ^^"
`;
-exports[`snippet: #16 [typescript] format 1`] = `
+exports[`snippet: #16 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:19)
> 1 | interface Foo {bar<>()}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #17 [babel-ts] format 1`] = `
+exports[`snippet: #17 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:16)
> 1 | interface Foo {<>(): boolean}
| ^
Cause: Type parameter list cannot be empty. (1:15)"
`;
-exports[`snippet: #17 [oxc-ts] format 1`] = `
+exports[`snippet: #17 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:16)
> 1 | interface Foo {<>(): boolean}
| ^^"
`;
-exports[`snippet: #17 [typescript] format 1`] = `
+exports[`snippet: #17 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:16)
> 1 | interface Foo {<>(): boolean}
| ^^
Cause: Type parameter list cannot be empty."
`;
-exports[`snippet: #18 [babel-ts] format 1`] = `
+exports[`snippet: #18 format[babel-ts] 1`] = `
"Type argument list cannot be empty. (1:15)
> 1 | const foo: Foo<> = 1
| ^
Cause: Type argument list cannot be empty. (1:14)"
`;
-exports[`snippet: #18 [oxc-ts] format 1`] = `
+exports[`snippet: #18 format[oxc-ts] 1`] = `
"Type argument list cannot be empty. (1:15)
> 1 | const foo: Foo<> = 1
| ^^"
`;
-exports[`snippet: #18 [typescript] format 1`] = `
+exports[`snippet: #18 format[typescript] 1`] = `
"Type argument list cannot be empty. (1:15)
> 1 | const foo: Foo<> = 1
| ^^
Cause: Type argument list cannot be empty."
`;
-exports[`snippet: #19 [babel-ts] format 1`] = `
+exports[`snippet: #19 format[babel-ts] 1`] = `
"Type parameter list cannot be empty. (1:12)
> 1 | type Foo = <>() => {}
| ^
Cause: Type parameter list cannot be empty. (1:11)"
`;
-exports[`snippet: #19 [oxc-ts] format 1`] = `
+exports[`snippet: #19 format[oxc-ts] 1`] = `
"Type parameter list cannot be empty. (1:12)
> 1 | type Foo = <>() => {}
| ^^"
`;
-exports[`snippet: #19 [typescript] format 1`] = `
+exports[`snippet: #19 format[typescript] 1`] = `
"Type parameter list cannot be empty. (1:12)
> 1 | type Foo = <>() => {}
| ^^
diff --git a/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap
index d1c03112b..85318319a 100644
--- a/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Unexpected token (2:3)
1 | enum Foo {
> 2 | 1 = 1
@@ -9,7 +9,7 @@ exports[`snippet: #0 [babel-ts] format 1`] = `
Cause: Unexpected token (2:2)"
`;
-exports[`snippet: #0 [babel-ts] format 2`] = `
+exports[`snippet: #0 format[babel-ts] 2`] = `
"Unexpected token (2:3)
1 | enum Foo {
> 2 | ['foo'] = 1
@@ -18,7 +18,7 @@ exports[`snippet: #0 [babel-ts] format 2`] = `
Cause: Unexpected token (2:2)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"An enum member cannot have a numeric name. (2:3)
1 | enum Foo {
> 2 | 1 = 1
@@ -26,7 +26,7 @@ exports[`snippet: #0 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"An enum member cannot have a numeric name. (2:3)
1 | enum Foo {
> 2 | 1 = 1
@@ -35,7 +35,7 @@ exports[`snippet: #0 [typescript] format 1`] = `
Cause: An enum member cannot have a numeric name."
`;
-exports[`snippet: #0 [typescript] format 2`] = `
+exports[`snippet: #0 format[typescript] 2`] = `
"Computed property names are not allowed in enums. (2:3)
1 | enum Foo {
> 2 | ['foo'] = 1
@@ -44,7 +44,7 @@ exports[`snippet: #0 [typescript] format 2`] = `
Cause: Computed property names are not allowed in enums."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Unexpected token (2:3)
1 | enum Foo {
> 2 | 1n = 1
@@ -53,7 +53,7 @@ exports[`snippet: #1 [babel-ts] format 1`] = `
Cause: Unexpected token (2:2)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"An enum member cannot have a numeric name. (2:3)
1 | enum Foo {
> 2 | 1n = 1
@@ -61,7 +61,7 @@ exports[`snippet: #1 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"An enum member cannot have a numeric name. (2:3)
1 | enum Foo {
> 2 | 1n = 1
@@ -70,7 +70,7 @@ exports[`snippet: #1 [typescript] format 1`] = `
Cause: An enum member cannot have a numeric name."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected token (2:3)
1 | enum Foo {
> 2 | [1] = 1
@@ -79,7 +79,7 @@ exports[`snippet: #2 [babel-ts] format 1`] = `
Cause: Unexpected token (2:2)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"An enum member cannot have a numeric name. (2:4)
1 | enum Foo {
> 2 | [1] = 1
@@ -87,7 +87,7 @@ exports[`snippet: #2 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Computed property names are not allowed in enums. (2:3)
1 | enum Foo {
> 2 | [1] = 1
@@ -96,7 +96,7 @@ exports[`snippet: #2 [typescript] format 1`] = `
Cause: Computed property names are not allowed in enums."
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Unexpected token (2:3)
1 | enum Foo {
> 2 | [1n] = 1
@@ -105,7 +105,7 @@ exports[`snippet: #3 [babel-ts] format 1`] = `
Cause: Unexpected token (2:2)"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Computed property names are not allowed in enums. (2:4)
1 | enum Foo {
> 2 | [1n] = 1
@@ -113,7 +113,7 @@ exports[`snippet: #3 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"Computed property names are not allowed in enums. (2:3)
1 | enum Foo {
> 2 | [1n] = 1
@@ -122,7 +122,7 @@ exports[`snippet: #3 [typescript] format 1`] = `
Cause: Computed property names are not allowed in enums."
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Unexpected token (2:3)
1 | enum Foo {
> 2 | [foo] = 1
@@ -131,7 +131,7 @@ exports[`snippet: #4 [babel-ts] format 1`] = `
Cause: Unexpected token (2:2)"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"Computed property names are not allowed in enums. (2:4)
1 | enum Foo {
> 2 | [foo] = 1
@@ -139,7 +139,7 @@ exports[`snippet: #4 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"Computed property names are not allowed in enums. (2:3)
1 | enum Foo {
> 2 | [foo] = 1
diff --git a/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap
index 7cd478aef..540ddd222 100644
--- a/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`valid-flow-default-import.mts [babel-ts] format 1`] = `
+exports[`valid-flow-default-import.mts format[babel-ts] 1`] = `
"Unexpected token, expected "from" (1:15)
> 1 | import module foo from "./module.wasm";
| ^
@@ -9,7 +9,7 @@ exports[`valid-flow-default-import.mts [babel-ts] format 1`] = `
Cause: Unexpected token, expected "from" (1:14)"
`;
-exports[`valid-flow-default-import.mts [oxc-ts] format 1`] = `
+exports[`valid-flow-default-import.mts format[oxc-ts] 1`] = `
"Expected \`from\` but found \`Identifier\` (1:15)
> 1 | import module foo from "./module.wasm";
| ^^^
@@ -17,7 +17,7 @@ exports[`valid-flow-default-import.mts [oxc-ts] format 1`] = `
3 |"
`;
-exports[`valid-flow-default-import.mts [typescript] format 1`] = `
+exports[`valid-flow-default-import.mts format[typescript] 1`] = `
"'=' expected. (1:15)
> 1 | import module foo from "./module.wasm";
| ^
@@ -26,7 +26,7 @@ exports[`valid-flow-default-import.mts [typescript] format 1`] = `
Cause: '=' expected."
`;
-exports[`valid-ts-default-import.mts [babel-ts] format 1`] = `
+exports[`valid-ts-default-import.mts format[babel-ts] 1`] = `
"Unexpected token, expected "from" (1:15)
> 1 | import module foo from "./module.wasm";
| ^
@@ -35,7 +35,7 @@ exports[`valid-ts-default-import.mts [babel-ts] format 1`] = `
Cause: Unexpected token, expected "from" (1:14)"
`;
-exports[`valid-ts-default-import.mts [oxc-ts] format 1`] = `
+exports[`valid-ts-default-import.mts format[oxc-ts] 1`] = `
"Expected \`from\` but found \`Identifier\` (1:15)
> 1 | import module foo from "./module.wasm";
| ^^^
@@ -43,7 +43,7 @@ exports[`valid-ts-default-import.mts [oxc-ts] format 1`] = `
3 |"
`;
-exports[`valid-ts-default-import.mts [typescript] format 1`] = `
+exports[`valid-ts-default-import.mts format[typescript] 1`] = `
"'=' expected. (1:15)
> 1 | import module foo from "./module.wasm";
| ^
diff --git a/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap
index 54f9b45bb..0adea99ba 100644
--- a/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap
@@ -1,59 +1,59 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:25)
> 1 | interface I { x: number = 1;}
| ^
Cause: Unexpected token, expected ";" (1:24)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Unexpected token (1:25)
> 1 | interface I { x: number = 1;}
| ^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"A property signature cannot have an initializer. (1:27)
> 1 | interface I { x: number = 1;}
| ^
Cause: A property signature cannot have an initializer."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | interface A mixins B {}
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Expected \`{\` but found \`Identifier\` (1:13)
> 1 | interface A mixins B {}
| ^^^^^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"'{' expected. (1:13)
> 1 | interface A mixins B {}
| ^
Cause: '{' expected."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | interface A implements B {}
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Interface declaration cannot have 'implements' clause. (1:13)
> 1 | interface A implements B {}
| ^^^^^^^^^^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Interface declaration cannot have 'implements' clause. (1:13)
> 1 | interface A implements B {}
| ^^^^^^^^^^^^
diff --git a/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap
index d18c99f82..23e0d0b6b 100644
--- a/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap
@@ -1,79 +1,79 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"'implements' list can only include identifiers or qualified-names with optional type arguments. (1:22)
> 1 | class Foo implements A?.B {}
| ^
Cause: 'implements' list can only include identifiers or qualified-names with optional type arguments. (1:21)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Expected \`{\` but found \`?.\` (1:23)
> 1 | class Foo implements A?.B {}
| ^^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"A class can only implement an identifier/qualified-name with optional type arguments. (1:22)
> 1 | class Foo implements A?.B {}
| ^^^^
Cause: A class can only implement an identifier/qualified-name with optional type arguments."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"'implements' list can only include identifiers or qualified-names with optional type arguments. (1:23)
> 1 | (class Foo implements A?.B {})
| ^
Cause: 'implements' list can only include identifiers or qualified-names with optional type arguments. (1:22)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Expected \`{\` but found \`?.\` (1:24)
> 1 | (class Foo implements A?.B {})
| ^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"A class can only implement an identifier/qualified-name with optional type arguments. (1:23)
> 1 | (class Foo implements A?.B {})
| ^^^^
Cause: A class can only implement an identifier/qualified-name with optional type arguments."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"'implements' list can only include identifiers or qualified-names with optional type arguments. (1:22)
> 1 | class Foo implements "thing" {}
| ^
Cause: 'implements' list can only include identifiers or qualified-names with optional type arguments. (1:21)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Unexpected token (1:22)
> 1 | class Foo implements "thing" {}
| ^^^^^^^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"A class can only implement an identifier/qualified-name with optional type arguments. (1:22)
> 1 | class Foo implements "thing" {}
| ^^^^^^^
Cause: A class can only implement an identifier/qualified-name with optional type arguments."
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"'implements' list can only include identifiers or qualified-names with optional type arguments. (1:23)
> 1 | (class Foo implements "thing" {})
| ^
Cause: 'implements' list can only include identifiers or qualified-names with optional type arguments. (1:22)"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"Unexpected token (1:23)
> 1 | (class Foo implements "thing" {})
| ^^^^^^^"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"A class can only implement an identifier/qualified-name with optional type arguments. (1:23)
> 1 | (class Foo implements "thing" {})
| ^^^^^^^
diff --git a/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap
index 2b911a337..5a6503678 100644
--- a/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap
@@ -1,13 +1,13 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"An import alias can not use 'import type'. (1:17)
> 1 | import type F = T;
| ^
Cause: An import alias can not use 'import type'. (1:16)"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"An import alias cannot use 'import type' (1:1)
> 1 | import type F = T;
| ^^^^^^^^^^^^^^^^^^
diff --git a/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap
index b166185e8..b27f7fb42 100644
--- a/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap
@@ -1,83 +1,83 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21)
> 1 | interface A extends (typeof fs) { }
| ^
Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21)
> 1 | interface A extends (typeof fs) { }
| ^^^^^^^^^^^
Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21)
> 1 | interface B extends C['D'] { }
| ^
Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21)
> 1 | interface B extends C['D'] { }
| ^^^^^^
Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21)
> 1 | interface E extends F?.G { }
| ^
Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21)
> 1 | interface E extends F?.G { }
| ^^^^
Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments."
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:23)
> 1 | interface H extends I extends J { }
| ^
Cause: Unexpected token, expected "," (1:22)"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"'extends' clause already seen. (1:23)
> 1 | interface H extends I extends J { }
| ^^^^^^^^^
Cause: 'extends' clause already seen."
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21)
> 1 | interface K extends 2 { }
| ^
Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21)
> 1 | interface K extends 2 { }
| ^
Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments."
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21)
> 1 | interface L extends M().N { }
| ^
Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)"
`;
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21)
> 1 | interface L extends M().N { }
| ^^^^^
diff --git a/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap
index 05cb86456..c3dc59bc7 100644
--- a/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap
@@ -1,25 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
-"'extends' list cannot be empty. (1:23)
-> 1 | interface Foo extends {}
- | ^
-Cause: 'extends' list cannot be empty. (1:22)"
-`;
-
-exports[`snippet: #0 [oxc-ts] format 1`] = `
-"Expected \`{\` but found \`EOF\` (1:25)
-> 1 | interface Foo extends {}
- | ^"
-`;
-
-exports[`snippet: #0 [typescript] format 1`] = `
-"'extends' list cannot be empty. (1:15)
-> 1 | interface Foo extends {}
- | ^^^^^^^
-Cause: 'extends' list cannot be empty."
-`;
-
exports[`snippet: #0 format 1`] = `
"'extends' list cannot be empty. (1:13)
> 1 | interface F extends implements {}
@@ -27,40 +7,60 @@ exports[`snippet: #0 format 1`] = `
Cause: 'extends' list cannot be empty."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
+"'extends' list cannot be empty. (1:23)
+> 1 | interface Foo extends {}
+ | ^
+Cause: 'extends' list cannot be empty. (1:22)"
+`;
+
+exports[`snippet: #0 format[oxc-ts] 1`] = `
+"Expected \`{\` but found \`EOF\` (1:25)
+> 1 | interface Foo extends {}
+ | ^"
+`;
+
+exports[`snippet: #0 format[typescript] 1`] = `
+"'extends' list cannot be empty. (1:15)
+> 1 | interface Foo extends {}
+ | ^^^^^^^
+Cause: 'extends' list cannot be empty."
+`;
+
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | interface F implements {}
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Unexpected token (1:24)
> 1 | interface F implements {}
| ^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Interface declaration cannot have 'implements' clause. (1:13)
> 1 | interface F implements {}
| ^^^^^^^^^^
Cause: Interface declaration cannot have 'implements' clause."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:13)
> 1 | interface F implements A {}
| ^
Cause: Unexpected token, expected "{" (1:12)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Interface declaration cannot have 'implements' clause. (1:13)
> 1 | interface F implements A {}
| ^^^^^^^^^^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Interface declaration cannot have 'implements' clause. (1:13)
> 1 | interface F implements A {}
| ^^^^^^^^^^^^
diff --git a/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap
index f1a276538..61273ebe6 100644
--- a/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`decorator.ts [babel-ts] format 1`] = `
+exports[`decorator.ts format[babel-ts] 1`] = `
"Leading decorators must be attached to a class declaration. (4:1)
2 |
3 | @dec
@@ -10,7 +10,7 @@ exports[`decorator.ts [babel-ts] format 1`] = `
Cause: Leading decorators must be attached to a class declaration. (4:0)"
`;
-exports[`decorator.ts [typescript] format 1`] = `
+exports[`decorator.ts format[typescript] 1`] = `
"Decorators are not valid here. (3:1)
1 | declare function dec(target: T): T;
2 |
@@ -21,7 +21,7 @@ exports[`decorator.ts [typescript] format 1`] = `
Cause: Decorators are not valid here."
`;
-exports[`enums.ts [babel-ts] format 1`] = `
+exports[`enums.ts format[babel-ts] 1`] = `
"Leading decorators must be attached to a class declaration. (4:1)
2 |
3 | @decorator()
@@ -33,7 +33,7 @@ exports[`enums.ts [babel-ts] format 1`] = `
Cause: Leading decorators must be attached to a class declaration. (4:0)"
`;
-exports[`enums.ts [typescript] format 1`] = `
+exports[`enums.ts format[typescript] 1`] = `
"Decorators are not valid here. (3:1)
1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375
2 |
@@ -45,7 +45,7 @@ exports[`enums.ts [typescript] format 1`] = `
Cause: Decorators are not valid here."
`;
-exports[`function.ts [babel-ts] format 1`] = `
+exports[`function.ts format[babel-ts] 1`] = `
"Leading decorators must be attached to a class declaration. (4:1)
2 |
3 | @decorator()
@@ -55,7 +55,7 @@ exports[`function.ts [babel-ts] format 1`] = `
Cause: Leading decorators must be attached to a class declaration. (4:0)"
`;
-exports[`function.ts [typescript] format 1`] = `
+exports[`function.ts format[typescript] 1`] = `
"Decorators are not valid here. (3:1)
1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375
2 |
@@ -66,7 +66,7 @@ exports[`function.ts [typescript] format 1`] = `
Cause: Decorators are not valid here."
`;
-exports[`interface.ts [babel-ts] format 1`] = `
+exports[`interface.ts format[babel-ts] 1`] = `
"Leading decorators must be attached to a class declaration. (5:1)
3 |
4 | @hello()
@@ -77,7 +77,7 @@ exports[`interface.ts [babel-ts] format 1`] = `
Cause: Leading decorators must be attached to a class declaration. (5:0)"
`;
-exports[`interface.ts [typescript] format 1`] = `
+exports[`interface.ts format[typescript] 1`] = `
"Decorators are not valid here. (4:1)
2 | // #4632
3 |
@@ -89,7 +89,7 @@ exports[`interface.ts [typescript] format 1`] = `
Cause: Decorators are not valid here."
`;
-exports[`issue-9102.ts [babel-ts] format 1`] = `
+exports[`issue-9102.ts format[babel-ts] 1`] = `
"Leading decorators must be attached to a class declaration. (2:1)
1 | @Decorator()
> 2 | type T = 1;
@@ -99,7 +99,7 @@ exports[`issue-9102.ts [babel-ts] format 1`] = `
Cause: Leading decorators must be attached to a class declaration. (2:0)"
`;
-exports[`issue-9102.ts [typescript] format 1`] = `
+exports[`issue-9102.ts format[typescript] 1`] = `
"Decorators are not valid here. (1:1)
> 1 | @Decorator()
| ^^^^^^^^^^^^
diff --git a/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap
index 669f6e2c3..ec640f3ac 100644
--- a/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap
@@ -1,59 +1,59 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Missing semicolon. (1:12)
> 1 | for (var of X);
| ^
Cause: Missing semicolon. (1:11)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Expected \`;\` but found \`Identifier\` (1:13)
> 1 | for (var of X);
| ^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Only a single variable declaration is allowed in a 'for...of' statement. (1:6)
> 1 | for (var of X);
| ^^^
Cause: Only a single variable declaration is allowed in a 'for...of' statement."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Unexpected token (1:15)
> 1 | for (var of of);
| ^
Cause: Unexpected token (1:14)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Unexpected token (1:15)
> 1 | for (var of of);
| ^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Only a single variable declaration is allowed in a 'for...of' statement. (1:6)
> 1 | for (var of of);
| ^^^
Cause: Only a single variable declaration is allowed in a 'for...of' statement."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected keyword 'in'. (1:10)
> 1 | for (var in X);
| ^
Cause: Unexpected keyword 'in'. (1:9)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Identifier expected. 'in' is a reserved word that cannot be used here. (1:10)
> 1 | for (var in X);
| ^^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"Only a single variable declaration is allowed in a 'for...in' statement. (1:6)
> 1 | for (var in X);
| ^^^
diff --git a/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap
index 98b3a30b6..97e4b0730 100644
--- a/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`mapped-type.ts [babel-ts] format 1`] = `
+exports[`mapped-type.ts format[babel-ts] 1`] = `
"Unexpected token, expected "}" (3:3)
1 | type Mapped = {
2 | [key in keyof O]: number;
@@ -11,7 +11,7 @@ exports[`mapped-type.ts [babel-ts] format 1`] = `
Cause: Unexpected token, expected "}" (3:2)"
`;
-exports[`mapped-type.ts [oxc-ts] format 1`] = `
+exports[`mapped-type.ts format[oxc-ts] 1`] = `
"Expected \`}\` but found \`Identifier\` (3:3)
1 | type Mapped = {
2 | [key in keyof O]: number;
@@ -21,7 +21,7 @@ exports[`mapped-type.ts [oxc-ts] format 1`] = `
5 |"
`;
-exports[`mapped-type.ts [typescript] format 1`] = `
+exports[`mapped-type.ts format[typescript] 1`] = `
"A mapped type may not declare properties or methods. (3:3)
1 | type Mapped = {
2 | [key in keyof O]: number;
diff --git a/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap
index b44f2fdee..d7775cab8 100644
--- a/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | abstract method();
@@ -9,7 +9,7 @@ exports[`snippet: #0 [babel-ts] format 1`] = `
Cause: 'abstract' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | abstract method();
@@ -17,7 +17,7 @@ exports[`snippet: #0 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"'abstract' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | abstract method();
@@ -26,7 +26,7 @@ exports[`snippet: #0 [typescript] format 1`] = `
Cause: 'abstract' modifier cannot appear on a type member"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | abstract property;
@@ -35,7 +35,7 @@ exports[`snippet: #1 [babel-ts] format 1`] = `
Cause: 'abstract' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | abstract property;
@@ -43,7 +43,7 @@ exports[`snippet: #1 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"'abstract' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | abstract property;
@@ -52,7 +52,7 @@ exports[`snippet: #1 [typescript] format 1`] = `
Cause: 'abstract' modifier cannot appear on a type member"
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | abstract [index: string]: number
@@ -61,7 +61,7 @@ exports[`snippet: #2 [babel-ts] format 1`] = `
Cause: 'abstract' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | abstract [index: string]: number
@@ -69,7 +69,7 @@ exports[`snippet: #2 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"'abstract' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | abstract [index: string]: number
@@ -78,7 +78,7 @@ exports[`snippet: #2 [typescript] format 1`] = `
Cause: 'abstract' modifier cannot appear on an index signature"
`;
-exports[`snippet: #3 [babel-ts] format 1`] = `
+exports[`snippet: #3 format[babel-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | abstract [index: string] : string
@@ -87,7 +87,7 @@ exports[`snippet: #3 [babel-ts] format 1`] = `
Cause: 'abstract' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #3 [oxc-ts] format 1`] = `
+exports[`snippet: #3 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | abstract [index: string] : string
@@ -95,7 +95,7 @@ exports[`snippet: #3 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #3 [typescript] format 1`] = `
+exports[`snippet: #3 format[typescript] 1`] = `
"'abstract' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | abstract [index: string] : string
@@ -104,7 +104,7 @@ exports[`snippet: #3 [typescript] format 1`] = `
Cause: 'abstract' modifier cannot appear on an index signature"
`;
-exports[`snippet: #4 [babel-ts] format 1`] = `
+exports[`snippet: #4 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:12)
1 | interface Foo {
> 2 | accessor method();
@@ -113,7 +113,7 @@ exports[`snippet: #4 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:11)"
`;
-exports[`snippet: #4 [oxc-ts] format 1`] = `
+exports[`snippet: #4 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | accessor method();
@@ -121,7 +121,7 @@ exports[`snippet: #4 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #4 [typescript] format 1`] = `
+exports[`snippet: #4 format[typescript] 1`] = `
"'accessor' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | accessor method();
@@ -130,7 +130,7 @@ exports[`snippet: #4 [typescript] format 1`] = `
Cause: 'accessor' modifier cannot appear on a type member"
`;
-exports[`snippet: #5 [babel-ts] format 1`] = `
+exports[`snippet: #5 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:12)
1 | interface Foo {
> 2 | accessor property;
@@ -139,7 +139,7 @@ exports[`snippet: #5 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:11)"
`;
-exports[`snippet: #5 [oxc-ts] format 1`] = `
+exports[`snippet: #5 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | accessor property;
@@ -147,7 +147,7 @@ exports[`snippet: #5 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #5 [typescript] format 1`] = `
+exports[`snippet: #5 format[typescript] 1`] = `
"'accessor' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | accessor property;
@@ -156,7 +156,7 @@ exports[`snippet: #5 [typescript] format 1`] = `
Cause: 'accessor' modifier cannot appear on a type member"
`;
-exports[`snippet: #6 [babel-ts] format 1`] = `
+exports[`snippet: #6 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:12)
1 | interface Foo {
> 2 | accessor [index: string]: number
@@ -165,7 +165,7 @@ exports[`snippet: #6 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:11)"
`;
-exports[`snippet: #6 [oxc-ts] format 1`] = `
+exports[`snippet: #6 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | accessor [index: string]: number
@@ -173,7 +173,7 @@ exports[`snippet: #6 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #6 [typescript] format 1`] = `
+exports[`snippet: #6 format[typescript] 1`] = `
"'accessor' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | accessor [index: string]: number
@@ -182,7 +182,7 @@ exports[`snippet: #6 [typescript] format 1`] = `
Cause: 'accessor' modifier cannot appear on an index signature"
`;
-exports[`snippet: #7 [babel-ts] format 1`] = `
+exports[`snippet: #7 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:12)
1 | const foo: {
> 2 | accessor [index: string] : string
@@ -191,7 +191,7 @@ exports[`snippet: #7 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:11)"
`;
-exports[`snippet: #7 [oxc-ts] format 1`] = `
+exports[`snippet: #7 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | accessor [index: string] : string
@@ -199,7 +199,7 @@ exports[`snippet: #7 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #7 [typescript] format 1`] = `
+exports[`snippet: #7 format[typescript] 1`] = `
"'accessor' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | accessor [index: string] : string
@@ -208,7 +208,7 @@ exports[`snippet: #7 [typescript] format 1`] = `
Cause: 'accessor' modifier cannot appear on an index signature"
`;
-exports[`snippet: #8 [babel-ts] format 1`] = `
+exports[`snippet: #8 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | interface Foo {
> 2 | async method();
@@ -217,7 +217,7 @@ exports[`snippet: #8 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #8 [oxc-ts] format 1`] = `
+exports[`snippet: #8 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | async method();
@@ -225,7 +225,7 @@ exports[`snippet: #8 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #8 [typescript] format 1`] = `
+exports[`snippet: #8 format[typescript] 1`] = `
"'async' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | async method();
@@ -234,7 +234,7 @@ exports[`snippet: #8 [typescript] format 1`] = `
Cause: 'async' modifier cannot appear on a type member"
`;
-exports[`snippet: #9 [babel-ts] format 1`] = `
+exports[`snippet: #9 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | interface Foo {
> 2 | async property;
@@ -243,7 +243,7 @@ exports[`snippet: #9 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #9 [oxc-ts] format 1`] = `
+exports[`snippet: #9 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | async property;
@@ -251,7 +251,7 @@ exports[`snippet: #9 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #9 [typescript] format 1`] = `
+exports[`snippet: #9 format[typescript] 1`] = `
"'async' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | async property;
@@ -260,7 +260,7 @@ exports[`snippet: #9 [typescript] format 1`] = `
Cause: 'async' modifier cannot appear on a type member"
`;
-exports[`snippet: #10 [babel-ts] format 1`] = `
+exports[`snippet: #10 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | interface Foo {
> 2 | async [index: string]: number
@@ -269,7 +269,7 @@ exports[`snippet: #10 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #10 [oxc-ts] format 1`] = `
+exports[`snippet: #10 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | async [index: string]: number
@@ -277,7 +277,7 @@ exports[`snippet: #10 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #10 [typescript] format 1`] = `
+exports[`snippet: #10 format[typescript] 1`] = `
"'async' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | async [index: string]: number
@@ -286,7 +286,7 @@ exports[`snippet: #10 [typescript] format 1`] = `
Cause: 'async' modifier cannot appear on an index signature"
`;
-exports[`snippet: #11 [babel-ts] format 1`] = `
+exports[`snippet: #11 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | const foo: {
> 2 | async [index: string] : string
@@ -295,7 +295,7 @@ exports[`snippet: #11 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #11 [oxc-ts] format 1`] = `
+exports[`snippet: #11 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | async [index: string] : string
@@ -303,7 +303,7 @@ exports[`snippet: #11 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #11 [typescript] format 1`] = `
+exports[`snippet: #11 format[typescript] 1`] = `
"'async' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | async [index: string] : string
@@ -312,7 +312,7 @@ exports[`snippet: #11 [typescript] format 1`] = `
Cause: 'async' modifier cannot appear on an index signature"
`;
-exports[`snippet: #12 [babel-ts] format 1`] = `
+exports[`snippet: #12 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | interface Foo {
> 2 | const method();
@@ -321,7 +321,7 @@ exports[`snippet: #12 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #12 [oxc-ts] format 1`] = `
+exports[`snippet: #12 format[oxc-ts] 1`] = `
"'const' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | const method();
@@ -329,7 +329,7 @@ exports[`snippet: #12 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #12 [typescript] format 1`] = `
+exports[`snippet: #12 format[typescript] 1`] = `
"';' expected. (2:9)
1 | interface Foo {
> 2 | const method();
@@ -338,7 +338,7 @@ exports[`snippet: #12 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #13 [babel-ts] format 1`] = `
+exports[`snippet: #13 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | interface Foo {
> 2 | const property;
@@ -347,7 +347,7 @@ exports[`snippet: #13 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #13 [oxc-ts] format 1`] = `
+exports[`snippet: #13 format[oxc-ts] 1`] = `
"'const' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | const property;
@@ -355,7 +355,7 @@ exports[`snippet: #13 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #13 [typescript] format 1`] = `
+exports[`snippet: #13 format[typescript] 1`] = `
"';' expected. (2:9)
1 | interface Foo {
> 2 | const property;
@@ -364,7 +364,7 @@ exports[`snippet: #13 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #14 [babel-ts] format 1`] = `
+exports[`snippet: #14 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | interface Foo {
> 2 | const [index: string]: number
@@ -373,7 +373,7 @@ exports[`snippet: #14 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #14 [oxc-ts] format 1`] = `
+exports[`snippet: #14 format[oxc-ts] 1`] = `
"'const' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | const [index: string]: number
@@ -381,7 +381,7 @@ exports[`snippet: #14 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #14 [typescript] format 1`] = `
+exports[`snippet: #14 format[typescript] 1`] = `
"';' expected. (2:9)
1 | interface Foo {
> 2 | const [index: string]: number
@@ -390,7 +390,7 @@ exports[`snippet: #14 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #15 [babel-ts] format 1`] = `
+exports[`snippet: #15 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:9)
1 | const foo: {
> 2 | const [index: string] : string
@@ -399,7 +399,7 @@ exports[`snippet: #15 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:8)"
`;
-exports[`snippet: #15 [oxc-ts] format 1`] = `
+exports[`snippet: #15 format[oxc-ts] 1`] = `
"'const' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | const [index: string] : string
@@ -407,7 +407,7 @@ exports[`snippet: #15 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #15 [typescript] format 1`] = `
+exports[`snippet: #15 format[typescript] 1`] = `
"';' expected. (2:9)
1 | const foo: {
> 2 | const [index: string] : string
@@ -416,7 +416,7 @@ exports[`snippet: #15 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #16 [babel-ts] format 1`] = `
+exports[`snippet: #16 format[babel-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | declare method();
@@ -425,7 +425,7 @@ exports[`snippet: #16 [babel-ts] format 1`] = `
Cause: 'declare' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #16 [oxc-ts] format 1`] = `
+exports[`snippet: #16 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | declare method();
@@ -433,7 +433,7 @@ exports[`snippet: #16 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #16 [typescript] format 1`] = `
+exports[`snippet: #16 format[typescript] 1`] = `
"'declare' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | declare method();
@@ -442,7 +442,7 @@ exports[`snippet: #16 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on a type member"
`;
-exports[`snippet: #17 [babel-ts] format 1`] = `
+exports[`snippet: #17 format[babel-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | declare property;
@@ -451,7 +451,7 @@ exports[`snippet: #17 [babel-ts] format 1`] = `
Cause: 'declare' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #17 [oxc-ts] format 1`] = `
+exports[`snippet: #17 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | declare property;
@@ -459,7 +459,7 @@ exports[`snippet: #17 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #17 [typescript] format 1`] = `
+exports[`snippet: #17 format[typescript] 1`] = `
"'declare' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | declare property;
@@ -468,7 +468,7 @@ exports[`snippet: #17 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on a type member"
`;
-exports[`snippet: #18 [babel-ts] format 1`] = `
+exports[`snippet: #18 format[babel-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | declare [index: string]: number
@@ -477,7 +477,7 @@ exports[`snippet: #18 [babel-ts] format 1`] = `
Cause: 'declare' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #18 [oxc-ts] format 1`] = `
+exports[`snippet: #18 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | declare [index: string]: number
@@ -485,7 +485,7 @@ exports[`snippet: #18 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #18 [typescript] format 1`] = `
+exports[`snippet: #18 format[typescript] 1`] = `
"'declare' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | declare [index: string]: number
@@ -494,7 +494,7 @@ exports[`snippet: #18 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on an index signature"
`;
-exports[`snippet: #19 [babel-ts] format 1`] = `
+exports[`snippet: #19 format[babel-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | declare [index: string] : string
@@ -503,7 +503,7 @@ exports[`snippet: #19 [babel-ts] format 1`] = `
Cause: 'declare' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #19 [oxc-ts] format 1`] = `
+exports[`snippet: #19 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | declare [index: string] : string
@@ -511,7 +511,7 @@ exports[`snippet: #19 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #19 [typescript] format 1`] = `
+exports[`snippet: #19 format[typescript] 1`] = `
"'declare' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | declare [index: string] : string
@@ -520,7 +520,7 @@ exports[`snippet: #19 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on an index signature"
`;
-exports[`snippet: #20 [babel-ts] format 1`] = `
+exports[`snippet: #20 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:11)
1 | interface Foo {
> 2 | default method();
@@ -529,7 +529,7 @@ exports[`snippet: #20 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:10)"
`;
-exports[`snippet: #20 [oxc-ts] format 1`] = `
+exports[`snippet: #20 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | default method();
@@ -537,7 +537,7 @@ exports[`snippet: #20 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #20 [typescript] format 1`] = `
+exports[`snippet: #20 format[typescript] 1`] = `
"';' expected. (2:11)
1 | interface Foo {
> 2 | default method();
@@ -546,7 +546,7 @@ exports[`snippet: #20 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #21 [babel-ts] format 1`] = `
+exports[`snippet: #21 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:11)
1 | interface Foo {
> 2 | default property;
@@ -555,7 +555,7 @@ exports[`snippet: #21 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:10)"
`;
-exports[`snippet: #21 [oxc-ts] format 1`] = `
+exports[`snippet: #21 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | default property;
@@ -563,7 +563,7 @@ exports[`snippet: #21 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #21 [typescript] format 1`] = `
+exports[`snippet: #21 format[typescript] 1`] = `
"';' expected. (2:11)
1 | interface Foo {
> 2 | default property;
@@ -572,7 +572,7 @@ exports[`snippet: #21 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #22 [babel-ts] format 1`] = `
+exports[`snippet: #22 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:11)
1 | interface Foo {
> 2 | default [index: string]: number
@@ -581,7 +581,7 @@ exports[`snippet: #22 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:10)"
`;
-exports[`snippet: #22 [oxc-ts] format 1`] = `
+exports[`snippet: #22 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | default [index: string]: number
@@ -589,7 +589,7 @@ exports[`snippet: #22 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #22 [typescript] format 1`] = `
+exports[`snippet: #22 format[typescript] 1`] = `
"';' expected. (2:11)
1 | interface Foo {
> 2 | default [index: string]: number
@@ -598,7 +598,7 @@ exports[`snippet: #22 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #23 [babel-ts] format 1`] = `
+exports[`snippet: #23 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:11)
1 | const foo: {
> 2 | default [index: string] : string
@@ -607,7 +607,7 @@ exports[`snippet: #23 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:10)"
`;
-exports[`snippet: #23 [oxc-ts] format 1`] = `
+exports[`snippet: #23 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | default [index: string] : string
@@ -615,7 +615,7 @@ exports[`snippet: #23 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #23 [typescript] format 1`] = `
+exports[`snippet: #23 format[typescript] 1`] = `
"';' expected. (2:11)
1 | const foo: {
> 2 | default [index: string] : string
@@ -624,7 +624,7 @@ exports[`snippet: #23 [typescript] format 1`] = `
Cause: ';' expected."
`;
-exports[`snippet: #24 [babel-ts] format 1`] = `
+exports[`snippet: #24 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:10)
1 | interface Foo {
> 2 | export method();
@@ -633,7 +633,7 @@ exports[`snippet: #24 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:9)"
`;
-exports[`snippet: #24 [oxc-ts] format 1`] = `
+exports[`snippet: #24 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | export method();
@@ -641,7 +641,7 @@ exports[`snippet: #24 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #24 [typescript] format 1`] = `
+exports[`snippet: #24 format[typescript] 1`] = `
"'export' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | export method();
@@ -650,7 +650,7 @@ exports[`snippet: #24 [typescript] format 1`] = `
Cause: 'export' modifier cannot appear on a type member"
`;
-exports[`snippet: #25 [babel-ts] format 1`] = `
+exports[`snippet: #25 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:10)
1 | interface Foo {
> 2 | export property;
@@ -659,7 +659,7 @@ exports[`snippet: #25 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:9)"
`;
-exports[`snippet: #25 [oxc-ts] format 1`] = `
+exports[`snippet: #25 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | export property;
@@ -667,7 +667,7 @@ exports[`snippet: #25 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #25 [typescript] format 1`] = `
+exports[`snippet: #25 format[typescript] 1`] = `
"'export' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | export property;
@@ -676,7 +676,7 @@ exports[`snippet: #25 [typescript] format 1`] = `
Cause: 'export' modifier cannot appear on a type member"
`;
-exports[`snippet: #26 [babel-ts] format 1`] = `
+exports[`snippet: #26 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:10)
1 | interface Foo {
> 2 | export [index: string]: number
@@ -685,7 +685,7 @@ exports[`snippet: #26 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:9)"
`;
-exports[`snippet: #26 [oxc-ts] format 1`] = `
+exports[`snippet: #26 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | export [index: string]: number
@@ -693,7 +693,7 @@ exports[`snippet: #26 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #26 [typescript] format 1`] = `
+exports[`snippet: #26 format[typescript] 1`] = `
"'export' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | export [index: string]: number
@@ -702,7 +702,7 @@ exports[`snippet: #26 [typescript] format 1`] = `
Cause: 'export' modifier cannot appear on an index signature"
`;
-exports[`snippet: #27 [babel-ts] format 1`] = `
+exports[`snippet: #27 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:10)
1 | const foo: {
> 2 | export [index: string] : string
@@ -711,7 +711,7 @@ exports[`snippet: #27 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:9)"
`;
-exports[`snippet: #27 [oxc-ts] format 1`] = `
+exports[`snippet: #27 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | export [index: string] : string
@@ -719,7 +719,7 @@ exports[`snippet: #27 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #27 [typescript] format 1`] = `
+exports[`snippet: #27 format[typescript] 1`] = `
"'export' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | export [index: string] : string
@@ -728,7 +728,7 @@ exports[`snippet: #27 [typescript] format 1`] = `
Cause: 'export' modifier cannot appear on an index signature"
`;
-exports[`snippet: #28 [babel-ts] format 1`] = `
+exports[`snippet: #28 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:6)
1 | interface Foo {
> 2 | in method();
@@ -737,7 +737,7 @@ exports[`snippet: #28 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:5)"
`;
-exports[`snippet: #28 [oxc-ts] format 1`] = `
+exports[`snippet: #28 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | in method();
@@ -745,7 +745,7 @@ exports[`snippet: #28 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #28 [typescript] format 1`] = `
+exports[`snippet: #28 format[typescript] 1`] = `
"'in' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | in method();
@@ -754,7 +754,7 @@ exports[`snippet: #28 [typescript] format 1`] = `
Cause: 'in' modifier cannot appear on a type member"
`;
-exports[`snippet: #29 [babel-ts] format 1`] = `
+exports[`snippet: #29 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:6)
1 | interface Foo {
> 2 | in property;
@@ -763,7 +763,7 @@ exports[`snippet: #29 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:5)"
`;
-exports[`snippet: #29 [oxc-ts] format 1`] = `
+exports[`snippet: #29 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | in property;
@@ -771,7 +771,7 @@ exports[`snippet: #29 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #29 [typescript] format 1`] = `
+exports[`snippet: #29 format[typescript] 1`] = `
"'in' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | in property;
@@ -780,7 +780,7 @@ exports[`snippet: #29 [typescript] format 1`] = `
Cause: 'in' modifier cannot appear on a type member"
`;
-exports[`snippet: #30 [babel-ts] format 1`] = `
+exports[`snippet: #30 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:6)
1 | interface Foo {
> 2 | in [index: string]: number
@@ -789,7 +789,7 @@ exports[`snippet: #30 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:5)"
`;
-exports[`snippet: #30 [oxc-ts] format 1`] = `
+exports[`snippet: #30 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | in [index: string]: number
@@ -797,7 +797,7 @@ exports[`snippet: #30 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #30 [typescript] format 1`] = `
+exports[`snippet: #30 format[typescript] 1`] = `
"'in' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | in [index: string]: number
@@ -806,7 +806,7 @@ exports[`snippet: #30 [typescript] format 1`] = `
Cause: 'in' modifier cannot appear on an index signature"
`;
-exports[`snippet: #31 [babel-ts] format 1`] = `
+exports[`snippet: #31 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:6)
1 | const foo: {
> 2 | in [index: string] : string
@@ -815,7 +815,7 @@ exports[`snippet: #31 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:5)"
`;
-exports[`snippet: #31 [oxc-ts] format 1`] = `
+exports[`snippet: #31 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | in [index: string] : string
@@ -823,7 +823,7 @@ exports[`snippet: #31 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #31 [typescript] format 1`] = `
+exports[`snippet: #31 format[typescript] 1`] = `
"'in' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | in [index: string] : string
@@ -832,7 +832,7 @@ exports[`snippet: #31 [typescript] format 1`] = `
Cause: 'in' modifier cannot appear on an index signature"
`;
-exports[`snippet: #32 [babel-ts] format 1`] = `
+exports[`snippet: #32 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:7)
1 | interface Foo {
> 2 | out method();
@@ -841,7 +841,7 @@ exports[`snippet: #32 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:6)"
`;
-exports[`snippet: #32 [oxc-ts] format 1`] = `
+exports[`snippet: #32 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | out method();
@@ -849,7 +849,7 @@ exports[`snippet: #32 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #32 [typescript] format 1`] = `
+exports[`snippet: #32 format[typescript] 1`] = `
"'out' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | out method();
@@ -858,7 +858,7 @@ exports[`snippet: #32 [typescript] format 1`] = `
Cause: 'out' modifier cannot appear on a type member"
`;
-exports[`snippet: #33 [babel-ts] format 1`] = `
+exports[`snippet: #33 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:7)
1 | interface Foo {
> 2 | out property;
@@ -867,7 +867,7 @@ exports[`snippet: #33 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:6)"
`;
-exports[`snippet: #33 [oxc-ts] format 1`] = `
+exports[`snippet: #33 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | out property;
@@ -875,7 +875,7 @@ exports[`snippet: #33 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #33 [typescript] format 1`] = `
+exports[`snippet: #33 format[typescript] 1`] = `
"'out' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | out property;
@@ -884,7 +884,7 @@ exports[`snippet: #33 [typescript] format 1`] = `
Cause: 'out' modifier cannot appear on a type member"
`;
-exports[`snippet: #34 [babel-ts] format 1`] = `
+exports[`snippet: #34 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:7)
1 | interface Foo {
> 2 | out [index: string]: number
@@ -893,7 +893,7 @@ exports[`snippet: #34 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:6)"
`;
-exports[`snippet: #34 [oxc-ts] format 1`] = `
+exports[`snippet: #34 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | out [index: string]: number
@@ -901,7 +901,7 @@ exports[`snippet: #34 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #34 [typescript] format 1`] = `
+exports[`snippet: #34 format[typescript] 1`] = `
"'out' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | out [index: string]: number
@@ -910,7 +910,7 @@ exports[`snippet: #34 [typescript] format 1`] = `
Cause: 'out' modifier cannot appear on an index signature"
`;
-exports[`snippet: #35 [babel-ts] format 1`] = `
+exports[`snippet: #35 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (2:7)
1 | const foo: {
> 2 | out [index: string] : string
@@ -919,7 +919,7 @@ exports[`snippet: #35 [babel-ts] format 1`] = `
Cause: Unexpected token, expected ";" (2:6)"
`;
-exports[`snippet: #35 [oxc-ts] format 1`] = `
+exports[`snippet: #35 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | out [index: string] : string
@@ -927,7 +927,7 @@ exports[`snippet: #35 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #35 [typescript] format 1`] = `
+exports[`snippet: #35 format[typescript] 1`] = `
"'out' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | out [index: string] : string
@@ -936,7 +936,7 @@ exports[`snippet: #35 [typescript] format 1`] = `
Cause: 'out' modifier cannot appear on an index signature"
`;
-exports[`snippet: #36 [babel-ts] format 1`] = `
+exports[`snippet: #36 format[babel-ts] 1`] = `
"'override' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | override method();
@@ -945,7 +945,7 @@ exports[`snippet: #36 [babel-ts] format 1`] = `
Cause: 'override' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #36 [oxc-ts] format 1`] = `
+exports[`snippet: #36 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | override method();
@@ -953,7 +953,7 @@ exports[`snippet: #36 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #36 [typescript] format 1`] = `
+exports[`snippet: #36 format[typescript] 1`] = `
"'override' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | override method();
@@ -962,7 +962,7 @@ exports[`snippet: #36 [typescript] format 1`] = `
Cause: 'override' modifier cannot appear on a type member"
`;
-exports[`snippet: #37 [babel-ts] format 1`] = `
+exports[`snippet: #37 format[babel-ts] 1`] = `
"'override' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | override property;
@@ -971,7 +971,7 @@ exports[`snippet: #37 [babel-ts] format 1`] = `
Cause: 'override' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #37 [oxc-ts] format 1`] = `
+exports[`snippet: #37 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | override property;
@@ -979,7 +979,7 @@ exports[`snippet: #37 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #37 [typescript] format 1`] = `
+exports[`snippet: #37 format[typescript] 1`] = `
"'override' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | override property;
@@ -988,7 +988,7 @@ exports[`snippet: #37 [typescript] format 1`] = `
Cause: 'override' modifier cannot appear on a type member"
`;
-exports[`snippet: #38 [babel-ts] format 1`] = `
+exports[`snippet: #38 format[babel-ts] 1`] = `
"'override' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | override [index: string]: number
@@ -997,7 +997,7 @@ exports[`snippet: #38 [babel-ts] format 1`] = `
Cause: 'override' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #38 [oxc-ts] format 1`] = `
+exports[`snippet: #38 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | override [index: string]: number
@@ -1005,7 +1005,7 @@ exports[`snippet: #38 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #38 [typescript] format 1`] = `
+exports[`snippet: #38 format[typescript] 1`] = `
"'override' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | override [index: string]: number
@@ -1014,7 +1014,7 @@ exports[`snippet: #38 [typescript] format 1`] = `
Cause: 'override' modifier cannot appear on an index signature"
`;
-exports[`snippet: #39 [babel-ts] format 1`] = `
+exports[`snippet: #39 format[babel-ts] 1`] = `
"'override' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | override [index: string] : string
@@ -1023,7 +1023,7 @@ exports[`snippet: #39 [babel-ts] format 1`] = `
Cause: 'override' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #39 [oxc-ts] format 1`] = `
+exports[`snippet: #39 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | override [index: string] : string
@@ -1031,7 +1031,7 @@ exports[`snippet: #39 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #39 [typescript] format 1`] = `
+exports[`snippet: #39 format[typescript] 1`] = `
"'override' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | override [index: string] : string
@@ -1040,7 +1040,7 @@ exports[`snippet: #39 [typescript] format 1`] = `
Cause: 'override' modifier cannot appear on an index signature"
`;
-exports[`snippet: #40 [babel-ts] format 1`] = `
+exports[`snippet: #40 format[babel-ts] 1`] = `
"'private' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | private method();
@@ -1049,7 +1049,7 @@ exports[`snippet: #40 [babel-ts] format 1`] = `
Cause: 'private' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #40 [oxc-ts] format 1`] = `
+exports[`snippet: #40 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | private method();
@@ -1057,7 +1057,7 @@ exports[`snippet: #40 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #40 [typescript] format 1`] = `
+exports[`snippet: #40 format[typescript] 1`] = `
"'private' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | private method();
@@ -1066,7 +1066,7 @@ exports[`snippet: #40 [typescript] format 1`] = `
Cause: 'private' modifier cannot appear on a type member"
`;
-exports[`snippet: #41 [babel-ts] format 1`] = `
+exports[`snippet: #41 format[babel-ts] 1`] = `
"'private' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | private property;
@@ -1075,7 +1075,7 @@ exports[`snippet: #41 [babel-ts] format 1`] = `
Cause: 'private' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #41 [oxc-ts] format 1`] = `
+exports[`snippet: #41 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | private property;
@@ -1083,7 +1083,7 @@ exports[`snippet: #41 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #41 [typescript] format 1`] = `
+exports[`snippet: #41 format[typescript] 1`] = `
"'private' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | private property;
@@ -1092,7 +1092,7 @@ exports[`snippet: #41 [typescript] format 1`] = `
Cause: 'private' modifier cannot appear on a type member"
`;
-exports[`snippet: #42 [babel-ts] format 1`] = `
+exports[`snippet: #42 format[babel-ts] 1`] = `
"'private' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | private [index: string]: number
@@ -1101,7 +1101,7 @@ exports[`snippet: #42 [babel-ts] format 1`] = `
Cause: 'private' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #42 [oxc-ts] format 1`] = `
+exports[`snippet: #42 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | private [index: string]: number
@@ -1109,7 +1109,7 @@ exports[`snippet: #42 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #42 [typescript] format 1`] = `
+exports[`snippet: #42 format[typescript] 1`] = `
"'private' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | private [index: string]: number
@@ -1118,7 +1118,7 @@ exports[`snippet: #42 [typescript] format 1`] = `
Cause: 'private' modifier cannot appear on an index signature"
`;
-exports[`snippet: #43 [babel-ts] format 1`] = `
+exports[`snippet: #43 format[babel-ts] 1`] = `
"'private' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | private [index: string] : string
@@ -1127,7 +1127,7 @@ exports[`snippet: #43 [babel-ts] format 1`] = `
Cause: 'private' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #43 [oxc-ts] format 1`] = `
+exports[`snippet: #43 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | private [index: string] : string
@@ -1135,7 +1135,7 @@ exports[`snippet: #43 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #43 [typescript] format 1`] = `
+exports[`snippet: #43 format[typescript] 1`] = `
"'private' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | private [index: string] : string
@@ -1144,7 +1144,7 @@ exports[`snippet: #43 [typescript] format 1`] = `
Cause: 'private' modifier cannot appear on an index signature"
`;
-exports[`snippet: #44 [babel-ts] format 1`] = `
+exports[`snippet: #44 format[babel-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | protected method();
@@ -1153,7 +1153,7 @@ exports[`snippet: #44 [babel-ts] format 1`] = `
Cause: 'protected' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #44 [oxc-ts] format 1`] = `
+exports[`snippet: #44 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | protected method();
@@ -1161,7 +1161,7 @@ exports[`snippet: #44 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #44 [typescript] format 1`] = `
+exports[`snippet: #44 format[typescript] 1`] = `
"'protected' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | protected method();
@@ -1170,7 +1170,7 @@ exports[`snippet: #44 [typescript] format 1`] = `
Cause: 'protected' modifier cannot appear on a type member"
`;
-exports[`snippet: #45 [babel-ts] format 1`] = `
+exports[`snippet: #45 format[babel-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | protected property;
@@ -1179,7 +1179,7 @@ exports[`snippet: #45 [babel-ts] format 1`] = `
Cause: 'protected' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #45 [oxc-ts] format 1`] = `
+exports[`snippet: #45 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | protected property;
@@ -1187,7 +1187,7 @@ exports[`snippet: #45 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #45 [typescript] format 1`] = `
+exports[`snippet: #45 format[typescript] 1`] = `
"'protected' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | protected property;
@@ -1196,7 +1196,7 @@ exports[`snippet: #45 [typescript] format 1`] = `
Cause: 'protected' modifier cannot appear on a type member"
`;
-exports[`snippet: #46 [babel-ts] format 1`] = `
+exports[`snippet: #46 format[babel-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | protected [index: string]: number
@@ -1205,7 +1205,7 @@ exports[`snippet: #46 [babel-ts] format 1`] = `
Cause: 'protected' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #46 [oxc-ts] format 1`] = `
+exports[`snippet: #46 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | protected [index: string]: number
@@ -1213,7 +1213,7 @@ exports[`snippet: #46 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #46 [typescript] format 1`] = `
+exports[`snippet: #46 format[typescript] 1`] = `
"'protected' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | protected [index: string]: number
@@ -1222,7 +1222,7 @@ exports[`snippet: #46 [typescript] format 1`] = `
Cause: 'protected' modifier cannot appear on an index signature"
`;
-exports[`snippet: #47 [babel-ts] format 1`] = `
+exports[`snippet: #47 format[babel-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | protected [index: string] : string
@@ -1231,7 +1231,7 @@ exports[`snippet: #47 [babel-ts] format 1`] = `
Cause: 'protected' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #47 [oxc-ts] format 1`] = `
+exports[`snippet: #47 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | protected [index: string] : string
@@ -1239,7 +1239,7 @@ exports[`snippet: #47 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #47 [typescript] format 1`] = `
+exports[`snippet: #47 format[typescript] 1`] = `
"'protected' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | protected [index: string] : string
@@ -1248,7 +1248,7 @@ exports[`snippet: #47 [typescript] format 1`] = `
Cause: 'protected' modifier cannot appear on an index signature"
`;
-exports[`snippet: #48 [babel-ts] format 1`] = `
+exports[`snippet: #48 format[babel-ts] 1`] = `
"'public' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | public method();
@@ -1257,7 +1257,7 @@ exports[`snippet: #48 [babel-ts] format 1`] = `
Cause: 'public' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #48 [oxc-ts] format 1`] = `
+exports[`snippet: #48 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | public method();
@@ -1265,7 +1265,7 @@ exports[`snippet: #48 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #48 [typescript] format 1`] = `
+exports[`snippet: #48 format[typescript] 1`] = `
"'public' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | public method();
@@ -1274,7 +1274,7 @@ exports[`snippet: #48 [typescript] format 1`] = `
Cause: 'public' modifier cannot appear on a type member"
`;
-exports[`snippet: #49 [babel-ts] format 1`] = `
+exports[`snippet: #49 format[babel-ts] 1`] = `
"'public' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | public property;
@@ -1283,7 +1283,7 @@ exports[`snippet: #49 [babel-ts] format 1`] = `
Cause: 'public' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #49 [oxc-ts] format 1`] = `
+exports[`snippet: #49 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | public property;
@@ -1291,7 +1291,7 @@ exports[`snippet: #49 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #49 [typescript] format 1`] = `
+exports[`snippet: #49 format[typescript] 1`] = `
"'public' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | public property;
@@ -1300,7 +1300,7 @@ exports[`snippet: #49 [typescript] format 1`] = `
Cause: 'public' modifier cannot appear on a type member"
`;
-exports[`snippet: #50 [babel-ts] format 1`] = `
+exports[`snippet: #50 format[babel-ts] 1`] = `
"'public' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | public [index: string]: number
@@ -1309,7 +1309,7 @@ exports[`snippet: #50 [babel-ts] format 1`] = `
Cause: 'public' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #50 [oxc-ts] format 1`] = `
+exports[`snippet: #50 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | public [index: string]: number
@@ -1317,7 +1317,7 @@ exports[`snippet: #50 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #50 [typescript] format 1`] = `
+exports[`snippet: #50 format[typescript] 1`] = `
"'public' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | public [index: string]: number
@@ -1326,7 +1326,7 @@ exports[`snippet: #50 [typescript] format 1`] = `
Cause: 'public' modifier cannot appear on an index signature"
`;
-exports[`snippet: #51 [babel-ts] format 1`] = `
+exports[`snippet: #51 format[babel-ts] 1`] = `
"'public' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | public [index: string] : string
@@ -1335,7 +1335,7 @@ exports[`snippet: #51 [babel-ts] format 1`] = `
Cause: 'public' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #51 [oxc-ts] format 1`] = `
+exports[`snippet: #51 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | public [index: string] : string
@@ -1343,7 +1343,7 @@ exports[`snippet: #51 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #51 [typescript] format 1`] = `
+exports[`snippet: #51 format[typescript] 1`] = `
"'public' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | public [index: string] : string
@@ -1352,7 +1352,7 @@ exports[`snippet: #51 [typescript] format 1`] = `
Cause: 'public' modifier cannot appear on an index signature"
`;
-exports[`snippet: #52 [babel-ts] format 1`] = `
+exports[`snippet: #52 format[babel-ts] 1`] = `
"'static' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | static method();
@@ -1361,7 +1361,7 @@ exports[`snippet: #52 [babel-ts] format 1`] = `
Cause: 'static' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #52 [oxc-ts] format 1`] = `
+exports[`snippet: #52 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | static method();
@@ -1369,7 +1369,7 @@ exports[`snippet: #52 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #52 [typescript] format 1`] = `
+exports[`snippet: #52 format[typescript] 1`] = `
"'static' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | static method();
@@ -1378,7 +1378,7 @@ exports[`snippet: #52 [typescript] format 1`] = `
Cause: 'static' modifier cannot appear on a type member"
`;
-exports[`snippet: #53 [babel-ts] format 1`] = `
+exports[`snippet: #53 format[babel-ts] 1`] = `
"'static' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | static property;
@@ -1387,7 +1387,7 @@ exports[`snippet: #53 [babel-ts] format 1`] = `
Cause: 'static' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #53 [oxc-ts] format 1`] = `
+exports[`snippet: #53 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | static property;
@@ -1395,7 +1395,7 @@ exports[`snippet: #53 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #53 [typescript] format 1`] = `
+exports[`snippet: #53 format[typescript] 1`] = `
"'static' modifier cannot appear on a type member (2:3)
1 | interface Foo {
> 2 | static property;
@@ -1404,7 +1404,7 @@ exports[`snippet: #53 [typescript] format 1`] = `
Cause: 'static' modifier cannot appear on a type member"
`;
-exports[`snippet: #54 [babel-ts] format 1`] = `
+exports[`snippet: #54 format[babel-ts] 1`] = `
"'static' modifier cannot appear on a type member. (2:3)
1 | interface Foo {
> 2 | static [index: string]: number
@@ -1413,7 +1413,7 @@ exports[`snippet: #54 [babel-ts] format 1`] = `
Cause: 'static' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #54 [oxc-ts] format 1`] = `
+exports[`snippet: #54 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on an index signature. (2:3)
1 | interface Foo {
> 2 | static [index: string]: number
@@ -1421,7 +1421,7 @@ exports[`snippet: #54 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #54 [typescript] format 1`] = `
+exports[`snippet: #54 format[typescript] 1`] = `
"'static' modifier cannot appear on an index signature (2:3)
1 | interface Foo {
> 2 | static [index: string]: number
@@ -1430,7 +1430,7 @@ exports[`snippet: #54 [typescript] format 1`] = `
Cause: 'static' modifier cannot appear on an index signature"
`;
-exports[`snippet: #55 [babel-ts] format 1`] = `
+exports[`snippet: #55 format[babel-ts] 1`] = `
"'static' modifier cannot appear on a type member. (2:3)
1 | const foo: {
> 2 | static [index: string] : string
@@ -1439,7 +1439,7 @@ exports[`snippet: #55 [babel-ts] format 1`] = `
Cause: 'static' modifier cannot appear on a type member. (2:2)"
`;
-exports[`snippet: #55 [oxc-ts] format 1`] = `
+exports[`snippet: #55 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on an index signature. (2:3)
1 | const foo: {
> 2 | static [index: string] : string
@@ -1447,7 +1447,7 @@ exports[`snippet: #55 [oxc-ts] format 1`] = `
3 | } = {};"
`;
-exports[`snippet: #55 [typescript] format 1`] = `
+exports[`snippet: #55 format[typescript] 1`] = `
"'static' modifier cannot appear on an index signature (2:3)
1 | const foo: {
> 2 | static [index: string] : string
@@ -1456,7 +1456,7 @@ exports[`snippet: #55 [typescript] format 1`] = `
Cause: 'static' modifier cannot appear on an index signature"
`;
-exports[`snippet: #56 [babel-ts] format 1`] = `
+exports[`snippet: #56 format[babel-ts] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (2:3)
1 | interface Foo {
> 2 | readonly method();
@@ -1465,7 +1465,7 @@ exports[`snippet: #56 [babel-ts] format 1`] = `
Cause: 'readonly' modifier can only appear on a property declaration or index signature. (2:2)"
`;
-exports[`snippet: #56 [oxc-ts] format 1`] = `
+exports[`snippet: #56 format[oxc-ts] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (2:3)
1 | interface Foo {
> 2 | readonly method();
@@ -1473,7 +1473,7 @@ exports[`snippet: #56 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #56 [typescript] format 1`] = `
+exports[`snippet: #56 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (2:3)
1 | interface Foo {
> 2 | readonly method();
@@ -1482,507 +1482,507 @@ exports[`snippet: #56 [typescript] format 1`] = `
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #57 [babel-ts] format 1`] = `
+exports[`snippet: #57 format[babel-ts] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:1)
> 1 | abstract interface Foo {}
| ^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration. (1:0)"
`;
-exports[`snippet: #57 [oxc-ts] format 1`] = `
+exports[`snippet: #57 format[oxc-ts] 1`] = `
"'abstract' modifier cannot be used here. (1:1)
> 1 | abstract interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #57 [typescript] format 1`] = `
+exports[`snippet: #57 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:1)
> 1 | abstract interface Foo {}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #58 [babel-ts] format 1`] = `
+exports[`snippet: #58 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | accessor interface Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #58 [oxc-ts] format 1`] = `
+exports[`snippet: #58 format[oxc-ts] 1`] = `
"'accessor' modifier cannot be used here. (1:1)
> 1 | accessor interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #58 [typescript] format 1`] = `
+exports[`snippet: #58 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:1)
> 1 | accessor interface Foo {}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #59 [babel-ts] format 1`] = `
+exports[`snippet: #59 format[babel-ts] 1`] = `
"Missing semicolon. (1:6)
> 1 | async interface Foo {}
| ^
Cause: Missing semicolon. (1:5)"
`;
-exports[`snippet: #59 [oxc-ts] format 1`] = `
+exports[`snippet: #59 format[oxc-ts] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async interface Foo {}
| ^^^^^"
`;
-exports[`snippet: #59 [typescript] format 1`] = `
+exports[`snippet: #59 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async interface Foo {}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #60 [babel-ts] format 1`] = `
+exports[`snippet: #60 format[babel-ts] 1`] = `
"Missing semicolon. (1:16)
> 1 | const interface Foo {}
| ^
Cause: Missing semicolon. (1:15)"
`;
-exports[`snippet: #60 [oxc-ts] format 1`] = `
+exports[`snippet: #60 format[oxc-ts] 1`] = `
"Missing initializer in const declaration (1:7)
> 1 | const interface Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #60 [typescript] format 1`] = `
+exports[`snippet: #60 format[typescript] 1`] = `
"',' expected. (1:17)
> 1 | const interface Foo {}
| ^
Cause: ',' expected."
`;
-exports[`snippet: #61 [babel-ts] format 1`] = `
+exports[`snippet: #61 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default interface Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #61 [oxc-ts] format 1`] = `
+exports[`snippet: #61 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default interface Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #61 [typescript] format 1`] = `
+exports[`snippet: #61 format[typescript] 1`] = `
"'export' expected. (1:1)
> 1 | default interface Foo {}
| ^
Cause: 'export' expected."
`;
-exports[`snippet: #62 [babel-ts] format 1`] = `
+exports[`snippet: #62 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in interface Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #62 [oxc-ts] format 1`] = `
+exports[`snippet: #62 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in interface Foo {}
| ^^"
`;
-exports[`snippet: #62 [typescript] format 1`] = `
+exports[`snippet: #62 format[typescript] 1`] = `
"Expression expected. (1:1)
> 1 | in interface Foo {}
| ^
Cause: Expression expected."
`;
-exports[`snippet: #63 [babel-ts] format 1`] = `
+exports[`snippet: #63 format[babel-ts] 1`] = `
"Missing semicolon. (1:4)
> 1 | out interface Foo {}
| ^
Cause: Missing semicolon. (1:3)"
`;
-exports[`snippet: #63 [oxc-ts] format 1`] = `
+exports[`snippet: #63 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:4)
> 1 | out interface Foo {}
| ^"
`;
-exports[`snippet: #63 [typescript] format 1`] = `
+exports[`snippet: #63 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | out interface Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #64 [babel-ts] format 1`] = `
+exports[`snippet: #64 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | override interface Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #64 [oxc-ts] format 1`] = `
+exports[`snippet: #64 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
> 1 | override interface Foo {}
| ^"
`;
-exports[`snippet: #64 [typescript] format 1`] = `
+exports[`snippet: #64 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | override interface Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #65 [babel-ts] format 1`] = `
+exports[`snippet: #65 format[babel-ts] 1`] = `
"Missing semicolon. (1:8)
> 1 | private interface Foo {}
| ^
Cause: Missing semicolon. (1:7)"
`;
-exports[`snippet: #65 [oxc-ts] format 1`] = `
+exports[`snippet: #65 format[oxc-ts] 1`] = `
"'private' modifier cannot be used here. (1:1)
> 1 | private interface Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #65 [typescript] format 1`] = `
+exports[`snippet: #65 format[typescript] 1`] = `
"'private' modifier cannot appear on a module or namespace element. (1:1)
> 1 | private interface Foo {}
| ^^^^^^^
Cause: 'private' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #66 [babel-ts] format 1`] = `
+exports[`snippet: #66 format[babel-ts] 1`] = `
"Missing semicolon. (1:10)
> 1 | protected interface Foo {}
| ^
Cause: Missing semicolon. (1:9)"
`;
-exports[`snippet: #66 [oxc-ts] format 1`] = `
+exports[`snippet: #66 format[oxc-ts] 1`] = `
"'protected' modifier cannot be used here. (1:1)
> 1 | protected interface Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #66 [typescript] format 1`] = `
+exports[`snippet: #66 format[typescript] 1`] = `
"'protected' modifier cannot appear on a module or namespace element. (1:1)
> 1 | protected interface Foo {}
| ^^^^^^^^^
Cause: 'protected' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #67 [babel-ts] format 1`] = `
+exports[`snippet: #67 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | public interface Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #67 [oxc-ts] format 1`] = `
+exports[`snippet: #67 format[oxc-ts] 1`] = `
"'public' modifier cannot be used here. (1:1)
> 1 | public interface Foo {}
| ^^^^^^"
`;
-exports[`snippet: #67 [typescript] format 1`] = `
+exports[`snippet: #67 format[typescript] 1`] = `
"'public' modifier cannot appear on a module or namespace element. (1:1)
> 1 | public interface Foo {}
| ^^^^^^
Cause: 'public' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #68 [babel-ts] format 1`] = `
+exports[`snippet: #68 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | readonly interface Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #68 [oxc-ts] format 1`] = `
+exports[`snippet: #68 format[oxc-ts] 1`] = `
"'readonly' modifier cannot be used here. (1:1)
> 1 | readonly interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #68 [typescript] format 1`] = `
+exports[`snippet: #68 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (1:1)
> 1 | readonly interface Foo {}
| ^^^^^^^^
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #69 [babel-ts] format 1`] = `
+exports[`snippet: #69 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | static interface Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #69 [oxc-ts] format 1`] = `
+exports[`snippet: #69 format[oxc-ts] 1`] = `
"'static' modifier cannot be used here. (1:1)
> 1 | static interface Foo {}
| ^^^^^^"
`;
-exports[`snippet: #69 [typescript] format 1`] = `
+exports[`snippet: #69 format[typescript] 1`] = `
"'static' modifier cannot appear on a module or namespace element. (1:1)
> 1 | static interface Foo {}
| ^^^^^^
Cause: 'static' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #70 [babel-ts] format 1`] = `
+exports[`snippet: #70 format[babel-ts] 1`] = `
"'abstract' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'abstract' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #70 [oxc-ts] format 1`] = `
+exports[`snippet: #70 format[oxc-ts] 1`] = `
"'abstract' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #70 [typescript] format 1`] = `
+exports[`snippet: #70 format[typescript] 1`] = `
"'abstract' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^^
Cause: 'abstract' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #71 [babel-ts] format 1`] = `
+exports[`snippet: #71 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:24)
> 1 | interface Foo {}
| ^
Cause: Unexpected token, expected "," (1:23)"
`;
-exports[`snippet: #71 [oxc-ts] format 1`] = `
+exports[`snippet: #71 format[oxc-ts] 1`] = `
"'accessor' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #71 [typescript] format 1`] = `
+exports[`snippet: #71 format[typescript] 1`] = `
"'accessor' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^^
Cause: 'accessor' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #72 [babel-ts] format 1`] = `
+exports[`snippet: #72 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:21)
> 1 | interface Foo {}
| ^
Cause: Unexpected token, expected "," (1:20)"
`;
-exports[`snippet: #72 [oxc-ts] format 1`] = `
+exports[`snippet: #72 format[oxc-ts] 1`] = `
"'async' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^"
`;
-exports[`snippet: #72 [typescript] format 1`] = `
+exports[`snippet: #72 format[typescript] 1`] = `
"'async' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^
Cause: 'async' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #73 [babel-ts] format 1`] = `
+exports[`snippet: #73 format[babel-ts] 1`] = `
"'declare' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'declare' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #73 [oxc-ts] format 1`] = `
+exports[`snippet: #73 format[oxc-ts] 1`] = `
"'declare' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #73 [typescript] format 1`] = `
+exports[`snippet: #73 format[typescript] 1`] = `
"'declare' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #74 [babel-ts] format 1`] = `
+exports[`snippet: #74 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:23)
> 1 | interface Foo {}
| ^
Cause: Unexpected token, expected "," (1:22)"
`;
-exports[`snippet: #74 [oxc-ts] format 1`] = `
+exports[`snippet: #74 format[oxc-ts] 1`] = `
"'default' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #74 [typescript] format 1`] = `
+exports[`snippet: #74 format[typescript] 1`] = `
"Type parameter declaration expected. (1:15)
> 1 | interface Foo {}
| ^
Cause: Type parameter declaration expected."
`;
-exports[`snippet: #75 [babel-ts] format 1`] = `
+exports[`snippet: #75 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:22)
> 1 | interface Foo {}
| ^
Cause: Unexpected token, expected "," (1:21)"
`;
-exports[`snippet: #75 [oxc-ts] format 1`] = `
+exports[`snippet: #75 format[oxc-ts] 1`] = `
"'export' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^"
`;
-exports[`snippet: #75 [typescript] format 1`] = `
+exports[`snippet: #75 format[typescript] 1`] = `
"Type parameter declaration expected. (1:15)
> 1 | interface Foo {}
| ^
Cause: Type parameter declaration expected."
`;
-exports[`snippet: #76 [babel-ts] format 1`] = `
+exports[`snippet: #76 format[babel-ts] 1`] = `
"'override' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'override' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #76 [oxc-ts] format 1`] = `
+exports[`snippet: #76 format[oxc-ts] 1`] = `
"'override' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #76 [typescript] format 1`] = `
+exports[`snippet: #76 format[typescript] 1`] = `
"'override' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^^
Cause: 'override' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #77 [babel-ts] format 1`] = `
+exports[`snippet: #77 format[babel-ts] 1`] = `
"'private' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'private' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #77 [oxc-ts] format 1`] = `
+exports[`snippet: #77 format[oxc-ts] 1`] = `
"'private' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #77 [typescript] format 1`] = `
+exports[`snippet: #77 format[typescript] 1`] = `
"'private' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^
Cause: 'private' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #78 [babel-ts] format 1`] = `
+exports[`snippet: #78 format[babel-ts] 1`] = `
"'protected' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'protected' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #78 [oxc-ts] format 1`] = `
+exports[`snippet: #78 format[oxc-ts] 1`] = `
"'protected' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #78 [typescript] format 1`] = `
+exports[`snippet: #78 format[typescript] 1`] = `
"'protected' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^^^
Cause: 'protected' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #79 [babel-ts] format 1`] = `
+exports[`snippet: #79 format[babel-ts] 1`] = `
"'public' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'public' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #79 [oxc-ts] format 1`] = `
+exports[`snippet: #79 format[oxc-ts] 1`] = `
"'public' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^"
`;
-exports[`snippet: #79 [typescript] format 1`] = `
+exports[`snippet: #79 format[typescript] 1`] = `
"'public' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^
Cause: 'public' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #80 [babel-ts] format 1`] = `
+exports[`snippet: #80 format[babel-ts] 1`] = `
"'readonly' modifier cannot appear on a type parameter. (1:15)
> 1 | interface Foo {}
| ^
Cause: 'readonly' modifier cannot appear on a type parameter. (1:14)"
`;
-exports[`snippet: #80 [oxc-ts] format 1`] = `
+exports[`snippet: #80 format[oxc-ts] 1`] = `
"'readonly' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #80 [typescript] format 1`] = `
+exports[`snippet: #80 format[typescript] 1`] = `
"'readonly' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^^^
Cause: 'readonly' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #81 [babel-ts] format 1`] = `
+exports[`snippet: #81 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:22)
> 1 | interface Foo {}
| ^
Cause: Unexpected token, expected "," (1:21)"
`;
-exports[`snippet: #81 [oxc-ts] format 1`] = `
+exports[`snippet: #81 format[oxc-ts] 1`] = `
"'static' modifier cannot be used on a type parameter. (1:15)
> 1 | interface Foo {}
| ^^^^^^"
`;
-exports[`snippet: #81 [typescript] format 1`] = `
+exports[`snippet: #81 format[typescript] 1`] = `
"'static' modifier cannot appear on a type parameter (1:15)
> 1 | interface Foo {}
| ^^^^^^
Cause: 'static' modifier cannot appear on a type parameter"
`;
-exports[`snippet: #82 [babel-ts] format 1`] = `
+exports[`snippet: #82 format[babel-ts] 1`] = `
"Class methods cannot have the 'declare' modifier. (2:3)
1 | class Foo {
> 2 | declare method() {}
@@ -1991,7 +1991,7 @@ exports[`snippet: #82 [babel-ts] format 1`] = `
Cause: Class methods cannot have the 'declare' modifier. (2:2)"
`;
-exports[`snippet: #82 [oxc-ts] format 1`] = `
+exports[`snippet: #82 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on class elements of this kind. (2:3)
1 | class Foo {
> 2 | declare method() {}
@@ -1999,7 +1999,7 @@ exports[`snippet: #82 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #82 [typescript] format 1`] = `
+exports[`snippet: #82 format[typescript] 1`] = `
"'declare' modifier cannot appear on class elements of this kind. (2:3)
1 | class Foo {
> 2 | declare method() {}
@@ -2008,7 +2008,7 @@ exports[`snippet: #82 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on class elements of this kind."
`;
-exports[`snippet: #83 [babel-ts] format 1`] = `
+exports[`snippet: #83 format[babel-ts] 1`] = `
"Class methods cannot have the 'readonly' modifier. (2:3)
1 | class Foo {
> 2 | readonly method() {}
@@ -2017,7 +2017,7 @@ exports[`snippet: #83 [babel-ts] format 1`] = `
Cause: Class methods cannot have the 'readonly' modifier. (2:2)"
`;
-exports[`snippet: #83 [oxc-ts] format 1`] = `
+exports[`snippet: #83 format[oxc-ts] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (2:3)
1 | class Foo {
> 2 | readonly method() {}
@@ -2025,7 +2025,7 @@ exports[`snippet: #83 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #83 [typescript] format 1`] = `
+exports[`snippet: #83 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (2:3)
1 | class Foo {
> 2 | readonly method() {}
@@ -2034,7 +2034,7 @@ exports[`snippet: #83 [typescript] format 1`] = `
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #84 [babel-ts] format 1`] = `
+exports[`snippet: #84 format[babel-ts] 1`] = `
"'declare' is not allowed in getters. (2:3)
1 | class Foo {
> 2 | declare get getter() {}
@@ -2043,7 +2043,7 @@ exports[`snippet: #84 [babel-ts] format 1`] = `
Cause: 'declare' is not allowed in getters. (2:2)"
`;
-exports[`snippet: #84 [oxc-ts] format 1`] = `
+exports[`snippet: #84 format[oxc-ts] 1`] = `
"'declare' modifier cannot be used here. (2:3)
1 | class Foo {
> 2 | declare get getter() {}
@@ -2051,7 +2051,7 @@ exports[`snippet: #84 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #84 [typescript] format 1`] = `
+exports[`snippet: #84 format[typescript] 1`] = `
"'declare' modifier cannot appear on class elements of this kind. (2:3)
1 | class Foo {
> 2 | declare get getter() {}
@@ -2060,7 +2060,7 @@ exports[`snippet: #84 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on class elements of this kind."
`;
-exports[`snippet: #85 [babel-ts] format 1`] = `
+exports[`snippet: #85 format[babel-ts] 1`] = `
"'declare' is not allowed in setters. (2:3)
1 | class Foo {
> 2 | declare set setter(v) {}
@@ -2069,7 +2069,7 @@ exports[`snippet: #85 [babel-ts] format 1`] = `
Cause: 'declare' is not allowed in setters. (2:2)"
`;
-exports[`snippet: #85 [oxc-ts] format 1`] = `
+exports[`snippet: #85 format[oxc-ts] 1`] = `
"'declare' modifier cannot be used here. (2:3)
1 | class Foo {
> 2 | declare set setter(v) {}
@@ -2077,7 +2077,7 @@ exports[`snippet: #85 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #85 [typescript] format 1`] = `
+exports[`snippet: #85 format[typescript] 1`] = `
"'declare' modifier cannot appear on class elements of this kind. (2:3)
1 | class Foo {
> 2 | declare set setter(v) {}
@@ -2086,1927 +2086,1927 @@ exports[`snippet: #85 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on class elements of this kind."
`;
-exports[`snippet: #86 [babel-ts] format 1`] = `
+exports[`snippet: #86 format[babel-ts] 1`] = `
"Unexpected token, expected "class" (1:10)
> 1 | abstract module Foo {}
| ^
Cause: Unexpected token, expected "class" (1:9)"
`;
-exports[`snippet: #86 [oxc-ts] format 1`] = `
+exports[`snippet: #86 format[oxc-ts] 1`] = `
"'abstract' modifier cannot be used here. (1:1)
> 1 | abstract module Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #86 [typescript] format 1`] = `
+exports[`snippet: #86 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:1)
> 1 | abstract module Foo {}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #87 [babel-ts] format 1`] = `
+exports[`snippet: #87 format[babel-ts] 1`] = `
"Unexpected token, expected "class" (1:10)
> 1 | abstract namespace Foo {}
| ^
Cause: Unexpected token, expected "class" (1:9)"
`;
-exports[`snippet: #87 [oxc-ts] format 1`] = `
+exports[`snippet: #87 format[oxc-ts] 1`] = `
"'abstract' modifier cannot be used here. (1:1)
> 1 | abstract namespace Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #87 [typescript] format 1`] = `
+exports[`snippet: #87 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:1)
> 1 | abstract namespace Foo {}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #88 [babel-ts] format 1`] = `
+exports[`snippet: #88 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | accessor module Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #88 [oxc-ts] format 1`] = `
+exports[`snippet: #88 format[oxc-ts] 1`] = `
"'accessor' modifier cannot be used here. (1:1)
> 1 | accessor module Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #88 [typescript] format 1`] = `
+exports[`snippet: #88 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:1)
> 1 | accessor module Foo {}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #89 [babel-ts] format 1`] = `
+exports[`snippet: #89 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | accessor namespace Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #89 [oxc-ts] format 1`] = `
+exports[`snippet: #89 format[oxc-ts] 1`] = `
"'accessor' modifier cannot be used here. (1:1)
> 1 | accessor namespace Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #89 [typescript] format 1`] = `
+exports[`snippet: #89 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:1)
> 1 | accessor namespace Foo {}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #90 [babel-ts] format 1`] = `
+exports[`snippet: #90 format[babel-ts] 1`] = `
"Missing semicolon. (1:6)
> 1 | async module Foo {}
| ^
Cause: Missing semicolon. (1:5)"
`;
-exports[`snippet: #90 [oxc-ts] format 1`] = `
+exports[`snippet: #90 format[oxc-ts] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async module Foo {}
| ^^^^^"
`;
-exports[`snippet: #90 [typescript] format 1`] = `
+exports[`snippet: #90 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async module Foo {}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #91 [babel-ts] format 1`] = `
+exports[`snippet: #91 format[babel-ts] 1`] = `
"Missing semicolon. (1:6)
> 1 | async namespace Foo {}
| ^
Cause: Missing semicolon. (1:5)"
`;
-exports[`snippet: #91 [oxc-ts] format 1`] = `
+exports[`snippet: #91 format[oxc-ts] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async namespace Foo {}
| ^^^^^"
`;
-exports[`snippet: #91 [typescript] format 1`] = `
+exports[`snippet: #91 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async namespace Foo {}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #92 [babel-ts] format 1`] = `
+exports[`snippet: #92 format[babel-ts] 1`] = `
"Missing semicolon. (1:13)
> 1 | const module Foo {}
| ^
Cause: Missing semicolon. (1:12)"
`;
-exports[`snippet: #92 [oxc-ts] format 1`] = `
+exports[`snippet: #92 format[oxc-ts] 1`] = `
"Missing initializer in const declaration (1:7)
> 1 | const module Foo {}
| ^^^^^^"
`;
-exports[`snippet: #92 [typescript] format 1`] = `
+exports[`snippet: #92 format[typescript] 1`] = `
"',' expected. (1:14)
> 1 | const module Foo {}
| ^
Cause: ',' expected."
`;
-exports[`snippet: #93 [babel-ts] format 1`] = `
+exports[`snippet: #93 format[babel-ts] 1`] = `
"Missing semicolon. (1:16)
> 1 | const namespace Foo {}
| ^
Cause: Missing semicolon. (1:15)"
`;
-exports[`snippet: #93 [oxc-ts] format 1`] = `
+exports[`snippet: #93 format[oxc-ts] 1`] = `
"Missing initializer in const declaration (1:7)
> 1 | const namespace Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #93 [typescript] format 1`] = `
+exports[`snippet: #93 format[typescript] 1`] = `
"',' expected. (1:17)
> 1 | const namespace Foo {}
| ^
Cause: ',' expected."
`;
-exports[`snippet: #94 [babel-ts] format 1`] = `
+exports[`snippet: #94 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default module Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #94 [oxc-ts] format 1`] = `
+exports[`snippet: #94 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default module Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #94 [typescript] format 1`] = `
+exports[`snippet: #94 format[typescript] 1`] = `
"'export' expected. (1:1)
> 1 | default module Foo {}
| ^
Cause: 'export' expected."
`;
-exports[`snippet: #95 [babel-ts] format 1`] = `
+exports[`snippet: #95 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default namespace Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #95 [oxc-ts] format 1`] = `
+exports[`snippet: #95 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default namespace Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #95 [typescript] format 1`] = `
+exports[`snippet: #95 format[typescript] 1`] = `
"'export' expected. (1:1)
> 1 | default namespace Foo {}
| ^
Cause: 'export' expected."
`;
-exports[`snippet: #96 [babel-ts] format 1`] = `
+exports[`snippet: #96 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in module Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #96 [oxc-ts] format 1`] = `
+exports[`snippet: #96 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in module Foo {}
| ^^"
`;
-exports[`snippet: #96 [typescript] format 1`] = `
+exports[`snippet: #96 format[typescript] 1`] = `
"Expression expected. (1:1)
> 1 | in module Foo {}
| ^
Cause: Expression expected."
`;
-exports[`snippet: #97 [babel-ts] format 1`] = `
+exports[`snippet: #97 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in namespace Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #97 [oxc-ts] format 1`] = `
+exports[`snippet: #97 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in namespace Foo {}
| ^^"
`;
-exports[`snippet: #97 [typescript] format 1`] = `
+exports[`snippet: #97 format[typescript] 1`] = `
"Expression expected. (1:1)
> 1 | in namespace Foo {}
| ^
Cause: Expression expected."
`;
-exports[`snippet: #98 [babel-ts] format 1`] = `
+exports[`snippet: #98 format[babel-ts] 1`] = `
"Missing semicolon. (1:4)
> 1 | out module Foo {}
| ^
Cause: Missing semicolon. (1:3)"
`;
-exports[`snippet: #98 [oxc-ts] format 1`] = `
+exports[`snippet: #98 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:4)
> 1 | out module Foo {}
| ^"
`;
-exports[`snippet: #98 [typescript] format 1`] = `
+exports[`snippet: #98 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | out module Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #99 [babel-ts] format 1`] = `
+exports[`snippet: #99 format[babel-ts] 1`] = `
"Missing semicolon. (1:4)
> 1 | out namespace Foo {}
| ^
Cause: Missing semicolon. (1:3)"
`;
-exports[`snippet: #99 [oxc-ts] format 1`] = `
+exports[`snippet: #99 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:4)
> 1 | out namespace Foo {}
| ^"
`;
-exports[`snippet: #99 [typescript] format 1`] = `
+exports[`snippet: #99 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | out namespace Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #100 [babel-ts] format 1`] = `
+exports[`snippet: #100 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | override module Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #100 [oxc-ts] format 1`] = `
+exports[`snippet: #100 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
> 1 | override module Foo {}
| ^"
`;
-exports[`snippet: #100 [typescript] format 1`] = `
+exports[`snippet: #100 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | override module Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #101 [babel-ts] format 1`] = `
+exports[`snippet: #101 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | override namespace Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #101 [oxc-ts] format 1`] = `
+exports[`snippet: #101 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
> 1 | override namespace Foo {}
| ^"
`;
-exports[`snippet: #101 [typescript] format 1`] = `
+exports[`snippet: #101 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | override namespace Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #102 [babel-ts] format 1`] = `
+exports[`snippet: #102 format[babel-ts] 1`] = `
"Missing semicolon. (1:8)
> 1 | private module Foo {}
| ^
Cause: Missing semicolon. (1:7)"
`;
-exports[`snippet: #102 [oxc-ts] format 1`] = `
+exports[`snippet: #102 format[oxc-ts] 1`] = `
"'private' modifier cannot be used here. (1:1)
> 1 | private module Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #102 [typescript] format 1`] = `
+exports[`snippet: #102 format[typescript] 1`] = `
"'private' modifier cannot appear on a module or namespace element. (1:1)
> 1 | private module Foo {}
| ^^^^^^^
Cause: 'private' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #103 [babel-ts] format 1`] = `
+exports[`snippet: #103 format[babel-ts] 1`] = `
"Missing semicolon. (1:8)
> 1 | private namespace Foo {}
| ^
Cause: Missing semicolon. (1:7)"
`;
-exports[`snippet: #103 [oxc-ts] format 1`] = `
+exports[`snippet: #103 format[oxc-ts] 1`] = `
"'private' modifier cannot be used here. (1:1)
> 1 | private namespace Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #103 [typescript] format 1`] = `
+exports[`snippet: #103 format[typescript] 1`] = `
"'private' modifier cannot appear on a module or namespace element. (1:1)
> 1 | private namespace Foo {}
| ^^^^^^^
Cause: 'private' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #104 [babel-ts] format 1`] = `
+exports[`snippet: #104 format[babel-ts] 1`] = `
"Missing semicolon. (1:10)
> 1 | protected module Foo {}
| ^
Cause: Missing semicolon. (1:9)"
`;
-exports[`snippet: #104 [oxc-ts] format 1`] = `
+exports[`snippet: #104 format[oxc-ts] 1`] = `
"'protected' modifier cannot be used here. (1:1)
> 1 | protected module Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #104 [typescript] format 1`] = `
+exports[`snippet: #104 format[typescript] 1`] = `
"'protected' modifier cannot appear on a module or namespace element. (1:1)
> 1 | protected module Foo {}
| ^^^^^^^^^
Cause: 'protected' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #105 [babel-ts] format 1`] = `
+exports[`snippet: #105 format[babel-ts] 1`] = `
"Missing semicolon. (1:10)
> 1 | protected namespace Foo {}
| ^
Cause: Missing semicolon. (1:9)"
`;
-exports[`snippet: #105 [oxc-ts] format 1`] = `
+exports[`snippet: #105 format[oxc-ts] 1`] = `
"'protected' modifier cannot be used here. (1:1)
> 1 | protected namespace Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #105 [typescript] format 1`] = `
+exports[`snippet: #105 format[typescript] 1`] = `
"'protected' modifier cannot appear on a module or namespace element. (1:1)
> 1 | protected namespace Foo {}
| ^^^^^^^^^
Cause: 'protected' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #106 [babel-ts] format 1`] = `
+exports[`snippet: #106 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | public module Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #106 [oxc-ts] format 1`] = `
+exports[`snippet: #106 format[oxc-ts] 1`] = `
"'public' modifier cannot be used here. (1:1)
> 1 | public module Foo {}
| ^^^^^^"
`;
-exports[`snippet: #106 [typescript] format 1`] = `
+exports[`snippet: #106 format[typescript] 1`] = `
"'public' modifier cannot appear on a module or namespace element. (1:1)
> 1 | public module Foo {}
| ^^^^^^
Cause: 'public' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #107 [babel-ts] format 1`] = `
+exports[`snippet: #107 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | public namespace Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #107 [oxc-ts] format 1`] = `
+exports[`snippet: #107 format[oxc-ts] 1`] = `
"'public' modifier cannot be used here. (1:1)
> 1 | public namespace Foo {}
| ^^^^^^"
`;
-exports[`snippet: #107 [typescript] format 1`] = `
+exports[`snippet: #107 format[typescript] 1`] = `
"'public' modifier cannot appear on a module or namespace element. (1:1)
> 1 | public namespace Foo {}
| ^^^^^^
Cause: 'public' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #108 [babel-ts] format 1`] = `
+exports[`snippet: #108 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | readonly module Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #108 [oxc-ts] format 1`] = `
+exports[`snippet: #108 format[oxc-ts] 1`] = `
"'readonly' modifier cannot be used here. (1:1)
> 1 | readonly module Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #108 [typescript] format 1`] = `
+exports[`snippet: #108 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (1:1)
> 1 | readonly module Foo {}
| ^^^^^^^^
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #109 [babel-ts] format 1`] = `
+exports[`snippet: #109 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | readonly namespace Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #109 [oxc-ts] format 1`] = `
+exports[`snippet: #109 format[oxc-ts] 1`] = `
"'readonly' modifier cannot be used here. (1:1)
> 1 | readonly namespace Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #109 [typescript] format 1`] = `
+exports[`snippet: #109 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (1:1)
> 1 | readonly namespace Foo {}
| ^^^^^^^^
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #110 [babel-ts] format 1`] = `
+exports[`snippet: #110 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | static module Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #110 [oxc-ts] format 1`] = `
+exports[`snippet: #110 format[oxc-ts] 1`] = `
"'static' modifier cannot be used here. (1:1)
> 1 | static module Foo {}
| ^^^^^^"
`;
-exports[`snippet: #110 [typescript] format 1`] = `
+exports[`snippet: #110 format[typescript] 1`] = `
"'static' modifier cannot appear on a module or namespace element. (1:1)
> 1 | static module Foo {}
| ^^^^^^
Cause: 'static' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #111 [babel-ts] format 1`] = `
+exports[`snippet: #111 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | static namespace Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #111 [oxc-ts] format 1`] = `
+exports[`snippet: #111 format[oxc-ts] 1`] = `
"'static' modifier cannot be used here. (1:1)
> 1 | static namespace Foo {}
| ^^^^^^"
`;
-exports[`snippet: #111 [typescript] format 1`] = `
+exports[`snippet: #111 format[typescript] 1`] = `
"'static' modifier cannot appear on a module or namespace element. (1:1)
> 1 | static namespace Foo {}
| ^^^^^^
Cause: 'static' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #112 [babel-ts] format 1`] = `
+exports[`snippet: #112 format[babel-ts] 1`] = `
"Unexpected token, expected "class" (1:10)
> 1 | abstract enum Foo {}
| ^
Cause: Unexpected token, expected "class" (1:9)"
`;
-exports[`snippet: #112 [oxc-ts] format 1`] = `
+exports[`snippet: #112 format[oxc-ts] 1`] = `
"'abstract' modifier cannot be used here. (1:1)
> 1 | abstract enum Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #112 [typescript] format 1`] = `
+exports[`snippet: #112 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:1)
> 1 | abstract enum Foo {}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #113 [babel-ts] format 1`] = `
+exports[`snippet: #113 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | accessor enum Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #113 [oxc-ts] format 1`] = `
+exports[`snippet: #113 format[oxc-ts] 1`] = `
"'accessor' modifier cannot be used here. (1:1)
> 1 | accessor enum Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #113 [typescript] format 1`] = `
+exports[`snippet: #113 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:1)
> 1 | accessor enum Foo {}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #114 [babel-ts] format 1`] = `
+exports[`snippet: #114 format[babel-ts] 1`] = `
"Missing semicolon. (1:6)
> 1 | async enum Foo {}
| ^
Cause: Missing semicolon. (1:5)"
`;
-exports[`snippet: #114 [oxc-ts] format 1`] = `
+exports[`snippet: #114 format[oxc-ts] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async enum Foo {}
| ^^^^^"
`;
-exports[`snippet: #114 [typescript] format 1`] = `
+exports[`snippet: #114 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:1)
> 1 | async enum Foo {}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #115 [babel-ts] format 1`] = `
+exports[`snippet: #115 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default enum Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #115 [oxc-ts] format 1`] = `
+exports[`snippet: #115 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | default enum Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #115 [typescript] format 1`] = `
+exports[`snippet: #115 format[typescript] 1`] = `
"'export' expected. (1:1)
> 1 | default enum Foo {}
| ^
Cause: 'export' expected."
`;
-exports[`snippet: #116 [babel-ts] format 1`] = `
+exports[`snippet: #116 format[babel-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in enum Foo {}
| ^
Cause: Unexpected token (1:0)"
`;
-exports[`snippet: #116 [oxc-ts] format 1`] = `
+exports[`snippet: #116 format[oxc-ts] 1`] = `
"Unexpected token (1:1)
> 1 | in enum Foo {}
| ^^"
`;
-exports[`snippet: #116 [typescript] format 1`] = `
+exports[`snippet: #116 format[typescript] 1`] = `
"Expression expected. (1:1)
> 1 | in enum Foo {}
| ^
Cause: Expression expected."
`;
-exports[`snippet: #117 [babel-ts] format 1`] = `
+exports[`snippet: #117 format[babel-ts] 1`] = `
"Missing semicolon. (1:4)
> 1 | out enum Foo {}
| ^
Cause: Missing semicolon. (1:3)"
`;
-exports[`snippet: #117 [oxc-ts] format 1`] = `
+exports[`snippet: #117 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:4)
> 1 | out enum Foo {}
| ^"
`;
-exports[`snippet: #117 [typescript] format 1`] = `
+exports[`snippet: #117 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | out enum Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #118 [babel-ts] format 1`] = `
+exports[`snippet: #118 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | override enum Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #118 [oxc-ts] format 1`] = `
+exports[`snippet: #118 format[oxc-ts] 1`] = `
"Expected a semicolon or an implicit semicolon after a statement, but found none (1:9)
> 1 | override enum Foo {}
| ^"
`;
-exports[`snippet: #118 [typescript] format 1`] = `
+exports[`snippet: #118 format[typescript] 1`] = `
"Unexpected keyword or identifier. (1:1)
> 1 | override enum Foo {}
| ^
Cause: Unexpected keyword or identifier."
`;
-exports[`snippet: #119 [babel-ts] format 1`] = `
+exports[`snippet: #119 format[babel-ts] 1`] = `
"Missing semicolon. (1:8)
> 1 | private enum Foo {}
| ^
Cause: Missing semicolon. (1:7)"
`;
-exports[`snippet: #119 [oxc-ts] format 1`] = `
+exports[`snippet: #119 format[oxc-ts] 1`] = `
"'private' modifier cannot be used here. (1:1)
> 1 | private enum Foo {}
| ^^^^^^^"
`;
-exports[`snippet: #119 [typescript] format 1`] = `
+exports[`snippet: #119 format[typescript] 1`] = `
"'private' modifier cannot appear on a module or namespace element. (1:1)
> 1 | private enum Foo {}
| ^^^^^^^
Cause: 'private' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #120 [babel-ts] format 1`] = `
+exports[`snippet: #120 format[babel-ts] 1`] = `
"Missing semicolon. (1:10)
> 1 | protected enum Foo {}
| ^
Cause: Missing semicolon. (1:9)"
`;
-exports[`snippet: #120 [oxc-ts] format 1`] = `
+exports[`snippet: #120 format[oxc-ts] 1`] = `
"'protected' modifier cannot be used here. (1:1)
> 1 | protected enum Foo {}
| ^^^^^^^^^"
`;
-exports[`snippet: #120 [typescript] format 1`] = `
+exports[`snippet: #120 format[typescript] 1`] = `
"'protected' modifier cannot appear on a module or namespace element. (1:1)
> 1 | protected enum Foo {}
| ^^^^^^^^^
Cause: 'protected' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #121 [babel-ts] format 1`] = `
+exports[`snippet: #121 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | public enum Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #121 [oxc-ts] format 1`] = `
+exports[`snippet: #121 format[oxc-ts] 1`] = `
"'public' modifier cannot be used here. (1:1)
> 1 | public enum Foo {}
| ^^^^^^"
`;
-exports[`snippet: #121 [typescript] format 1`] = `
+exports[`snippet: #121 format[typescript] 1`] = `
"'public' modifier cannot appear on a module or namespace element. (1:1)
> 1 | public enum Foo {}
| ^^^^^^
Cause: 'public' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #122 [babel-ts] format 1`] = `
+exports[`snippet: #122 format[babel-ts] 1`] = `
"Missing semicolon. (1:9)
> 1 | readonly enum Foo {}
| ^
Cause: Missing semicolon. (1:8)"
`;
-exports[`snippet: #122 [oxc-ts] format 1`] = `
+exports[`snippet: #122 format[oxc-ts] 1`] = `
"'readonly' modifier cannot be used here. (1:1)
> 1 | readonly enum Foo {}
| ^^^^^^^^"
`;
-exports[`snippet: #122 [typescript] format 1`] = `
+exports[`snippet: #122 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (1:1)
> 1 | readonly enum Foo {}
| ^^^^^^^^
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #123 [babel-ts] format 1`] = `
+exports[`snippet: #123 format[babel-ts] 1`] = `
"Missing semicolon. (1:7)
> 1 | static enum Foo {}
| ^
Cause: Missing semicolon. (1:6)"
`;
-exports[`snippet: #123 [oxc-ts] format 1`] = `
+exports[`snippet: #123 format[oxc-ts] 1`] = `
"'static' modifier cannot be used here. (1:1)
> 1 | static enum Foo {}
| ^^^^^^"
`;
-exports[`snippet: #123 [typescript] format 1`] = `
+exports[`snippet: #123 format[typescript] 1`] = `
"'static' modifier cannot appear on a module or namespace element. (1:1)
> 1 | static enum Foo {}
| ^^^^^^
Cause: 'static' modifier cannot appear on a module or namespace element."
`;
-exports[`snippet: #124 [babel-ts] format 1`] = `
+exports[`snippet: #124 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:23)
> 1 | function foo(abstract parameter) {}
| ^
Cause: Unexpected token, expected "," (1:22)"
`;
-exports[`snippet: #124 [oxc-ts] format 1`] = `
+exports[`snippet: #124 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(abstract parameter) {}
| ^^^^^^^^"
`;
-exports[`snippet: #124 [typescript] format 1`] = `
+exports[`snippet: #124 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:14)
> 1 | function foo(abstract parameter) {}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #125 [babel-ts] format 1`] = `
+exports[`snippet: #125 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class Foo { method(abstract parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #125 [oxc-ts] format 1`] = `
+exports[`snippet: #125 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(abstract parameter) {} }
| ^^^^^^^^"
`;
-exports[`snippet: #125 [typescript] format 1`] = `
+exports[`snippet: #125 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:20)
> 1 | class Foo { method(abstract parameter) {} }
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #126 [babel-ts] format 1`] = `
+exports[`snippet: #126 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:23)
> 1 | function foo(accessor parameter) {}
| ^
Cause: Unexpected token, expected "," (1:22)"
`;
-exports[`snippet: #126 [oxc-ts] format 1`] = `
+exports[`snippet: #126 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(accessor parameter) {}
| ^^^^^^^^"
`;
-exports[`snippet: #126 [typescript] format 1`] = `
+exports[`snippet: #126 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:14)
> 1 | function foo(accessor parameter) {}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #127 [babel-ts] format 1`] = `
+exports[`snippet: #127 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class Foo { method(accessor parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #127 [oxc-ts] format 1`] = `
+exports[`snippet: #127 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(accessor parameter) {} }
| ^^^^^^^^"
`;
-exports[`snippet: #127 [typescript] format 1`] = `
+exports[`snippet: #127 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:20)
> 1 | class Foo { method(accessor parameter) {} }
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #128 [babel-ts] format 1`] = `
+exports[`snippet: #128 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:20)
> 1 | function foo(async parameter) {}
| ^
Cause: Unexpected token, expected "," (1:19)"
`;
-exports[`snippet: #128 [oxc-ts] format 1`] = `
+exports[`snippet: #128 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(async parameter) {}
| ^^^^^"
`;
-exports[`snippet: #128 [typescript] format 1`] = `
+exports[`snippet: #128 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:14)
> 1 | function foo(async parameter) {}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #129 [babel-ts] format 1`] = `
+exports[`snippet: #129 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:26)
> 1 | class Foo { method(async parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:25)"
`;
-exports[`snippet: #129 [oxc-ts] format 1`] = `
+exports[`snippet: #129 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(async parameter) {} }
| ^^^^^"
`;
-exports[`snippet: #129 [typescript] format 1`] = `
+exports[`snippet: #129 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:20)
> 1 | class Foo { method(async parameter) {} }
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #130 [babel-ts] format 1`] = `
+exports[`snippet: #130 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:20)
> 1 | function foo(const parameter) {}
| ^
Cause: Unexpected token, expected "," (1:19)"
`;
-exports[`snippet: #130 [oxc-ts] format 1`] = `
+exports[`snippet: #130 format[oxc-ts] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:14)
> 1 | function foo(const parameter) {}
| ^^^^^"
`;
-exports[`snippet: #130 [typescript] format 1`] = `
+exports[`snippet: #130 format[typescript] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:14)
> 1 | function foo(const parameter) {}
| ^
Cause: Identifier expected. 'const' is a reserved word that cannot be used here."
`;
-exports[`snippet: #131 [babel-ts] format 1`] = `
+exports[`snippet: #131 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:26)
> 1 | class Foo { method(const parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:25)"
`;
-exports[`snippet: #131 [oxc-ts] format 1`] = `
+exports[`snippet: #131 format[oxc-ts] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:20)
> 1 | class Foo { method(const parameter) {} }
| ^^^^^"
`;
-exports[`snippet: #131 [typescript] format 1`] = `
+exports[`snippet: #131 format[typescript] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:20)
> 1 | class Foo { method(const parameter) {} }
| ^
Cause: Identifier expected. 'const' is a reserved word that cannot be used here."
`;
-exports[`snippet: #132 [babel-ts] format 1`] = `
+exports[`snippet: #132 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:22)
> 1 | function foo(declare parameter) {}
| ^
Cause: Unexpected token, expected "," (1:21)"
`;
-exports[`snippet: #132 [oxc-ts] format 1`] = `
+exports[`snippet: #132 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(declare parameter) {}
| ^^^^^^^"
`;
-exports[`snippet: #132 [typescript] format 1`] = `
+exports[`snippet: #132 format[typescript] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(declare parameter) {}
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a parameter."
`;
-exports[`snippet: #133 [babel-ts] format 1`] = `
+exports[`snippet: #133 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class Foo { method(declare parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #133 [oxc-ts] format 1`] = `
+exports[`snippet: #133 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(declare parameter) {} }
| ^^^^^^^"
`;
-exports[`snippet: #133 [typescript] format 1`] = `
+exports[`snippet: #133 format[typescript] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(declare parameter) {} }
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a parameter."
`;
-exports[`snippet: #134 [babel-ts] format 1`] = `
+exports[`snippet: #134 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:22)
> 1 | function foo(default parameter) {}
| ^
Cause: Unexpected token, expected "," (1:21)"
`;
-exports[`snippet: #134 [oxc-ts] format 1`] = `
+exports[`snippet: #134 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(default parameter) {}
| ^^^^^^^"
`;
-exports[`snippet: #134 [typescript] format 1`] = `
+exports[`snippet: #134 format[typescript] 1`] = `
"Identifier expected. 'default' is a reserved word that cannot be used here. (1:14)
> 1 | function foo(default parameter) {}
| ^
Cause: Identifier expected. 'default' is a reserved word that cannot be used here."
`;
-exports[`snippet: #135 [babel-ts] format 1`] = `
+exports[`snippet: #135 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class Foo { method(default parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #135 [oxc-ts] format 1`] = `
+exports[`snippet: #135 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(default parameter) {} }
| ^^^^^^^"
`;
-exports[`snippet: #135 [typescript] format 1`] = `
+exports[`snippet: #135 format[typescript] 1`] = `
"Identifier expected. 'default' is a reserved word that cannot be used here. (1:20)
> 1 | class Foo { method(default parameter) {} }
| ^
Cause: Identifier expected. 'default' is a reserved word that cannot be used here."
`;
-exports[`snippet: #136 [babel-ts] format 1`] = `
+exports[`snippet: #136 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:21)
> 1 | function foo(export parameter) {}
| ^
Cause: Unexpected token, expected "," (1:20)"
`;
-exports[`snippet: #136 [oxc-ts] format 1`] = `
+exports[`snippet: #136 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(export parameter) {}
| ^^^^^^"
`;
-exports[`snippet: #136 [typescript] format 1`] = `
+exports[`snippet: #136 format[typescript] 1`] = `
"'export' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(export parameter) {}
| ^^^^^^
Cause: 'export' modifier cannot appear on a parameter."
`;
-exports[`snippet: #137 [babel-ts] format 1`] = `
+exports[`snippet: #137 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:27)
> 1 | class Foo { method(export parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:26)"
`;
-exports[`snippet: #137 [oxc-ts] format 1`] = `
+exports[`snippet: #137 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(export parameter) {} }
| ^^^^^^"
`;
-exports[`snippet: #137 [typescript] format 1`] = `
+exports[`snippet: #137 format[typescript] 1`] = `
"'export' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(export parameter) {} }
| ^^^^^^
Cause: 'export' modifier cannot appear on a parameter."
`;
-exports[`snippet: #138 [babel-ts] format 1`] = `
+exports[`snippet: #138 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:17)
> 1 | function foo(in parameter) {}
| ^
Cause: Unexpected token, expected "," (1:16)"
`;
-exports[`snippet: #138 [oxc-ts] format 1`] = `
+exports[`snippet: #138 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(in parameter) {}
| ^^"
`;
-exports[`snippet: #138 [typescript] format 1`] = `
+exports[`snippet: #138 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:14)
> 1 | function foo(in parameter) {}
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #139 [babel-ts] format 1`] = `
+exports[`snippet: #139 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:23)
> 1 | class Foo { method(in parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:22)"
`;
-exports[`snippet: #139 [oxc-ts] format 1`] = `
+exports[`snippet: #139 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(in parameter) {} }
| ^^"
`;
-exports[`snippet: #139 [typescript] format 1`] = `
+exports[`snippet: #139 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:20)
> 1 | class Foo { method(in parameter) {} }
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #140 [babel-ts] format 1`] = `
+exports[`snippet: #140 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:18)
> 1 | function foo(out parameter) {}
| ^
Cause: Unexpected token, expected "," (1:17)"
`;
-exports[`snippet: #140 [oxc-ts] format 1`] = `
+exports[`snippet: #140 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(out parameter) {}
| ^^^"
`;
-exports[`snippet: #140 [typescript] format 1`] = `
+exports[`snippet: #140 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:14)
> 1 | function foo(out parameter) {}
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #141 [babel-ts] format 1`] = `
+exports[`snippet: #141 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:24)
> 1 | class Foo { method(out parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:23)"
`;
-exports[`snippet: #141 [oxc-ts] format 1`] = `
+exports[`snippet: #141 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(out parameter) {} }
| ^^^"
`;
-exports[`snippet: #141 [typescript] format 1`] = `
+exports[`snippet: #141 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:20)
> 1 | class Foo { method(out parameter) {} }
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #142 [babel-ts] format 1`] = `
+exports[`snippet: #142 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(override parameter) {}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:13)"
`;
-exports[`snippet: #142 [oxc-ts] format 1`] = `
+exports[`snippet: #142 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(override parameter) {}
| ^^^^^^^^"
`;
-exports[`snippet: #142 [typescript] format 1`] = `
+exports[`snippet: #142 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(override parameter) {}
| ^^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #143 [babel-ts] format 1`] = `
+exports[`snippet: #143 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(override parameter) {} }
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:19)"
`;
-exports[`snippet: #143 [oxc-ts] format 1`] = `
+exports[`snippet: #143 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(override parameter) {} }
| ^^^^^^^^"
`;
-exports[`snippet: #143 [typescript] format 1`] = `
+exports[`snippet: #143 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(override parameter) {} }
| ^^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #144 [babel-ts] format 1`] = `
+exports[`snippet: #144 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(private parameter) {}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:13)"
`;
-exports[`snippet: #144 [oxc-ts] format 1`] = `
+exports[`snippet: #144 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(private parameter) {}
| ^^^^^^^"
`;
-exports[`snippet: #144 [typescript] format 1`] = `
+exports[`snippet: #144 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(private parameter) {}
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #145 [babel-ts] format 1`] = `
+exports[`snippet: #145 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(private parameter) {} }
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:19)"
`;
-exports[`snippet: #145 [oxc-ts] format 1`] = `
+exports[`snippet: #145 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(private parameter) {} }
| ^^^^^^^"
`;
-exports[`snippet: #145 [typescript] format 1`] = `
+exports[`snippet: #145 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(private parameter) {} }
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #146 [babel-ts] format 1`] = `
+exports[`snippet: #146 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(protected parameter) {}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:13)"
`;
-exports[`snippet: #146 [oxc-ts] format 1`] = `
+exports[`snippet: #146 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(protected parameter) {}
| ^^^^^^^^^"
`;
-exports[`snippet: #146 [typescript] format 1`] = `
+exports[`snippet: #146 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(protected parameter) {}
| ^^^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #147 [babel-ts] format 1`] = `
+exports[`snippet: #147 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(protected parameter) {} }
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:19)"
`;
-exports[`snippet: #147 [oxc-ts] format 1`] = `
+exports[`snippet: #147 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(protected parameter) {} }
| ^^^^^^^^^"
`;
-exports[`snippet: #147 [typescript] format 1`] = `
+exports[`snippet: #147 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(protected parameter) {} }
| ^^^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #148 [babel-ts] format 1`] = `
+exports[`snippet: #148 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(public parameter) {}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:13)"
`;
-exports[`snippet: #148 [oxc-ts] format 1`] = `
+exports[`snippet: #148 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(public parameter) {}
| ^^^^^^"
`;
-exports[`snippet: #148 [typescript] format 1`] = `
+exports[`snippet: #148 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(public parameter) {}
| ^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #149 [babel-ts] format 1`] = `
+exports[`snippet: #149 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(public parameter) {} }
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:19)"
`;
-exports[`snippet: #149 [oxc-ts] format 1`] = `
+exports[`snippet: #149 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(public parameter) {} }
| ^^^^^^"
`;
-exports[`snippet: #149 [typescript] format 1`] = `
+exports[`snippet: #149 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(public parameter) {} }
| ^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #150 [babel-ts] format 1`] = `
+exports[`snippet: #150 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(readonly parameter) {}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:13)"
`;
-exports[`snippet: #150 [oxc-ts] format 1`] = `
+exports[`snippet: #150 format[oxc-ts] 1`] = `
"'readonly' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(readonly parameter) {}
| ^^^^^^^^"
`;
-exports[`snippet: #150 [typescript] format 1`] = `
+exports[`snippet: #150 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:14)
> 1 | function foo(readonly parameter) {}
| ^^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #151 [babel-ts] format 1`] = `
+exports[`snippet: #151 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(readonly parameter) {} }
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:19)"
`;
-exports[`snippet: #151 [oxc-ts] format 1`] = `
+exports[`snippet: #151 format[oxc-ts] 1`] = `
"'readonly' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(readonly parameter) {} }
| ^^^^^^^^"
`;
-exports[`snippet: #151 [typescript] format 1`] = `
+exports[`snippet: #151 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:20)
> 1 | class Foo { method(readonly parameter) {} }
| ^^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #152 [babel-ts] format 1`] = `
+exports[`snippet: #152 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:21)
> 1 | function foo(static parameter) {}
| ^
Cause: Unexpected token, expected "," (1:20)"
`;
-exports[`snippet: #152 [oxc-ts] format 1`] = `
+exports[`snippet: #152 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(static parameter) {}
| ^^^^^^"
`;
-exports[`snippet: #152 [typescript] format 1`] = `
+exports[`snippet: #152 format[typescript] 1`] = `
"'static' modifier cannot appear on a parameter. (1:14)
> 1 | function foo(static parameter) {}
| ^^^^^^
Cause: 'static' modifier cannot appear on a parameter."
`;
-exports[`snippet: #153 [babel-ts] format 1`] = `
+exports[`snippet: #153 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:27)
> 1 | class Foo { method(static parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:26)"
`;
-exports[`snippet: #153 [oxc-ts] format 1`] = `
+exports[`snippet: #153 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(static parameter) {} }
| ^^^^^^"
`;
-exports[`snippet: #153 [typescript] format 1`] = `
+exports[`snippet: #153 format[typescript] 1`] = `
"'static' modifier cannot appear on a parameter. (1:20)
> 1 | class Foo { method(static parameter) {} }
| ^^^^^^
Cause: 'static' modifier cannot appear on a parameter."
`;
-exports[`snippet: #154 [babel-ts] format 1`] = `
+exports[`snippet: #154 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:34)
> 1 | class Foo { constructor(abstract parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:33)"
`;
-exports[`snippet: #154 [oxc-ts] format 1`] = `
+exports[`snippet: #154 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(abstract parameter) {} }
| ^^^^^^^^"
`;
-exports[`snippet: #154 [typescript] format 1`] = `
+exports[`snippet: #154 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:25)
> 1 | class Foo { constructor(abstract parameter) {} }
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #155 [babel-ts] format 1`] = `
+exports[`snippet: #155 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:34)
> 1 | class Foo { constructor(accessor parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:33)"
`;
-exports[`snippet: #155 [oxc-ts] format 1`] = `
+exports[`snippet: #155 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(accessor parameter) {} }
| ^^^^^^^^"
`;
-exports[`snippet: #155 [typescript] format 1`] = `
+exports[`snippet: #155 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:25)
> 1 | class Foo { constructor(accessor parameter) {} }
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #156 [babel-ts] format 1`] = `
+exports[`snippet: #156 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class Foo { constructor(async parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #156 [oxc-ts] format 1`] = `
+exports[`snippet: #156 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(async parameter) {} }
| ^^^^^"
`;
-exports[`snippet: #156 [typescript] format 1`] = `
+exports[`snippet: #156 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:25)
> 1 | class Foo { constructor(async parameter) {} }
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #157 [babel-ts] format 1`] = `
+exports[`snippet: #157 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class Foo { constructor(const parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #157 [oxc-ts] format 1`] = `
+exports[`snippet: #157 format[oxc-ts] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:25)
> 1 | class Foo { constructor(const parameter) {} }
| ^^^^^"
`;
-exports[`snippet: #157 [typescript] format 1`] = `
+exports[`snippet: #157 format[typescript] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:25)
> 1 | class Foo { constructor(const parameter) {} }
| ^
Cause: Identifier expected. 'const' is a reserved word that cannot be used here."
`;
-exports[`snippet: #158 [babel-ts] format 1`] = `
+exports[`snippet: #158 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:33)
> 1 | class Foo { constructor(declare parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:32)"
`;
-exports[`snippet: #158 [oxc-ts] format 1`] = `
+exports[`snippet: #158 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(declare parameter) {} }
| ^^^^^^^"
`;
-exports[`snippet: #158 [typescript] format 1`] = `
+exports[`snippet: #158 format[typescript] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(declare parameter) {} }
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a parameter."
`;
-exports[`snippet: #159 [babel-ts] format 1`] = `
+exports[`snippet: #159 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:33)
> 1 | class Foo { constructor(default parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:32)"
`;
-exports[`snippet: #159 [oxc-ts] format 1`] = `
+exports[`snippet: #159 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(default parameter) {} }
| ^^^^^^^"
`;
-exports[`snippet: #159 [typescript] format 1`] = `
+exports[`snippet: #159 format[typescript] 1`] = `
"Identifier expected. 'default' is a reserved word that cannot be used here. (1:25)
> 1 | class Foo { constructor(default parameter) {} }
| ^
Cause: Identifier expected. 'default' is a reserved word that cannot be used here."
`;
-exports[`snippet: #160 [babel-ts] format 1`] = `
+exports[`snippet: #160 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:32)
> 1 | class Foo { constructor(export parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:31)"
`;
-exports[`snippet: #160 [oxc-ts] format 1`] = `
+exports[`snippet: #160 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(export parameter) {} }
| ^^^^^^"
`;
-exports[`snippet: #160 [typescript] format 1`] = `
+exports[`snippet: #160 format[typescript] 1`] = `
"'export' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(export parameter) {} }
| ^^^^^^
Cause: 'export' modifier cannot appear on a parameter."
`;
-exports[`snippet: #161 [babel-ts] format 1`] = `
+exports[`snippet: #161 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class Foo { constructor(in parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #161 [oxc-ts] format 1`] = `
+exports[`snippet: #161 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(in parameter) {} }
| ^^"
`;
-exports[`snippet: #161 [typescript] format 1`] = `
+exports[`snippet: #161 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:25)
> 1 | class Foo { constructor(in parameter) {} }
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #162 [babel-ts] format 1`] = `
+exports[`snippet: #162 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class Foo { constructor(out parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #162 [oxc-ts] format 1`] = `
+exports[`snippet: #162 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(out parameter) {} }
| ^^^"
`;
-exports[`snippet: #162 [typescript] format 1`] = `
+exports[`snippet: #162 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:25)
> 1 | class Foo { constructor(out parameter) {} }
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #163 [babel-ts] format 1`] = `
+exports[`snippet: #163 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:32)
> 1 | class Foo { constructor(static parameter) {} }
| ^
Cause: Unexpected token, expected "," (1:31)"
`;
-exports[`snippet: #163 [oxc-ts] format 1`] = `
+exports[`snippet: #163 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(static parameter) {} }
| ^^^^^^"
`;
-exports[`snippet: #163 [typescript] format 1`] = `
+exports[`snippet: #163 format[typescript] 1`] = `
"'static' modifier cannot appear on a parameter. (1:25)
> 1 | class Foo { constructor(static parameter) {} }
| ^^^^^^
Cause: 'static' modifier cannot appear on a parameter."
`;
-exports[`snippet: #164 [babel-ts] format 1`] = `
+exports[`snippet: #164 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:28)
> 1 | class Foo {["constructor"](private parameter) {}}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:27)"
`;
-exports[`snippet: #164 [oxc-ts] format 1`] = `
+exports[`snippet: #164 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a parameter. (1:28)
> 1 | class Foo {["constructor"](private parameter) {}}
| ^^^^^^^"
`;
-exports[`snippet: #164 [typescript] format 1`] = `
+exports[`snippet: #164 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:28)
> 1 | class Foo {["constructor"](private parameter) {}}
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #165 [babel-ts] format 1`] = `
+exports[`snippet: #165 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:28)
> 1 | class Foo {['constructor'](private parameter) {}}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:27)"
`;
-exports[`snippet: #165 [oxc-ts] format 1`] = `
+exports[`snippet: #165 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a parameter. (1:28)
> 1 | class Foo {['constructor'](private parameter) {}}
| ^^^^^^^"
`;
-exports[`snippet: #165 [typescript] format 1`] = `
+exports[`snippet: #165 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:28)
> 1 | class Foo {['constructor'](private parameter) {}}
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #166 [babel-ts] format 1`] = `
+exports[`snippet: #166 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:28)
> 1 | class Foo {[\`constructor\`](private parameter) {}}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:27)"
`;
-exports[`snippet: #166 [oxc-ts] format 1`] = `
+exports[`snippet: #166 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a parameter. (1:28)
> 1 | class Foo {[\`constructor\`](private parameter) {}}
| ^^^^^^^"
`;
-exports[`snippet: #166 [typescript] format 1`] = `
+exports[`snippet: #166 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:28)
> 1 | class Foo {[\`constructor\`](private parameter) {}}
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #167 [babel-ts] format 1`] = `
+exports[`snippet: #167 format[babel-ts] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:33)
> 1 | class Foo {['construct' + 'or'](private parameter) {}}
| ^
Cause: A parameter property is only allowed in a constructor implementation. (1:32)"
`;
-exports[`snippet: #167 [oxc-ts] format 1`] = `
+exports[`snippet: #167 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a parameter. (1:33)
> 1 | class Foo {['construct' + 'or'](private parameter) {}}
| ^^^^^^^"
`;
-exports[`snippet: #167 [typescript] format 1`] = `
+exports[`snippet: #167 format[typescript] 1`] = `
"A parameter property is only allowed in a constructor implementation. (1:33)
> 1 | class Foo {['construct' + 'or'](private parameter) {}}
| ^^^^^^^
Cause: A parameter property is only allowed in a constructor implementation."
`;
-exports[`snippet: #168 [babel-ts] format 1`] = `
+exports[`snippet: #168 format[babel-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {abstract bar};
| ^
Cause: 'abstract' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #168 [oxc-ts] format 1`] = `
+exports[`snippet: #168 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {abstract bar};
| ^^^^^^^^"
`;
-exports[`snippet: #168 [typescript] format 1`] = `
+exports[`snippet: #168 format[typescript] 1`] = `
"'abstract' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {abstract bar};
| ^^^^^^^^
Cause: 'abstract' modifier cannot appear on a type member"
`;
-exports[`snippet: #169 [babel-ts] format 1`] = `
+exports[`snippet: #169 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:22)
> 1 | type Foo = {accessor bar};
| ^
Cause: Unexpected token, expected ";" (1:21)"
`;
-exports[`snippet: #169 [oxc-ts] format 1`] = `
+exports[`snippet: #169 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {accessor bar};
| ^^^^^^^^"
`;
-exports[`snippet: #169 [typescript] format 1`] = `
+exports[`snippet: #169 format[typescript] 1`] = `
"'accessor' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {accessor bar};
| ^^^^^^^^
Cause: 'accessor' modifier cannot appear on a type member"
`;
-exports[`snippet: #170 [babel-ts] format 1`] = `
+exports[`snippet: #170 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:19)
> 1 | type Foo = {async bar};
| ^
Cause: Unexpected token, expected ";" (1:18)"
`;
-exports[`snippet: #170 [oxc-ts] format 1`] = `
+exports[`snippet: #170 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {async bar};
| ^^^^^"
`;
-exports[`snippet: #170 [typescript] format 1`] = `
+exports[`snippet: #170 format[typescript] 1`] = `
"'async' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {async bar};
| ^^^^^
Cause: 'async' modifier cannot appear on a type member"
`;
-exports[`snippet: #171 [babel-ts] format 1`] = `
+exports[`snippet: #171 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:19)
> 1 | type Foo = {const bar};
| ^
Cause: Unexpected token, expected ";" (1:18)"
`;
-exports[`snippet: #171 [oxc-ts] format 1`] = `
+exports[`snippet: #171 format[oxc-ts] 1`] = `
"'const' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {const bar};
| ^^^^^"
`;
-exports[`snippet: #171 [typescript] format 1`] = `
+exports[`snippet: #171 format[typescript] 1`] = `
"';' expected. (1:19)
> 1 | type Foo = {const bar};
| ^
Cause: ';' expected."
`;
-exports[`snippet: #172 [babel-ts] format 1`] = `
+exports[`snippet: #172 format[babel-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {declare bar};
| ^
Cause: 'declare' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #172 [oxc-ts] format 1`] = `
+exports[`snippet: #172 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {declare bar};
| ^^^^^^^"
`;
-exports[`snippet: #172 [typescript] format 1`] = `
+exports[`snippet: #172 format[typescript] 1`] = `
"'declare' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {declare bar};
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a type member"
`;
-exports[`snippet: #173 [babel-ts] format 1`] = `
+exports[`snippet: #173 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:21)
> 1 | type Foo = {default bar};
| ^
Cause: Unexpected token, expected ";" (1:20)"
`;
-exports[`snippet: #173 [oxc-ts] format 1`] = `
+exports[`snippet: #173 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {default bar};
| ^^^^^^^"
`;
-exports[`snippet: #173 [typescript] format 1`] = `
+exports[`snippet: #173 format[typescript] 1`] = `
"';' expected. (1:21)
> 1 | type Foo = {default bar};
| ^
Cause: ';' expected."
`;
-exports[`snippet: #174 [babel-ts] format 1`] = `
+exports[`snippet: #174 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:20)
> 1 | type Foo = {export bar};
| ^
Cause: Unexpected token, expected ";" (1:19)"
`;
-exports[`snippet: #174 [oxc-ts] format 1`] = `
+exports[`snippet: #174 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {export bar};
| ^^^^^^"
`;
-exports[`snippet: #174 [typescript] format 1`] = `
+exports[`snippet: #174 format[typescript] 1`] = `
"'export' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {export bar};
| ^^^^^^
Cause: 'export' modifier cannot appear on a type member"
`;
-exports[`snippet: #175 [babel-ts] format 1`] = `
+exports[`snippet: #175 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:16)
> 1 | type Foo = {in bar};
| ^
Cause: Unexpected token, expected ";" (1:15)"
`;
-exports[`snippet: #175 [oxc-ts] format 1`] = `
+exports[`snippet: #175 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {in bar};
| ^^"
`;
-exports[`snippet: #175 [typescript] format 1`] = `
+exports[`snippet: #175 format[typescript] 1`] = `
"'in' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {in bar};
| ^^
Cause: 'in' modifier cannot appear on a type member"
`;
-exports[`snippet: #176 [babel-ts] format 1`] = `
+exports[`snippet: #176 format[babel-ts] 1`] = `
"Unexpected token, expected ";" (1:17)
> 1 | type Foo = {out bar};
| ^
Cause: Unexpected token, expected ";" (1:16)"
`;
-exports[`snippet: #176 [oxc-ts] format 1`] = `
+exports[`snippet: #176 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {out bar};
| ^^^"
`;
-exports[`snippet: #176 [typescript] format 1`] = `
+exports[`snippet: #176 format[typescript] 1`] = `
"'out' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {out bar};
| ^^^
Cause: 'out' modifier cannot appear on a type member"
`;
-exports[`snippet: #177 [babel-ts] format 1`] = `
+exports[`snippet: #177 format[babel-ts] 1`] = `
"'override' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {override bar};
| ^
Cause: 'override' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #177 [oxc-ts] format 1`] = `
+exports[`snippet: #177 format[oxc-ts] 1`] = `
"'override' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {override bar};
| ^^^^^^^^"
`;
-exports[`snippet: #177 [typescript] format 1`] = `
+exports[`snippet: #177 format[typescript] 1`] = `
"'override' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {override bar};
| ^^^^^^^^
Cause: 'override' modifier cannot appear on a type member"
`;
-exports[`snippet: #178 [babel-ts] format 1`] = `
+exports[`snippet: #178 format[babel-ts] 1`] = `
"'private' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {private bar};
| ^
Cause: 'private' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #178 [oxc-ts] format 1`] = `
+exports[`snippet: #178 format[oxc-ts] 1`] = `
"'private' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {private bar};
| ^^^^^^^"
`;
-exports[`snippet: #178 [typescript] format 1`] = `
+exports[`snippet: #178 format[typescript] 1`] = `
"'private' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {private bar};
| ^^^^^^^
Cause: 'private' modifier cannot appear on a type member"
`;
-exports[`snippet: #179 [babel-ts] format 1`] = `
+exports[`snippet: #179 format[babel-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {protected bar};
| ^
Cause: 'protected' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #179 [oxc-ts] format 1`] = `
+exports[`snippet: #179 format[oxc-ts] 1`] = `
"'protected' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {protected bar};
| ^^^^^^^^^"
`;
-exports[`snippet: #179 [typescript] format 1`] = `
+exports[`snippet: #179 format[typescript] 1`] = `
"'protected' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {protected bar};
| ^^^^^^^^^
Cause: 'protected' modifier cannot appear on a type member"
`;
-exports[`snippet: #180 [babel-ts] format 1`] = `
+exports[`snippet: #180 format[babel-ts] 1`] = `
"'public' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {public bar};
| ^
Cause: 'public' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #180 [oxc-ts] format 1`] = `
+exports[`snippet: #180 format[oxc-ts] 1`] = `
"'public' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {public bar};
| ^^^^^^"
`;
-exports[`snippet: #180 [typescript] format 1`] = `
+exports[`snippet: #180 format[typescript] 1`] = `
"'public' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {public bar};
| ^^^^^^
Cause: 'public' modifier cannot appear on a type member"
`;
-exports[`snippet: #181 [babel-ts] format 1`] = `
+exports[`snippet: #181 format[babel-ts] 1`] = `
"'static' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {static bar};
| ^
Cause: 'static' modifier cannot appear on a type member. (1:12)"
`;
-exports[`snippet: #181 [oxc-ts] format 1`] = `
+exports[`snippet: #181 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a type member. (1:13)
> 1 | type Foo = {static bar};
| ^^^^^^"
`;
-exports[`snippet: #181 [typescript] format 1`] = `
+exports[`snippet: #181 format[typescript] 1`] = `
"'static' modifier cannot appear on a type member (1:13)
> 1 | type Foo = {static bar};
| ^^^^^^
Cause: 'static' modifier cannot appear on a type member"
`;
-exports[`snippet: #182 [babel-ts] format 1`] = `
+exports[`snippet: #182 format[babel-ts] 1`] = `
"Index signatures cannot have the 'declare' modifier. (2:3)
1 | class Foo {
> 2 | declare [index: string]: number
@@ -4015,7 +4015,7 @@ exports[`snippet: #182 [babel-ts] format 1`] = `
Cause: Index signatures cannot have the 'declare' modifier. (2:2)"
`;
-exports[`snippet: #182 [oxc-ts] format 1`] = `
+exports[`snippet: #182 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on an index signature. (2:3)
1 | class Foo {
> 2 | declare [index: string]: number
@@ -4023,7 +4023,7 @@ exports[`snippet: #182 [oxc-ts] format 1`] = `
3 | }"
`;
-exports[`snippet: #182 [typescript] format 1`] = `
+exports[`snippet: #182 format[typescript] 1`] = `
"'declare' modifier cannot appear on an index signature (2:3)
1 | class Foo {
> 2 | declare [index: string]: number
@@ -4032,1180 +4032,1180 @@ exports[`snippet: #182 [typescript] format 1`] = `
Cause: 'declare' modifier cannot appear on an index signature"
`;
-exports[`snippet: #183 [babel-ts] format 1`] = `
+exports[`snippet: #183 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:12)
> 1 | ({abstract method(){}})
| ^
Cause: Unexpected token, expected "," (1:11)"
`;
-exports[`snippet: #183 [oxc-ts] format 1`] = `
+exports[`snippet: #183 format[oxc-ts] 1`] = `
"'abstract' modifier cannot be used here. (1:3)
> 1 | ({abstract method(){}})
| ^^^^^^^^"
`;
-exports[`snippet: #183 [typescript] format 1`] = `
+exports[`snippet: #183 format[typescript] 1`] = `
"'abstract' modifier cannot be used here. (1:3)
> 1 | ({abstract method(){}})
| ^^^^^^^^
Cause: 'abstract' modifier cannot be used here."
`;
-exports[`snippet: #184 [babel-ts] format 1`] = `
+exports[`snippet: #184 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:12)
> 1 | ({accessor method(){}})
| ^
Cause: Unexpected token, expected "," (1:11)"
`;
-exports[`snippet: #184 [oxc-ts] format 1`] = `
+exports[`snippet: #184 format[oxc-ts] 1`] = `
"'accessor' modifier cannot be used here. (1:3)
> 1 | ({accessor method(){}})
| ^^^^^^^^"
`;
-exports[`snippet: #184 [typescript] format 1`] = `
+exports[`snippet: #184 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:3)
> 1 | ({accessor method(){}})
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #185 [babel-ts] format 1`] = `
+exports[`snippet: #185 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:9)
> 1 | ({const method(){}})
| ^
Cause: Unexpected token, expected "," (1:8)"
`;
-exports[`snippet: #185 [oxc-ts] format 1`] = `
+exports[`snippet: #185 format[oxc-ts] 1`] = `
"Expected \`:\` but found \`Identifier\` (1:9)
> 1 | ({const method(){}})
| ^^^^^^"
`;
-exports[`snippet: #185 [typescript] format 1`] = `
+exports[`snippet: #185 format[typescript] 1`] = `
"':' expected. (1:9)
> 1 | ({const method(){}})
| ^
Cause: ':' expected."
`;
-exports[`snippet: #186 [babel-ts] format 1`] = `
+exports[`snippet: #186 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:11)
> 1 | ({declare method(){}})
| ^
Cause: Unexpected token, expected "," (1:10)"
`;
-exports[`snippet: #186 [oxc-ts] format 1`] = `
+exports[`snippet: #186 format[oxc-ts] 1`] = `
"'declare' modifier cannot be used here. (1:3)
> 1 | ({declare method(){}})
| ^^^^^^^"
`;
-exports[`snippet: #186 [typescript] format 1`] = `
+exports[`snippet: #186 format[typescript] 1`] = `
"'declare' modifier cannot be used here. (1:3)
> 1 | ({declare method(){}})
| ^^^^^^^
Cause: 'declare' modifier cannot be used here."
`;
-exports[`snippet: #187 [babel-ts] format 1`] = `
+exports[`snippet: #187 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:11)
> 1 | ({default method(){}})
| ^
Cause: Unexpected token, expected "," (1:10)"
`;
-exports[`snippet: #187 [oxc-ts] format 1`] = `
+exports[`snippet: #187 format[oxc-ts] 1`] = `
"'default' modifier cannot be used here. (1:3)
> 1 | ({default method(){}})
| ^^^^^^^"
`;
-exports[`snippet: #187 [typescript] format 1`] = `
+exports[`snippet: #187 format[typescript] 1`] = `
"':' expected. (1:11)
> 1 | ({default method(){}})
| ^
Cause: ':' expected."
`;
-exports[`snippet: #188 [babel-ts] format 1`] = `
+exports[`snippet: #188 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:10)
> 1 | ({export method(){}})
| ^
Cause: Unexpected token, expected "," (1:9)"
`;
-exports[`snippet: #188 [oxc-ts] format 1`] = `
+exports[`snippet: #188 format[oxc-ts] 1`] = `
"'export' modifier cannot be used here. (1:3)
> 1 | ({export method(){}})
| ^^^^^^"
`;
-exports[`snippet: #188 [typescript] format 1`] = `
+exports[`snippet: #188 format[typescript] 1`] = `
"'export' modifier cannot be used here. (1:3)
> 1 | ({export method(){}})
| ^^^^^^
Cause: 'export' modifier cannot be used here."
`;
-exports[`snippet: #189 [babel-ts] format 1`] = `
+exports[`snippet: #189 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:6)
> 1 | ({in method(){}})
| ^
Cause: Unexpected token, expected "," (1:5)"
`;
-exports[`snippet: #189 [oxc-ts] format 1`] = `
+exports[`snippet: #189 format[oxc-ts] 1`] = `
"'in' modifier cannot be used here. (1:3)
> 1 | ({in method(){}})
| ^^"
`;
-exports[`snippet: #189 [typescript] format 1`] = `
+exports[`snippet: #189 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:3)
> 1 | ({in method(){}})
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #190 [babel-ts] format 1`] = `
+exports[`snippet: #190 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:7)
> 1 | ({out method(){}})
| ^
Cause: Unexpected token, expected "," (1:6)"
`;
-exports[`snippet: #190 [oxc-ts] format 1`] = `
+exports[`snippet: #190 format[oxc-ts] 1`] = `
"'out' modifier cannot be used here. (1:3)
> 1 | ({out method(){}})
| ^^^"
`;
-exports[`snippet: #190 [typescript] format 1`] = `
+exports[`snippet: #190 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:3)
> 1 | ({out method(){}})
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #191 [babel-ts] format 1`] = `
+exports[`snippet: #191 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:12)
> 1 | ({override method(){}})
| ^
Cause: Unexpected token, expected "," (1:11)"
`;
-exports[`snippet: #191 [oxc-ts] format 1`] = `
+exports[`snippet: #191 format[oxc-ts] 1`] = `
"'override' modifier cannot be used here. (1:3)
> 1 | ({override method(){}})
| ^^^^^^^^"
`;
-exports[`snippet: #191 [typescript] format 1`] = `
+exports[`snippet: #191 format[typescript] 1`] = `
"'override' modifier cannot be used here. (1:3)
> 1 | ({override method(){}})
| ^^^^^^^^
Cause: 'override' modifier cannot be used here."
`;
-exports[`snippet: #192 [babel-ts] format 1`] = `
+exports[`snippet: #192 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:11)
> 1 | ({private method(){}})
| ^
Cause: Unexpected token, expected "," (1:10)"
`;
-exports[`snippet: #192 [oxc-ts] format 1`] = `
+exports[`snippet: #192 format[oxc-ts] 1`] = `
"'private' modifier cannot be used here. (1:3)
> 1 | ({private method(){}})
| ^^^^^^^"
`;
-exports[`snippet: #192 [typescript] format 1`] = `
+exports[`snippet: #192 format[typescript] 1`] = `
"'private' modifier cannot be used here. (1:3)
> 1 | ({private method(){}})
| ^^^^^^^
Cause: 'private' modifier cannot be used here."
`;
-exports[`snippet: #193 [babel-ts] format 1`] = `
+exports[`snippet: #193 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:13)
> 1 | ({protected method(){}})
| ^
Cause: Unexpected token, expected "," (1:12)"
`;
-exports[`snippet: #193 [oxc-ts] format 1`] = `
+exports[`snippet: #193 format[oxc-ts] 1`] = `
"'protected' modifier cannot be used here. (1:3)
> 1 | ({protected method(){}})
| ^^^^^^^^^"
`;
-exports[`snippet: #193 [typescript] format 1`] = `
+exports[`snippet: #193 format[typescript] 1`] = `
"'protected' modifier cannot be used here. (1:3)
> 1 | ({protected method(){}})
| ^^^^^^^^^
Cause: 'protected' modifier cannot be used here."
`;
-exports[`snippet: #194 [babel-ts] format 1`] = `
+exports[`snippet: #194 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:10)
> 1 | ({public method(){}})
| ^
Cause: Unexpected token, expected "," (1:9)"
`;
-exports[`snippet: #194 [oxc-ts] format 1`] = `
+exports[`snippet: #194 format[oxc-ts] 1`] = `
"'public' modifier cannot be used here. (1:3)
> 1 | ({public method(){}})
| ^^^^^^"
`;
-exports[`snippet: #194 [typescript] format 1`] = `
+exports[`snippet: #194 format[typescript] 1`] = `
"'public' modifier cannot be used here. (1:3)
> 1 | ({public method(){}})
| ^^^^^^
Cause: 'public' modifier cannot be used here."
`;
-exports[`snippet: #195 [babel-ts] format 1`] = `
+exports[`snippet: #195 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:12)
> 1 | ({readonly method(){}})
| ^
Cause: Unexpected token, expected "," (1:11)"
`;
-exports[`snippet: #195 [oxc-ts] format 1`] = `
+exports[`snippet: #195 format[oxc-ts] 1`] = `
"'readonly' modifier cannot be used here. (1:3)
> 1 | ({readonly method(){}})
| ^^^^^^^^"
`;
-exports[`snippet: #195 [typescript] format 1`] = `
+exports[`snippet: #195 format[typescript] 1`] = `
"'readonly' modifier can only appear on a property declaration or index signature. (1:3)
> 1 | ({readonly method(){}})
| ^^^^^^^^
Cause: 'readonly' modifier can only appear on a property declaration or index signature."
`;
-exports[`snippet: #196 [babel-ts] format 1`] = `
+exports[`snippet: #196 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:10)
> 1 | ({static method(){}})
| ^
Cause: Unexpected token, expected "," (1:9)"
`;
-exports[`snippet: #196 [oxc-ts] format 1`] = `
+exports[`snippet: #196 format[oxc-ts] 1`] = `
"'static' modifier cannot be used here. (1:3)
> 1 | ({static method(){}})
| ^^^^^^"
`;
-exports[`snippet: #196 [typescript] format 1`] = `
+exports[`snippet: #196 format[typescript] 1`] = `
"'static' modifier cannot be used here. (1:3)
> 1 | ({static method(){}})
| ^^^^^^
Cause: 'static' modifier cannot be used here."
`;
-exports[`snippet: #197 [babel-ts] format 1`] = `
+exports[`snippet: #197 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class A {constructor(abstract []){}}
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #197 [oxc-ts] format 1`] = `
+exports[`snippet: #197 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(abstract []){}}
| ^^^^^^^^"
`;
-exports[`snippet: #197 [typescript] format 1`] = `
+exports[`snippet: #197 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:22)
> 1 | class A {constructor(abstract []){}}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #198 [babel-ts] format 1`] = `
+exports[`snippet: #198 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class A {constructor(abstract {}){}}
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #198 [oxc-ts] format 1`] = `
+exports[`snippet: #198 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(abstract {}){}}
| ^^^^^^^^"
`;
-exports[`snippet: #198 [typescript] format 1`] = `
+exports[`snippet: #198 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:22)
> 1 | class A {constructor(abstract {}){}}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #199 [babel-ts] format 1`] = `
+exports[`snippet: #199 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class A {constructor(abstract ...a){}}
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #199 [oxc-ts] format 1`] = `
+exports[`snippet: #199 format[oxc-ts] 1`] = `
"'abstract' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(abstract ...a){}}
| ^^^^^^^^"
`;
-exports[`snippet: #199 [typescript] format 1`] = `
+exports[`snippet: #199 format[typescript] 1`] = `
"'abstract' modifier can only appear on a class, method, or property declaration. (1:22)
> 1 | class A {constructor(abstract ...a){}}
| ^^^^^^^^
Cause: 'abstract' modifier can only appear on a class, method, or property declaration."
`;
-exports[`snippet: #200 [babel-ts] format 1`] = `
+exports[`snippet: #200 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class A {constructor(accessor []){}}
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #200 [oxc-ts] format 1`] = `
+exports[`snippet: #200 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(accessor []){}}
| ^^^^^^^^"
`;
-exports[`snippet: #200 [typescript] format 1`] = `
+exports[`snippet: #200 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:22)
> 1 | class A {constructor(accessor []){}}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #201 [babel-ts] format 1`] = `
+exports[`snippet: #201 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class A {constructor(accessor {}){}}
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #201 [oxc-ts] format 1`] = `
+exports[`snippet: #201 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(accessor {}){}}
| ^^^^^^^^"
`;
-exports[`snippet: #201 [typescript] format 1`] = `
+exports[`snippet: #201 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:22)
> 1 | class A {constructor(accessor {}){}}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #202 [babel-ts] format 1`] = `
+exports[`snippet: #202 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:31)
> 1 | class A {constructor(accessor ...a){}}
| ^
Cause: Unexpected token, expected "," (1:30)"
`;
-exports[`snippet: #202 [oxc-ts] format 1`] = `
+exports[`snippet: #202 format[oxc-ts] 1`] = `
"'accessor' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(accessor ...a){}}
| ^^^^^^^^"
`;
-exports[`snippet: #202 [typescript] format 1`] = `
+exports[`snippet: #202 format[typescript] 1`] = `
"'accessor' modifier can only appear on a property declaration. (1:22)
> 1 | class A {constructor(accessor ...a){}}
| ^^^^^^^^
Cause: 'accessor' modifier can only appear on a property declaration."
`;
-exports[`snippet: #203 [babel-ts] format 1`] = `
+exports[`snippet: #203 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class A {constructor(async []){}}
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #203 [oxc-ts] format 1`] = `
+exports[`snippet: #203 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(async []){}}
| ^^^^^"
`;
-exports[`snippet: #203 [typescript] format 1`] = `
+exports[`snippet: #203 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:22)
> 1 | class A {constructor(async []){}}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #204 [babel-ts] format 1`] = `
+exports[`snippet: #204 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class A {constructor(async {}){}}
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #204 [oxc-ts] format 1`] = `
+exports[`snippet: #204 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(async {}){}}
| ^^^^^"
`;
-exports[`snippet: #204 [typescript] format 1`] = `
+exports[`snippet: #204 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:22)
> 1 | class A {constructor(async {}){}}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #205 [babel-ts] format 1`] = `
+exports[`snippet: #205 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class A {constructor(async ...a){}}
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #205 [oxc-ts] format 1`] = `
+exports[`snippet: #205 format[oxc-ts] 1`] = `
"'async' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(async ...a){}}
| ^^^^^"
`;
-exports[`snippet: #205 [typescript] format 1`] = `
+exports[`snippet: #205 format[typescript] 1`] = `
"'async' modifier cannot be used here. (1:22)
> 1 | class A {constructor(async ...a){}}
| ^^^^^
Cause: 'async' modifier cannot be used here."
`;
-exports[`snippet: #206 [babel-ts] format 1`] = `
+exports[`snippet: #206 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class A {constructor(const []){}}
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #206 [oxc-ts] format 1`] = `
+exports[`snippet: #206 format[oxc-ts] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(const []){}}
| ^^^^^"
`;
-exports[`snippet: #206 [typescript] format 1`] = `
+exports[`snippet: #206 format[typescript] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(const []){}}
| ^
Cause: Identifier expected. 'const' is a reserved word that cannot be used here."
`;
-exports[`snippet: #207 [babel-ts] format 1`] = `
+exports[`snippet: #207 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class A {constructor(const {}){}}
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #207 [oxc-ts] format 1`] = `
+exports[`snippet: #207 format[oxc-ts] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(const {}){}}
| ^^^^^"
`;
-exports[`snippet: #207 [typescript] format 1`] = `
+exports[`snippet: #207 format[typescript] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(const {}){}}
| ^
Cause: Identifier expected. 'const' is a reserved word that cannot be used here."
`;
-exports[`snippet: #208 [babel-ts] format 1`] = `
+exports[`snippet: #208 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:28)
> 1 | class A {constructor(const ...a){}}
| ^
Cause: Unexpected token, expected "," (1:27)"
`;
-exports[`snippet: #208 [oxc-ts] format 1`] = `
+exports[`snippet: #208 format[oxc-ts] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(const ...a){}}
| ^^^^^"
`;
-exports[`snippet: #208 [typescript] format 1`] = `
+exports[`snippet: #208 format[typescript] 1`] = `
"Identifier expected. 'const' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(const ...a){}}
| ^
Cause: Identifier expected. 'const' is a reserved word that cannot be used here."
`;
-exports[`snippet: #209 [babel-ts] format 1`] = `
+exports[`snippet: #209 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:30)
> 1 | class A {constructor(declare []){}}
| ^
Cause: Unexpected token, expected "," (1:29)"
`;
-exports[`snippet: #209 [oxc-ts] format 1`] = `
+exports[`snippet: #209 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(declare []){}}
| ^^^^^^^"
`;
-exports[`snippet: #209 [typescript] format 1`] = `
+exports[`snippet: #209 format[typescript] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(declare []){}}
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a parameter."
`;
-exports[`snippet: #210 [babel-ts] format 1`] = `
+exports[`snippet: #210 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:30)
> 1 | class A {constructor(declare {}){}}
| ^
Cause: Unexpected token, expected "," (1:29)"
`;
-exports[`snippet: #210 [oxc-ts] format 1`] = `
+exports[`snippet: #210 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(declare {}){}}
| ^^^^^^^"
`;
-exports[`snippet: #210 [typescript] format 1`] = `
+exports[`snippet: #210 format[typescript] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(declare {}){}}
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a parameter."
`;
-exports[`snippet: #211 [babel-ts] format 1`] = `
+exports[`snippet: #211 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:30)
> 1 | class A {constructor(declare ...a){}}
| ^
Cause: Unexpected token, expected "," (1:29)"
`;
-exports[`snippet: #211 [oxc-ts] format 1`] = `
+exports[`snippet: #211 format[oxc-ts] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(declare ...a){}}
| ^^^^^^^"
`;
-exports[`snippet: #211 [typescript] format 1`] = `
+exports[`snippet: #211 format[typescript] 1`] = `
"'declare' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(declare ...a){}}
| ^^^^^^^
Cause: 'declare' modifier cannot appear on a parameter."
`;
-exports[`snippet: #212 [babel-ts] format 1`] = `
+exports[`snippet: #212 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:30)
> 1 | class A {constructor(default []){}}
| ^
Cause: Unexpected token, expected "," (1:29)"
`;
-exports[`snippet: #212 [oxc-ts] format 1`] = `
+exports[`snippet: #212 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(default []){}}
| ^^^^^^^"
`;
-exports[`snippet: #212 [typescript] format 1`] = `
+exports[`snippet: #212 format[typescript] 1`] = `
"Identifier expected. 'default' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(default []){}}
| ^
Cause: Identifier expected. 'default' is a reserved word that cannot be used here."
`;
-exports[`snippet: #213 [babel-ts] format 1`] = `
+exports[`snippet: #213 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:30)
> 1 | class A {constructor(default {}){}}
| ^
Cause: Unexpected token, expected "," (1:29)"
`;
-exports[`snippet: #213 [oxc-ts] format 1`] = `
+exports[`snippet: #213 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(default {}){}}
| ^^^^^^^"
`;
-exports[`snippet: #213 [typescript] format 1`] = `
+exports[`snippet: #213 format[typescript] 1`] = `
"Identifier expected. 'default' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(default {}){}}
| ^
Cause: Identifier expected. 'default' is a reserved word that cannot be used here."
`;
-exports[`snippet: #214 [babel-ts] format 1`] = `
+exports[`snippet: #214 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:30)
> 1 | class A {constructor(default ...a){}}
| ^
Cause: Unexpected token, expected "," (1:29)"
`;
-exports[`snippet: #214 [oxc-ts] format 1`] = `
+exports[`snippet: #214 format[oxc-ts] 1`] = `
"'default' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(default ...a){}}
| ^^^^^^^"
`;
-exports[`snippet: #214 [typescript] format 1`] = `
+exports[`snippet: #214 format[typescript] 1`] = `
"Identifier expected. 'default' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(default ...a){}}
| ^
Cause: Identifier expected. 'default' is a reserved word that cannot be used here."
`;
-exports[`snippet: #215 [babel-ts] format 1`] = `
+exports[`snippet: #215 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class A {constructor(export []){}}
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #215 [oxc-ts] format 1`] = `
+exports[`snippet: #215 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(export []){}}
| ^^^^^^"
`;
-exports[`snippet: #215 [typescript] format 1`] = `
+exports[`snippet: #215 format[typescript] 1`] = `
"'export' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(export []){}}
| ^^^^^^
Cause: 'export' modifier cannot appear on a parameter."
`;
-exports[`snippet: #216 [babel-ts] format 1`] = `
+exports[`snippet: #216 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class A {constructor(export {}){}}
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #216 [oxc-ts] format 1`] = `
+exports[`snippet: #216 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(export {}){}}
| ^^^^^^"
`;
-exports[`snippet: #216 [typescript] format 1`] = `
+exports[`snippet: #216 format[typescript] 1`] = `
"Identifier expected. 'export' is a reserved word that cannot be used here. (1:22)
> 1 | class A {constructor(export {}){}}
| ^
Cause: Identifier expected. 'export' is a reserved word that cannot be used here."
`;
-exports[`snippet: #217 [babel-ts] format 1`] = `
+exports[`snippet: #217 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class A {constructor(export ...a){}}
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #217 [oxc-ts] format 1`] = `
+exports[`snippet: #217 format[oxc-ts] 1`] = `
"'export' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(export ...a){}}
| ^^^^^^"
`;
-exports[`snippet: #217 [typescript] format 1`] = `
+exports[`snippet: #217 format[typescript] 1`] = `
"'export' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(export ...a){}}
| ^^^^^^
Cause: 'export' modifier cannot appear on a parameter."
`;
-exports[`snippet: #218 [babel-ts] format 1`] = `
+exports[`snippet: #218 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:25)
> 1 | class A {constructor(in []){}}
| ^
Cause: Unexpected token, expected "," (1:24)"
`;
-exports[`snippet: #218 [oxc-ts] format 1`] = `
+exports[`snippet: #218 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(in []){}}
| ^^"
`;
-exports[`snippet: #218 [typescript] format 1`] = `
+exports[`snippet: #218 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:22)
> 1 | class A {constructor(in []){}}
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #219 [babel-ts] format 1`] = `
+exports[`snippet: #219 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:25)
> 1 | class A {constructor(in {}){}}
| ^
Cause: Unexpected token, expected "," (1:24)"
`;
-exports[`snippet: #219 [oxc-ts] format 1`] = `
+exports[`snippet: #219 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(in {}){}}
| ^^"
`;
-exports[`snippet: #219 [typescript] format 1`] = `
+exports[`snippet: #219 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:22)
> 1 | class A {constructor(in {}){}}
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #220 [babel-ts] format 1`] = `
+exports[`snippet: #220 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:25)
> 1 | class A {constructor(in ...a){}}
| ^
Cause: Unexpected token, expected "," (1:24)"
`;
-exports[`snippet: #220 [oxc-ts] format 1`] = `
+exports[`snippet: #220 format[oxc-ts] 1`] = `
"'in' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(in ...a){}}
| ^^"
`;
-exports[`snippet: #220 [typescript] format 1`] = `
+exports[`snippet: #220 format[typescript] 1`] = `
"'in' modifier can only appear on a type parameter of a class, interface or type alias (1:22)
> 1 | class A {constructor(in ...a){}}
| ^^
Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #221 [babel-ts] format 1`] = `
+exports[`snippet: #221 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:26)
> 1 | class A {constructor(out []){}}
| ^
Cause: Unexpected token, expected "," (1:25)"
`;
-exports[`snippet: #221 [oxc-ts] format 1`] = `
+exports[`snippet: #221 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(out []){}}
| ^^^"
`;
-exports[`snippet: #221 [typescript] format 1`] = `
+exports[`snippet: #221 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:22)
> 1 | class A {constructor(out []){}}
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #222 [babel-ts] format 1`] = `
+exports[`snippet: #222 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:26)
> 1 | class A {constructor(out {}){}}
| ^
Cause: Unexpected token, expected "," (1:25)"
`;
-exports[`snippet: #222 [oxc-ts] format 1`] = `
+exports[`snippet: #222 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(out {}){}}
| ^^^"
`;
-exports[`snippet: #222 [typescript] format 1`] = `
+exports[`snippet: #222 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:22)
> 1 | class A {constructor(out {}){}}
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #223 [babel-ts] format 1`] = `
+exports[`snippet: #223 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:26)
> 1 | class A {constructor(out ...a){}}
| ^
Cause: Unexpected token, expected "," (1:25)"
`;
-exports[`snippet: #223 [oxc-ts] format 1`] = `
+exports[`snippet: #223 format[oxc-ts] 1`] = `
"'out' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(out ...a){}}
| ^^^"
`;
-exports[`snippet: #223 [typescript] format 1`] = `
+exports[`snippet: #223 format[typescript] 1`] = `
"'out' modifier can only appear on a type parameter of a class, interface or type alias (1:22)
> 1 | class A {constructor(out ...a){}}
| ^^^
Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias"
`;
-exports[`snippet: #224 [babel-ts] format 1`] = `
+exports[`snippet: #224 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(override []){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #224 [oxc-ts] format 1`] = `
+exports[`snippet: #224 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(override []){}}
| ^^^^^^^^^^^"
`;
-exports[`snippet: #224 [typescript] format 1`] = `
+exports[`snippet: #224 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(override []){}}
| ^^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #225 [babel-ts] format 1`] = `
+exports[`snippet: #225 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(override {}){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #225 [oxc-ts] format 1`] = `
+exports[`snippet: #225 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(override {}){}}
| ^^^^^^^^^^^"
`;
-exports[`snippet: #225 [typescript] format 1`] = `
+exports[`snippet: #225 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(override {}){}}
| ^^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #226 [babel-ts] format 1`] = `
+exports[`snippet: #226 format[babel-ts] 1`] = `
"Unexpected token (1:31)
> 1 | class A {constructor(override ...a){}}
| ^
Cause: Unexpected token (1:30)"
`;
-exports[`snippet: #226 [oxc-ts] format 1`] = `
+exports[`snippet: #226 format[oxc-ts] 1`] = `
"Unexpected token (1:31)
> 1 | class A {constructor(override ...a){}}
| ^^^"
`;
-exports[`snippet: #226 [typescript] format 1`] = `
+exports[`snippet: #226 format[typescript] 1`] = `
"A parameter property cannot be a rest parameter. (1:22)
> 1 | class A {constructor(override ...a){}}
| ^^^^^^^^
Cause: A parameter property cannot be a rest parameter."
`;
-exports[`snippet: #227 [babel-ts] format 1`] = `
+exports[`snippet: #227 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(private []){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #227 [oxc-ts] format 1`] = `
+exports[`snippet: #227 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(private []){}}
| ^^^^^^^^^^"
`;
-exports[`snippet: #227 [typescript] format 1`] = `
+exports[`snippet: #227 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(private []){}}
| ^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #228 [babel-ts] format 1`] = `
+exports[`snippet: #228 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(private {}){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #228 [oxc-ts] format 1`] = `
+exports[`snippet: #228 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(private {}){}}
| ^^^^^^^^^^"
`;
-exports[`snippet: #228 [typescript] format 1`] = `
+exports[`snippet: #228 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(private {}){}}
| ^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #229 [babel-ts] format 1`] = `
+exports[`snippet: #229 format[babel-ts] 1`] = `
"Unexpected token (1:30)
> 1 | class A {constructor(private ...a){}}
| ^
Cause: Unexpected token (1:29)"
`;
-exports[`snippet: #229 [oxc-ts] format 1`] = `
+exports[`snippet: #229 format[oxc-ts] 1`] = `
"Unexpected token (1:30)
> 1 | class A {constructor(private ...a){}}
| ^^^"
`;
-exports[`snippet: #229 [typescript] format 1`] = `
+exports[`snippet: #229 format[typescript] 1`] = `
"A parameter property cannot be a rest parameter. (1:22)
> 1 | class A {constructor(private ...a){}}
| ^^^^^^^
Cause: A parameter property cannot be a rest parameter."
`;
-exports[`snippet: #230 [babel-ts] format 1`] = `
+exports[`snippet: #230 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(protected []){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #230 [oxc-ts] format 1`] = `
+exports[`snippet: #230 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(protected []){}}
| ^^^^^^^^^^^^"
`;
-exports[`snippet: #230 [typescript] format 1`] = `
+exports[`snippet: #230 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(protected []){}}
| ^^^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #231 [babel-ts] format 1`] = `
+exports[`snippet: #231 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(protected {}){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #231 [oxc-ts] format 1`] = `
+exports[`snippet: #231 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(protected {}){}}
| ^^^^^^^^^^^^"
`;
-exports[`snippet: #231 [typescript] format 1`] = `
+exports[`snippet: #231 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(protected {}){}}
| ^^^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #232 [babel-ts] format 1`] = `
+exports[`snippet: #232 format[babel-ts] 1`] = `
"Unexpected token (1:32)
> 1 | class A {constructor(protected ...a){}}
| ^
Cause: Unexpected token (1:31)"
`;
-exports[`snippet: #232 [oxc-ts] format 1`] = `
+exports[`snippet: #232 format[oxc-ts] 1`] = `
"Unexpected token (1:32)
> 1 | class A {constructor(protected ...a){}}
| ^^^"
`;
-exports[`snippet: #232 [typescript] format 1`] = `
+exports[`snippet: #232 format[typescript] 1`] = `
"A parameter property cannot be a rest parameter. (1:22)
> 1 | class A {constructor(protected ...a){}}
| ^^^^^^^^^
Cause: A parameter property cannot be a rest parameter."
`;
-exports[`snippet: #233 [babel-ts] format 1`] = `
+exports[`snippet: #233 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(public []){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #233 [oxc-ts] format 1`] = `
+exports[`snippet: #233 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(public []){}}
| ^^^^^^^^^"
`;
-exports[`snippet: #233 [typescript] format 1`] = `
+exports[`snippet: #233 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(public []){}}
| ^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #234 [babel-ts] format 1`] = `
+exports[`snippet: #234 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(public {}){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #234 [oxc-ts] format 1`] = `
+exports[`snippet: #234 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(public {}){}}
| ^^^^^^^^^"
`;
-exports[`snippet: #234 [typescript] format 1`] = `
+exports[`snippet: #234 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(public {}){}}
| ^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #235 [babel-ts] format 1`] = `
+exports[`snippet: #235 format[babel-ts] 1`] = `
"Unexpected token (1:29)
> 1 | class A {constructor(public ...a){}}
| ^
Cause: Unexpected token (1:28)"
`;
-exports[`snippet: #235 [oxc-ts] format 1`] = `
+exports[`snippet: #235 format[oxc-ts] 1`] = `
"Unexpected token (1:29)
> 1 | class A {constructor(public ...a){}}
| ^^^"
`;
-exports[`snippet: #235 [typescript] format 1`] = `
+exports[`snippet: #235 format[typescript] 1`] = `
"A parameter property cannot be a rest parameter. (1:22)
> 1 | class A {constructor(public ...a){}}
| ^^^^^^
Cause: A parameter property cannot be a rest parameter."
`;
-exports[`snippet: #236 [babel-ts] format 1`] = `
+exports[`snippet: #236 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(readonly []){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #236 [oxc-ts] format 1`] = `
+exports[`snippet: #236 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(readonly []){}}
| ^^^^^^^^^^^"
`;
-exports[`snippet: #236 [typescript] format 1`] = `
+exports[`snippet: #236 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(readonly []){}}
| ^^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #237 [babel-ts] format 1`] = `
+exports[`snippet: #237 format[babel-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(readonly {}){}}
| ^
Cause: A parameter property may not be declared using a binding pattern. (1:21)"
`;
-exports[`snippet: #237 [oxc-ts] format 1`] = `
+exports[`snippet: #237 format[oxc-ts] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(readonly {}){}}
| ^^^^^^^^^^^"
`;
-exports[`snippet: #237 [typescript] format 1`] = `
+exports[`snippet: #237 format[typescript] 1`] = `
"A parameter property may not be declared using a binding pattern. (1:22)
> 1 | class A {constructor(readonly {}){}}
| ^^^^^^^^
Cause: A parameter property may not be declared using a binding pattern."
`;
-exports[`snippet: #238 [babel-ts] format 1`] = `
+exports[`snippet: #238 format[babel-ts] 1`] = `
"Unexpected token (1:31)
> 1 | class A {constructor(readonly ...a){}}
| ^
Cause: Unexpected token (1:30)"
`;
-exports[`snippet: #238 [oxc-ts] format 1`] = `
+exports[`snippet: #238 format[oxc-ts] 1`] = `
"Unexpected token (1:31)
> 1 | class A {constructor(readonly ...a){}}
| ^^^"
`;
-exports[`snippet: #238 [typescript] format 1`] = `
+exports[`snippet: #238 format[typescript] 1`] = `
"A parameter property cannot be a rest parameter. (1:22)
> 1 | class A {constructor(readonly ...a){}}
| ^^^^^^^^
Cause: A parameter property cannot be a rest parameter."
`;
-exports[`snippet: #239 [babel-ts] format 1`] = `
+exports[`snippet: #239 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class A {constructor(static []){}}
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #239 [oxc-ts] format 1`] = `
+exports[`snippet: #239 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(static []){}}
| ^^^^^^"
`;
-exports[`snippet: #239 [typescript] format 1`] = `
+exports[`snippet: #239 format[typescript] 1`] = `
"'static' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(static []){}}
| ^^^^^^
Cause: 'static' modifier cannot appear on a parameter."
`;
-exports[`snippet: #240 [babel-ts] format 1`] = `
+exports[`snippet: #240 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class A {constructor(static {}){}}
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #240 [oxc-ts] format 1`] = `
+exports[`snippet: #240 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(static {}){}}
| ^^^^^^"
`;
-exports[`snippet: #240 [typescript] format 1`] = `
+exports[`snippet: #240 format[typescript] 1`] = `
"'static' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(static {}){}}
| ^^^^^^
Cause: 'static' modifier cannot appear on a parameter."
`;
-exports[`snippet: #241 [babel-ts] format 1`] = `
+exports[`snippet: #241 format[babel-ts] 1`] = `
"Unexpected token, expected "," (1:29)
> 1 | class A {constructor(static ...a){}}
| ^
Cause: Unexpected token, expected "," (1:28)"
`;
-exports[`snippet: #241 [oxc-ts] format 1`] = `
+exports[`snippet: #241 format[oxc-ts] 1`] = `
"'static' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(static ...a){}}
| ^^^^^^"
`;
-exports[`snippet: #241 [typescript] format 1`] = `
+exports[`snippet: #241 format[typescript] 1`] = `
"'static' modifier cannot appear on a parameter. (1:22)
> 1 | class A {constructor(static ...a){}}
| ^^^^^^
diff --git a/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap
index 273393699..1500ca648 100644
--- a/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap
@@ -1,59 +1,59 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"Missing semicolon. (1:10)
> 1 | namespace "a" {}
| ^
Cause: Missing semicolon. (1:9)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"Unexpected token (1:11)
> 1 | namespace "a" {}
| ^^^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"Identifier expected. (1:11)
> 1 | namespace "a" {}
| ^
Cause: Identifier expected."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Missing semicolon. (1:10)
> 1 | namespace "a";
| ^
Cause: Missing semicolon. (1:9)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Unexpected token (1:11)
> 1 | namespace "a";
| ^^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"Identifier expected. (1:11)
> 1 | namespace "a";
| ^
Cause: Identifier expected."
`;
-exports[`snippet: #2 [babel-ts] format 1`] = `
+exports[`snippet: #2 format[babel-ts] 1`] = `
"Unexpected token, expected "{" (1:12)
> 1 | namespace a;
| ^
Cause: Unexpected token, expected "{" (1:11)"
`;
-exports[`snippet: #2 [oxc-ts] format 1`] = `
+exports[`snippet: #2 format[oxc-ts] 1`] = `
"Expected \`{\` but found \`;\` (1:12)
> 1 | namespace a;
| ^"
`;
-exports[`snippet: #2 [typescript] format 1`] = `
+exports[`snippet: #2 format[typescript] 1`] = `
"'{' expected. (1:12)
> 1 | namespace a;
| ^
diff --git a/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap
index 1374145e3..01f959b6f 100644
--- a/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap
@@ -1,38 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
-"Tuple members must be labeled with a simple identifier. (1:11)
-> 1 | type T = [x.y: A];
- | ^
-Cause: Tuple members must be labeled with a simple identifier. (1:10)"
-`;
-
-exports[`snippet: #0 [babel-ts] format 2`] = `
-"A required element cannot follow an optional element. (1:18)
-> 1 | type T = [x?: A, y: B];
- | ^
-Cause: A required element cannot follow an optional element. (1:17)"
-`;
-
-exports[`snippet: #0 [oxc-ts] format 1`] = `
-"Expected \`,\` or \`]\` but found \`:\` (1:14)
-> 1 | type T = [x.y: A];
- | ^"
-`;
-
-exports[`snippet: #0 [oxc-ts] format 2`] = `
-"A required element cannot follow an optional element. (1:18)
-> 1 | type T = [x?: A, y: B];
- | ^^^^"
-`;
-
-exports[`snippet: #0 [typescript] format 1`] = `
-"',' expected. (1:14)
-> 1 | type T = [x.y: A];
- | ^
-Cause: ',' expected."
-`;
-
exports[`snippet: #0 format 1`] = `
"Type parameters cannot appear on a constructor declaration. (1:24)
> 1 | class A { 'constructor'() {} }
@@ -40,33 +7,66 @@ exports[`snippet: #0 format 1`] = `
Cause: Type parameters cannot appear on a constructor declaration. (1:23)"
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
+"Tuple members must be labeled with a simple identifier. (1:11)
+> 1 | type T = [x.y: A];
+ | ^
+Cause: Tuple members must be labeled with a simple identifier. (1:10)"
+`;
+
+exports[`snippet: #0 format[babel-ts] 2`] = `
+"A required element cannot follow an optional element. (1:18)
+> 1 | type T = [x?: A, y: B];
+ | ^
+Cause: A required element cannot follow an optional element. (1:17)"
+`;
+
+exports[`snippet: #0 format[oxc-ts] 1`] = `
+"Expected \`,\` or \`]\` but found \`:\` (1:14)
+> 1 | type T = [x.y: A];
+ | ^"
+`;
+
+exports[`snippet: #0 format[oxc-ts] 2`] = `
+"A required element cannot follow an optional element. (1:18)
+> 1 | type T = [x?: A, y: B];
+ | ^^^^"
+`;
+
+exports[`snippet: #0 format[typescript] 1`] = `
+"',' expected. (1:14)
+> 1 | type T = [x.y: A];
+ | ^
+Cause: ',' expected."
+`;
+
+exports[`snippet: #1 format[babel-ts] 1`] = `
"Tuple members must be labeled with a simple identifier. (1:11)
> 1 | type T = [x: A];
| ^
Cause: Tuple members must be labeled with a simple identifier. (1:10)"
`;
-exports[`snippet: #1 [babel-ts] format 2`] = `
+exports[`snippet: #1 format[babel-ts] 2`] = `
"Type parameters cannot appear on a constructor declaration. (1:22)
> 1 | class A { constructor() {} }
| ^
Cause: Type parameters cannot appear on a constructor declaration. (1:21)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"Expected \`,\` or \`]\` but found \`:\` (1:15)
> 1 | type T = [x: A];
| ^"
`;
-exports[`snippet: #1 [oxc-ts] format 2`] = `
+exports[`snippet: #1 format[oxc-ts] 2`] = `
"Type parameters cannot appear on a constructor declaration (1:22)
> 1 | class A { constructor() {} }
| ^^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"',' expected. (1:15)
> 1 | type T = [x: A];
| ^
diff --git a/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap
index de4bdc235..940464ec3 100644
--- a/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap
@@ -1,52 +1,52 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`snippet: #0 [babel-ts] format 1`] = `
+exports[`snippet: #0 format[babel-ts] 1`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:1)
> 1 | import type foo, {named} from "foo"
| ^
Cause: A type-only import can specify a default import or named bindings, but not both. (1:0)"
`;
-exports[`snippet: #0 [oxc-ts] format 1`] = `
+exports[`snippet: #0 format[oxc-ts] 1`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:13)
> 1 | import type foo, {} from "foo"
| ^^^"
`;
-exports[`snippet: #0 [oxc-ts] format 2`] = `
+exports[`snippet: #0 format[oxc-ts] 2`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:13)
> 1 | import type foo, {named} from "foo"
| ^^^"
`;
-exports[`snippet: #0 [typescript] format 1`] = `
+exports[`snippet: #0 format[typescript] 1`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:8)
> 1 | import type foo, {} from "foo"
| ^^^^^^^^^^^^
Cause: A type-only import can specify a default import or named bindings, but not both."
`;
-exports[`snippet: #0 [typescript] format 2`] = `
+exports[`snippet: #0 format[typescript] 2`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:8)
> 1 | import type foo, {named} from "foo"
| ^^^^^^^^^^^^^^^^^
Cause: A type-only import can specify a default import or named bindings, but not both."
`;
-exports[`snippet: #1 [babel-ts] format 1`] = `
+exports[`snippet: #1 format[babel-ts] 1`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:1)
> 1 | import type foo, * as namespace from "foo"
| ^
Cause: A type-only import can specify a default import or named bindings, but not both. (1:0)"
`;
-exports[`snippet: #1 [oxc-ts] format 1`] = `
+exports[`snippet: #1 format[oxc-ts] 1`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:13)
> 1 | import type foo, * as namespace from "foo"
| ^^^"
`;
-exports[`snippet: #1 [typescript] format 1`] = `
+exports[`snippet: #1 format[typescript] 1`] = `
"A type-only import can specify a default import or named bindings, but not both. (1:8)
> 1 | import type foo, * as namespace from "foo"
| ^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/format/typescript/as/break-after-keyword/__snapshots__/format.test.js.snap b/tests/format/typescript/as/break-after-keyword/__snapshots__/format.test.js.snap
index a785c9ae2..38e9bd171 100644
--- a/tests/format/typescript/as/break-after-keyword/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/as/break-after-keyword/__snapshots__/format.test.js.snap
@@ -1,19 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`18148.ts [hermes] format 1`] = `
-"';' expected (12:70)
- 10 |
- 11 | // 79 width until \`as\` or \`satisfies\` keyword
-> 12 | const firstItem3 = _____________.find((item) => item.type === 'item') satisfies string | number;
- | ^
- 13 | // 80 width until \`as\` or \`satisfies\` keyword
- 14 | const firstItem_3 = _____________.find((item) => item.type === 'item') satisfies string | number;
- 15 |
-Cause: ';' expected (12:70)
-const firstItem3 = _____________.find((item) => item.type === 'item') satisfies string | number;
- ^"
-`;
-
exports[`18148.ts format 1`] = `
====================================options=====================================
parsers: ["typescript", "flow"]
@@ -97,3 +83,17 @@ const firstItem_5 = ______________.items.find(
================================================================================
`;
+
+exports[`18148.ts format[hermes] 1`] = `
+"';' expected (12:70)
+ 10 |
+ 11 | // 79 width until \`as\` or \`satisfies\` keyword
+> 12 | const firstItem3 = _____________.find((item) => item.type === 'item') satisfies string | number;
+ | ^
+ 13 | // 80 width until \`as\` or \`satisfies\` keyword
+ 14 | const firstItem_3 = _____________.find((item) => item.type === 'item') satisfies string | number;
+ 15 |
+Cause: ';' expected (12:70)
+const firstItem3 = _____________.find((item) => item.type === 'item') satisfies string | number;
+ ^"
+`;
diff --git a/tests/format/typescript/as/comments/__snapshots__/format.test.js.snap b/tests/format/typescript/as/comments/__snapshots__/format.test.js.snap
index 57bf4733c..eccbe04aa 100644
--- a/tests/format/typescript/as/comments/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/as/comments/__snapshots__/format.test.js.snap
@@ -28,20 +28,6 @@ function getClassNameFromPrototypeMethod(container) {
================================================================================
`;
-exports[`18160.ts [hermes] format 1`] = `
-"';' expected (7:2)
- 5 | comment
- 6 | */Foo;
-> 7 | 1 satisfies /*
- | ^
- 8 | comment
- 9 | */Foo;
- 10 |
-Cause: ';' expected (7:2)
-1 satisfies /*
- ^"
-`;
-
exports[`18160.ts format 1`] = `
====================================options=====================================
parsers: ["typescript", "flow"]
@@ -160,3 +146,17 @@ Foo;
================================================================================
`;
+
+exports[`18160.ts format[hermes] 1`] = `
+"';' expected (7:2)
+ 5 | comment
+ 6 | */Foo;
+> 7 | 1 satisfies /*
+ | ^
+ 8 | comment
+ 9 | */Foo;
+ 10 |
+Cause: ';' expected (7:2)
+1 satisfies /*
+ ^"
+`;
diff --git a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap
index 130c02cf2..7c4e05f7d 100644
--- a/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/conformance/classes/classDeclarations/classAbstractKeyword/__snapshots__/format.test.js.snap
@@ -602,18 +602,6 @@ class A {
================================================================================
`;
-exports[`classAbstractMixedWithModifiers.ts [babel-ts] format 1`] = `
-"'static' modifier cannot be used with 'abstract' modifier. (12:14)
- 10 | abstract private foo_dd();
- 11 |
-> 12 | abstract static foo_d();
- | ^
- 13 |
- 14 | static abstract foo_e();
- 15 | }
-Cause: 'static' modifier cannot be used with 'abstract' modifier. (12:13)"
-`;
-
exports[`classAbstractMixedWithModifiers.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -655,6 +643,18 @@ abstract class A {
================================================================================
`;
+exports[`classAbstractMixedWithModifiers.ts format[babel-ts] 1`] = `
+"'static' modifier cannot be used with 'abstract' modifier. (12:14)
+ 10 | abstract private foo_dd();
+ 11 |
+> 12 | abstract static foo_d();
+ | ^
+ 13 |
+ 14 | static abstract foo_e();
+ 15 | }
+Cause: 'static' modifier cannot be used with 'abstract' modifier. (12:13)"
+`;
+
exports[`classAbstractOverloads.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
diff --git a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap
index f41b75f6e..632a8b639 100644
--- a/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/__snapshots__/format.test.js.snap
@@ -450,18 +450,6 @@ class E extends D {
================================================================================
`;
-exports[`readonlyInConstructorParameters.ts [babel-ts] format 1`] = `
-"'public' modifier must precede 'readonly' modifier. (7:26)
- 5 |
- 6 | class E {
-> 7 | constructor(readonly public x: number) {}
- | ^
- 8 | }
- 9 |
- 10 | class F {
-Cause: 'public' modifier must precede 'readonly' modifier. (7:25)"
-`;
-
exports[`readonlyInConstructorParameters.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -499,23 +487,16 @@ new F(1).x;
================================================================================
`;
-exports[`readonlyReadonly.ts [babel-ts] format 1`] = `
-"Duplicate modifier: 'readonly'. (2:14)
- 1 | class C {
-> 2 | readonly readonly x: number;
- | ^
- 3 | constructor(readonly readonly y: number) {}
- 4 | }
-Cause: Duplicate modifier: 'readonly'. (2:13)"
-`;
-
-exports[`readonlyReadonly.ts [oxc-ts] format 1`] = `
-"'readonly' modifier already seen. (2:14)
- 1 | class C {
-> 2 | readonly readonly x: number;
- | ^^^^^^^^
- 3 | constructor(readonly readonly y: number) {}
- 4 | }"
+exports[`readonlyInConstructorParameters.ts format[babel-ts] 1`] = `
+"'public' modifier must precede 'readonly' modifier. (7:26)
+ 5 |
+ 6 | class E {
+> 7 | constructor(readonly public x: number) {}
+ | ^
+ 8 | }
+ 9 |
+ 10 | class F {
+Cause: 'public' modifier must precede 'readonly' modifier. (7:25)"
`;
exports[`readonlyReadonly.ts format 1`] = `
@@ -536,3 +517,22 @@ class C {
================================================================================
`;
+
+exports[`readonlyReadonly.ts format[babel-ts] 1`] = `
+"Duplicate modifier: 'readonly'. (2:14)
+ 1 | class C {
+> 2 | readonly readonly x: number;
+ | ^
+ 3 | constructor(readonly readonly y: number) {}
+ 4 | }
+Cause: Duplicate modifier: 'readonly'. (2:13)"
+`;
+
+exports[`readonlyReadonly.ts format[oxc-ts] 1`] = `
+"'readonly' modifier already seen. (2:14)
+ 1 | class C {
+> 2 | readonly readonly x: number;
+ | ^^^^^^^^
+ 3 | constructor(readonly readonly y: number) {}
+ 4 | }"
+`;
diff --git a/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap b/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap
index 758584ffb..6079f4cb0 100644
--- a/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/conformance/types/functions/__snapshots__/format.test.js.snap
@@ -592,27 +592,6 @@ function f(x: string): void {
================================================================================
`;
-exports[`functionOverloadErrorsSyntax.ts [babel-ts] format 1`] = `
-"Rest element must be last element. (9:36)
- 7 |
- 8 | //Function overload signature with rest param followed by non-optional parameter
-> 9 | function fn5(x: string, ...y: any[], z: string);
- | ^
- 10 | function fn5() { }
- 11 |
-Cause: Rest element must be last element. (9:35)"
-`;
-
-exports[`functionOverloadErrorsSyntax.ts [oxc-ts] format 1`] = `
-"A rest parameter must be last in a parameter list (9:25)
- 7 |
- 8 | //Function overload signature with rest param followed by non-optional parameter
-> 9 | function fn5(x: string, ...y: any[], z: string);
- | ^^^^^^^^^^^
- 10 | function fn5() { }
- 11 |"
-`;
-
exports[`functionOverloadErrorsSyntax.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -645,6 +624,27 @@ function fn5() {}
================================================================================
`;
+exports[`functionOverloadErrorsSyntax.ts format[babel-ts] 1`] = `
+"Rest element must be last element. (9:36)
+ 7 |
+ 8 | //Function overload signature with rest param followed by non-optional parameter
+> 9 | function fn5(x: string, ...y: any[], z: string);
+ | ^
+ 10 | function fn5() { }
+ 11 |
+Cause: Rest element must be last element. (9:35)"
+`;
+
+exports[`functionOverloadErrorsSyntax.ts format[oxc-ts] 1`] = `
+"A rest parameter must be last in a parameter list (9:25)
+ 7 |
+ 8 | //Function overload signature with rest param followed by non-optional parameter
+> 9 | function fn5(x: string, ...y: any[], z: string);
+ | ^^^^^^^^^^^
+ 10 | function fn5() { }
+ 11 |"
+`;
+
exports[`functionTypeTypeParameters.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
diff --git a/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap b/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap
index 821c7ac65..b0d6674d2 100644
--- a/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/custom/abstract/__snapshots__/format.test.js.snap
@@ -38,18 +38,6 @@ export class Y {}
================================================================================
`;
-exports[`abstractProperties.ts [babel-ts] format 1`] = `
-"'static' modifier cannot be used with 'abstract' modifier. (4:12)
- 2 | abstract private a: 1;
- 3 | private abstract b: 2;
-> 4 | static abstract c: 3;
- | ^
- 5 | abstract private ['g'];
- 6 | private abstract ['h'];
- 7 | static abstract ['i'];
-Cause: 'static' modifier cannot be used with 'abstract' modifier. (4:11)"
-`;
-
exports[`abstractProperties.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -77,3 +65,15 @@ abstract class Foo {
================================================================================
`;
+
+exports[`abstractProperties.ts format[babel-ts] 1`] = `
+"'static' modifier cannot be used with 'abstract' modifier. (4:12)
+ 2 | abstract private a: 1;
+ 3 | private abstract b: 2;
+> 4 | static abstract c: 3;
+ | ^
+ 5 | abstract private ['g'];
+ 6 | private abstract ['h'];
+ 7 | static abstract ['i'];
+Cause: 'static' modifier cannot be used with 'abstract' modifier. (4:11)"
+`;
diff --git a/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap b/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap
index 84d0024c7..09ac14d7c 100644
--- a/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/error-recovery/__snapshots__/format.test.js.snap
@@ -1,47 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`index-signature.ts [babel-ts] format 1`] = `
-"Unexpected token, expected "]" (4:13)
- 2 |
- 3 | type TwoParams = {
-> 4 | [a: string, b: string]: string;
- | ^
- 5 | };
- 6 | type ThreeParams = {
- 7 | [a: string, b: string, c: string]: string;
-Cause: Unexpected token, expected "]" (4:12)"
-`;
-
-exports[`index-signature.ts [oxc-ts] format 1`] = `
-"An index signature must have a type annotation. (1:12)
-> 1 | type A = { [key: string] };
- | ^^^^^^^^^^^^^
- 2 |
- 3 | type TwoParams = {
- 4 | [a: string, b: string]: string;"
-`;
-
-exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = `
-"Unexpected token, expected "]" (4:13)
- 2 |
- 3 | type TwoParams = {
-> 4 | [a: string, b: string]: string;
- | ^
- 5 | };
- 6 | type ThreeParams = {
- 7 | [a: string, b: string, c: string]: string;
-Cause: Unexpected token, expected "]" (4:12)"
-`;
-
-exports[`index-signature.ts - {"trailingComma":"all"} [oxc-ts] format 1`] = `
-"An index signature must have a type annotation. (1:12)
-> 1 | type A = { [key: string] };
- | ^^^^^^^^^^^^^
- 2 |
- 3 | type TwoParams = {
- 4 | [a: string, b: string]: string;"
-`;
-
exports[`index-signature.ts - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -105,7 +63,7 @@ type TooLongSingleParam = {
================================================================================
`;
-exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = `
+exports[`index-signature.ts - {"trailingComma":"all"} format[babel-ts] 1`] = `
"Unexpected token, expected "]" (4:13)
2 |
3 | type TwoParams = {
@@ -117,7 +75,7 @@ exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = `
Cause: Unexpected token, expected "]" (4:12)"
`;
-exports[`index-signature.ts - {"trailingComma":"es5"} [oxc-ts] format 1`] = `
+exports[`index-signature.ts - {"trailingComma":"all"} format[oxc-ts] 1`] = `
"An index signature must have a type annotation. (1:12)
> 1 | type A = { [key: string] };
| ^^^^^^^^^^^^^
@@ -189,6 +147,27 @@ type TooLongSingleParam = {
================================================================================
`;
+exports[`index-signature.ts - {"trailingComma":"es5"} format[babel-ts] 1`] = `
+"Unexpected token, expected "]" (4:13)
+ 2 |
+ 3 | type TwoParams = {
+> 4 | [a: string, b: string]: string;
+ | ^
+ 5 | };
+ 6 | type ThreeParams = {
+ 7 | [a: string, b: string, c: string]: string;
+Cause: Unexpected token, expected "]" (4:12)"
+`;
+
+exports[`index-signature.ts - {"trailingComma":"es5"} format[oxc-ts] 1`] = `
+"An index signature must have a type annotation. (1:12)
+> 1 | type A = { [key: string] };
+ | ^^^^^^^^^^^^^
+ 2 |
+ 3 | type TwoParams = {
+ 4 | [a: string, b: string]: string;"
+`;
+
exports[`index-signature.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -251,42 +230,25 @@ type TooLongSingleParam = {
================================================================================
`;
-exports[`jsdoc_only_types.ts [babel-ts] format 1`] = `
-"Unexpected token (1:8)
-> 1 | let a: *;
- | ^
- 2 | function b(x: ?) {}
- 3 | let c: ?string;
- 4 | let d: string?;
-Cause: Unexpected token (1:7)"
+exports[`index-signature.ts format[babel-ts] 1`] = `
+"Unexpected token, expected "]" (4:13)
+ 2 |
+ 3 | type TwoParams = {
+> 4 | [a: string, b: string]: string;
+ | ^
+ 5 | };
+ 6 | type ThreeParams = {
+ 7 | [a: string, b: string, c: string]: string;
+Cause: Unexpected token, expected "]" (4:12)"
`;
-exports[`jsdoc_only_types.ts [oxc-ts] format 1`] = `
-"Unexpected token (1:8)
-> 1 | let a: *;
- | ^
- 2 | function b(x: ?) {}
- 3 | let c: ?string;
- 4 | let d: string?;"
-`;
-
-exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [babel-ts] format 1`] = `
-"Unexpected token (1:8)
-> 1 | let a: *;
- | ^
- 2 | function b(x: ?) {}
- 3 | let c: ?string;
- 4 | let d: string?;
-Cause: Unexpected token (1:7)"
-`;
-
-exports[`jsdoc_only_types.ts - {"trailingComma":"all"} [oxc-ts] format 1`] = `
-"Unexpected token (1:8)
-> 1 | let a: *;
- | ^
- 2 | function b(x: ?) {}
- 3 | let c: ?string;
- 4 | let d: string?;"
+exports[`index-signature.ts format[oxc-ts] 1`] = `
+"An index signature must have a type annotation. (1:12)
+> 1 | type A = { [key: string] };
+ | ^^^^^^^^^^^^^
+ 2 |
+ 3 | type TwoParams = {
+ 4 | [a: string, b: string]: string;"
`;
exports[`jsdoc_only_types.ts - {"trailingComma":"all"} format 1`] = `
@@ -318,7 +280,7 @@ let h: !(string | number);
================================================================================
`;
-exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = `
+exports[`jsdoc_only_types.ts - {"trailingComma":"all"} format[babel-ts] 1`] = `
"Unexpected token (1:8)
> 1 | let a: *;
| ^
@@ -328,7 +290,7 @@ exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = `
Cause: Unexpected token (1:7)"
`;
-exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} [oxc-ts] format 1`] = `
+exports[`jsdoc_only_types.ts - {"trailingComma":"all"} format[oxc-ts] 1`] = `
"Unexpected token (1:8)
> 1 | let a: *;
| ^
@@ -366,6 +328,25 @@ let h: !(string | number);
================================================================================
`;
+exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} format[babel-ts] 1`] = `
+"Unexpected token (1:8)
+> 1 | let a: *;
+ | ^
+ 2 | function b(x: ?) {}
+ 3 | let c: ?string;
+ 4 | let d: string?;
+Cause: Unexpected token (1:7)"
+`;
+
+exports[`jsdoc_only_types.ts - {"trailingComma":"es5"} format[oxc-ts] 1`] = `
+"Unexpected token (1:8)
+> 1 | let a: *;
+ | ^
+ 2 | function b(x: ?) {}
+ 3 | let c: ?string;
+ 4 | let d: string?;"
+`;
+
exports[`jsdoc_only_types.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -393,3 +374,22 @@ let h: !(string | number);
================================================================================
`;
+
+exports[`jsdoc_only_types.ts format[babel-ts] 1`] = `
+"Unexpected token (1:8)
+> 1 | let a: *;
+ | ^
+ 2 | function b(x: ?) {}
+ 3 | let c: ?string;
+ 4 | let d: string?;
+Cause: Unexpected token (1:7)"
+`;
+
+exports[`jsdoc_only_types.ts format[oxc-ts] 1`] = `
+"Unexpected token (1:8)
+> 1 | let a: *;
+ | ^
+ 2 | function b(x: ?) {}
+ 3 | let c: ?string;
+ 4 | let d: string?;"
+`;
diff --git a/tests/format/typescript/namespace/__snapshots__/format.test.js.snap b/tests/format/typescript/namespace/__snapshots__/format.test.js.snap
index e059668c9..183557252 100644
--- a/tests/format/typescript/namespace/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/namespace/__snapshots__/format.test.js.snap
@@ -1,24 +1,5 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
-exports[`invalid-await.ts [babel-ts] format 1`] = `
-"'await' is only allowed within async functions and at the top levels of modules. (2:13)
- 1 | namespace N {
-> 2 | const x = await 42;
- | ^
- 3 | }
- 4 |
-Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:12)"
-`;
-
-exports[`invalid-await.ts [oxc-ts] format 1`] = `
-"\`await\` is only allowed within async functions and at the top levels of modules (2:13)
- 1 | namespace N {
-> 2 | const x = await 42;
- | ^^^^^
- 3 | }
- 4 |"
-`;
-
exports[`invalid-await.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -36,3 +17,22 @@ namespace N {
================================================================================
`;
+
+exports[`invalid-await.ts format[babel-ts] 1`] = `
+"'await' is only allowed within async functions and at the top levels of modules. (2:13)
+ 1 | namespace N {
+> 2 | const x = await 42;
+ | ^
+ 3 | }
+ 4 |
+Cause: 'await' is only allowed within async functions and at the top levels of modules. (2:12)"
+`;
+
+exports[`invalid-await.ts format[oxc-ts] 1`] = `
+"\`await\` is only allowed within async functions and at the top levels of modules (2:13)
+ 1 | namespace N {
+> 2 | const x = await 42;
+ | ^^^^^
+ 3 | }
+ 4 |"
+`;
diff --git a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap
index 653d98103..9fd6611e8 100644
--- a/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/format.test.js.snap
@@ -28,21 +28,6 @@ f<(v: T) => void>();
================================================================================
`;
-exports[`3.ts [oxc-ts] format 1`] = `
-"Expected \`{\` but found \`<<\` (1:17)
-> 1 | (class extends f<(v: T) => void> {});
- | ^^
- 2 |"
-`;
-
-exports[`3.ts [typescript] format 1`] = `
-"',' expected. (1:17)
-> 1 | (class extends f<(v: T) => void> {});
- | ^
- 2 |
-Cause: ',' expected."
-`;
-
exports[`3.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -57,6 +42,21 @@ printWidth: 80
================================================================================
`;
+exports[`3.ts format[oxc-ts] 1`] = `
+"Expected \`{\` but found \`<<\` (1:17)
+> 1 | (class extends f<(v: T) => void> {});
+ | ^^
+ 2 |"
+`;
+
+exports[`3.ts format[typescript] 1`] = `
+"',' expected. (1:17)
+> 1 | (class extends f<(v: T) => void> {});
+ | ^
+ 2 |
+Cause: ',' expected."
+`;
+
exports[`4.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -74,21 +74,6 @@ printWidth: 80
================================================================================
`;
-exports[`5.tsx [oxc-ts] format 1`] = `
-"Unexpected token (1:11)
-> 1 | (v: T) => void> />
- | ^^
- 2 |"
-`;
-
-exports[`5.tsx [typescript] format 1`] = `
-"Identifier expected. (1:11)
-> 1 | (v: T) => void> />
- | ^
- 2 |
-Cause: Identifier expected."
-`;
-
exports[`5.tsx format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -103,6 +88,21 @@ printWidth: 80
================================================================================
`;
+exports[`5.tsx format[oxc-ts] 1`] = `
+"Unexpected token (1:11)
+> 1 | (v: T) => void> />
+ | ^^
+ 2 |"
+`;
+
+exports[`5.tsx format[typescript] 1`] = `
+"Identifier expected. (1:11)
+> 1 | (v: T) => void> />
+ | ^
+ 2 |
+Cause: Identifier expected."
+`;
+
exports[`6.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
diff --git a/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap b/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap
index 474f0126f..bc5310fa8 100644
--- a/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap
+++ b/tests/format/typescript/type-params/consistent/__snapshots__/format.test.js.snap
@@ -84,23 +84,6 @@ const foo12: Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
================================================================================
`;
-exports[`template-literal-types.ts [flow] format 1`] = `
-"Flow does not support template literal types. (1:84)
-> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
- | ^
- 2 |"
-`;
-
-exports[`template-literal-types.ts [hermes] format 1`] = `
-"unexpected token in type annotation (1:83)
-> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
- | ^
- 2 |
-Cause: unexpected token in type annotation (1:83)
-const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
- ^"
-`;
-
exports[`template-literal-types.ts format 1`] = `
====================================options=====================================
parsers: ["typescript", "flow"]
@@ -116,6 +99,23 @@ const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
================================================================================
`;
+exports[`template-literal-types.ts format[flow] 1`] = `
+"Flow does not support template literal types. (1:84)
+> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
+ | ^
+ 2 |"
+`;
+
+exports[`template-literal-types.ts format[hermes] 1`] = `
+"unexpected token in type annotation (1:83)
+> 1 | const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
+ | ^
+ 2 |
+Cause: unexpected token in type annotation (1:83)
+const foo1: Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo<\`Hello, \${keyof World}\`> = a;
+ ^"
+`;
+
exports[`typescript-only.ts format 1`] = `
====================================options=====================================
parsers: ["typescript", "flow"]