disable formatting rules for eslint and add prettier in lint-staged (#2355)

* disable formatting rules for eslint and add prettier in lint-staged

* update npm modules

* set plugin-proposal-private-methods to loose

* update snapshots due to popover package update

* add missing quotes

Co-authored-by: bkmartinjr <bruce@chanzuckerberg.com>
This commit is contained in:
Timmy Huang
2021-07-30 12:27:47 -07:00
committed by GitHub
co-authored by bkmartinjr
parent 97fb98b4eb
commit 5ab96ed360
40 changed files with 11781 additions and 8189 deletions
@@ -55,16 +55,14 @@ const filterGenes = (query: any, genes: any) =>
type AddGenesState = any;
// @ts-expect-error ts-migrate(1238) FIXME: Unable to resolve signature of class decorator whe... Remove this comment to see the full error message
@connect((state) => {
return {
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
annoMatrix: (state as any).annoMatrix,
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
userDefinedGenes: (state as any).controls.userDefinedGenes,
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
userDefinedGenesLoading: (state as any).controls.userDefinedGenesLoading,
};
})
@connect((state) => ({
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
annoMatrix: (state as any).annoMatrix,
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
userDefinedGenes: (state as any).controls.userDefinedGenes,
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
userDefinedGenesLoading: (state as any).controls.userDefinedGenesLoading,
}))
// eslint-disable-next-line @typescript-eslint/ban-types --- FIXME: disabled temporarily on migrate to TS.
class AddGenes extends React.Component<{}, AddGenesState> {
// eslint-disable-next-line @typescript-eslint/ban-types --- FIXME: disabled temporarily on migrate to TS.
@@ -291,9 +289,7 @@ class AddGenes extends React.Component<{}, AddGenesState> {
initialContent={<MenuItem disabled text="Enter a gene…" />}
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ "data-testid": string; }' is not assignabl... Remove this comment to see the full error message
inputProps={{ "data-testid": "gene-search" }}
inputValueRenderer={() => {
return "";
}}
inputValueRenderer={() => ""}
// @ts-expect-error ts-migrate(2322) FIXME: Type '(query: any, genes: any) => Fuzzysort.Result... Remove this comment to see the full error message
itemListPredicate={filterGenes}
onActiveItemChange={(item) => this.setState({ activeItem: item })}
@@ -90,9 +90,7 @@ class CreateGenesetDialogue extends React.PureComponent<{}, State> {
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types --- FIXME: disabled temporarily on migrate to TS.
genesetNameError = () => {
return false;
};
genesetNameError = () => false;
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
handleChange = (e: any) => {
@@ -113,11 +111,10 @@ class CreateGenesetDialogue extends React.PureComponent<{}, State> {
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
instruction = (genesetName: any, genesets: any) => {
return genesets.has(genesetName)
instruction = (genesetName: any, genesets: any) =>
genesets.has(genesetName)
? "Gene set name must be unique."
: "New, unique gene set name";
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
validate = (genesetName: any, genesets: any) => {
@@ -66,9 +66,7 @@ class RenameGeneset extends React.PureComponent<{}, State> {
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types --- FIXME: disabled temporarily on migrate to TS.
genesetNameError = () => {
return false;
};
genesetNameError = () => false;
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
handleChange = (e: any) => {
@@ -81,14 +79,11 @@ class RenameGeneset extends React.PureComponent<{}, State> {
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
validate = (genesetName: any, genesets: any) => {
return (
!genesets.has(genesetName) &&
// eslint-disable-next-line no-control-regex -- unicode 0-31 127-65535
genesetName.match(/^\s|[\u0000-\u001F\u007F-\uFFFF]|[ ]{2,}|^$|\s$/g)
?.length
);
};
validate = (genesetName: any, genesets: any) =>
!genesets.has(genesetName) &&
// eslint-disable-next-line no-control-regex -- unicode 0-31 127-65535
genesetName.match(/^\s|[\u0000-\u001F\u007F-\uFFFF]|[ ]{2,}|^$|\s$/g)
?.length;
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types --- FIXME: disabled temporarily on migrate to TS.
render() {
@@ -21,14 +21,12 @@ import AddGeneToGenesetDialogue from "./addGeneToGenesetDialogue";
type State = any;
// @ts-expect-error ts-migrate(1238) FIXME: Unable to resolve signature of class decorator whe... Remove this comment to see the full error message
@connect((state) => {
return {
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
genesetsUI: (state as any).genesetsUI,
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
colorAccessor: (state as any).colors.colorAccessor,
};
})
@connect((state) => ({
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
genesetsUI: (state as any).genesetsUI,
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
colorAccessor: (state as any).colors.colorAccessor,
}))
// eslint-disable-next-line @typescript-eslint/ban-types --- FIXME: disabled temporarily on migrate to TS.
class GenesetMenus extends React.PureComponent<{}, State> {
// eslint-disable-next-line @typescript-eslint/ban-types --- FIXME: disabled temporarily on migrate to TS.