Skip to content

Commit

Permalink
tools: remove default parameters from lint rule
Browse files Browse the repository at this point in the history
The CI server uses system Node.js for linting, which is currently v5.x.
So default parameters are not supported there. This change removes the
default parameters.

PR-URL: #6411
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott committed Apr 29, 2016
1 parent a5012a0 commit c8e137b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/eslint-rules/align-multiline-assignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
function getBinaryExpressionStarts(binaryExpression, starts = []) {
function getBinaryExpressionStarts(binaryExpression, starts) {
function getStartsFromOneSide(side, starts) {
starts.push(side.loc.start);
if (side.type === 'BinaryExpression') {
Expand All @@ -29,7 +29,7 @@ function checkExpressionAlignment(expression) {

switch (expression.type) {
case 'BinaryExpression':
var starts = getBinaryExpressionStarts(expression);
var starts = getBinaryExpressionStarts(expression, []);
var startLine = starts[0].line;
const startColumn = starts[0].column;
starts.forEach((loc) => {
Expand Down

0 comments on commit c8e137b

Please sign in to comment.