Repository: prettier/prettier (2025-07-07T08:59:00Z)

Issue:
Support "discard binding"
- https://github.com/babel/babel/pull/17163
- https://github.com/prettier/prettier/pull/17696
- https://tc39.es/proposal-discard-binding
- https://github.com/tc39/proposal-discard-binding


Discussion:

Patch:
diff --git a/changelog_unreleased/javascript/17708.md b/changelog_unreleased/javascript/17708.md
new file mode 100644
index 000000000000..ba54e45244ae
--- /dev/null
+++ b/changelog_unreleased/javascript/17708.md
@@ -0,0 +1,10 @@
+#### Add support for "Discard Bindings" proposal (#17708 by @fisker)
+
+The Stage 2 proposal ["Discard Bindings"](https://github.com/tc39/proposal-discard-binding) is now supported via Babel. Also keep in mind our [policy on non-standardized syntax](https://prettier.io/docs/en/rationale.html#disclaimer-about-non-standard-syntax) before using this proposed syntax feature with Prettier.
+
+<!-- prettier-ignore -->
+```jsx
+const [void] = x;
+
+const {x:void} = x;
+```
diff --git a/src/language-js/parse/babel.js b/src/language-js/parse/babel.js
index 09a917107c14..e2814fc58a70 100644
--- a/src/language-js/parse/babel.js
+++ b/src/language-js/parse/babel.js
@@ -49,6 +49,7 @@ const parseOptions = {
     "sourcePhaseImports",
     "deferredImportEvaluation",
     ["optionalChainingAssign", { version: "2023-07" }],
+    ["discardBinding", { syntaxType: "void" }],
   ],
   tokens: false,
   // Ranges not available on comments, so we use `Node#{start,end}` instead
diff --git a/src/language-js/print/estree.js b/src/language-js/print/estree.js
index 6a237d855c63..6416044103a9 100644
--- a/src/language-js/print/estree.js
+++ b/src/language-js/print/estree.js
@@ -648,6 +648,9 @@ function printEstree(path, options, print, args) {
     case "ModuleExpression":
       return ["module ", print("body")];
 
+    case "VoidPattern":
+      return "void";
+
     case "InterpreterDirective": // Printed as comment
     default:
       /* c8 ignore next */
diff --git a/src/language-js/traverse/visitor-keys.evaluate.js b/src/language-js/traverse/visitor-keys.evaluate.js
index e758fbf62943..b727f69edd38 100644
--- a/src/language-js/traverse/visitor-keys.evaluate.js
+++ b/src/language-js/traverse/visitor-keys.evaluate.js
@@ -66,10 +66,6 @@ const excludeNodeTypes = new Set([
   "DecimalLiteral",
   // Babel, Won't exist since we use `createImportExpressions` when parsing with babel
   "Import",
-
-  // Babel v7.28.0
-  // https://github.com/prettier/prettier/pull/17696
-  "VoidPattern",
 ]);
 
 const visitorKeys = Object.fromEntries(


Test patch:
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 11edced75969..49593ec0689a 100644
--- a/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap
+++ b/tests/format/js/babel-plugins/__snapshots__/format.test.js.snap
@@ -690,6 +690,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[`discard-binding.js [espree] format 1`] = `
+"Unexpected keyword 'void' (1:11)
+> 1 | const [a, void] = iter;
+    |           ^
+  2 |
+Cause: Unexpected keyword 'void'"
+`;
+
+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[`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[`discard-binding.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "babel-ts", "babel-flow"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+const [a, void] = iter;
+
+=====================================output=====================================
+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
diff --git a/tests/format/js/babel-plugins/discard-binding.js b/tests/format/js/babel-plugins/discard-binding.js
new file mode 100644
index 000000000000..772e77c406cc
--- /dev/null
+++ b/tests/format/js/babel-plugins/discard-binding.js
@@ -0,0 +1,1 @@
+const [a, void] = iter;
diff --git a/tests/format/js/babel-plugins/format.test.js b/tests/format/js/babel-plugins/format.test.js
index ba925a06d94d..967ffd903cb6 100644
--- a/tests/format/js/babel-plugins/format.test.js
+++ b/tests/format/js/babel-plugins/format.test.js
@@ -25,6 +25,7 @@ runFormatTest(import.meta, ["babel", "babel-ts", "babel-flow"], {
       "source-phase-imports.js",
       "deferred-import-evaluation.js",
       "optional-chaining-assignment.js",
+      "discard-binding.js",
     ],
     espree: [
       "decorators.js",
@@ -48,6 +49,7 @@ runFormatTest(import.meta, ["babel", "babel-ts", "babel-flow"], {
       "source-phase-imports.js",
       "deferred-import-evaluation.js",
       "optional-chaining-assignment.js",
+      "discard-binding.js",
     ],
     meriyah: [
       "do-expressions.js",
@@ -73,6 +75,7 @@ runFormatTest(import.meta, ["babel", "babel-ts", "babel-flow"], {
       "source-phase-imports.js",
       "deferred-import-evaluation.js",
       "optional-chaining-assignment.js",
+      "discard-binding.js",
     ],
     oxc: [
       "async-do-expressions.js",
@@ -91,6 +94,7 @@ runFormatTest(import.meta, ["babel", "babel-ts", "babel-flow"], {
       "throw-expressions.js",
       "typescript.js",
       "v8intrinsic.js",
+      "discard-binding.js",
     ],
     "oxc-ts": [
       "async-do-expressions.js",
@@ -109,6 +113,7 @@ runFormatTest(import.meta, ["babel", "babel-ts", "babel-flow"], {
       "throw-expressions.js",
       "typescript.js",
       "v8intrinsic.js",
+      "discard-binding.js",
     ],
     babel: ["flow.js", "typescript.js"],
     __babel_estree: ["flow.js", "typescript.js"],
diff --git a/tests/format/js/discard-binding/__snapshots__/format.test.js.snap b/tests/format/js/discard-binding/__snapshots__/format.test.js.snap
new file mode 100644
index 000000000000..8c372d4dbefe
--- /dev/null
+++ b/tests/format/js/discard-binding/__snapshots__/format.test.js.snap
@@ -0,0 +1,1720 @@
+// 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"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+{
+  // destructuring binding
+  const [, void, ] = value;
+}
+{
+  // for-of destructuring binding
+  for (const [void] of []);
+}
+{
+  // destructuring assignment
+  [void] = [];
+}
+{
+  // for-of destructuring assignment;
+  for ([void] of []);
+}
+{
+  // function param;
+  function f([[[void], void, ], void]) {}
+}
+{
+  // arrow function param
+  ([[[void], void, ], void]) => {}
+}
+{
+  // async arrow function param
+  async ([[[void], void, ], void]) => {}
+}
+{
+  // destructuring assignment in async call";
+  async([void] = []);
+}
+{
+  // catch param
+  try {} catch ([void]) {}
+}
+
+=====================================output=====================================
+{
+  // destructuring binding
+  const [, void] = value;
+}
+{
+  // for-of destructuring binding
+  for (const [void] of []);
+}
+{
+  // destructuring assignment
+  [void] = [];
+}
+{
+  // for-of destructuring assignment;
+  for ([void] of []);
+}
+{
+  // function param;
+  function f([[[void], void], void]) {}
+}
+{
+  // arrow function param
+  ([[[void], void], void]) => {};
+}
+{
+  // async arrow function param
+  async ([[[void], void], void]) => {};
+}
+{
+  // destructuring assignment in async call";
+  async(([void] = []));
+}
+{
+  // catch param
+  try {
+  } catch ([void]) {}
+}
+
+================================================================================
+`;
+
+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[`basic.js [espree] 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'"
+`;
+
+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[`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[`basic.js [meriyah] format 1`] = `
+"Unexpected token: ']' (1:12)
+> 1 | const [void] = [,void] = [void,] = [];
+    |            ^
+  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 |
+Cause: Array element destructuring pattern expected."
+`;
+
+exports[`basic.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+const [void] = [,void] = [void,] = [];
+
+function f(void, { p: void }, [ void ]) {}
+
+(void, { p: void }, [ void ]) => {}
+
+async (void, { p: void }, [ void ]) => {}
+
+=====================================output=====================================
+const [void] = ([, void] = [void] = []);
+
+function f(void, { p: void }, [void]) {}
+
+(void, { p: void }, [void]) => {};
+
+async (void, { p: void }, [void]) => {};
+
+================================================================================
+`;
+
+exports[`discard-binding-arrow-params.js [acorn] format 1`] = `
+"Unexpected token (1:6)
+> 1 | (void) => {}
+    |      ^
+  2 |
+Cause: Unexpected token (1:5)"
+`;
+
+exports[`discard-binding-arrow-params.js [espree] format 1`] = `
+"Unexpected token ) (1:6)
+> 1 | (void) => {}
+    |      ^
+  2 |
+Cause: Unexpected token )"
+`;
+
+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) => {}
+    |     ^
+  2 |
+Cause: invalid expression (1:5)
+(void) => {}
+     ^"
+`;
+
+exports[`discard-binding-arrow-params.js [meriyah] format 1`] = `
+"Unexpected token: ')' (1:6)
+> 1 | (void) => {}
+    |      ^
+  2 |
+Cause: [1:5-1:6]: Unexpected token: ')'"
+`;
+
+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) => {}
+    |      ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`discard-binding-arrow-params.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+(void) => {}
+
+=====================================output=====================================
+(void) => {};
+
+================================================================================
+`;
+
+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] = []);
+    |      ^
+  2 |
+Cause: invalid expression (1:6)
+([void] = []);
+      ^"
+`;
+
+exports[`discard-binding-assignment.js [meriyah] format 1`] = `
+"Unexpected token: ']' (1:7)
+> 1 | ([void] = []);
+    |       ^
+  2 |
+Cause: [1:6-1:7]: Unexpected token: ']'"
+`;
+
+exports[`discard-binding-assignment.js [oxc] format 1`] = `
+"Unexpected token (1:7)
+> 1 | ([void] = []);
+    |       ^
+  2 |"
+`;
+
+exports[`discard-binding-assignment.js [oxc-ts] format 1`] = `
+"Unexpected token (1:7)
+> 1 | ([void] = []);
+    |       ^
+  2 |"
+`;
+
+exports[`discard-binding-assignment.js [typescript] format 1`] = `
+"Expression expected. (1:7)
+> 1 | ([void] = []);
+    |       ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`discard-binding-assignment.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+([void] = []);
+
+=====================================output=====================================
+[void] = [];
+
+================================================================================
+`;
+
+exports[`discard-binding-async-arrow-params.js [acorn] format 1`] = `
+"Unexpected token (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |
+Cause: Unexpected token (1:11)"
+`;
+
+exports[`discard-binding-async-arrow-params.js [espree] format 1`] = `
+"Unexpected token ) (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |
+Cause: Unexpected token )"
+`;
+
+exports[`discard-binding-async-arrow-params.js [flow] format 1`] = `
+"Unexpected token \`)\` (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |"
+`;
+
+exports[`discard-binding-async-arrow-params.js [hermes] format 1`] = `
+"invalid expression (1:11)
+> 1 | async (void) => {}
+    |           ^
+  2 |
+Cause: invalid expression (1:11)
+async (void) => {}
+           ^"
+`;
+
+exports[`discard-binding-async-arrow-params.js [meriyah] format 1`] = `
+"Unexpected token: ')' (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |
+Cause: [1:11-1:12]: Unexpected token: ')'"
+`;
+
+exports[`discard-binding-async-arrow-params.js [oxc] format 1`] = `
+"Unexpected token (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |"
+`;
+
+exports[`discard-binding-async-arrow-params.js [oxc-ts] format 1`] = `
+"Unexpected token (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |"
+`;
+
+exports[`discard-binding-async-arrow-params.js [typescript] format 1`] = `
+"Expression expected. (1:12)
+> 1 | async (void) => {}
+    |            ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`discard-binding-async-arrow-params.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+async (void) => {}
+
+=====================================output=====================================
+async (void) => {};
+
+================================================================================
+`;
+
+exports[`discard-binding-bindings.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (1:12)
+> 1 | const { p: void } = {};
+    |            ^
+  2 |
+Cause: Unexpected keyword 'void' (1:11)"
+`;
+
+exports[`discard-binding-bindings.js [espree] format 1`] = `
+"Unexpected keyword 'void' (1:12)
+> 1 | const { p: void } = {};
+    |            ^
+  2 |
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`discard-binding-bindings.js [flow] format 1`] = `
+"Unexpected reserved word (1:12)
+> 1 | const { p: void } = {};
+    |            ^^^^
+  2 |"
+`;
+
+exports[`discard-binding-bindings.js [hermes] format 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-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 } = {};
+    |            ^
+  2 |
+Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
+`;
+
+exports[`discard-binding-bindings.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+const { p: void } = {};
+
+=====================================output=====================================
+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-for-await-using-binding.js [espree] format 1`] = `
+"Unexpected keyword 'void' (2:19)
+  1 | async () => {
+> 2 |   for(await using void of []);
+    |                   ^
+  3 | }
+  4 |
+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-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-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-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-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-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-for-await-using-binding.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+async () => {
+  for(await using void of []);
+}
+
+=====================================output=====================================
+async () => {
+  for (await using void of []);
+};
+
+================================================================================
+`;
+
+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-bindings.js [espree] format 1`] = `
+"Unexpected keyword 'void' (1:16)
+> 1 | for(const { p: void } of []);
+    |                ^
+  2 |
+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-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-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-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-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-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-bindings.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+for(const { p: void } of []);
+
+=====================================output=====================================
+for (const { p: void } of []);
+
+================================================================================
+`;
+
+exports[`discard-binding-for-lhs.js [acorn] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for({ p: void } of []);
+    |               ^
+  2 |
+Cause: Unexpected token (1:14)"
+`;
+
+exports[`discard-binding-for-lhs.js [espree] format 1`] = `
+"Unexpected token } (1:15)
+> 1 | for({ p: void } of []);
+    |               ^
+  2 |
+Cause: Unexpected token }"
+`;
+
+exports[`discard-binding-for-lhs.js [flow] format 1`] = `
+"Unexpected token \`}\` (1:15)
+> 1 | for({ 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 []);
+    |               ^
+  2 |
+Cause: [1:14-1:15]: Unexpected token: '}'"
+`;
+
+exports[`discard-binding-for-lhs.js [oxc] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for({ p: void } of []);
+    |               ^
+  2 |"
+`;
+
+exports[`discard-binding-for-lhs.js [oxc-ts] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for({ p: void } of []);
+    |               ^
+  2 |"
+`;
+
+exports[`discard-binding-for-lhs.js [typescript] format 1`] = `
+"Expression expected. (1:15)
+> 1 | for({ p: void } of []);
+    |               ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`discard-binding-for-lhs.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+for({ p: void } of []);
+
+=====================================output=====================================
+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-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-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-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-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-using-binding.js [oxc] format 1`] = `
+"Expected \`;\` but found \`void\` (2:13)
+  1 | {
+> 2 |   for(using void of []);
+    |             ^^^^
+  3 | }
+  4 |"
+`;
+
+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-using-binding.js [typescript] format 1`] = `
+"';' expected. (2:13)
+  1 | {
+> 2 |   for(using void of []);
+    |             ^
+  3 | }
+  4 |
+Cause: ';' expected."
+`;
+
+exports[`discard-binding-for-using-binding.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+{
+  for(using void of []);
+}
+
+=====================================output=====================================
+{
+  for (using void of []);
+}
+
+================================================================================
+`;
+
+exports[`function-parameter.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void) {}
+    |              ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: Unexpected keyword 'void' (3:13)"
+`;
+
+exports[`function-parameter.js [espree] format 1`] = `
+"Unexpected keyword 'void' (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void) {}
+    |              ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`function-parameter.js [flow] format 1`] = `
+"Unexpected reserved word (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void) {}
+    |              ^^^^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter"
+`;
+
+exports[`function-parameter.js [hermes] format 1`] = `
+"identifier, '{' or '[' expected in binding pattern (3:13)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void) {}
+    |             ^
+  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."
+`;
+
+exports[`function-parameter.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+{
+  // function parameter
+  function f(void) {}
+}
+{
+  // arrow function parameter
+  (x, void) => {}
+}
+{
+  // async arrow function parameter
+  async (void, x) => {}
+}
+{
+  // object method parameter
+  ({ f(x, void, y) {} });
+}
+{
+  // class method parameter
+  class C { m(void,) {} }
+}
+
+=====================================output=====================================
+{
+  // function parameter
+  function f(void) {}
+}
+{
+  // arrow function parameter
+  (x, void) => {};
+}
+{
+  // async arrow function parameter
+  async (void, x) => {};
+}
+{
+  // object method parameter
+  ({ f(x, void, y) {} });
+}
+{
+  // class method parameter
+  class C {
+    m(void) {}
+  }
+}
+
+================================================================================
+`;
+
+exports[`object-pattern.js [acorn] format 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[`object-pattern.js [espree] format 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[`object-pattern.js [flow] format 1`] = `
+"Unexpected reserved word (3:17)
+  1 | {
+  2 |   // destructuring binding
+> 3 |   const { void: void } = value;
+    |                 ^^^^
+  4 | }
+  5 | {
+  6 |   // for-of destructuring binding"
+`;
+
+exports[`object-pattern.js [hermes] format 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[`object-pattern.js [meriyah] format 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[`object-pattern.js [oxc] format 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[`object-pattern.js [oxc-ts] format 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[`object-pattern.js [typescript] format 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[`object-pattern.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+{
+  // destructuring binding
+  const { void: void } = value;
+}
+{
+  // for-of destructuring binding
+  for (const { p: void } of []);
+}
+{
+  // destructuring assignment
+  ({ p: void } = {});
+}
+{
+  // for-of destructuring assignment
+  for ({ p: void } of []);
+}
+{
+  // function param
+  function f({ q: { q: { p: void }, p: void }, p: void }) {}
+}
+{
+  // arrow function param
+  ({ q: { q: { p: void }, p: void }, p: void }) => {}
+}
+{
+  // async arrow function param
+  async ({ q: { q: { p: void }, p: void }, p: void }) => {}
+}
+{
+  // destructuring assignment in async call
+  async({ p: void } = {});
+}
+{
+  // catch param
+  try {} catch ({ p: void }) {}
+}
+
+=====================================output=====================================
+{
+  // destructuring binding
+  const { void: void } = value;
+}
+{
+  // for-of destructuring binding
+  for (const { p: void } of []);
+}
+{
+  // destructuring assignment
+  ({ p: void } = {});
+}
+{
+  // for-of destructuring assignment
+  for ({ p: void } of []);
+}
+{
+  // function param
+  function f({
+    q: {
+      q: { p: void },
+      p: void,
+    },
+    p: void,
+  }) {}
+}
+{
+  // arrow function param
+  ({
+    q: {
+      q: { p: void },
+      p: void,
+    },
+    p: void,
+  }) => {};
+}
+{
+  // async arrow function param
+  async ({
+    q: {
+      q: { p: void },
+      p: void,
+    },
+    p: void,
+  }) => {};
+}
+{
+  // destructuring assignment in async call
+  async(({ p: void } = {}));
+}
+{
+  // catch param
+  try {
+  } catch ({ p: void }) {}
+}
+
+================================================================================
+`;
+
+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[`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[`unary-expression-void.js [flow] format 1`] = `
+"Unexpected token \`]\` (4:10)
+  2 | void [
+  3 |   // pattern
+> 4 |   [ void ] = [{
+    |          ^
+  5 |     // expr
+  6 |     [ void [] ]:
+  7 |     // pattern"
+`;
+
+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[`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[`unary-expression-void.js [oxc] format 1`] = `
+"Unexpected token (4:10)
+  2 | void [
+  3 |   // pattern
+> 4 |   [ void ] = [{
+    |          ^
+  5 |     // expr
+  6 |     [ void [] ]:
+  7 |     // pattern"
+`;
+
+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[`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[`unary-expression-void.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+// expr
+void [
+  // pattern
+  [ void ] = [{
+    // expr
+    [ void [] ]:
+    // pattern
+    [ void ] =
+    // expr
+    void [
+      // pattern
+      ([void]) => []
+    ]
+    // expr
+  }] = [void []]
+]
+
+=====================================output=====================================
+// expr
+void [
+  // pattern
+  ([void] = [
+    {
+      // expr
+      [void []]:
+        // pattern
+        // expr
+        [void] = void [
+          // pattern
+          ([void]) => [],
+        ],
+      // expr
+    },
+  ] =
+    [void []]),
+];
+
+================================================================================
+`;
+
+exports[`using.js [acorn] 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' (2:8)"
+`;
+
+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[`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[`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[`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[`using.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+{
+  using void = f();
+}
+async (void) => {
+  await using void = f();
+}
+
+=====================================output=====================================
+{
+  using void = f();
+}
+async (void) => {
+  await using void = f();
+};
+
+================================================================================
+`;
+
+exports[`using-variable-declarator.js [acorn] format 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 [espree] format 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 [flow] format 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 [hermes] format 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 [meriyah] format 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 [oxc] format 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 [oxc-ts] format 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 [typescript] format 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."
+`;
+
+exports[`using-variable-declarator.js format 1`] = `
+====================================options=====================================
+parsers: ["babel", "flow", "typescript"]
+printWidth: 80
+                                                                                | printWidth
+=====================================input======================================
+{
+  // using 1 declarator
+  using void = f();
+}
+{
+  // using 2 declarators
+  using void = f(), void = g();
+}
+{
+  // using void declarator and normal declarator
+  using void = f(), x = g();
+}
+{
+  // using declarator in for-of
+  for(using void of []);
+}
+async () => {
+  {
+    // await using 1 declarator
+    await using void = f();
+  }
+  {
+    // await using 2 declarators
+    await using void = f(), void = g();
+  }
+  {
+    // await using void declarator and normal declarator
+    await using void = f(), x = g();
+  }
+  {
+    // await using declarator in for-of
+    for(await using void of []);
+  }
+}
+
+=====================================output=====================================
+{
+  // using 1 declarator
+  using void = f();
+}
+{
+  // using 2 declarators
+  using void = f(),
+    void = g();
+}
+{
+  // using void declarator and normal declarator
+  using void = f(),
+    x = g();
+}
+{
+  // using declarator in for-of
+  for (using void of []);
+}
+async () => {
+  {
+    // await using 1 declarator
+    await using void = f();
+  }
+  {
+    // await using 2 declarators
+    await using void = f(),
+      void = g();
+  }
+  {
+    // await using void declarator and normal declarator
+    await using void = f(),
+      x = g();
+  }
+  {
+    // await using declarator in for-of
+    for (await using void of []);
+  }
+};
+
+================================================================================
+`;
diff --git a/tests/format/js/discard-binding/array-pattern.js b/tests/format/js/discard-binding/array-pattern.js
new file mode 100644
index 000000000000..a811f875c593
--- /dev/null
+++ b/tests/format/js/discard-binding/array-pattern.js
@@ -0,0 +1,36 @@
+{
+  // destructuring binding
+  const [, void, ] = value;
+}
+{
+  // for-of destructuring binding
+  for (const [void] of []);
+}
+{
+  // destructuring assignment
+  [void] = [];
+}
+{
+  // for-of destructuring assignment;
+  for ([void] of []);
+}
+{
+  // function param;
+  function f([[[void], void, ], void]) {}
+}
+{
+  // arrow function param
+  ([[[void], void, ], void]) => {}
+}
+{
+  // async arrow function param
+  async ([[[void], void, ], void]) => {}
+}
+{
+  // destructuring assignment in async call";
+  async([void] = []);
+}
+{
+  // catch param
+  try {} catch ([void]) {}
+}
diff --git a/tests/format/js/discard-binding/basic.js b/tests/format/js/discard-binding/basic.js
new file mode 100644
index 000000000000..ff371fc91ec7
--- /dev/null
+++ b/tests/format/js/discard-binding/basic.js
@@ -0,0 +1,7 @@
+const [void] = [,void] = [void,] = [];
+
+function f(void, { p: void }, [ void ]) {}
+
+(void, { p: void }, [ void ]) => {}
+
+async (void, { p: void }, [ void ]) => {}
diff --git a/tests/format/js/discard-binding/discard-binding-arrow-params.js b/tests/format/js/discard-binding/discard-binding-arrow-params.js
new file mode 100644
index 000000000000..c5ad81d2e534
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-arrow-params.js
@@ -0,0 +1,1 @@
+(void) => {}
diff --git a/tests/format/js/discard-binding/discard-binding-assignment.js b/tests/format/js/discard-binding/discard-binding-assignment.js
new file mode 100644
index 000000000000..7a7b659e1ed9
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-assignment.js
@@ -0,0 +1,1 @@
+([void] = []);
diff --git a/tests/format/js/discard-binding/discard-binding-async-arrow-params.js b/tests/format/js/discard-binding/discard-binding-async-arrow-params.js
new file mode 100644
index 000000000000..eaad1a426d0e
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-async-arrow-params.js
@@ -0,0 +1,1 @@
+async (void) => {}
diff --git a/tests/format/js/discard-binding/discard-binding-bindings.js b/tests/format/js/discard-binding/discard-binding-bindings.js
new file mode 100644
index 000000000000..c1788c192ac0
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-bindings.js
@@ -0,0 +1,1 @@
+const { p: void } = {};
diff --git a/tests/format/js/discard-binding/discard-binding-for-await-using-binding.js b/tests/format/js/discard-binding/discard-binding-for-await-using-binding.js
new file mode 100644
index 000000000000..322650adca34
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-for-await-using-binding.js
@@ -0,0 +1,3 @@
+async () => {
+  for(await using void of []);
+}
diff --git a/tests/format/js/discard-binding/discard-binding-for-bindings.js b/tests/format/js/discard-binding/discard-binding-for-bindings.js
new file mode 100644
index 000000000000..85bd202f39e4
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-for-bindings.js
@@ -0,0 +1,1 @@
+for(const { p: void } of []);
diff --git a/tests/format/js/discard-binding/discard-binding-for-lhs.js b/tests/format/js/discard-binding/discard-binding-for-lhs.js
new file mode 100644
index 000000000000..af2435344081
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-for-lhs.js
@@ -0,0 +1,1 @@
+for({ p: void } of []);
diff --git a/tests/format/js/discard-binding/discard-binding-for-using-binding.js b/tests/format/js/discard-binding/discard-binding-for-using-binding.js
new file mode 100644
index 000000000000..b6ffe5e9b6f2
--- /dev/null
+++ b/tests/format/js/discard-binding/discard-binding-for-using-binding.js
@@ -0,0 +1,3 @@
+{
+  for(using void of []);
+}
diff --git a/tests/format/js/discard-binding/format.test.js b/tests/format/js/discard-binding/format.test.js
new file mode 100644
index 000000000000..30ab92f0ab9e
--- /dev/null
+++ b/tests/format/js/discard-binding/format.test.js
@@ -0,0 +1,12 @@
+runFormatTest(import.meta, ["babel", "flow", "typescript"], {
+  errors: {
+    flow: true,
+    typescript: true,
+    acorn: true,
+    espree: true,
+    meriyah: true,
+    oxc: true,
+    "oxc-ts": true,
+    hermes: true,
+  },
+});
diff --git a/tests/format/js/discard-binding/function-parameter.js b/tests/format/js/discard-binding/function-parameter.js
new file mode 100644
index 000000000000..a43e09f438a3
--- /dev/null
+++ b/tests/format/js/discard-binding/function-parameter.js
@@ -0,0 +1,20 @@
+{
+  // function parameter
+  function f(void) {}
+}
+{
+  // arrow function parameter
+  (x, void) => {}
+}
+{
+  // async arrow function parameter
+  async (void, x) => {}
+}
+{
+  // object method parameter
+  ({ f(x, void, y) {} });
+}
+{
+  // class method parameter
+  class C { m(void,) {} }
+}
diff --git a/tests/format/js/discard-binding/object-pattern.js b/tests/format/js/discard-binding/object-pattern.js
new file mode 100644
index 000000000000..53d4b415aa0e
--- /dev/null
+++ b/tests/format/js/discard-binding/object-pattern.js
@@ -0,0 +1,36 @@
+{
+  // destructuring binding
+  const { void: void } = value;
+}
+{
+  // for-of destructuring binding
+  for (const { p: void } of []);
+}
+{
+  // destructuring assignment
+  ({ p: void } = {});
+}
+{
+  // for-of destructuring assignment
+  for ({ p: void } of []);
+}
+{
+  // function param
+  function f({ q: { q: { p: void }, p: void }, p: void }) {}
+}
+{
+  // arrow function param
+  ({ q: { q: { p: void }, p: void }, p: void }) => {}
+}
+{
+  // async arrow function param
+  async ({ q: { q: { p: void }, p: void }, p: void }) => {}
+}
+{
+  // destructuring assignment in async call
+  async({ p: void } = {});
+}
+{
+  // catch param
+  try {} catch ({ p: void }) {}
+}
diff --git a/tests/format/js/discard-binding/unary-expression-void.js b/tests/format/js/discard-binding/unary-expression-void.js
new file mode 100644
index 000000000000..031043d9526f
--- /dev/null
+++ b/tests/format/js/discard-binding/unary-expression-void.js
@@ -0,0 +1,16 @@
+// expr
+void [
+  // pattern
+  [ void ] = [{
+    // expr
+    [ void [] ]:
+    // pattern
+    [ void ] =
+    // expr
+    void [
+      // pattern
+      ([void]) => []
+    ]
+    // expr
+  }] = [void []]
+]
diff --git a/tests/format/js/discard-binding/using-variable-declarator.js b/tests/format/js/discard-binding/using-variable-declarator.js
new file mode 100644
index 000000000000..8b5eb00acc9f
--- /dev/null
+++ b/tests/format/js/discard-binding/using-variable-declarator.js
@@ -0,0 +1,34 @@
+{
+  // using 1 declarator
+  using void = f();
+}
+{
+  // using 2 declarators
+  using void = f(), void = g();
+}
+{
+  // using void declarator and normal declarator
+  using void = f(), x = g();
+}
+{
+  // using declarator in for-of
+  for(using void of []);
+}
+async () => {
+  {
+    // await using 1 declarator
+    await using void = f();
+  }
+  {
+    // await using 2 declarators
+    await using void = f(), void = g();
+  }
+  {
+    // await using void declarator and normal declarator
+    await using void = f(), x = g();
+  }
+  {
+    // await using declarator in for-of
+    for(await using void of []);
+  }
+}
diff --git a/tests/format/js/discard-binding/using.js b/tests/format/js/discard-binding/using.js
new file mode 100644
index 000000000000..d6db9f977ae2
--- /dev/null
+++ b/tests/format/js/discard-binding/using.js
@@ -0,0 +1,6 @@
+{
+  using void = f();
+}
+async (void) => {
+  await using void = f();
+}
diff --git a/tests/format/misc/errors/js/discard-binding/__snapshots__/format.test.js.snap b/tests/format/misc/errors/js/discard-binding/__snapshots__/format.test.js.snap
new file mode 100644
index 000000000000..fcda0de7e553
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/__snapshots__/format.test.js.snap
@@ -0,0 +1,1385 @@
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
+
+exports[`invalid-array-expression.js [acorn] format 1`] = `
+"Unexpected token (1:9)
+> 1 | ([[[void], x, ], y]);
+    |         ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |
+Cause: Unexpected token (1:8)"
+`;
+
+exports[`invalid-array-expression.js [babel] format 1`] = `
+"'void' must be followed by an expression when not used in a binding position. (1:5)
+> 1 | ([[[void], x, ], y]);
+    |     ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |
+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`] = `
+"Unexpected token ] (1:9)
+> 1 | ([[[void], x, ], y]);
+    |         ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |
+Cause: Unexpected token ]"
+`;
+
+exports[`invalid-array-expression.js [hermes] format 1`] = `
+"invalid expression (1:8)
+> 1 | ([[[void], x, ], y]);
+    |        ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |
+Cause: invalid expression (1:8)
+([[[void], x, ], y]);
+        ^"
+`;
+
+exports[`invalid-array-expression.js [meriyah] format 1`] = `
+"Unexpected token: ']' (1:9)
+> 1 | ([[[void], x, ], y]);
+    |         ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |
+Cause: [1:8-1:9]: Unexpected token: ']'"
+`;
+
+exports[`invalid-array-expression.js [oxc] format 1`] = `
+"Unexpected token (1:9)
+> 1 | ([[[void], x, ], y]);
+    |         ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |"
+`;
+
+exports[`invalid-array-expression.js [oxc-ts] format 1`] = `
+"Unexpected token (1:9)
+> 1 | ([[[void], x, ], y]);
+    |         ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |"
+`;
+
+exports[`invalid-array-expression.js [typescript] format 1`] = `
+"Expression expected. (1:9)
+> 1 | ([[[void], x, ], y]);
+    |         ^
+  2 |
+  3 | ([[[x], void, ], y]);
+  4 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-assignment-expression.js [acorn] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |
+Cause: Unexpected token (1:5)"
+`;
+
+exports[`invalid-assignment-expression.js [babel] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |
+Cause: Unexpected token (1:5)"
+`;
+
+exports[`invalid-assignment-expression.js [espree] format 1`] = `
+"Unexpected token = (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |
+Cause: Unexpected token ="
+`;
+
+exports[`invalid-assignment-expression.js [hermes] format 1`] = `
+"invalid expression (1:5)
+> 1 | void = 0;
+    |     ^
+  2 |
+Cause: invalid expression (1:5)
+void = 0;
+     ^"
+`;
+
+exports[`invalid-assignment-expression.js [meriyah] format 1`] = `
+"Unexpected token: '=' (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |
+Cause: [1:5-1:6]: Unexpected token: '='"
+`;
+
+exports[`invalid-assignment-expression.js [oxc] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |"
+`;
+
+exports[`invalid-assignment-expression.js [oxc-ts] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |"
+`;
+
+exports[`invalid-assignment-expression.js [typescript] format 1`] = `
+"Expression expected. (1:6)
+> 1 | void = 0;
+    |      ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-assignment-for.js [acorn] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |
+Cause: Unexpected token (1:14)"
+`;
+
+exports[`invalid-assignment-for.js [babel] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |
+Cause: Unexpected token (1:14)"
+`;
+
+exports[`invalid-assignment-for.js [espree] format 1`] = `
+"Unexpected token ] (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |
+Cause: Unexpected token ]"
+`;
+
+exports[`invalid-assignment-for.js [hermes] format 1`] = `
+"invalid expression (1:14)
+> 1 | for (void of []);
+    |              ^
+  2 |
+Cause: invalid expression (1:14)
+for (void of []);
+              ^"
+`;
+
+exports[`invalid-assignment-for.js [meriyah] format 1`] = `
+"Unexpected token: ']' (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |
+Cause: [1:14-1:15]: Unexpected token: ']'"
+`;
+
+exports[`invalid-assignment-for.js [oxc] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |"
+`;
+
+exports[`invalid-assignment-for.js [oxc-ts] format 1`] = `
+"Unexpected token (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |"
+`;
+
+exports[`invalid-assignment-for.js [typescript] format 1`] = `
+"An element access expression should take an argument. (1:15)
+> 1 | for (void of []);
+    |               ^
+  2 |
+Cause: An element access expression should take an argument."
+`;
+
+exports[`invalid-assignment-pattern.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void = 0) {}
+    |              ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: Unexpected keyword 'void' (3:13)"
+`;
+
+exports[`invalid-assignment-pattern.js [babel] format 1`] = `
+"A void binding may not have an initializer. (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void = 0) {}
+    |              ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: A void binding may not have an initializer. (3:13)"
+`;
+
+exports[`invalid-assignment-pattern.js [espree] format 1`] = `
+"Unexpected keyword 'void' (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void = 0) {}
+    |              ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`invalid-assignment-pattern.js [hermes] format 1`] = `
+"identifier, '{' or '[' expected in binding pattern (3:13)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void = 0) {}
+    |             ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: identifier, '{' or '[' expected in binding pattern (3:13)
+  function f(void = 0) {}
+             ^"
+`;
+
+exports[`invalid-assignment-pattern.js [meriyah] format 1`] = `
+"Invalid keyword (3:14)
+  1 | {
+  2 |   // function parameter
+> 3 |   function f(void = 0) {}
+    |              ^^^^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: [3:13-3:17]: Invalid keyword"
+`;
+
+exports[`invalid-assignment-pattern.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 = 0) {}
+    |              ^^^^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter"
+`;
+
+exports[`invalid-assignment-pattern.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 = 0) {}
+    |              ^^^^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter"
+`;
+
+exports[`invalid-assignment-pattern.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 = 0) {}
+    |              ^
+  4 | }
+  5 | {
+  6 |   // arrow function parameter
+Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
+`;
+
+exports[`invalid-async-call-argument.js [acorn] format 1`] = `
+"Unexpected token (1:11)
+> 1 | async(void, x);
+    |           ^
+  2 |
+  3 | async(x, void);
+  4 |
+Cause: Unexpected token (1:10)"
+`;
+
+exports[`invalid-async-call-argument.js [babel] format 1`] = `
+"'void' must be followed by an expression when not used in a binding position. (1:7)
+> 1 | async(void, x);
+    |       ^
+  2 |
+  3 | async(x, void);
+  4 |
+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`] = `
+"Unexpected token , (1:11)
+> 1 | async(void, x);
+    |           ^
+  2 |
+  3 | async(x, void);
+  4 |
+Cause: Unexpected token ,"
+`;
+
+exports[`invalid-async-call-argument.js [hermes] format 1`] = `
+"invalid expression (1:10)
+> 1 | async(void, x);
+    |          ^
+  2 |
+  3 | async(x, void);
+  4 |
+Cause: invalid expression (1:10)
+async(void, x);
+          ^"
+`;
+
+exports[`invalid-async-call-argument.js [meriyah] format 1`] = `
+"Unexpected token: ',' (1:11)
+> 1 | async(void, x);
+    |           ^
+  2 |
+  3 | async(x, void);
+  4 |
+Cause: [1:10-1:11]: Unexpected token: ','"
+`;
+
+exports[`invalid-async-call-argument.js [oxc] format 1`] = `
+"Unexpected token (1:11)
+> 1 | async(void, x);
+    |           ^
+  2 |
+  3 | async(x, void);
+  4 |"
+`;
+
+exports[`invalid-async-call-argument.js [oxc-ts] format 1`] = `
+"Unexpected token (1:11)
+> 1 | async(void, x);
+    |           ^
+  2 |
+  3 | async(x, void);
+  4 |"
+`;
+
+exports[`invalid-async-call-argument.js [typescript] format 1`] = `
+"Expression expected. (1:11)
+> 1 | async(void, x);
+    |           ^
+  2 |
+  3 | async(x, void);
+  4 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-catch-parameter.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (1:15)
+> 1 | try {} catch (void) {}
+    |               ^
+  2 |
+Cause: Unexpected keyword 'void' (1:14)"
+`;
+
+exports[`invalid-catch-parameter.js [babel] format 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) {}
+    |               ^
+  2 |
+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`] = `
+"Unexpected keyword 'void' (1:15)
+> 1 | try {} catch (void) {}
+    |               ^
+  2 |
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`invalid-catch-parameter.js [hermes] format 1`] = `
+"'identifier' expected inside catch list (1:14)
+> 1 | try {} catch (void) {}
+    |              ^
+  2 |
+Cause: 'identifier' expected inside catch list (1:14)
+try {} catch (void) {}
+       ~~~~~~~^"
+`;
+
+exports[`invalid-catch-parameter.js [meriyah] format 1`] = `
+"Invalid keyword (1:15)
+> 1 | try {} catch (void) {}
+    |               ^^^^
+  2 |
+Cause: [1:14-1:18]: Invalid keyword"
+`;
+
+exports[`invalid-catch-parameter.js [oxc] format 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`] = `
+"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`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (1:15)
+> 1 | try {} catch (void) {}
+    |               ^
+  2 |
+Cause: Identifier expected. 'void' is a reserved word that cannot be used here."
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [acorn] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void => {}
+    |      ^
+  2 |
+Cause: Unexpected token (1:5)"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [babel] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void => {}
+    |      ^
+  2 |
+Cause: Unexpected token (1:5)"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [espree] format 1`] = `
+"Unexpected token => (1:6)
+> 1 | void => {}
+    |      ^
+  2 |
+Cause: Unexpected token =>"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [hermes] format 1`] = `
+"invalid expression (1:5)
+> 1 | void => {}
+    |     ^
+  2 |
+Cause: invalid expression (1:5)
+void => {}
+     ^"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [meriyah] format 1`] = `
+"Unexpected token: '=>' (1:6)
+> 1 | void => {}
+    |      ^^
+  2 |
+Cause: [1:5-1:7]: Unexpected token: '=>'"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [oxc] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void => {}
+    |      ^^
+  2 |"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [oxc-ts] format 1`] = `
+"Unexpected token (1:6)
+> 1 | void => {}
+    |      ^^
+  2 |"
+`;
+
+exports[`invalid-lone-arrow-function-parameter.js [typescript] format 1`] = `
+"Expression expected. (1:6)
+> 1 | void => {}
+    |      ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-lone-async-arrow-function-parameter.js [acorn] format 1`] = `
+"Unexpected token (1:7)
+> 1 | async void => {}
+    |       ^
+  2 |
+Cause: Unexpected token (1:6)"
+`;
+
+exports[`invalid-lone-async-arrow-function-parameter.js [babel] format 1`] = `
+"Unexpected token (1:12)
+> 1 | async void => {}
+    |            ^
+  2 |
+Cause: Unexpected token (1:11)"
+`;
+
+exports[`invalid-lone-async-arrow-function-parameter.js [espree] format 1`] = `
+"Unexpected token void (1:7)
+> 1 | async void => {}
+    |       ^
+  2 |
+Cause: Unexpected token void"
+`;
+
+exports[`invalid-lone-async-arrow-function-parameter.js [hermes] format 1`] = `
+"';' expected (1:6)
+> 1 | async void => {}
+    |      ^
+  2 |
+Cause: ';' expected (1:6)
+async void => {}
+      ^"
+`;
+
+exports[`invalid-lone-async-arrow-function-parameter.js [meriyah] format 1`] = `
+"Unexpected token: 'void' (1:7)
+> 1 | async void => {}
+    |       ^^^^
+  2 |
+Cause: [1:6-1:10]: Unexpected token: 'void'"
+`;
+
+exports[`invalid-lone-async-arrow-function-parameter.js [oxc] format 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`] = `
+"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`] = `
+"Unexpected keyword or identifier. (1:1)
+> 1 | async void => {}
+    | ^
+  2 |
+Cause: Unexpected keyword or identifier."
+`;
+
+exports[`invalid-object-expression.js [acorn] format 1`] = `
+"Unexpected token (1:22)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                      ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |
+Cause: Unexpected token (1:21)"
+`;
+
+exports[`invalid-object-expression.js [babel] format 1`] = `
+"'void' must be followed by an expression when not used in a binding position. (1:17)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                 ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |
+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`] = `
+"Unexpected token } (1:22)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                      ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |
+Cause: Unexpected token }"
+`;
+
+exports[`invalid-object-expression.js [hermes] format 1`] = `
+"invalid expression (1:21)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                     ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |
+Cause: invalid expression (1:21)
+({ p: { p: { p: void }, x, }, y});
+                     ^"
+`;
+
+exports[`invalid-object-expression.js [meriyah] format 1`] = `
+"Unexpected token: '}' (1:22)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                      ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |
+Cause: [1:21-1:22]: Unexpected token: '}'"
+`;
+
+exports[`invalid-object-expression.js [oxc] format 1`] = `
+"Unexpected token (1:22)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                      ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |"
+`;
+
+exports[`invalid-object-expression.js [oxc-ts] format 1`] = `
+"Unexpected token (1:22)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                      ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |"
+`;
+
+exports[`invalid-object-expression.js [typescript] format 1`] = `
+"Expression expected. (1:22)
+> 1 | ({ p: { p: { p: void }, x, }, y});
+    |                      ^
+  2 |
+  3 | ({ p: { x: { x }, p: void, }, y});
+  4 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-parenthesized-assignment.js [acorn] format 1`] = `
+"Unexpected token (1:7)
+> 1 | [(void)] = [];
+    |       ^
+  2 |
+Cause: Unexpected token (1:6)"
+`;
+
+exports[`invalid-parenthesized-assignment.js [babel] format 1`] = `
+"'void' must be followed by an expression when not used in a binding position. (1:3)
+> 1 | [(void)] = [];
+    |   ^
+  2 |
+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`] = `
+"Unexpected token ) (1:7)
+> 1 | [(void)] = [];
+    |       ^
+  2 |
+Cause: Unexpected token )"
+`;
+
+exports[`invalid-parenthesized-assignment.js [hermes] format 1`] = `
+"invalid expression (1:6)
+> 1 | [(void)] = [];
+    |      ^
+  2 |
+Cause: invalid expression (1:6)
+[(void)] = [];
+      ^"
+`;
+
+exports[`invalid-parenthesized-assignment.js [meriyah] format 1`] = `
+"Unexpected token: ')' (1:7)
+> 1 | [(void)] = [];
+    |       ^
+  2 |
+Cause: [1:6-1:7]: Unexpected token: ')'"
+`;
+
+exports[`invalid-parenthesized-assignment.js [oxc] format 1`] = `
+"Unexpected token (1:7)
+> 1 | [(void)] = [];
+    |       ^
+  2 |"
+`;
+
+exports[`invalid-parenthesized-assignment.js [oxc-ts] format 1`] = `
+"Unexpected token (1:7)
+> 1 | [(void)] = [];
+    |       ^
+  2 |"
+`;
+
+exports[`invalid-parenthesized-assignment.js [typescript] format 1`] = `
+"Expression expected. (1:7)
+> 1 | [(void)] = [];
+    |       ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-parenthesized-binding.js [acorn] format 1`] = `
+"Unexpected token (1:10)
+> 1 | const [, (void), ] = value;
+    |          ^
+  2 |
+Cause: Unexpected token (1:9)"
+`;
+
+exports[`invalid-parenthesized-binding.js [babel] format 1`] = `
+"Unexpected token (1:10)
+> 1 | const [, (void), ] = value;
+    |          ^
+  2 |
+Cause: Unexpected token (1:9)"
+`;
+
+exports[`invalid-parenthesized-binding.js [espree] format 1`] = `
+"Unexpected token ( (1:10)
+> 1 | const [, (void), ] = value;
+    |          ^
+  2 |
+Cause: Unexpected token ("
+`;
+
+exports[`invalid-parenthesized-binding.js [hermes] format 1`] = `
+"identifier, '{' or '[' expected in binding pattern (1:9)
+> 1 | const [, (void), ] = value;
+    |         ^
+  2 |
+Cause: identifier, '{' or '[' expected in binding pattern (1:9)
+const [, (void), ] = value;
+         ^"
+`;
+
+exports[`invalid-parenthesized-binding.js [meriyah] format 1`] = `
+"Unexpected token: ')' (1:15)
+> 1 | const [, (void), ] = value;
+    |               ^
+  2 |
+Cause: [1:14-1:15]: Unexpected token: ')'"
+`;
+
+exports[`invalid-parenthesized-binding.js [oxc] format 1`] = `
+"Unexpected token (1:10)
+> 1 | const [, (void), ] = value;
+    |          ^
+  2 |"
+`;
+
+exports[`invalid-parenthesized-binding.js [oxc-ts] format 1`] = `
+"Unexpected token (1:10)
+> 1 | const [, (void), ] = value;
+    |          ^
+  2 |"
+`;
+
+exports[`invalid-parenthesized-binding.js [typescript] format 1`] = `
+"Array element destructuring pattern expected. (1:10)
+> 1 | const [, (void), ] = value;
+    |          ^
+  2 |
+Cause: Array element destructuring pattern expected."
+`;
+
+exports[`invalid-rest-element-array-pattern.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (2:12)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);
+Cause: Unexpected keyword 'void' (2:11)"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [babel] format 1`] = `
+"Unexpected void binding. (2:12)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);
+Cause: Unexpected void binding. (2:11)"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [espree] format 1`] = `
+"Unexpected keyword 'void' (2:12)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [hermes] format 1`] = `
+"identifier, '{' or '[' expected in binding pattern (2:11)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |           ^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);
+Cause: identifier, '{' or '[' expected in binding pattern (2:11)
+  var [ ...void ] = [];
+           ^"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [meriyah] format 1`] = `
+"Unexpected token: ']' (2:17)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |                 ^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);
+Cause: [2:16-2:17]: Unexpected token: ']'"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [oxc] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |            ^^^^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [oxc-ts] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |            ^^^^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);"
+`;
+
+exports[`invalid-rest-element-array-pattern.js [typescript] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
+  1 | {
+> 2 |   var [ ...void ] = [];
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var [...void] of [[]]);
+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`] = `
+"Unexpected token (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |
+Cause: Unexpected token (1:15)"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [babel] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |
+Cause: Unexpected token (1:15)"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [espree] format 1`] = `
+"Unexpected token ] (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |
+Cause: Unexpected token ]"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [hermes] format 1`] = `
+"invalid expression (1:15)
+> 1 | for ([ ...void ] of []);
+    |               ^
+  2 |
+Cause: invalid expression (1:15)
+for ([ ...void ] of []);
+               ^"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [meriyah] format 1`] = `
+"Unexpected token: ']' (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |
+Cause: [1:15-1:16]: Unexpected token: ']'"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [oxc] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [oxc-ts] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-array-pattern-for-lhs.js [typescript] format 1`] = `
+"Expression expected. (1:16)
+> 1 | for ([ ...void ] of []);
+    |                ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [acorn] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |
+Cause: Unexpected token (1:11)"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [babel] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |
+Cause: Unexpected token (1:11)"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [espree] format 1`] = `
+"Unexpected token ] (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |
+Cause: Unexpected token ]"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [hermes] format 1`] = `
+"invalid expression (1:11)
+> 1 | ([ ...void ] = []);
+    |           ^
+  2 |
+Cause: invalid expression (1:11)
+([ ...void ] = []);
+           ^"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [meriyah] format 1`] = `
+"Unexpected token: ']' (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |
+Cause: [1:11-1:12]: Unexpected token: ']'"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [oxc] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [oxc-ts] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-array-pattern-lhs.js [typescript] format 1`] = `
+"Expression expected. (1:12)
+> 1 | ([ ...void ] = []);
+    |            ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-rest-element-object-pattern.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (2:12)
+  1 | {
+> 2 |   var { ...void } = {};
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);
+Cause: Unexpected keyword 'void' (2:11)"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [babel] format 1`] = `
+"Unexpected void binding. (2:12)
+  1 | {
+> 2 |   var { ...void } = {};
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);
+Cause: Unexpected void binding. (2:11)"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [espree] format 1`] = `
+"Unexpected keyword 'void' (2:12)
+  1 | {
+> 2 |   var { ...void } = {};
+    |            ^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [hermes] format 1`] = `
+"identifier expected after '...' in object pattern (2:11)
+  1 | {
+> 2 |   var { ...void } = {};
+    |           ^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);
+Cause: identifier expected after '...' in object pattern (2:11)
+  var { ...void } = {};
+           ^"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [meriyah] format 1`] = `
+"Unexpected token: '}' (2:17)
+  1 | {
+> 2 |   var { ...void } = {};
+    |                 ^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);
+Cause: [2:16-2:17]: Unexpected token: '}'"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [oxc] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
+  1 | {
+> 2 |   var { ...void } = {};
+    |            ^^^^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [oxc-ts] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:12)
+  1 | {
+> 2 |   var { ...void } = {};
+    |            ^^^^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);"
+`;
+
+exports[`invalid-rest-element-object-pattern.js [typescript] format 1`] = `
+"':' expected. (2:17)
+  1 | {
+> 2 |   var { ...void } = {};
+    |                 ^
+  3 | }
+  4 | {
+  5 |   for (var { ...void } of [{}]);
+Cause: ':' expected."
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [acorn] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |
+Cause: Unexpected token (1:15)"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [babel] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |
+Cause: Unexpected token (1:15)"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [espree] format 1`] = `
+"Unexpected token } (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |
+Cause: Unexpected token }"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [hermes] format 1`] = `
+"invalid expression (1:15)
+> 1 | for ({ ...void } of []);
+    |               ^
+  2 |
+Cause: invalid expression (1:15)
+for ({ ...void } of []);
+               ^"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [meriyah] format 1`] = `
+"Unexpected token: '}' (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |
+Cause: [1:15-1:16]: Unexpected token: '}'"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [oxc] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [oxc-ts] format 1`] = `
+"Unexpected token (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-object-pattern-for-lhs.js [typescript] format 1`] = `
+"Expression expected. (1:16)
+> 1 | for ({ ...void } of []);
+    |                ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [acorn] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |
+Cause: Unexpected token (1:11)"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [babel] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |
+Cause: Unexpected token (1:11)"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [espree] format 1`] = `
+"Unexpected token } (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |
+Cause: Unexpected token }"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [hermes] format 1`] = `
+"invalid expression (1:11)
+> 1 | ({ ...void } = {});
+    |           ^
+  2 |
+Cause: invalid expression (1:11)
+({ ...void } = {});
+           ^"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [meriyah] format 1`] = `
+"Unexpected token: '}' (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |
+Cause: [1:11-1:12]: Unexpected token: '}'"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [oxc] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [oxc-ts] format 1`] = `
+"Unexpected token (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |"
+`;
+
+exports[`invalid-rest-element-object-pattern-lhs.js [typescript] format 1`] = `
+"Expression expected. (1:12)
+> 1 | ({ ...void } = {});
+    |            ^
+  2 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-sequence-expression.js [acorn] format 1`] = `
+"Unexpected token (1:6)
+> 1 | (void, x);
+    |      ^
+  2 |
+  3 | (x, void);
+  4 |
+Cause: Unexpected token (1:5)"
+`;
+
+exports[`invalid-sequence-expression.js [babel] format 1`] = `
+"'void' must be followed by an expression when not used in a binding position. (1:2)
+> 1 | (void, x);
+    |  ^
+  2 |
+  3 | (x, void);
+  4 |
+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`] = `
+"Unexpected token , (1:6)
+> 1 | (void, x);
+    |      ^
+  2 |
+  3 | (x, void);
+  4 |
+Cause: Unexpected token ,"
+`;
+
+exports[`invalid-sequence-expression.js [hermes] format 1`] = `
+"invalid expression (1:5)
+> 1 | (void, x);
+    |     ^
+  2 |
+  3 | (x, void);
+  4 |
+Cause: invalid expression (1:5)
+(void, x);
+     ^"
+`;
+
+exports[`invalid-sequence-expression.js [meriyah] format 1`] = `
+"Unexpected token: ',' (1:6)
+> 1 | (void, x);
+    |      ^
+  2 |
+  3 | (x, void);
+  4 |
+Cause: [1:5-1:6]: Unexpected token: ','"
+`;
+
+exports[`invalid-sequence-expression.js [oxc] format 1`] = `
+"Unexpected token (1:6)
+> 1 | (void, x);
+    |      ^
+  2 |
+  3 | (x, void);
+  4 |"
+`;
+
+exports[`invalid-sequence-expression.js [oxc-ts] format 1`] = `
+"Unexpected token (1:6)
+> 1 | (void, x);
+    |      ^
+  2 |
+  3 | (x, void);
+  4 |"
+`;
+
+exports[`invalid-sequence-expression.js [typescript] format 1`] = `
+"Expression expected. (1:6)
+> 1 | (void, x);
+    |      ^
+  2 |
+  3 | (x, void);
+  4 |
+Cause: Expression expected."
+`;
+
+exports[`invalid-variable-declarator.js [acorn] format 1`] = `
+"Unexpected keyword 'void' (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();
+Cause: Unexpected keyword 'void' (2:6)"
+`;
+
+exports[`invalid-variable-declarator.js [babel] format 1`] = `
+"Unexpected void binding. (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();
+Cause: Unexpected void binding. (2:6)"
+`;
+
+exports[`invalid-variable-declarator.js [espree] format 1`] = `
+"Unexpected keyword 'void' (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();
+Cause: Unexpected keyword 'void'"
+`;
+
+exports[`invalid-variable-declarator.js [hermes] format 1`] = `
+"'identifier' expected in declaration (2:6)
+  1 | {
+> 2 |   var void = f();
+    |      ^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();
+Cause: 'identifier' expected in declaration (2:6)
+  var void = f();
+  ~~~~^"
+`;
+
+exports[`invalid-variable-declarator.js [meriyah] format 1`] = `
+"Invalid keyword (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^^^^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();
+Cause: [2:6-2:10]: Invalid keyword"
+`;
+
+exports[`invalid-variable-declarator.js [oxc] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^^^^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();"
+`;
+
+exports[`invalid-variable-declarator.js [oxc-ts] format 1`] = `
+"Identifier expected. 'void' is a reserved word that cannot be used here. (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^^^^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();"
+`;
+
+exports[`invalid-variable-declarator.js [typescript] format 1`] = `
+"'void' is not allowed as a variable declaration name. (2:7)
+  1 | {
+> 2 |   var void = f();
+    |       ^
+  3 | }
+  4 | {
+  5 |   let void = f(), void = g();
+Cause: 'void' is not allowed as a variable declaration name."
+`;
diff --git a/tests/format/misc/errors/js/discard-binding/format.test.js b/tests/format/misc/errors/js/discard-binding/format.test.js
new file mode 100644
index 000000000000..909e2769f4ef
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/format.test.js
@@ -0,0 +1,10 @@
+runFormatTest(import.meta, [
+  "babel",
+  "typescript",
+  "acorn",
+  "espree",
+  "meriyah",
+  "oxc",
+  "oxc-ts",
+  "hermes",
+]);
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-array-expression.js b/tests/format/misc/errors/js/discard-binding/invalid-array-expression.js
new file mode 100644
index 000000000000..2f3c47674c98
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-array-expression.js
@@ -0,0 +1,9 @@
+([[[void], x, ], y]);
+
+([[[x], void, ], y]);
+
+([[[x], y, ], void]);
+
+([void, x = 0]);
+
+async([void, x = 0]);
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-assignment-expression.js b/tests/format/misc/errors/js/discard-binding/invalid-assignment-expression.js
new file mode 100644
index 000000000000..214251a82412
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-assignment-expression.js
@@ -0,0 +1,1 @@
+void = 0;
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-assignment-for.js b/tests/format/misc/errors/js/discard-binding/invalid-assignment-for.js
new file mode 100644
index 000000000000..45dca173a8b9
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-assignment-for.js
@@ -0,0 +1,1 @@
+for (void of []);
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-assignment-pattern.js b/tests/format/misc/errors/js/discard-binding/invalid-assignment-pattern.js
new file mode 100644
index 000000000000..2385915a4a26
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-assignment-pattern.js
@@ -0,0 +1,69 @@
+{
+  // function parameter
+  function f(void = 0) {}
+}
+{
+  // arrow function parameter
+  (void = 0) => {}
+}
+{
+  // async arrow function parameter
+  async (void = 0) => {}
+}
+{
+  // nested array pattern: function parameter
+  function f([void = 0]) {}
+}
+{
+  // nested array pattern: arrow function parameter
+  ([void = 0]) => {}
+}
+{
+  // nested array pattern: async arrow function parameter
+  async ([void = 0]) => {}
+}
+{
+  // nested object pattern: function parameter
+  function f({ p: void = 0 }) {}
+}
+{
+  // nested object pattern: arrow function parameter
+  ({ p: void = 0 }) => {}
+}
+{
+  // nested object pattern: async arrow function parameter
+  async ({ p: void = 0 }) => {}
+}
+
+{
+  // nested array pattern: destructuring binding
+  let [void = 0] = [];
+}
+{
+  // nested object pattern: destructuring binding
+  let { p: void = 0 } = {};
+}
+{
+  // nested array pattern: for-of destructuring binding
+  for (let [void = 0] of []);
+}
+{
+  // nested object pattern: for-of destructuring binding
+  for (let { p: void = 0 } of [{}]);
+}
+{
+  // nested array pattern: destructuring assignment
+  ([void = 0] = []);
+}
+{
+  // nested object pattern: destructuring assignment
+  ({ p: void = 0 } = {});
+}
+{
+  // nested array pattern: for-of destructuring assignment
+  for ([void = 0] of []);
+}
+{
+  // nested object pattern: for-of destructuring assignment
+  for ({ p: void = 0 } of [{}]);
+}
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-async-call-argument.js b/tests/format/misc/errors/js/discard-binding/invalid-async-call-argument.js
new file mode 100644
index 000000000000..443ce0fbb2ce
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-async-call-argument.js
@@ -0,0 +1,5 @@
+async(void, x);
+
+async(x, void);
+
+async(void, () => {});
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-catch-parameter.js b/tests/format/misc/errors/js/discard-binding/invalid-catch-parameter.js
new file mode 100644
index 000000000000..09f3fe186757
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-catch-parameter.js
@@ -0,0 +1,1 @@
+try {} catch (void) {}
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-lone-arrow-function-parameter.js b/tests/format/misc/errors/js/discard-binding/invalid-lone-arrow-function-parameter.js
new file mode 100644
index 000000000000..3db817c2db2a
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-lone-arrow-function-parameter.js
@@ -0,0 +1,1 @@
+void => {}
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-lone-async-arrow-function-parameter.js b/tests/format/misc/errors/js/discard-binding/invalid-lone-async-arrow-function-parameter.js
new file mode 100644
index 000000000000..e95c3c2fffd1
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-lone-async-arrow-function-parameter.js
@@ -0,0 +1,1 @@
+async void => {}
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-object-expression.js b/tests/format/misc/errors/js/discard-binding/invalid-object-expression.js
new file mode 100644
index 000000000000..4da93542096c
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-object-expression.js
@@ -0,0 +1,9 @@
+({ p: { p: { p: void }, x, }, y});
+
+({ p: { x: { x }, p: void, }, y});
+
+({ y: { x: { x }, y, }, p: void });
+
+({ p: void, x: x = 0 });
+
+async({ p: void, x: x = 0 });
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-parenthesized-assignment.js b/tests/format/misc/errors/js/discard-binding/invalid-parenthesized-assignment.js
new file mode 100644
index 000000000000..3592fbb7ec8d
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-parenthesized-assignment.js
@@ -0,0 +1,1 @@
+[(void)] = [];
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-parenthesized-binding.js b/tests/format/misc/errors/js/discard-binding/invalid-parenthesized-binding.js
new file mode 100644
index 000000000000..a19872cbef2b
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-parenthesized-binding.js
@@ -0,0 +1,1 @@
+const [, (void), ] = value;
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern-for-lhs.js b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern-for-lhs.js
new file mode 100644
index 000000000000..3f48bbac398c
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern-for-lhs.js
@@ -0,0 +1,1 @@
+for ([ ...void ] of []);
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern-lhs.js b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern-lhs.js
new file mode 100644
index 000000000000..cbb9729fb408
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern-lhs.js
@@ -0,0 +1,1 @@
+([ ...void ] = []);
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern.js b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern.js
new file mode 100644
index 000000000000..edf3d62a58e1
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-array-pattern.js
@@ -0,0 +1,6 @@
+{
+  var [ ...void ] = [];
+}
+{
+  for (var [...void] of [[]]);
+}
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern-for-lhs.js b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern-for-lhs.js
new file mode 100644
index 000000000000..cdec123bb2d8
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern-for-lhs.js
@@ -0,0 +1,1 @@
+for ({ ...void } of []);
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern-lhs.js b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern-lhs.js
new file mode 100644
index 000000000000..df3cd0378bf3
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern-lhs.js
@@ -0,0 +1,1 @@
+({ ...void } = {});
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern.js b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern.js
new file mode 100644
index 000000000000..44070b0fb754
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-rest-element-object-pattern.js
@@ -0,0 +1,6 @@
+{
+  var { ...void } = {};
+}
+{
+  for (var { ...void } of [{}]);
+}
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-sequence-expression.js b/tests/format/misc/errors/js/discard-binding/invalid-sequence-expression.js
new file mode 100644
index 000000000000..2bedb97700af
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-sequence-expression.js
@@ -0,0 +1,5 @@
+(void, x);
+
+(x, void);
+
+(void, () => {});
diff --git a/tests/format/misc/errors/js/discard-binding/invalid-variable-declarator.js b/tests/format/misc/errors/js/discard-binding/invalid-variable-declarator.js
new file mode 100644
index 000000000000..0f879b45e556
--- /dev/null
+++ b/tests/format/misc/errors/js/discard-binding/invalid-variable-declarator.js
@@ -0,0 +1,9 @@
+{
+  var void = f();
+}
+{
+  let void = f(), void = g();
+}
+{
+  const void = f(), x = g();
+}
diff --git a/tests/unit/__snapshots__/visitor-keys.js.snap b/tests/unit/__snapshots__/visitor-keys.js.snap
index ed431b694dbe..a0f797dfffa8 100644
--- a/tests/unit/__snapshots__/visitor-keys.js.snap
+++ b/tests/unit/__snapshots__/visitor-keys.js.snap
@@ -1170,6 +1170,7 @@ exports[`visitor keys estree 1`] = `
     "init",
   ],
   "Variance": [],
+  "VoidPattern": [],
   "VoidTypeAnnotation": [],
   "WhileStatement": [
     "body",