mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 09:28:12 +08:00
* Disabled @blueprintjs/classes-constants. #2288. * thuang-eslint-bp-off (#2344) * Disabled @blueprintjs/classes-constants on webpack dev and shared. #2288. * Added TS recommended, suppress lint errors codemod. * Added per-error/warning ignore for tests. * Added per-error/warning ignore for configuration. * Added per-error/warning ignore for src. Removed suppress package. * Minor linting. Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
25 lines
796 B
TypeScript
25 lines
796 B
TypeScript
export const KEYS = {
|
|
COOKIE_DECISION: "cxg.cookieDecision",
|
|
LOGIN_PROMPT: "cxg.LOGIN_PROMPT",
|
|
};
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
|
|
export function storageGet(key: any, defaultValue = null) {
|
|
try {
|
|
const val = window.localStorage.getItem(key);
|
|
if (val === null) return defaultValue;
|
|
return val;
|
|
} catch (e) {
|
|
return defaultValue;
|
|
}
|
|
}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
|
|
export function storageSet(key: any, value: any) {
|
|
try {
|
|
window.localStorage.setItem(key, value);
|
|
} catch {
|
|
// continue
|
|
}
|
|
}
|