validateAlignedFunctionParameters

Validates proper alignment of function parameters.

Types: Boolean, Object

Values:

  • true: setting this is the same as validating the rule using {lineBreakAfterOpeningBrace: true, lineBreakBeforeClosingBrace: true}
  • Object:
    • lineBreakAfterOpeningBrace
      • true specifies that the first function parameter must not be on the same line as the opening brace ( of the function parameters list
    • lineBreakBeforeClosingBrace
      • true specifies that the last function parameter must not be on the same line as the closing brace ) of the function parameters list

Example

"validateAlignedFunctionParameters": {
  "lineBreakAfterOpeningBrace": true,
  "lineBreakBeforeClosingBrace": true
}
Valid for mode { "lineBreakAfterOpeningBrace": true, "lineBreakBeforeClosingBrace": true}
function (
  thisIs,
  theLongestList,
  ofParametersEverWritten
) {}
Invalid for mode { "lineBreakAfterOpeningBrace": true, "lineBreakBeforeClosingBrace": true}
function (thisIs,
          theLongestList,
          ofParametersEverWritten) {}
Rule source
Test source