We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8f8ce5 commit a64180eCopy full SHA for a64180e
crates/oxc_linter/src/rules/eslint/no_fallthrough.rs
@@ -588,6 +588,15 @@ fn test() {
588
// Issue #6417: switch with logical operators should work correctly with break
589
("switch(true) { case x === 1 || x === 2: a(); break; case x === 3: b(); }", None),
590
("switch(true) { case x === 1 && y: a(); break; case x === 3: b(); }", None),
591
+ (
592
+ r#"c.map(c => { switch (true) {
593
+ case c.f === 'qux' && xCount > 1: { return <td key="foo">Foo</td>; }
594
+ case c.f === 'barbaz' && isFoo: { return <td key="bar">Foobar</td>; }
595
+ case c.f === 'baz': { return arrayOfRecords.map(r => <td key={r.id}>{r.id}</td>); }
596
+ default: { return <td>Bar</td>; }
597
+ } });"#,
598
+ None,
599
+ ),
600
];
601
602
let fail = vec![
0 commit comments