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
+1 -1
View File
@@ -150,7 +150,7 @@ const ColorsReducer = (
case "annotation: delete label": {
const { world } = nextSharedState;
const { colorMode, colorAccessor } = state;
const { metadataField, colors } = action;
const { metadataField } = action;
if (
colorMode !== "color by categorical metadata" ||
colorAccessor !== metadataField
+1 -1
View File
@@ -49,7 +49,7 @@ const LayoutChoice = (
}
case "reembed: add reembedding": {
const name = action.schema.name;
const { name } = action.schema;
const available = Array.from(new Set(state.available).add(name));
return {
...state,
+5 -4
View File
@@ -9,11 +9,12 @@ const Ontology = (
) => {
switch (action.type) {
case "configuration load complete": {
/* eslint-disable camelcase */
const enabled =
action.config?.parameters?.annotations_cell_ontology_enabled ?? false;
const terms = action.config?.parameters?.annotations_cell_ontology_terms;
/* eslint-enable camelcase */
action.config?.parameters?.["annotations_cell_ontology_enabled"] ??
false;
const terms =
action.config?.parameters?.["annotations_cell_ontology_terms"];
const termSet = new Set(terms);
return {
...state,
+3 -3
View File
@@ -41,8 +41,8 @@ const WorldReducer = (
const { dim } = action;
// we don't clip anything except for varData and obsAnnotations
let unclipped = state.unclipped;
if (dim == "varData" || dim == "obsAnnotations") {
let { unclipped } = state;
if (dim === "varData" || dim === "obsAnnotations") {
unclipped = {
...unclipped,
[dim]: universe[dim].clone(),
@@ -298,7 +298,7 @@ const WorldReducer = (
const { obsLayout: origObsLayout, schema: origSchema } = state;
const { embedding, schema: embeddingSchema } = action;
const { dims, name } = embeddingSchema;
const { dims } = embeddingSchema;
let obsLayout = origObsLayout;
let schema = origSchema;