mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 02:48:12 +08:00
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:
@@ -1,14 +1,7 @@
|
||||
// jshint esversion: 6
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
Popover,
|
||||
Button,
|
||||
ButtonGroup,
|
||||
AnchorButton,
|
||||
Tooltip,
|
||||
Position,
|
||||
} from "@blueprintjs/core";
|
||||
import { Button, ButtonGroup, AnchorButton, Tooltip } from "@blueprintjs/core";
|
||||
import * as globals from "../../globals";
|
||||
import styles from "./menubar.css";
|
||||
import actions from "../../actions";
|
||||
@@ -21,16 +14,9 @@ import CellSetButton from "./cellSetButtons";
|
||||
celllist1: state.differential?.celllist1,
|
||||
celllist2: state.differential?.celllist2,
|
||||
diffexpMayBeSlow: state.config?.parameters?.["diffexp-may-be-slow"] ?? false,
|
||||
diffexpCellcountMax: state.config?.limits?.diffexp_cellcount_max,
|
||||
diffexpCellcountMax: state.config?.limits?.["diffexp_cellcount_max"],
|
||||
}))
|
||||
class DiffexpButtons extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
userDismissedPopover: false,
|
||||
};
|
||||
}
|
||||
|
||||
computeDiffExp = () => {
|
||||
const { dispatch, differential } = this.props;
|
||||
if (differential.celllist1 && differential.celllist2) {
|
||||
@@ -54,16 +40,9 @@ class DiffexpButtons extends React.Component {
|
||||
});
|
||||
};
|
||||
|
||||
handlePopoverDismiss = () => {
|
||||
this.setState({
|
||||
userDismissedPopover: true,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
/* diffexp-related buttons may be disabled */
|
||||
const { differential, diffexpMayBeSlow, diffexpCellcountMax } = this.props;
|
||||
const { userDismissedPopover } = this.state;
|
||||
|
||||
const haveBothCellSets =
|
||||
!!differential.celllist1 && !!differential.celllist2;
|
||||
@@ -86,7 +65,7 @@ class DiffexpButtons extends React.Component {
|
||||
diffexpCellcountMax;
|
||||
|
||||
return (
|
||||
<ButtonGroup className={styles.menubarButton} >
|
||||
<ButtonGroup className={styles.menubarButton}>
|
||||
<CellSetButton
|
||||
{...this.props} // eslint-disable-line react/jsx-props-no-spreading
|
||||
eitherCellSetOneOrTwo={1}
|
||||
|
||||
Reference in New Issue
Block a user