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/features/webControls/containers/WebControlsScreen.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/features/webControls/containers') diff --git a/src/features/webControls/containers/WebControlsScreen.tsx b/src/features/webControls/containers/WebControlsScreen.tsx index b492264bf..8709fcba5 100644 --- a/src/features/webControls/containers/WebControlsScreen.tsx +++ b/src/features/webControls/containers/WebControlsScreen.tsx @@ -118,8 +118,10 @@ class WebControlsScreen extends Component { } try { + // eslint-disable-next-line no-param-reassign url = new URL(url).toString(); } catch { + // eslint-disable-next-line no-param-reassign url = /^((?!-))(xn--)?[\da-z][\d_a-z-]{0,61}[\da-z]{0,1}\.(xn--)?([\da-z-]{1,61}|[\da-z-]{1,30}\.[a-z]{2,})$/.test( url, -- cgit v1.2.3-54-g00ecf