chore(linter/eslint/no-case-declarations): disable invalid test case (#24799)

There's no point testing these - the parser/coverage handles this already.
This commit is contained in:
Cameron authored and GitHub committed 2026-07-22 09:56:28 +01:00
1 parent b9fc6af57b
commit 81e8ed9e9f
2 files changed
+2 -16

No files matched your search

@@ -159,8 +159,8 @@ fn test() {
("switch (a) { default: function f() {} break; }"),
("switch (a) { case 1: class C {} break; }"),
("switch (a) { default: class C {} break; }"),
("switch (a) { default: using x = {}; break; }"),
("switch (a) { default: await using x = {}; break; }"),
// ("switch (a) { default: using x = {}; break; }"),
// ("switch (a) { default: await using x = {}; break; }"),
];
let fix = vec![
@@ -57,17 +57,3 @@ source: crates/oxc_linter/src/tester.rs
· ─────
╰────
help: Wrap the case body in braces `{}` to create an explicit block scope for the lexical declaration.
× Using declaration cannot appear in the bare case statement.
╭─[no_case_declarations.tsx:1:23]
1 │ switch (a) { default: using x = {}; break; }
· ─────────────
╰────
help: Wrap this declaration in a block statement
× Using declaration cannot appear in the bare case statement.
╭─[no_case_declarations.tsx:1:23]
1 │ switch (a) { default: await using x = {}; break; }
· ───────────────────
╰────
help: Wrap this declaration in a block statement