Requires blocks to begin and end with 2 newlines
Types: Boolean, Integer, Object
Values:
true validates all non-empty blocksInteger specifies a minimum number of lines containing elements in the block before validatingObject (at least one of properties must be true):'open'true validates that there is a newline after the opening brace in a blockfalse ignores the newline validation after the opening brace in a block'close'true validates that there is a newline before the closing brace in a blockfalse ignores the newline validation before the closing brace in a block'allExcept' array of exceptions:'conditionals' ignores conditional (if, else if, else) blocks'functions' ignores function blocks"requirePaddingNewlinesInBlocks": true
"requirePaddingNewlinesInBlocks": 1
"requirePaddingNewlinesInBlocks": { "open": true, "close": false }
"requirePaddingNewlinesInBlocks": { "allExcept": [ "conditionals" ] }
"requirePaddingNewlinesInBlocks": { "open": true, "close": false, allExcept: ['conditionals'] }
true or { "open": true, "close": true }if (true) {
doSomething();
}
var abc = function() {};
if (true) {doSomething();}
if (true) {
doSomething();
}
1if (true) {
doSomething();
doSomethingElse();
}
if (true) {
doSomething();
}
if (true) { doSomething(); }
var abc = function() {};
if (true) { doSomething(); doSomethingElse(); }
if (true) {
doSomething();
doSomethingElse();
}
{ "open": true, "close": false }if (true) {
doSomething();
}
var abc = function() {};
if (true) {doSomething();}
if (true) {
doSomething();
}
if (true) {
doSomething();
}
{ allExcept: ['conditionals'] }if (true) {
doSomething();
}
function (foo) {
return bar;
}
function (foo) {
return bar;
}
{ "open": true, "close": false, allExcept: ['conditionals'] }function (foo) {
return bar;
}
if (true) {
doSomething();
}
function (foo) {
return bar;
}