fix: eslint issues and reconfiguring (#3891)

* fix: eslint fixes

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
sriram veeraghanta 2024-03-06 18:39:14 +05:30 committed by GitHub
parent 921b9078f1
commit 3d09a69d58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
790 changed files with 4155 additions and 4051 deletions

View file

@ -3,15 +3,15 @@ import isEmpty from "lodash/isEmpty";
export const storage = {
set: (key: string, value: object | string | boolean): void => {
if (typeof window === undefined || typeof window === "undefined" || !key || !value) return undefined;
const _value: string | undefined = value
const tempValue: string | undefined = value
? ["string", "boolean"].includes(typeof value)
? value.toString()
: isEmpty(value)
? undefined
: JSON.stringify(value)
? undefined
: JSON.stringify(value)
: undefined;
if (!_value) return undefined;
window.localStorage.setItem(key, _value);
if (!tempValue) return undefined;
window.localStorage.setItem(key, tempValue);
},
get: (key: string): string | undefined => {