disallowNodeTypes

Disallow use of certain AST Node types.

Babylon node types

Type: Array

Value: Array of parser node types to be disallowed.

Example

"disallowNodeTypes": ['LabeledStatement']
Valid
// use of an allowed node type
var a = 1;
// shorthand form of arrow function that returns an object
var f = () => ({ a: 1 });
Invalid
// 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 }
Rule source
Test source