Requires blocks to begin and end with a newline
Types: Boolean
, Integer
, Object
Values:
true
validates all non-empty blocksInteger
specifies a minimum number of lines containing elements in the block before validatingObject
:'includeComments'
true
includes comments as part of the validation'minLines'
Integer
specifies a minimum number of lines containing elements in the block before validating"requireBlocksOnNewline": true
"requireBlocksOnNewline": 1
"requireBlocksOnNewline": {
"includeComments": true
}
"requireBlocksOnNewline": {
"includeComments": true,
"minLines": 1
}
true
if (true) {
doSomething();
}
var abc = function() {};
// or
if (true) { //comments
doSomething();
}
var abc = function() {};
// or
if (true) {
doSomething();
/** comments */
}
var abc = function() {};
if (true) {doSomething();}
1
if (true) {
doSomething();
doSomethingElse();
}
if (true) { doSomething(); }
var abc = function() {};
// or
if (true) { //comments
doSomething();
doSomethingElse();
}
if (true) { doSomething(); }
var abc = function() {};
if (true) {
doSomething();
doSomethingElse();
/** comments */
}
if (true) { doSomething(); }
var abc = function() {};
if (true) { doSomething(); doSomethingElse(); }
{ includeComments: true }
if (true) {
//comments
doSomething();
}
var abc = function() {};
// or
if (true) {
doSomething();
//comments
}
var abc = function() {};
if (true) { //comments
doSomething();
}
var abc = function() {};
// or
if (true) {
doSomething();
/** comments */}
var abc = function() {};
{ includeComments: true, minLines: 1 }
if (true) {
//comments
doSomething();
doSomethingElse();
}
if (true) { doSomething(); }
var abc = function() {};
// or
if (true) {
doSomething();
doSomethingElse();
//comments
}
if (true) { doSomething(); }
var abc = function() {};
if (true) { //comments
doSomething();
doSomethingElse();
}
if (true) { doSomething(); }
var abc = function() {};
// or
if (true) {
doSomething();
doSomethingElse();
/** comments */}
if (true) { doSomething(); }
var abc = function() {};