JSCS (original) (raw)

validateIndentation

Validates indentation for switch statements and block statements

Types: Integer, String or Object

Values:

JSHint: indent

Example

"validateIndentation": "\t"
Valid example for mode 2
if (a) {
  b=c;
  function(d) {
    e=f;
  }
}
Invalid example for mode 2
if (a) {
   b=c;
function(d) {
       e=f;
}
}
Valid example for mode "\t"
if (a) {
    b=c;
    function(d) {
        e=f;
    }
}
Invalid example for mode "\t"
if (a) {
     b=c;
function(d) {
           e=f;
 }
}
Valid example for mode { "value": "\t", "allExcept": ["emptyLines"] }
if (a) {
    b=c;
    function(d) {
        e=f;
    }

} // single tab character on previous line
Invalid example for mode { "value": "\t", "allExcept": ["emptyLines"] } }
if (a) {
    b=c;
    function(d) {
        e=f;
    }

} // no tab character on previous line
if (a) {
    b=c;
//    e=f
}