tools: remove default parameters from lint rule

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: https://github.com/nodejs/node/pull/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>
pull/5040/head
Rich Trott 2016-04-26 22:14:28 -07:00
parent a5012a04ba
commit c8e137b1b5
1 changed files with 2 additions and 2 deletions

View File

@ -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') {
@ -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) => {