Skip to content

Commit 887da40

Browse files
committed
test(linter): enable no-fallthrough test with disable-next-line. (#3766)
I thought we didn't have this, But now that I've read the `LintContext` I have realized it wasn't true.
1 parent 4d2b7f1 commit 887da40

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/oxc_linter/src/rules/eslint/no_fallthrough.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,10 @@ fn test() {
365365
("switch (foo) { case 0: try {} finally { break; } default: b(); }", None),
366366
("switch (foo) { case 0: try { throw 0; } catch (err) { break; } default: b(); }", None),
367367
("switch (foo) { case 0: do { throw 0; } while(a); default: b(); }", None),
368-
// TODO: we need a way to handle disables in the higher context, For example purging
369-
// disabled diagnostics.
370-
// (
371-
// "switch (foo) { case 0: a(); \n// eslint-disable-next-line no-fallthrough\n case 1: }",
372-
// None,
373-
// ),
368+
(
369+
"switch (foo) { case 0: a(); \n// eslint-disable-next-line no-fallthrough\n case 1: }",
370+
None,
371+
),
374372
(
375373
"switch(foo) { case 0: a(); /* no break */ case 1: b(); }",
376374
Some(serde_json::json!([{

0 commit comments

Comments
 (0)