mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 05:48:11 +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,9 +1,9 @@
|
||||
export const jest_env = process.env.JEST_ENV;
|
||||
export const jestEnv = process.env.JEST_ENV;
|
||||
export const appPort = process.env.CXG_SERVER_PORT;
|
||||
export const appUrlBase =
|
||||
process.env.CXG_URL_BASE || `http://localhost:${appPort}`;
|
||||
export const DEV = jest_env === "dev";
|
||||
export const DEBUG = jest_env === "debug";
|
||||
export const DEV = jestEnv === "dev";
|
||||
export const DEBUG = jestEnv === "debug";
|
||||
export const DATASET = "pbmc3k";
|
||||
|
||||
if (DEBUG) jest.setTimeout(100000);
|
||||
|
||||
@@ -7,7 +7,10 @@ import { appUrlBase, DATASET } from "./config";
|
||||
import { setupTestBrowser } from "./testBrowser";
|
||||
import { datasets } from "./data";
|
||||
|
||||
let browser, page, utils, cxgActions;
|
||||
let browser;
|
||||
let page;
|
||||
let utils;
|
||||
let cxgActions;
|
||||
const data = datasets[DATASET];
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -34,9 +37,9 @@ describe("did launch", () => {
|
||||
try {
|
||||
await utils.clickOn("tos-cookies-accept", { timeout: 500 });
|
||||
} catch {
|
||||
console.warn("No terms of service footer detected.")
|
||||
console.warn("No terms of service footer detected.");
|
||||
}
|
||||
page.waitFor(50); // give the footer a chance to disappear
|
||||
page.waitFor(50); // give the footer a chance to disappear
|
||||
const result = await page.$("[data-testid='tos-cookies-accept']");
|
||||
expect(result).toBeNull();
|
||||
});
|
||||
@@ -130,7 +133,7 @@ describe("gene entry", () => {
|
||||
testGenes
|
||||
);
|
||||
expect(allHistograms).toEqual(expect.arrayContaining(testGenes));
|
||||
expect(allHistograms.length).toEqual(testGenes.length);
|
||||
expect(allHistograms).toHaveLength(testGenes.length);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -144,7 +147,7 @@ describe("differential expression", () => {
|
||||
expect(allHistograms).toEqual(
|
||||
expect.arrayContaining(data.diffexp["gene-results"])
|
||||
);
|
||||
expect(allHistograms.length).toEqual(data.diffexp["gene-results"].length);
|
||||
expect(allHistograms).toHaveLength(data.diffexp["gene-results"].length);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@ import { appUrlBase, DATASET } from "./config";
|
||||
import { setupTestBrowser } from "./testBrowser";
|
||||
import { datasets } from "./data";
|
||||
|
||||
let browser, page, utils, actions;
|
||||
let browser;
|
||||
let page;
|
||||
let utils;
|
||||
let actions;
|
||||
const data = datasets[DATASET];
|
||||
|
||||
beforeAll(async () => {
|
||||
|
||||
@@ -12,9 +12,13 @@ import { appUrlBase, DEBUG, DEV, DATASET } from "./config";
|
||||
import { puppeteerUtils, cellxgeneActions } from "./puppeteerUtils";
|
||||
import { datasets } from "./data";
|
||||
|
||||
let browser, page, utils, cxgActions, spy;
|
||||
let browser;
|
||||
let page;
|
||||
let utils;
|
||||
let cxgActions;
|
||||
let spy;
|
||||
const browserViewport = { width: 1280, height: 960 };
|
||||
let data = datasets[DATASET].features;
|
||||
const data = datasets[DATASET].features;
|
||||
|
||||
if (DEBUG) jest.setTimeout(100000);
|
||||
if (DEV) jest.setTimeout(10000);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PromiseLimit } from "../../src/util/promiseLimit";
|
||||
import PromiseLimit from "../../src/util/promiseLimit";
|
||||
import { range } from "../../src/util/range";
|
||||
|
||||
const delay = (t) => new Promise((resolve, reject) => setTimeout(resolve, t));
|
||||
|
||||
Reference in New Issue
Block a user