Disallow use of certain AST Node types.
Babylon node types
Type: Array
Value: Array of parser node types to be disallowed.
"disallowNodeTypes": ['LabeledStatement']
// use of an allowed node type
var a = 1;
// shorthand form of arrow function that returns an object
var f = () => ({ a: 1 });
// label statement with loop
loop1:
for (i = 0; i < 10; i++) {
if (i === 3) {
break loop1;
}
}
// accidental label statement with arrow function
var f = () => { a: 1 };
// label statement
{ a: 1 }