pi-lens
Version:
Real-time code feedback for pi — LSP, linters, formatters, type-checking, structural analysis & booboo
35 lines (34 loc) • 477 B
YAML
id: no-case-declarations
valid:
- |
switch (x) {
case 1: {
const y = 1;
break;
}
}
- |
switch (x) {
case 1: {
if (x) {
const y = 1;
consume(y);
}
break;
}
}
- |
var z = 1; switch (x) { case 1: break; }
invalid:
- |
switch (x) {
case 1:
const y = 1;
break;
}
- |
switch (x) {
case 1:
let z = 1;
break;
}