requireAlignedObjectValues

Requires proper alignment in object literals.

Type: String

Values:

  • "all" for strict mode,
  • "ignoreFunction" ignores objects if one of the property values is a function expression,
  • "ignoreLineBreak" ignores objects if there are line breaks between properties

Example

"requireAlignedObjectValues": "all"
Valid
var x = {
    a   : 1,
    bcd : 2,
    ef  : 'str'
};
Invalid
var x = {
    a : 1,
    bcd : 2,
    ef : 'str'
};
Rule source
Test source