Disable linting of parameter reassignation

old
Javi Velasco 2015-09-05 02:10:47 +02:00
parent ae47335284
commit 5a451ac5ab
2 changed files with 6 additions and 10 deletions

View File

@ -112,8 +112,8 @@
"no-obj-calls": [2],
"no-octal": [2],
"no-octal-escape": [2],
"no-param-reassign": [2],
"no-path-concat": [0],
"no-param-reassign": [2],
"no-plusplus": [0],
"no-process-env": [0],
"no-process-exit": [2],

View File

@ -1,16 +1,12 @@
module.exports = {
range (start, stop, step = 1) {
if (stop == null) {
stop = start || 0;
start = 0;
}
let length = Math.max(Math.ceil((stop - start) / step), 0);
range (start = 0, stop = null, step = 1) {
let [_start, _stop] = (stop !== null) ? [start, stop] : [0, start];
let length = Math.max(Math.ceil((_stop - _start) / step), 0);
let range = Array(length);
for (const idx = 0; idx < length; idx++, start += step) {
range[idx] = start;
for (let idx = 0; idx < length; idx++, _start += step) {
range[idx] = _start;
}
return range;