A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix(deps): update dependency typescript-eslint to v8 (#896)
homarr-renovate[bot]a9a46024e2a1
diff --git a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsxindex fec07fd57..927e0c6f2 100644--- a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx+++ b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx@@ -39,6 +39,7 @@ export const LoginForm = ({ providers, oidcClientName, isOidcAutoLoginEnabled, cconst onSuccess = useCallback(async (response: Awaited<ReturnType<typeof signIn>>) => {if (response && (!response.ok || response.error)) {+ // eslint-disable-next-line @typescript-eslint/only-throw-errorthrow response.error;}diff --git a/apps/nextjs/src/components/board/sections/gridstack/init-gridstack.ts b/apps/nextjs/src/components/board/sections/gridstack/init-gridstack.tsindex 4fb9c2dd7..27d7db33f 100644--- a/apps/nextjs/src/components/board/sections/gridstack/init-gridstack.ts+++ b/apps/nextjs/src/components/board/sections/gridstack/init-gridstack.ts@@ -45,7 +45,9 @@ export const initializeGridstack = ({ section, refs, sectionColumnCount }: Initigrid.removeAll(false);section.items.forEach(({ id }) => {const ref = refs.items.current[id]?.current;- ref && grid.makeWidget(ref);+ if (!ref) return;++ grid.makeWidget(ref);});grid.batchUpdate(false);return true;diff --git a/packages/integrations/src/pi-hole/pi-hole-integration.ts b/packages/integrations/src/pi-hole/pi-hole-integration.tsindex c0c61a26c..a89af7c9a 100644--- a/packages/integrations/src/pi-hole/pi-hole-integration.ts+++ b/packages/integrations/src/pi-hole/pi-hole-integration.ts@@ -41,7 +41,7 @@ export class PiHoleIntegration extends Integration implements DnsHoleSummaryIntetry {const result = (await response.json()) as unknown;if (typeof result === "object" && result !== null && "status" in result) return;- } catch (error) {+ } catch {throw new IntegrationTestConnectionError("invalidJson");}diff --git a/packages/modals/src/confirm-modal.tsx b/packages/modals/src/confirm-modal.tsxindex 9b26d6508..41f11751d 100644--- a/packages/modals/src/confirm-modal.tsx+++ b/packages/modals/src/confirm-modal.tsx@@ -41,9 +41,17 @@ export const ConfirmModal = createModal<Omit<ConfirmModalProps, "title">>(({ actconst handleCancel = useCallback(async (event: React.MouseEvent<HTMLButtonElement>) => {- typeof cancelProps?.onClick === "function" && cancelProps.onClick(event);- typeof onCancel === "function" && (await onCancel());- closeOnCancel && actions.closeModal();+ if (typeof cancelProps?.onClick === "function") {+ cancelProps.onClick(event);+ }++ if (typeof onCancel === "function") {+ await onCancel();+ }++ if (closeOnCancel) {+ actions.closeModal();+ }},[cancelProps?.onClick, onCancel, actions.closeModal],);@@ -51,9 +59,18 @@ export const ConfirmModal = createModal<Omit<ConfirmModalProps, "title">>(({ actconst handleConfirm = useCallback(async (event: React.MouseEvent<HTMLButtonElement>) => {setLoading(true);- typeof confirmProps?.onClick === "function" && confirmProps.onClick(event);- typeof onConfirm === "function" && (await onConfirm());- closeOnConfirm && actions.closeModal();++ if (typeof confirmProps?.onClick === "function") {+ confirmProps.onClick(event);+ }++ if (typeof onConfirm === "function") {+ await onConfirm();+ }++ if (closeOnConfirm) {+ actions.closeModal();+ }setLoading(false);},[confirmProps?.onClick, onConfirm, actions.closeModal],diff --git a/packages/translation/src/lang.ts b/packages/translation/src/lang.tsindex ebaaca03c..5874d7918 100644--- a/packages/translation/src/lang.ts+++ b/packages/translation/src/lang.ts@@ -1,15 +1,16 @@import { supportedLanguages } from ".";-const enTranslations = () => import("./lang/en");+const _enTranslations = () => import("./lang/en");+type EnTranslation = typeof _enTranslations;export const languageMapping = () => {const mapping: Record<string, unknown> = {};for (const language of supportedLanguages) {- mapping[language] = () => import(`./lang/${language}`) as ReturnType<typeof enTranslations>;+ mapping[language] = () => import(`./lang/${language}`) as ReturnType<EnTranslation>;}- return mapping as Record<(typeof supportedLanguages)[number], () => ReturnType<typeof enTranslations>>;+ return mapping as Record<(typeof supportedLanguages)[number], () => ReturnType<EnTranslation>>;};type NestedKeyOf<ObjectType extends object> = {@@ -18,4 +19,4 @@ type NestedKeyOf<ObjectType extends object> = {: `${Key}`;}[keyof ObjectType & (string | number)];-export type TranslationKeys = NestedKeyOf<typeof enTranslations>;+export type TranslationKeys = NestedKeyOf<EnTranslation>;diff --git a/packages/translation/src/lang/en.ts b/packages/translation/src/lang/en.tsindex f7c7e2e2c..9b8cb53ab 100644--- a/packages/translation/src/lang/en.ts+++ b/packages/translation/src/lang/en.ts@@ -506,6 +506,7 @@ export default {symbols: {colon: ": ",},+ error: "Error",action: {add: "Add",apply: "Apply",diff --git a/packages/widgets/src/_inputs/widget-location-input.tsx b/packages/widgets/src/_inputs/widget-location-input.tsxindex b37c1817f..e264aee64 100644--- a/packages/widgets/src/_inputs/widget-location-input.tsx+++ b/packages/widgets/src/_inputs/widget-location-input.tsx@@ -3,6 +3,7 @@import { useCallback } from "react";import {ActionIcon,+ Alert,Anchor,Button,Fieldset,@@ -125,7 +126,11 @@ const LocationSearchModal = createModal<LocationSearchInnerProps>(({ actions, in});if (error) {- throw error;+ return (+ <Alert title={tCommon("error")} color="red">+ {error.message}+ </Alert>+ );}return (diff --git a/packages/widgets/src/app/serverData.ts b/packages/widgets/src/app/serverData.tsindex d4d995f2c..a541101d9 100644--- a/packages/widgets/src/app/serverData.ts+++ b/packages/widgets/src/app/serverData.ts@@ -19,7 +19,7 @@ export default async function getServerDataAsync({ options }: WidgetProps<"app">}return { app, pingResult };- } catch (error) {+ } catch {return { app: null, pingResult: null };}}diff --git a/packages/widgets/src/calendar/serverData.ts b/packages/widgets/src/calendar/serverData.tsindex faccd3468..907efba2e 100644--- a/packages/widgets/src/calendar/serverData.ts+++ b/packages/widgets/src/calendar/serverData.ts@@ -27,7 +27,7 @@ export default async function getServerDataAsync({ integrationIds, itemId }: Wid).flatMap((item) => item.data),};- } catch (error) {+ } catch {return {initialData: [],};diff --git a/packages/widgets/src/dns-hole/summary/serverData.ts b/packages/widgets/src/dns-hole/summary/serverData.tsindex 0575023fb..74cea93a4 100644--- a/packages/widgets/src/dns-hole/summary/serverData.ts+++ b/packages/widgets/src/dns-hole/summary/serverData.ts@@ -16,7 +16,7 @@ export default async function getServerDataAsync({ integrationIds }: WidgetPropsreturn {initialData: data,};- } catch (error) {+ } catch {return {initialData: undefined,};diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex bfecd5f8b..37db608e6 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1401,7 +1401,7 @@ importers:version: 2.0.11([email protected])eslint-plugin-import:specifier: ^2.29.1- version: 2.29.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])+ version: 2.29.1(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])eslint-plugin-jsx-a11y:specifier: ^6.9.0version: 6.9.0([email protected])@@ -1412,8 +1412,8 @@ importers:specifier: ^4.6.2version: 4.6.2([email protected])typescript-eslint:- specifier: ^7.18.0- version: 7.18.0([email protected])([email protected])+ specifier: ^8.0.0+ version: 8.0.0([email protected])([email protected])devDependencies:'@homarr/prettier-config':specifier: workspace:^0.1.0@@ -2873,63 +2873,62 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==}- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-STIZdwEQRXAHvNUS6ILDf5z3u95Gc8jzywunxSNqX00OooIemaaNIA0vEgynJlycL5AjabYLLrIyHd4iazyvtg==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:- '@typescript-eslint/parser': ^7.0.0- eslint: ^8.56.0+ '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0+ eslint: ^8.57.0 || ^9.0.0typescript: '*'peerDependenciesMeta:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-pS1hdZ+vnrpDIxuFXYQpLTILglTjSYJ9MbetZctrUawogUsPdz31DIIRZ9+rab0LhYNTsk88w4fIzVheiTbWOQ==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:- eslint: ^8.56.0+ eslint: ^8.57.0 || ^9.0.0typescript: '*'peerDependenciesMeta:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-mJAFP2mZLTBwAn5WI4PMakpywfWFH5nQZezUQdSKV23Pqo6o9iShQg1hP2+0hJJXP2LnZkWPphdIq4juYYwCeg==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:- eslint: ^8.56.0typescript: '*'peerDependenciesMeta:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-5b97WpKMX+Y43YKi4zVcCVLtK5F98dFls3Oxui8LbnmRsseKenbbDinmvxrWegKDMmlkIq/XHuyy0UGLtpCDKg==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:typescript: '*'peerDependenciesMeta:typescript:optional: true- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-k/oS/A/3QeGLRvOWCg6/9rATJL5rec7/5s1YmdS0ZU6LHveJyGFwBvLhSRBv6i9xaj7etmosp+l+ViN1I9Aj/Q==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:- eslint: ^8.56.0+ eslint: ^8.57.0 || ^9.0.0- '@typescript-eslint/[email protected]':- resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==}- engines: {node: ^18.18.0 || >=20.0.0}+ '@typescript-eslint/[email protected]':+ resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}'@umami/[email protected]':resolution: {integrity: sha512-+1cZ7o7jVN8oXDYZRqigfLHrWbEv5vtGWjB7blfVH1QUa+DRmWB6GfhMZtE2aSW+P9ACal8ZW7xD2PCAejlNCQ==}@@ -6312,11 +6311,10 @@ packages:resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==}engines: {node: '>= 0.4'}- resolution: {integrity: sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==}- engines: {node: ^18.18.0 || >=20.0.0}+ resolution: {integrity: sha512-yQWBJutWL1PmpmDddIOl9/Mi6vZjqNCjqSGBMQ4vsc2Aiodk0SnbQQWPXbSy0HNuKCuGkw1+u4aQ2mO40TdhDQ==}+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}peerDependencies:- eslint: ^8.56.0typescript: '*'peerDependenciesMeta:typescript:@@ -7980,14 +7978,14 @@ snapshots:dependencies:'@types/node': 20.14.13- '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':+ '@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])':dependencies:'@eslint-community/regexpp': 4.11.0- '@typescript-eslint/parser': 7.18.0([email protected])([email protected])- '@typescript-eslint/scope-manager': 7.18.0- '@typescript-eslint/type-utils': 7.18.0([email protected])([email protected])- '@typescript-eslint/utils': 7.18.0([email protected])([email protected])- '@typescript-eslint/visitor-keys': 7.18.0+ '@typescript-eslint/parser': 8.0.0([email protected])([email protected])+ '@typescript-eslint/scope-manager': 8.0.0+ '@typescript-eslint/type-utils': 8.0.0([email protected])([email protected])+ '@typescript-eslint/utils': 8.0.0([email protected])([email protected])+ '@typescript-eslint/visitor-keys': 8.0.0eslint: 9.8.0graphemer: 1.4.0ignore: 5.3.1@@ -7998,12 +7996,12 @@ snapshots:transitivePeerDependencies:- supports-colordependencies:- '@typescript-eslint/scope-manager': 7.18.0- '@typescript-eslint/types': 7.18.0- '@typescript-eslint/typescript-estree': 7.18.0([email protected])- '@typescript-eslint/visitor-keys': 7.18.0+ '@typescript-eslint/scope-manager': 8.0.0+ '@typescript-eslint/types': 8.0.0+ '@typescript-eslint/typescript-estree': 8.0.0([email protected])+ '@typescript-eslint/visitor-keys': 8.0.0debug: 4.3.5eslint: 9.8.0optionalDependencies:@@ -8011,29 +8009,29 @@ snapshots:transitivePeerDependencies:- supports-color- '@typescript-eslint/[email protected]':+ '@typescript-eslint/[email protected]':dependencies:- '@typescript-eslint/types': 7.18.0- '@typescript-eslint/visitor-keys': 7.18.0+ '@typescript-eslint/types': 8.0.0+ '@typescript-eslint/visitor-keys': 8.0.0dependencies:- '@typescript-eslint/typescript-estree': 7.18.0([email protected])- '@typescript-eslint/utils': 7.18.0([email protected])([email protected])+ '@typescript-eslint/typescript-estree': 8.0.0([email protected])+ '@typescript-eslint/utils': 8.0.0([email protected])([email protected])debug: 4.3.5- eslint: 9.8.0ts-api-utils: 1.3.0([email protected])optionalDependencies:typescript: 5.5.4transitivePeerDependencies:+ - eslint- supports-color- '@typescript-eslint/[email protected]': {}+ '@typescript-eslint/[email protected]': {}- '@typescript-eslint/[email protected]([email protected])':+ '@typescript-eslint/[email protected]([email protected])':dependencies:- '@typescript-eslint/types': 7.18.0- '@typescript-eslint/visitor-keys': 7.18.0+ '@typescript-eslint/types': 8.0.0+ '@typescript-eslint/visitor-keys': 8.0.0debug: 4.3.5globby: 11.1.0is-glob: 4.0.3@@ -8045,20 +8043,20 @@ snapshots:transitivePeerDependencies:- supports-colordependencies:'@eslint-community/eslint-utils': 4.4.0([email protected])- '@typescript-eslint/scope-manager': 7.18.0- '@typescript-eslint/types': 7.18.0- '@typescript-eslint/typescript-estree': 7.18.0([email protected])+ '@typescript-eslint/scope-manager': 8.0.0+ '@typescript-eslint/types': 8.0.0+ '@typescript-eslint/typescript-estree': 8.0.0([email protected])eslint: 9.8.0transitivePeerDependencies:- supports-color- typescript- '@typescript-eslint/[email protected]':+ '@typescript-eslint/[email protected]':dependencies:- '@typescript-eslint/types': 7.18.0+ '@typescript-eslint/types': 8.0.0eslint-visitor-keys: 3.4.3'@umami/[email protected]': {}@@ -9393,17 +9391,17 @@ snapshots:transitivePeerDependencies:- supports-color- [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]):+ [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]):dependencies:debug: 3.2.7optionalDependencies:- '@typescript-eslint/parser': 7.18.0([email protected])([email protected])+ '@typescript-eslint/parser': 8.0.0([email protected])([email protected])eslint: 9.8.0eslint-import-resolver-node: 0.3.9transitivePeerDependencies:- supports-color- [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected]):+ [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected]):dependencies:array-includes: 3.1.7array.prototype.findlastindex: 1.2.4@@ -9413,7 +9411,7 @@ snapshots:doctrine: 2.1.0eslint: 9.8.0eslint-import-resolver-node: 0.3.9- eslint-module-utils: 2.8.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])+ eslint-module-utils: 2.8.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])hasown: 2.0.1is-core-module: 2.13.1is-glob: 4.0.3@@ -9424,7 +9422,7 @@ snapshots:semver: 6.3.1tsconfig-paths: 3.15.0optionalDependencies:- '@typescript-eslint/parser': 7.18.0([email protected])([email protected])+ '@typescript-eslint/parser': 8.0.0([email protected])([email protected])transitivePeerDependencies:- eslint-import-resolver-typescript- eslint-import-resolver-webpack@@ -12011,15 +12009,15 @@ snapshots:is-typed-array: 1.1.13possible-typed-array-names: 1.0.0dependencies:- '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])- '@typescript-eslint/parser': 7.18.0([email protected])([email protected])- '@typescript-eslint/utils': 7.18.0([email protected])([email protected])- eslint: 9.8.0+ '@typescript-eslint/eslint-plugin': 8.0.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])+ '@typescript-eslint/parser': 8.0.0([email protected])([email protected])+ '@typescript-eslint/utils': 8.0.0([email protected])([email protected])optionalDependencies:typescript: 5.5.4transitivePeerDependencies:+ - eslint- supports-colordiff --git a/tooling/eslint/package.json b/tooling/eslint/package.jsonindex 3e3aaa357..56f4ecc27 100644--- a/tooling/eslint/package.json+++ b/tooling/eslint/package.json@@ -23,7 +23,7 @@"eslint-plugin-jsx-a11y": "^6.9.0","eslint-plugin-react": "^7.35.0","eslint-plugin-react-hooks": "^4.6.2",- "typescript-eslint": "^7.18.0"+ "typescript-eslint": "^8.0.0"},"devDependencies": {"@homarr/prettier-config": "workspace:^0.1.0",