Files
test-repo/tests/format/js/comments/switch.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
476 B
JavaScript
Raw Normal View History

switch (node && node.type) {
case "Property":
case "MethodDefinition":
prop = node.key;
break;
case "MemberExpression":
prop = node.property;
break;
// no default
}
switch (foo) {
case "bar":
doThing()
// no default
}
2017-04-05 20:27:14 -03:00
switch (foo) {
case "bar": //comment
doThing(); //comment
case "baz":
doOtherThing(); //comment
}
switch (foo) {
case "bar": {
doThing();
} //comment
case "baz": {
doThing();
} //comment
}