more lint - components (#336)

* more lint

* fix typo introduced in delinting

* more lint

* remove dead code

* lint fixes

* lint
This commit is contained in:
Bruce Martin
2018-10-17 07:17:51 -07:00
committed by GitHub
parent 952578680a
commit f9f43c42c0
23 changed files with 494 additions and 586 deletions
+3 -3
View File
@@ -279,14 +279,14 @@ class ScalarDimension {
let found = 0;
// skip up to offset records
for (i = len - 1; 0 <= i && skip < offset; i -= 1) {
for (i = len - 1; i >= 0 && skip < offset; i -= 1) {
if (selection.isSelected(index[i])) {
skip += 1;
}
}
// grab up to k records
for (; 0 <= i && found < k; i -= 1) {
for (; i >= 0 && found < k; i -= 1) {
if (selection.isSelected(index[i])) {
ret.push(data[index[i]]);
found += 1;
@@ -539,7 +539,7 @@ class ScalarGroup {
// set the reduce functions to count records.
reduceCount() {
return this.reduce((p, v) => p + 1, (p, v) => p - 1, () => 0);
return this.reduce(p => p + 1, p => p - 1, () => 0);
}
// set the reduce functions to sum records using specified value accessor.
@@ -30,7 +30,7 @@ class PositiveIntervals {
res.push(copy[i]);
} else if (copy[i][1] > res[res.length - 1][1]) {
// merge this into previous
res[res.length - 1][1] = copy[i][1];
res[res.length - 1][1] = copy[i][1]; // eslint-disable-line prefer-destructuring
}
}
return res;