"switch (foo) { case 0: try {} finally { break; } default: b(); }",
"switch (foo) { case 0: try { throw 0; } catch (err) { break; } default: b(); }",
"switch (foo) { case 0: do { throw 0; } while(a); default: b(); }",
+ "switch (foo) { case 0: a(); \n// eslint-disable-next-line no-fallthrough\n case 1: }",
{
code: "switch(foo) { case 0: a(); /* no break */ case 1: b(); }",
options: [{
column: 34
}
]
+ },
+ {
+ code: "switch (foo) { case 0: a(); \n// eslint-enable no-fallthrough\n case 1: }",
+ options: [{}],
+ errors: [
+ {
+ messageId: "case",
+ type: "SwitchCase",
+ line: 3,
+ column: 2
+ }
+ ]
}
]
});