remove all linting errors on client/src (#1463)

* run eslint --fix

* camelcase

* camelCase config part 1

* part 2

* part 3 - removing subscripts

* fix "class-methods-use-this"

* fix "class-methods-use-this"

* fix eslint ignores

* add eslint ignore for set state in update

* reformat comments to appease eslint

* add a11y features

* sort-comp fix

* a11y fix

* add ignore for set state in update

* add a11y htmlFor

* remove unused toast

* remove unnecessary bind

* add ignore for set state in update

* add rel="noopener noreferrer"

Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener

* use arrow function to bind

* remove unused definitions/declarations

* prettier

* remove unused state

* add comments to empty catch blocks remove curly brackets

* escape '

* use eqeqeq

* switch from default export

* remove ignore log

* remove static

* fix import

* revert subscripting config

* clean-up

* remove unnecessary subscript

* fix new errors from master

* change category click handler to a class property

* fix camelcase changes that slipped by

* unused import

* Fix newly introduced ESLint errors from addGenes
This commit is contained in:
Severiano Badajoz
2020-05-19 12:38:29 -07:00
committed by GitHub
parent 5fc76edf2d
commit c34a68304e
34 changed files with 248 additions and 238 deletions
+4 -6
View File
@@ -1,3 +1,4 @@
/* eslint-disable max-classes-per-file */
/**
Label indexing - map a label to & from an integer offset. See Dataframe
for how this is used.
@@ -23,7 +24,6 @@ function extent(tarr) {
return [min, max];
}
/* eslint-disable class-methods-use-this */
class IdentityInt32Index {
/*
identity/noop index, with small assumptions that labels are int32
@@ -41,11 +41,13 @@ class IdentityInt32Index {
return k;
}
// eslint-disable-next-line class-methods-use-this
getOffset(i) {
// label to offset
return i;
}
// eslint-disable-next-line class-methods-use-this
getLabel(i) {
// offset to label
return i;
@@ -93,9 +95,6 @@ class IdentityInt32Index {
return this.__promote(labelArray);
}
}
/* eslint-enable class-methods-use-this */
/* eslint-disable class-methods-use-this */
class DenseInt32Index {
/*
DenseInt32Index indexes integer labels, and uses Int32Array typed arrays
@@ -177,9 +176,7 @@ class DenseInt32Index {
return this.__promote(labelArray);
}
}
/* eslint-enable class-methods-use-this */
/* eslint-disable class-methods-use-this */
class KeyIndex {
/*
KeyIndex indexes arbitrary JS primitive types, and uses a Map()
@@ -223,6 +220,7 @@ class KeyIndex {
return this.rindex.length;
}
// eslint-disable-next-line class-methods-use-this
subsetLabels(labelArray) {
return new KeyIndex(labelArray);
}
+1 -1
View File
@@ -13,7 +13,7 @@ return Promise.all([
plimit.add(() => fetch('/baz'))
])
*/
export class PromiseLimit {
export default class PromiseLimit {
constructor(maxConcurrency) {
this.queue = new Set();
this.maxConcurrency = maxConcurrency;
+1 -1
View File
@@ -5,6 +5,6 @@
export default (n) => {
return n
.toExponential()
.replace(/e[\+\-0-9]*$/, "")
.replace(/e[+\-0-9]*$/, "")
.replace(/^0\.?0*|\./, "").length;
};
@@ -1,3 +1,4 @@
// eslint-disable-next-line max-classes-per-file
import PositiveIntervals from "./positiveIntervals";
import BitArray from "./bitArray";
import {
@@ -409,7 +410,7 @@ class ImmutableScalarDimension extends _ImmutableBaseDimension {
this.index = makeSortIndex(array);
}
/* eslint-disable class-methods-use-this */
// eslint-disable-next-line class-methods-use-this
_createValueArray(data, mapf, array) {
// create dimension value array
const len = data.length;
@@ -419,7 +420,6 @@ class ImmutableScalarDimension extends _ImmutableBaseDimension {
}
return larray;
}
/* eslint-enable class-methods-use-this */
select(spec) {
const { mode } = spec;
@@ -466,7 +466,7 @@ class ImmutableScalarDimension extends _ImmutableBaseDimension {
const ranges = [];
const r = [
lowerBoundIndirect(value, index, lo, 0, value.length),
!!inclusive
inclusive
? upperBoundIndirect(value, index, hi, 0, value.length)
: lowerBoundIndirect(value, index, hi, 0, value.length),
];
@@ -514,11 +514,10 @@ class ImmutableEnumDimension extends ImmutableScalarDimension {
});
}
/* eslint-disable class-methods-use-this */
// eslint-disable-next-line class-methods-use-this
selectRange() {
throw new Error("range selection unsupported on Enumerated dimension");
}
/* eslint-enable class-methods-use-this */
}
class ImmutableSpatialDimension extends _ImmutableBaseDimension {