Disallows empty blocks (except for catch blocks).
Type: Boolean
or Object
Values:
true
for default behavior (strict mode, no empty blocks allowed)Object
:'allExcept'
array of exceptions:'comments'
blocks containing only comments are not considered emptyJSHint: noempty
"disallowEmptyBlocks": true
if ( a == b ) { c = d; }
try { a = b; } catch( e ){}
if ( a == b ) { } else { c = d; }