mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 00:48:12 +08:00
more lint - components (#336)
* more lint * fix typo introduced in delinting * more lint * remove dead code * lint fixes * lint
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user