From c49723056acec489765acb54bae3889ac07f25af Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:18:36 -0600 Subject: 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` --- src/jsUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jsUtils.ts') 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) => export const cleanseJSObject = (data?: any | null) => JSON.parse(JSON.stringify(data)); -export const isEscKeyPress = (keyCode: number) => keyCode === 27; +export const isEscKeyPress = (key: string) => key === 'Escape'; export const safeParseInt = (text?: string | number | null) => { if (text === undefined || text === null) { -- cgit v1.2.3-54-g00ecf