diff --git a/frontend/src/Router/Redirector.tsx b/frontend/src/Router/Redirector.tsx index c9190c291..064522bbc 100644 --- a/frontend/src/Router/Redirector.tsx +++ b/frontend/src/Router/Redirector.tsx @@ -10,10 +10,10 @@ const Redirector: FunctionComponent = () => { useEffect(() => { if (data) { - const { use_sonarr, use_radarr } = data.general; - if (use_sonarr) { + const { use_sonarr: useSonarr, use_radarr: useRadarr } = data.general; + if (useSonarr) { navigate("/series"); - } else if (use_radarr) { + } else if (useRadarr) { navigate("/movies"); } else { navigate("/settings/general"); diff --git a/frontend/src/components/forms/ProfileEditForm.tsx b/frontend/src/components/forms/ProfileEditForm.tsx index a4f394942..d31a0e338 100644 --- a/frontend/src/components/forms/ProfileEditForm.tsx +++ b/frontend/src/components/forms/ProfileEditForm.tsx @@ -27,6 +27,7 @@ const defaultCutoffOptions: SelectorOption[] = [ label: "Any", value: { id: anyCutoff, + // eslint-disable-next-line camelcase audio_exclude: "False", forced: "False", hi: "False", @@ -128,6 +129,7 @@ const ProfileEditForm: FunctionComponent = ({ const item: Language.ProfileItem = { id, language, + // eslint-disable-next-line camelcase audio_exclude: "False", hi: "False", forced: "False", @@ -213,6 +215,7 @@ const ProfileEditForm: FunctionComponent = ({ onChange={({ currentTarget: { checked } }) => { action.mutate(index, { ...item, + // eslint-disable-next-line camelcase audio_exclude: checked ? "True" : "False", }); }} diff --git a/frontend/src/components/modals/HistoryModal.tsx b/frontend/src/components/modals/HistoryModal.tsx index 9976d5688..566a54611 100644 --- a/frontend/src/components/modals/HistoryModal.tsx +++ b/frontend/src/components/modals/HistoryModal.tsx @@ -1,3 +1,4 @@ +/* eslint-disable camelcase */ import { useEpisodeAddBlacklist, useEpisodeHistory, diff --git a/frontend/src/components/modals/ManualSearchModal.tsx b/frontend/src/components/modals/ManualSearchModal.tsx index d6d469cb7..411c93620 100644 --- a/frontend/src/components/modals/ManualSearchModal.tsx +++ b/frontend/src/components/modals/ManualSearchModal.tsx @@ -154,8 +154,8 @@ function ManualSearchView(props: Props) { { accessor: "matches", Cell: (row) => { - const { matches, dont_matches } = row.row.original; - return ; + const { matches, dont_matches: dont } = row.row.original; + return ; }, }, { diff --git a/frontend/src/components/modals/SubtitleToolsModal.tsx b/frontend/src/components/modals/SubtitleToolsModal.tsx index 2f49bccac..c92ff6a18 100644 --- a/frontend/src/components/modals/SubtitleToolsModal.tsx +++ b/frontend/src/components/modals/SubtitleToolsModal.tsx @@ -82,6 +82,7 @@ const SubtitleToolView: FunctionComponent = ({ type, language: v.code2, path: v.path, + // eslint-disable-next-line camelcase raw_language: v, }, ]; diff --git a/frontend/src/pages/Blacklist/Movies/table.tsx b/frontend/src/pages/Blacklist/Movies/table.tsx index edf23e323..02e63588d 100644 --- a/frontend/src/pages/Blacklist/Movies/table.tsx +++ b/frontend/src/pages/Blacklist/Movies/table.tsx @@ -75,6 +75,7 @@ const Table: FunctionComponent = ({ blacklist }) => { all: false, form: { provider: row.original.provider, + // eslint-disable-next-line camelcase subs_id: value, }, })} diff --git a/frontend/src/pages/Blacklist/Series/table.tsx b/frontend/src/pages/Blacklist/Series/table.tsx index 7777b55f1..7a751f32e 100644 --- a/frontend/src/pages/Blacklist/Series/table.tsx +++ b/frontend/src/pages/Blacklist/Series/table.tsx @@ -82,6 +82,7 @@ const Table: FunctionComponent = ({ blacklist }) => { all: false, form: { provider: row.original.provider, + // eslint-disable-next-line camelcase subs_id: value, }, })} diff --git a/frontend/src/pages/Episodes/table.tsx b/frontend/src/pages/Episodes/table.tsx index 477693b7a..3fa0a89ba 100644 --- a/frontend/src/pages/Episodes/table.tsx +++ b/frontend/src/pages/Episodes/table.tsx @@ -47,7 +47,7 @@ const Table: FunctionComponent = ({ episodes, profile, disabled }) => { forced, provider, subtitle, - original_format, + original_format: originalFormat, } = result; const { sonarrSeriesId: seriesId, sonarrEpisodeId: episodeId } = item; @@ -60,7 +60,8 @@ const Table: FunctionComponent = ({ episodes, profile, disabled }) => { forced, provider, subtitle, - original_format, + // eslint-disable-next-line camelcase + original_format: originalFormat, }, }); }, @@ -129,12 +130,12 @@ const Table: FunctionComponent = ({ episodes, profile, disabled }) => { > )); - let raw_subtitles = episode.subtitles; + let rawSubtitles = episode.subtitles; if (onlyDesired) { - raw_subtitles = filterSubtitleBy(raw_subtitles, profileItems); + rawSubtitles = filterSubtitleBy(rawSubtitles, profileItems); } - const subtitles = raw_subtitles.map((val, idx) => ( + const subtitles = rawSubtitles.map((val, idx) => ( { forced, provider, subtitle, - original_format, + original_format: originalFormat, } = result; const { radarrId } = item; @@ -73,7 +73,8 @@ const MovieDetailView: FunctionComponent = () => { forced, provider, subtitle, - original_format, + // eslint-disable-next-line camelcase + original_format: originalFormat, }, }); }, diff --git a/frontend/src/pages/Movies/Details/table.tsx b/frontend/src/pages/Movies/Details/table.tsx index 389cb32c8..9f4e5c948 100644 --- a/frontend/src/pages/Movies/Details/table.tsx +++ b/frontend/src/pages/Movies/Details/table.tsx @@ -180,12 +180,12 @@ const Table: FunctionComponent = ({ movie, profile, disabled }) => { path: missingText, })) ?? []; - let raw_subtitles = movie?.subtitles ?? []; + let rawSubtitles = movie?.subtitles ?? []; if (onlyDesired) { - raw_subtitles = filterSubtitleBy(raw_subtitles, profileItems); + rawSubtitles = filterSubtitleBy(rawSubtitles, profileItems); } - return [...raw_subtitles, ...missing]; + return [...rawSubtitles, ...missing]; }, [movie, onlyDesired, profileItems]); return ( diff --git a/frontend/src/pages/Settings/Languages/index.tsx b/frontend/src/pages/Settings/Languages/index.tsx index 64c3e58b2..993820478 100644 --- a/frontend/src/pages/Settings/Languages/index.tsx +++ b/frontend/src/pages/Settings/Languages/index.tsx @@ -43,8 +43,8 @@ export function useLatestProfiles() { const SettingsLanguagesView: FunctionComponent = () => { const { data: languages } = useLanguages(); - const { data: und_audio_languages } = useEnabledLanguages(); - const { data: und_embedded_subtitles_languages } = useEnabledLanguages(); + const { data: undAudioLanguages } = useEnabledLanguages(); + const { data: undEmbeddedSubtitlesLanguages } = useEnabledLanguages(); return (
@@ -83,7 +83,7 @@ const SettingsLanguagesView: FunctionComponent = () => { settingKey={defaultUndAudioLang} label="Treat unknown language audio track as (changing this will trigger missing subtitles calculation)" placeholder="Select languages" - options={und_audio_languages.map((v) => { + options={undAudioLanguages.map((v) => { return { label: v.name, value: v.code2 }; })} settingOptions={{ @@ -97,7 +97,7 @@ const SettingsLanguagesView: FunctionComponent = () => { settingKey={defaultUndEmbeddedSubtitlesLang} label="Treat unknown language embedded subtitles track as (changing this will trigger full subtitles indexation using cache)" placeholder="Select languages" - options={und_embedded_subtitles_languages.map((v) => { + options={undEmbeddedSubtitlesLanguages.map((v) => { return { label: v.name, value: v.code2 }; })} settingOptions={{ diff --git a/frontend/src/pages/System/Tasks/table.tsx b/frontend/src/pages/System/Tasks/table.tsx index c52b1978f..ac87c7c54 100644 --- a/frontend/src/pages/System/Tasks/table.tsx +++ b/frontend/src/pages/System/Tasks/table.tsx @@ -37,7 +37,7 @@ const Table: FunctionComponent = ({ tasks }) => { { accessor: "job_running", Cell: ({ row, value }) => { - const { job_id } = row.original; + const { job_id: jobId } = row.original; const runTask = useRunTask(); return ( @@ -46,7 +46,7 @@ const Table: FunctionComponent = ({ tasks }) => { icon={faPlay} iconProps={{ spin: value }} mutation={runTask} - args={() => job_id} + args={() => jobId} > ); }, diff --git a/frontend/src/utilities/routers.ts b/frontend/src/utilities/routers.ts index b3c91c541..6dd988be7 100644 --- a/frontend/src/utilities/routers.ts +++ b/frontend/src/utilities/routers.ts @@ -3,6 +3,7 @@ import type { Blocker, History, Transition } from "history"; import { useContext, useEffect } from "react"; +// eslint-disable-next-line camelcase import { UNSAFE_NavigationContext } from "react-router-dom"; export function useBlocker(blocker: Blocker, when = true) {