requireAlignedMultilineParams

Enforces indentation of parameters in multiline functions

Types: Boolean, String, Number

Values:

  • true to require parameters are aligned with the body of the function
  • 'firstParam' to require parameters to be aligned with the first parameter
  • Number for the number of columns the parameters should be indented past the function body

Example

"requireAlignedMultilineParams": true
Valid for true
var test = function(one, two,
  three, four, five,
  six, seven, eight) {
  console.log(a);
};
Valid for 2
var test = function(one, two,
    three, four, five,
    six, seven, eight) {
  console.log(a);
};
Valid for 'firstParam'
var test = function(one, two,
                    three, four, five,
                    six, seven, eight) {
  console.log(a);
};
Invalid for 0
var test = function(one, two,
    three, four, five,
    six, seven, eight) {
  console.log(a);
};
Rule source
Test source