aboutsummaryrefslogtreecommitdiffstats
path: root/src/jsUtils.ts
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2024-04-18 08:18:36 -0600
committerLibravatar GitHub <noreply@github.com>2024-04-18 08:18:36 -0600
commitc49723056acec489765acb54bae3889ac07f25af (patch)
tree58bea705d61a728b060e615ce514b8d4a7936c9e /src/jsUtils.ts
parentfeat: hide all services workspace (#1713) (diff)
downloadferdium-app-c49723056acec489765acb54bae3889ac07f25af.tar.gz
ferdium-app-c49723056acec489765acb54bae3889ac07f25af.tar.zst
ferdium-app-c49723056acec489765acb54bae3889ac07f25af.zip
refactor: bring down eslint warnings to zero (#1714)
- install `@eslint-react/eslint-plugin` dependency - configure `@eslint-react/eslint-plugin` in eslint config - modernize `lint` command in `package.json` - disable or fix various reported lint issues - fix `div` being nested in `p` for settings - replace deprecated `event.keyCode` with `event.key` - update isEscKeyPress method and unit tests which used deprecated `event.keyCode` - allow `eslint` v8 as peer dependency for `@eslint-react/eslint-plugin`
Diffstat (limited to 'src/jsUtils.ts')
-rw-r--r--src/jsUtils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsUtils.ts b/src/jsUtils.ts
index 31d6a2121..72e8111e6 100644
--- a/src/jsUtils.ts
+++ b/src/jsUtils.ts
@@ -9,7 +9,7 @@ export const convertToJSON = (data?: string | any | null) =>
9export const cleanseJSObject = (data?: any | null) => 9export const cleanseJSObject = (data?: any | null) =>
10 JSON.parse(JSON.stringify(data)); 10 JSON.parse(JSON.stringify(data));
11 11
12export const isEscKeyPress = (keyCode: number) => keyCode === 27; 12export const isEscKeyPress = (key: string) => key === 'Escape';
13 13
14export const safeParseInt = (text?: string | number | null) => { 14export const safeParseInt = (text?: string | number | null) => {
15 if (text === undefined || text === null) { 15 if (text === undefined || text === null) {