From 9077782c1784a447c65f593d69ba6a950b5aadc9 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 27 Mar 2025 11:32:16 -0400 Subject: [PATCH] Fix autofixable eslint warnings --- src/components/ServerConnections.js | 4 +--- src/components/apphost.js | 3 +-- src/components/images/imageLoader.js | 2 +- src/components/listview/List/Lists.tsx | 1 - src/components/notifications/notifications.js | 1 - .../playback/playbackorientation.js | 2 -- src/controllers/playback/video/index.js | 4 ++-- src/plugins/chromecastPlayer/plugin.js | 3 ++- .../syncPlay/core/players/GenericPlayer.js | 22 +++++++++---------- src/scripts/gamepadtokey.js | 4 +--- src/scripts/keyboardNavigation.js | 2 +- 11 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/components/ServerConnections.js b/src/components/ServerConnections.js index 9920b9baa..38692998f 100644 --- a/src/components/ServerConnections.js +++ b/src/components/ServerConnections.js @@ -1,5 +1,5 @@ // NOTE: This is used for jsdoc return type -// eslint-disable-next-line no-unused-vars +// eslint-disable-next-line @typescript-eslint/no-unused-vars import { Api } from '@jellyfin/sdk'; import { MINIMUM_VERSION } from '@jellyfin/sdk/lib/versions'; import { ConnectionManager, Credentials, ApiClient } from 'jellyfin-apiclient'; @@ -18,7 +18,6 @@ const normalizeImageOptions = options => { }; const getMaxBandwidth = () => { - /* eslint-disable compat/compat */ if (navigator.connection) { let max = navigator.connection.downlinkMax; if (max && max > 0 && max < Number.POSITIVE_INFINITY) { @@ -28,7 +27,6 @@ const getMaxBandwidth = () => { return parseInt(max, 10); } } - /* eslint-enable compat/compat */ return null; }; diff --git a/src/components/apphost.js b/src/components/apphost.js index 984c3a77b..7d4908856 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -452,7 +452,7 @@ let isHidden = false; let hidden; let visibilityChange; -if (typeof document.hidden !== 'undefined') { /* eslint-disable-line compat/compat */ +if (typeof document.hidden !== 'undefined') { hidden = 'hidden'; visibilityChange = 'visibilitychange'; } else if (typeof document.webkitHidden !== 'undefined') { @@ -461,7 +461,6 @@ if (typeof document.hidden !== 'undefined') { /* eslint-disable-line compat/comp } document.addEventListener(visibilityChange, function () { - /* eslint-disable-next-line compat/compat */ if (document[hidden]) { onAppHidden(); } else { diff --git a/src/components/images/imageLoader.js b/src/components/images/imageLoader.js index 561c96862..c41b0d59f 100644 --- a/src/components/images/imageLoader.js +++ b/src/components/images/imageLoader.js @@ -2,7 +2,7 @@ import Worker from './blurhash.worker.ts'; // eslint-disable-line import/default import * as lazyLoader from '../lazyLoader/lazyLoaderIntersectionObserver'; import * as userSettings from '../../scripts/settings/userSettings'; import './style.scss'; -// eslint-disable-next-line compat/compat + const worker = new Worker(); const targetDic = {}; worker.addEventListener( diff --git a/src/components/listview/List/Lists.tsx b/src/components/listview/List/Lists.tsx index 1215851cc..3a45be39c 100644 --- a/src/components/listview/List/Lists.tsx +++ b/src/components/listview/List/Lists.tsx @@ -25,7 +25,6 @@ const Lists: FC = ({ items = [], listOptions = {} }) => { const renderListItem = (item: ItemDto, index: number) => { return (