Browse Source

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>
process-exit-stdio-flushing
Rich Trott 9 years ago
parent
commit
c8e137b1b5
  1. 4
      tools/eslint-rules/align-multiline-assignment.js

4
tools/eslint-rules/align-multiline-assignment.js

@ -7,7 +7,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Rule Definition // Rule Definition
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
function getBinaryExpressionStarts(binaryExpression, starts = []) { function getBinaryExpressionStarts(binaryExpression, starts) {
function getStartsFromOneSide(side, starts) { function getStartsFromOneSide(side, starts) {
starts.push(side.loc.start); starts.push(side.loc.start);
if (side.type === 'BinaryExpression') { if (side.type === 'BinaryExpression') {
@ -29,7 +29,7 @@ function checkExpressionAlignment(expression) {
switch (expression.type) { switch (expression.type) {
case 'BinaryExpression': case 'BinaryExpression':
var starts = getBinaryExpressionStarts(expression); var starts = getBinaryExpressionStarts(expression, []);
var startLine = starts[0].line; var startLine = starts[0].line;
const startColumn = starts[0].column; const startColumn = starts[0].column;
starts.forEach((loc) => { starts.forEach((loc) => {

Loading…
Cancel
Save