diff --git a/.deepsource.toml b/.deepsource.toml index edc4a8907..e2f2ffcf8 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -3,9 +3,6 @@ version = 1 [[analyzers]] name = "javascript" - [analyzers.meta] - plugins = ["react"] - environment = ["nodejs"] - -[[transformers]] -name = "prettier" \ No newline at end of file +[analyzers.meta] +plugins = ["react"] +environment = ["nodejs"] diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index e972a1b0c..40d4ceb08 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -24,6 +24,38 @@ env: TURBO_SCM_HEAD: ${{ github.sha }} jobs: + lint-format-autofix: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} + + - name: Setup + uses: ./tooling/github/setup + + - name: Get changed files + id: changed + run: | + git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx' > /tmp/changed-files + echo "count=$(wc -l < /tmp/changed-files | tr -d '[:space:]')" >> $GITHUB_OUTPUT + + - name: Auto-fix lint + format + if: steps.changed.outputs.count != '0' + run: | + xargs -r -a /tmp/changed-files pnpm exec oxlint --fix || true + xargs -r -a /tmp/changed-files pnpm exec oxfmt --write + + - name: Commit fixes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: auto-fix lint and format" + lint: runs-on: ubuntu-latest timeout-minutes: 10 @@ -54,7 +86,7 @@ jobs: uses: ./tooling/github/setup - name: Format - run: pnpm turbo format --affected --continue -- --cache --cache-location node_modules/.cache/.prettiercache + run: pnpm turbo format --affected --continue typecheck: runs-on: ubuntu-latest diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 000000000..88c14e2f9 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 120, + "endOfLine": "lf", + "sortPackageJson": true, + "ignorePatterns": ["**/*.cjs", "**/lang/**", "static-data/**", "CHANGELOG.md"] +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 000000000..1dbc54c92 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,37 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["eslint", "typescript", "unicorn", "oxc", "react", "import", "jsx-a11y"], + "categories": { + "correctness": "error", + "suspicious": "warn", + "pedantic": "off", + "perf": "off", + "style": "off", + "restriction": "off", + "nursery": "off" + }, + "rules": { + "eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }], + "typescript/consistent-type-imports": ["warn", { "prefer": "type-imports", "fixStyle": "separate-type-imports" }], + "typescript/no-non-null-assertion": "error", + "import/consistent-type-specifier-style": ["error", "prefer-top-level"], + "unicorn/no-new-array": "warn", + "unicorn/no-useless-spread": "warn", + "unicorn/no-useless-length-check": "warn", + "unicorn/no-useless-fallback-in-spread": "warn", + "jsx-a11y/prefer-tag-over-role": "warn", + "oxc/const-comparisons": "warn", + "react-hooks/exhaustive-deps": "warn", + "react/no-children-prop": "warn", + "jsx-a11y/no-autofocus": "warn", + "jsx-a11y/img-redundant-alt": "warn", + "react/react-in-jsx-scope": "off" + }, + "options": { + "reportUnusedDisableDirectives": "off" + }, + "ignorePatterns": ["**/*.config.js", "**/*.config.mjs", "**/*.cjs", "**/lang/*.d.json.ts", ".next/**"], + "settings": { + "react": { "version": "19" } + } +} diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml index 1ee83bc7e..865d1ae28 100644 --- a/.vscode/i18n-ally-custom-framework.yml +++ b/.vscode/i18n-ally-custom-framework.yml @@ -31,6 +31,5 @@ scopeRangeRegex: "(?:const|let|var)\\s+t\\s*=\\s*(?:await\\s+)?(?:getScopedI18n| # refactorTemplates: # - i18n.get("$1") - # If set to true, only enables this custom framework (will disable all built-in frameworks) -monopoly: true \ No newline at end of file +monopoly: true diff --git a/.vscode/launch.json b/.vscode/launch.json index b24d8b507..f3f0886e0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,9 +15,7 @@ "request": "launch", "command": "pnpm docker:dev", "cwd": "${workspaceFolder}", - "skipFiles": [ - "/**" - ] + "skipFiles": ["/**"] }, { "name": "lint fix", @@ -25,9 +23,7 @@ "request": "launch", "command": "pnpm lint:fix", "cwd": "${workspaceFolder}", - "skipFiles": [ - "/**" - ] + "skipFiles": ["/**"] }, { "name": "format fix", @@ -35,9 +31,7 @@ "request": "launch", "command": "pnpm format:fix", "cwd": "${workspaceFolder}", - "skipFiles": [ - "/**" - ] + "skipFiles": ["/**"] }, { "name": "db push", @@ -69,9 +63,7 @@ "request": "launch", "command": "pnpm test", "cwd": "${workspaceFolder}", - "skipFiles": [ - "/**" - ] + "skipFiles": ["/**"] }, { "name": "test ui", @@ -79,9 +71,7 @@ "request": "launch", "command": "pnpm test:ui", "cwd": "${workspaceFolder}", - "skipFiles": [ - "/**" - ] + "skipFiles": ["/**"] } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index f018a27b5..aa5d827ff 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,6 @@ { - "eslint.workingDirectories": [ - { - "mode": "auto" - } - ], - "eslint.experimental.useFlatConfig": true, "typescript.tsdk": "node_modules\\typescript\\lib", "js/ts.implicitProjectConfig.experimentalDecorators": true, - "prettier.configPath": "./tooling/prettier/index.mjs", "cSpell.words": [ "ajnart", "cqmin", @@ -34,11 +27,7 @@ ], "i18n-ally.dirStructure": "auto", "i18n-ally.displayLanguage": "en", - "i18n-ally.enabledFrameworks": [ - "custom" - ], - "i18n-ally.localesPaths": [ - "packages/translation/src/lang", - ], - "i18n-ally.keystyle": "nested", + "i18n-ally.enabledFrameworks": ["custom"], + "i18n-ally.localesPaths": ["packages/translation/src/lang"], + "i18n-ally.keystyle": "nested" } diff --git a/apps/nextjs/eslint.config.js b/apps/nextjs/eslint.config.js deleted file mode 100644 index 3d593e34e..000000000 --- a/apps/nextjs/eslint.config.js +++ /dev/null @@ -1,30 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; -import nextjsConfig from "@homarr/eslint-config/nextjs"; -import reactConfig from "@homarr/eslint-config/react"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [".next/**"], - }, - ...baseConfig, - ...reactConfig, - ...nextjsConfig, - { - files: ["public/sw.js"], - languageOptions: { - globals: { - self: "readonly", - clients: "readonly", - skipWaiting: "readonly", - importScripts: "readonly", - caches: "readonly", - fetch: "readonly", - }, - }, - rules: { - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - }, - }, -]; diff --git a/apps/nextjs/package.json b/apps/nextjs/package.json index 409845f4e..ff5864f13 100644 --- a/apps/nextjs/package.json +++ b/apps/nextjs/package.json @@ -7,13 +7,12 @@ "build": "pnpm with-env next build", "clean": "git clean -xdf .next .turbo node_modules", "dev": "pnpm with-env next dev", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "start": "pnpm with-env next start", "typecheck": "tsc --noEmit", "with-env": "dotenv -e ../../.env --" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@dnd-kit/core": "catalog:", "@dnd-kit/modifiers": "catalog:", @@ -92,8 +91,6 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/chroma-js": "catalog:", "@types/node": "catalog:", @@ -102,9 +99,7 @@ "@types/react-dom": "catalog:", "@types/swagger-ui-react": "catalog:", "concurrently": "catalog:", - "eslint": "catalog:", "node-loader": "catalog:", - "prettier": "catalog:", "typescript": "catalog:" } } diff --git a/apps/nextjs/src/app/[locale]/_client-providers/mantine.tsx b/apps/nextjs/src/app/[locale]/_client-providers/mantine.tsx index d81b828f3..dc240d764 100644 --- a/apps/nextjs/src/app/[locale]/_client-providers/mantine.tsx +++ b/apps/nextjs/src/app/[locale]/_client-providers/mantine.tsx @@ -23,6 +23,7 @@ export const CustomMantineProvider = ({ theme={createTheme({ primaryColor: "red", autoContrast: true, + defaultRadius: "sm", })} > {children} diff --git a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx index 71d249cf5..8d36d1e79 100644 --- a/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx +++ b/apps/nextjs/src/app/[locale]/auth/login/_login-form.tsx @@ -9,7 +9,7 @@ import { z } from "zod/v4"; import { signIn } from "@homarr/auth/client"; import { revalidatePathActionAsync } from "@homarr/common/client"; -import type { useForm } from "@homarr/form"; +import type { UseFormReturnType } from "@homarr/form"; import { useZodForm } from "@homarr/form"; import { showErrorNotification, showSuccessNotification } from "@homarr/notifications"; import { useScopedI18n } from "@homarr/translation/client"; @@ -162,7 +162,7 @@ export const LoginForm = ({ providers, oidcClientName, isOidcAutoLoginEnabled, c interface SubmitButtonProps { isPending: boolean; - form: ReturnType FormType>>; + form: UseFormReturnType; provider: "credentials" | "ldap"; } @@ -198,7 +198,7 @@ const PasswordForgottenCollapse = ({ username }: PasswordForgottenCollapseProps) {tForgotPassword("label")} - + {tForgotPassword("description")} diff --git a/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx b/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx index 64c9289e3..3314dee3c 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_creator.tsx @@ -41,13 +41,11 @@ export const createBoardContentPage = >( }), // eslint-disable-next-line no-restricted-syntax page: async ({ params }: { params: Promise }) => { - const session = await auth(); - const integrations = await getIntegrationsWithPermissionsAsync(session); - - const board = await getInitialBoard(await params); + const resolvedParams = await params; const queryClient = getQueryClient(); - // Prefetch item data + const [board, session] = await Promise.all([getInitialBoard(resolvedParams), auth()]); + const itemsMap = board.items.reduce((acc, item) => { const existing = acc.get(item.kind); if (existing) { @@ -58,17 +56,20 @@ export const createBoardContentPage = >( return acc; }, new Map()); - for (const [kind, items] of itemsMap) { - await prefetchForKindAsync(kind, queryClient, items).catch((error) => { - logger.error( - new ErrorWithMetadata( - "Failed to prefetch widget", - { widgetKind: kind, itemCount: items.length }, - { cause: error }, - ), - ); - }); - } + const [integrations] = await Promise.all([ + getIntegrationsWithPermissionsAsync(session), + ...Array.from(itemsMap).map(([kind, items]) => + prefetchForKindAsync(kind, queryClient, items).catch((error) => { + logger.error( + new ErrorWithMetadata( + "Failed to prefetch widget", + { widgetKind: kind, itemCount: items.length }, + { cause: error }, + ), + ); + }), + ), + ]); return ( diff --git a/apps/nextjs/src/app/[locale]/boards/(content)/_theme.tsx b/apps/nextjs/src/app/[locale]/boards/(content)/_theme.tsx index 27f3e9152..8fa031ad0 100644 --- a/apps/nextjs/src/app/[locale]/boards/(content)/_theme.tsx +++ b/apps/nextjs/src/app/[locale]/boards/(content)/_theme.tsx @@ -24,6 +24,7 @@ export const BoardMantineProvider = ({ }, primaryColor: "primaryColor", autoContrast: true, + defaultRadius: "sm", fontSizes: { "2xl": rem(24), "3xl": rem(28), diff --git a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx index 95b3602e6..4af4af15f 100644 --- a/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx +++ b/apps/nextjs/src/app/[locale]/boards/[name]/settings/_appereance.tsx @@ -83,7 +83,7 @@ export const ColorSettingsContent = ({ board }: Props) => { {showPreview ? t("common.preview.hide") : t("common.preview.show")} - + diff --git a/apps/nextjs/src/app/[locale]/layout.tsx b/apps/nextjs/src/app/[locale]/layout.tsx index 5449e1252..9342e0d30 100644 --- a/apps/nextjs/src/app/[locale]/layout.tsx +++ b/apps/nextjs/src/app/[locale]/layout.tsx @@ -142,7 +142,7 @@ export default async function Layout(props: { - + {props.children} diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-card.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-card.tsx index 06c4baff3..cc6a0a752 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-card.tsx +++ b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-card.tsx @@ -79,7 +79,7 @@ export const SecretCard = ({ secret, children, onCancel }: SecretCardProps) => { - {children} + {children} ); diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-segmented-control.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-segmented-control.tsx index e524b3870..9272e47c2 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-segmented-control.tsx +++ b/apps/nextjs/src/app/[locale]/manage/integrations/_components/secrets/integration-secret-segmented-control.tsx @@ -12,7 +12,7 @@ interface FormType { interface SecretKindsSegmentedControlProps { defaultKinds?: IntegrationSecretKind[]; secretKinds: IntegrationSecretKind[][]; - form: UseFormReturnType TFormType>; + form: UseFormReturnType; } export const SecretKindsSegmentedControl = ({ diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx index 2f67da11c..fea4f8109 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx +++ b/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx @@ -255,7 +255,7 @@ const AppForm = ({ form, canCreateApps }: { form: UseFormReturnType; c description={t("integration.field.createApp.description")} /> - +
{canCreateApps && ( diff --git a/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx b/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx index 293a8fa96..adec086ad 100644 --- a/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx +++ b/apps/nextjs/src/app/[locale]/manage/settings/_components/setting-switch.tsx @@ -15,7 +15,7 @@ export const SwitchSetting = >({ disabled, }: { form: Modify< - UseFormReturnType TFormValue>, + UseFormReturnType, { setFieldValue: (key: keyof TFormValue, value: (previous: boolean) => boolean) => void; } diff --git a/apps/nextjs/src/app/[locale]/manage/tools/logs/level-selection.tsx b/apps/nextjs/src/app/[locale]/manage/tools/logs/level-selection.tsx index 71846ca02..243521471 100644 --- a/apps/nextjs/src/app/[locale]/manage/tools/logs/level-selection.tsx +++ b/apps/nextjs/src/app/[locale]/manage/tools/logs/level-selection.tsx @@ -2,12 +2,14 @@ import { Select } from "@mantine/core"; -import type { LogLevel } from "@homarr/core/infrastructure/logs/constants"; import { logLevelConfiguration, logLevels } from "@homarr/core/infrastructure/logs/constants"; +import type { LogLevel } from "@homarr/core/infrastructure/logs/constants"; import { useI18n } from "@homarr/translation/client"; import { useLogContext } from "./log-context"; +const levelByValue = Object.fromEntries(logLevels.map((logLevel) => [logLevel, logLevel])) as Record; + export const LogLevelSelection = () => { const { level, setLevel } = useLogContext(); const t = useI18n(); @@ -19,7 +21,12 @@ export const LogLevelSelection = () => { label: `${logLevelConfiguration[level].prefix} ${t(`log.level.option.${level}`)}`, }))} value={level} - onChange={(value) => setLevel(value as LogLevel)} + onChange={(value) => { + const nextLevel = value && levelByValue[value]; + if (nextLevel) { + setLevel(nextLevel); + } + }} checkIconPosition="right" /> ); diff --git a/apps/nextjs/src/app/[locale]/manage/users/[userId]/general/_components/_first-day-of-week.tsx b/apps/nextjs/src/app/[locale]/manage/users/[userId]/general/_components/_first-day-of-week.tsx index 71bef0737..2bf43a3bc 100644 --- a/apps/nextjs/src/app/[locale]/manage/users/[userId]/general/_components/_first-day-of-week.tsx +++ b/apps/nextjs/src/app/[locale]/manage/users/[userId]/general/_components/_first-day-of-week.tsx @@ -62,7 +62,7 @@ export const FirstDayOfWeek = ({ user }: FirstDayOfWeekProps) => { return (
- onChange(parseInt(value))}> + onChange(parseInt(nextValue, 10))}> diff --git a/apps/nextjs/src/components/board/sections/category-section.tsx b/apps/nextjs/src/components/board/sections/category-section.tsx index 592b39c68..feedcb964 100644 --- a/apps/nextjs/src/components/board/sections/category-section.tsx +++ b/apps/nextjs/src/components/board/sections/category-section.tsx @@ -62,7 +62,7 @@ export const BoardCategorySection = ({ section }: Props) => { - + diff --git a/apps/nextjs/src/components/board/sections/gridstack/use-gridstack.ts b/apps/nextjs/src/components/board/sections/gridstack/use-gridstack.ts index eda89a8e6..b5e468de6 100644 --- a/apps/nextjs/src/components/board/sections/gridstack/use-gridstack.ts +++ b/apps/nextjs/src/components/board/sections/gridstack/use-gridstack.ts @@ -1,6 +1,6 @@ -import type { RefObject } from "react"; +import type { Ref, RefObject } from "react"; import { createRef, useCallback, useEffect, useRef } from "react"; -import { useElementSize } from "@mantine/hooks"; +import { useElementSize, useMergedRef } from "@mantine/hooks"; import { useCurrentLayout, useRequiredBoard } from "@homarr/boards/context"; import { useEditMode } from "@homarr/boards/edit-mode"; @@ -13,7 +13,7 @@ import { useSectionActions } from "../section-actions"; import { initializeGridstack } from "./init-gridstack"; export interface UseGridstackRefs { - wrapper: RefObject; + wrapper: Ref; items: RefObject>>; gridstack: RefObject; } @@ -59,8 +59,9 @@ export const useGridstack = (section: Omit, itemIds: string[]) const { moveAndResizeItem, moveItemToSection } = useItemActions(); const { moveAndResizeInnerSection, moveInnerSectionToSection } = useSectionActions(); - // define reference for wrapper - is used to calculate the width of the wrapper - const { ref: wrapperRef, width, height } = useElementSize(); + const wrapperElementRef = useRef(null); + const { ref: measureWrapperRef, width, height } = useElementSize(); + const wrapperRef = useMergedRef(measureWrapperRef, wrapperElementRef); // references to the diffrent items contained in the gridstack const itemRefs = useRef>>({}); // reference of the gridstack object for modifications after initialization @@ -193,7 +194,7 @@ export const useGridstack = (section: Omit, itemIds: string[]) itemIds, refs: { items: itemRefs, - wrapper: wrapperRef, + wrapper: wrapperElementRef, gridstack: gridRef, }, sectionColumnCount: columnCount, @@ -276,7 +277,7 @@ export const useGridstack = (section: Omit, itemIds: string[]) useCssVariableConfiguration({ columnCount, gridRef, - wrapperRef, + wrapperRef: wrapperElementRef, width, height, isDynamic: section.kind === "dynamic", @@ -293,7 +294,7 @@ export const useGridstack = (section: Omit, itemIds: string[]) interface UseCssVariableConfiguration { gridRef: UseGridstackRefs["gridstack"]; - wrapperRef: UseGridstackRefs["wrapper"]; + wrapperRef: RefObject; width: number; height: number; columnCount: number; diff --git a/apps/nextjs/src/components/layout/background.tsx b/apps/nextjs/src/components/layout/background.tsx index c7011408a..70efc6b14 100644 --- a/apps/nextjs/src/components/layout/background.tsx +++ b/apps/nextjs/src/components/layout/background.tsx @@ -44,6 +44,7 @@ export const BoardBackgroundVideo = () => { muted loop playsInline + aria-hidden="true" style={{ position: "fixed", width: "100vw", diff --git a/apps/tasks/eslint.config.js b/apps/tasks/eslint.config.js deleted file mode 100644 index f44e21cd5..000000000 --- a/apps/tasks/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: ["tasks.cjs"], - }, - ...baseConfig, -]; diff --git a/apps/tasks/package.json b/apps/tasks/package.json index 28e34be63..13b911e5f 100644 --- a/apps/tasks/package.json +++ b/apps/tasks/package.json @@ -4,20 +4,19 @@ "private": true, "license": "Apache-2.0", "type": "module", + "main": "./src/main.ts", + "types": "./src/main.ts", "exports": { ".": "./src/main.ts" }, - "main": "./src/main.ts", - "types": "./src/main.ts", "scripts": { "clean": "rm -rf .turbo node_modules", "dev": "pnpm with-env tsx ./src/main.ts", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit", "with-env": "dotenv -e ../../.env --" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/analytics": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0", @@ -43,14 +42,10 @@ "undici": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/node": "catalog:", "dotenv-cli": "catalog:", "esbuild": "catalog:", - "eslint": "catalog:", - "prettier": "catalog:", "tsx": "catalog:", "typescript": "catalog:" } diff --git a/apps/websocket/eslint.config.js b/apps/websocket/eslint.config.js deleted file mode 100644 index 984f78162..000000000 --- a/apps/websocket/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: ["wssServer.cjs"], - }, - ...baseConfig, -]; diff --git a/apps/websocket/package.json b/apps/websocket/package.json index c4a9cf9d0..da277286e 100644 --- a/apps/websocket/package.json +++ b/apps/websocket/package.json @@ -4,20 +4,19 @@ "private": true, "license": "Apache-2.0", "type": "module", + "main": "./src/main.ts", + "types": "./src/main.ts", "exports": { ".": "./src/main.ts" }, - "main": "./src/main.ts", - "types": "./src/main.ts", "scripts": { "clean": "rm -rf .turbo node_modules", "dev": "pnpm with-env tsx ./src/main.ts", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit", "with-env": "dotenv -e ../../.env --" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/api": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0", @@ -32,13 +31,9 @@ "ws": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/ws": "catalog:", "esbuild": "catalog:", - "eslint": "catalog:", - "prettier": "catalog:", "typescript": "catalog:" } } diff --git a/deployments/prebuilt-debian/package.json b/deployments/prebuilt-debian/package.json index d39018275..2e5dd60cf 100644 --- a/deployments/prebuilt-debian/package.json +++ b/deployments/prebuilt-debian/package.json @@ -4,11 +4,11 @@ "dependencies": { "better-sqlite3": "^12.10.0" }, - "packageManager": "pnpm@10.33.4", "engines": { "node": ">=24.15.0", "pnpm": ">=10.33.4" }, + "packageManager": "pnpm@10.33.4", "pnpm": { "onlyBuiltDependencies": [ "better-sqlite3" diff --git a/development/development.docker-compose.yml b/development/development.docker-compose.yml index f19ed787d..093bbc331 100644 --- a/development/development.docker-compose.yml +++ b/development/development.docker-compose.yml @@ -51,4 +51,4 @@ services: volumes: mysql_data: - postgresql_data: \ No newline at end of file + postgresql_data: diff --git a/e2e/lldap.spec.ts b/e2e/lldap.spec.ts index a7fb2a7ef..f1f07790d 100644 --- a/e2e/lldap.spec.ts +++ b/e2e/lldap.spec.ts @@ -45,7 +45,7 @@ describe("LLDAP authorization", () => { // Act await page.goto(`http://${homarrContainer.getHost()}:${homarrContainer.getMappedPort(7575)}/auth/login`); await page.getByLabel("Username").fill(defaultCredentials.username); - await page.getByLabel("Password").fill(defaultCredentials.password); + await page.locator("#password").fill(defaultCredentials.password); await page.locator("css=button[type='submit']").click(); // Assert diff --git a/package.json b/package.json index dabadfe2b..17862437f 100644 --- a/package.json +++ b/package.json @@ -17,12 +17,11 @@ "db:studio": "pnpm -F db studio", "dev": "pnpm -F nextjs dev", "docker:dev": "docker compose -f ./development/development.docker-compose.yml up", - "format": "turbo format --continue -- --cache --cache-location node_modules/.cache/.prettiercache", - "format:fix": "turbo format --continue -- --write --cache --cache-location node_modules/.cache/.prettiercache", - "lint": "turbo lint --continue -- --cache --cache-location node_modules/.cache/.eslintcache", - "lint:fix": "turbo lint --continue -- --fix --cache --cache-location node_modules/.cache/.eslintcache", + "format": "turbo format --continue", + "format:fix": "turbo format --continue -- --write", + "lint": "turbo lint --continue", + "lint:fix": "turbo lint --continue -- --fix", "lint:ws": "pnpm dlx sherif@latest", - "package:new": "turbo gen init", "release": "semantic-release", "scripts:update-bug-report-template": "tsx ./scripts/update-bug-report-template.mts", "scripts:update-readme-integrations": "tsx ./scripts/update-integration-list.mts", @@ -33,9 +32,7 @@ "typecheck": "turbo typecheck", "with-env": "dotenv -e .env --" }, - "prettier": "@homarr/prettier-config", "devDependencies": { - "@homarr/prettier-config": "workspace:^0.1.0", "@playwright/test": "catalog:", "@semantic-release/changelog": "catalog:", "@semantic-release/commit-analyzer": "catalog:", @@ -52,7 +49,8 @@ "cross-env": "catalog:", "jsdom": "catalog:", "json5": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", + "oxlint": "catalog:", "semantic-release": "catalog:", "testcontainers": "catalog:", "turbo": "catalog:", @@ -60,11 +58,11 @@ "vite-tsconfig-paths": "catalog:", "vitest": "catalog:" }, - "packageManager": "pnpm@10.33.4", "engines": { "node": ">=24.15.0", "pnpm": ">=10.33.4" }, + "packageManager": "pnpm@10.33.4", "pnpm": { "onlyBuiltDependencies": [ "@tree-sitter-grammars/tree-sitter-yaml", @@ -85,7 +83,7 @@ "brace-expansion@>=1.0.0 <=1.1.11": ">=5.0.6", "esbuild@<=0.24.2": ">=0.28.0", "form-data@>=4.0.0 <4.0.4": ">=4.0.5", - "hono@<4.6.5": ">=4.12.21", + "hono@<4.6.5": ">=4.12.22", "linkifyjs@<4.3.2": ">=4.3.3", "nanoid@>=4.0.0 <5.0.9": ">=5.1.11", "prismjs@<1.30.0": ">=1.30.0", @@ -96,7 +94,7 @@ "tar-fs@>=3.0.0 <3.0.9": ">=3.1.2", "tar-fs@>=2.0.0 <2.1.3": ">=3.1.2", "tmp@<=0.2.3": ">=0.2.5", - "vite@>=5.0.0 <=5.4.18": ">=8.0.13" + "vite@>=5.0.0 <=5.4.18": ">=8.0.14" }, "patchedDependencies": { "@types/node-unifi": "patches/@types__node-unifi.patch", diff --git a/packages/analytics/eslint.config.js b/packages/analytics/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/analytics/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/analytics/package.json b/packages/analytics/package.json index ed0ea2331..6eb85decb 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/auth": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0", @@ -32,10 +31,7 @@ "superjson": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/api/eslint.config.js b/packages/api/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/api/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/api/package.json b/packages/api/package.json index 1c137c154..847279d59 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -4,6 +4,8 @@ "private": true, "license": "Apache-2.0", "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", "exports": { ".": "./src/index.ts", "./client": "./src/client.ts", @@ -12,15 +14,12 @@ "./shared": "./src/shared.ts", "./open-api": "./src/open-api.ts" }, - "main": "./index.ts", - "types": "./index.ts", "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/auth": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0", @@ -55,11 +54,7 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", - "prettier": "catalog:", "typescript": "catalog:" } } diff --git a/packages/auth/eslint.config.js b/packages/auth/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/auth/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/auth/package.json b/packages/auth/package.json index c0f98fdfc..36e2e965c 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -4,6 +4,8 @@ "private": true, "license": "Apache-2.0", "type": "module", + "main": "./index.ts", + "types": "./index.ts", "exports": { ".": "./index.ts", "./next": "./next.ts", @@ -14,15 +16,12 @@ "./shared": "./shared.ts", "./env": "./env.ts" }, - "main": "./index.ts", - "types": "./index.ts", "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@auth/core": "catalog:", "@auth/drizzle-adapter": "catalog:", @@ -41,13 +40,9 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/bcrypt": "catalog:", "@types/cookies": "catalog:", - "eslint": "catalog:", - "prettier": "catalog:", "typescript": "catalog:" } } diff --git a/packages/boards/eslint.config.js b/packages/boards/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/boards/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/boards/package.json b/packages/boards/package.json index b6dff9fca..cc58058a1 100644 --- a/packages/boards/package.json +++ b/packages/boards/package.json @@ -4,11 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - "./context": "./src/context.tsx", - "./updater": "./src/updater.ts", - "./edit-mode": "./src/edit-mode.tsx" - }, "typesVersions": { "*": { "*": [ @@ -16,23 +11,24 @@ ] } }, + "exports": { + "./context": "./src/context.tsx", + "./updater": "./src/updater.ts", + "./edit-mode": "./src/edit-mode.tsx" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/api": "workspace:^0.1.0", "react": "catalog:", "react-dom": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/cli/eslint.config.js b/packages/cli/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/cli/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/cli/package.json b/packages/cli/package.json index 6811f7a37..6e051c217 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,16 +11,18 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "build": "esbuild src/index.ts --bundle --platform=node --outfile=cli.cjs --external:bcrypt --external:cpu-features --loader:.html=text --loader:.node=text", "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "run": "pnpm with-env node cli.cjs", "typecheck": "tsc --noEmit", "with-env": "dotenv -e .env --" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@drizzle-team/brocli": "catalog:", "@homarr/auth": "workspace:^0.1.0", @@ -33,11 +32,8 @@ "dotenv": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "esbuild": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/common/eslint.config.js b/packages/common/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/common/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/common/package.json b/packages/common/package.json index e96ff6047..eea53a63a 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -4,13 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./types": "./src/types.ts", - "./server": "./src/server.ts", - "./client": "./src/client.ts", - "./env": "./env.ts" - }, "typesVersions": { "*": { "*": [ @@ -18,13 +11,19 @@ ] } }, + "exports": { + ".": "./index.ts", + "./types": "./src/types.ts", + "./server": "./src/server.ts", + "./client": "./src/client.ts", + "./env": "./env.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/core": "workspace:^0.1.0", "@paralleldrive/cuid2": "catalog:", @@ -39,10 +38,7 @@ "zod-validation-error": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/core/eslint.config.js b/packages/core/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/core/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/core/package.json b/packages/core/package.json index 19e7f473b..eee0125bf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,6 +4,13 @@ "private": true, "license": "Apache-2.0", "type": "module", + "typesVersions": { + "*": { + "*": [ + "src/*" + ] + } + }, "exports": { "./infrastructure/redis": "./src/infrastructure/redis/client.ts", "./infrastructure/env": "./src/infrastructure/env/index.ts", @@ -22,20 +29,12 @@ "./infrastructure/http": "./src/infrastructure/http/index.ts", "./infrastructure/http/timeout": "./src/infrastructure/http/timeout.ts" }, - "typesVersions": { - "*": { - "*": [ - "src/*" - ] - } - }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@t3-oss/env-nextjs": "catalog:", "better-sqlite3": "catalog:", @@ -49,12 +48,9 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/better-sqlite3": "catalog:", "@types/pg": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/cron-job-status/eslint.config.js b/packages/cron-job-status/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/cron-job-status/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/cron-job-status/package.json b/packages/cron-job-status/package.json index 2bd53b9cb..10c1ade01 100644 --- a/packages/cron-job-status/package.json +++ b/packages/cron-job-status/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./publisher": "./src/publisher.ts" - }, "typesVersions": { "*": { "*": [ @@ -15,21 +11,21 @@ ] } }, + "exports": { + ".": "./index.ts", + "./publisher": "./src/publisher.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/redis": "workspace:^0.1.0" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/cron-jobs-core/eslint.config.js b/packages/cron-jobs-core/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/cron-jobs-core/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/cron-jobs-core/package.json b/packages/cron-jobs-core/package.json index 71704bdfc..3d573a3ca 100644 --- a/packages/cron-jobs-core/package.json +++ b/packages/cron-jobs-core/package.json @@ -4,11 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./expressions": "./src/expressions.ts", - "./logger": "./src/logger.ts" - }, "typesVersions": { "*": { "*": [ @@ -16,13 +11,17 @@ ] } }, + "exports": { + ".": "./index.ts", + "./expressions": "./src/expressions.ts", + "./logger": "./src/logger.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/core": "workspace:^", @@ -30,10 +29,7 @@ "croner": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/cron-jobs/eslint.config.js b/packages/cron-jobs/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/cron-jobs/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/cron-jobs/package.json b/packages/cron-jobs/package.json index f634d7078..500c915a9 100644 --- a/packages/cron-jobs/package.json +++ b/packages/cron-jobs/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./job-manager": "./src/job-manager.ts" - }, "typesVersions": { "*": { "*": [ @@ -15,13 +11,16 @@ ] } }, + "exports": { + ".": "./index.ts", + "./job-manager": "./src/job-manager.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/analytics": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0", @@ -43,10 +42,7 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/db/eslint.config.js b/packages/db/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/db/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/db/package.json b/packages/db/package.json index 6e6c4851d..e78b3c185 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -4,6 +4,8 @@ "private": true, "license": "Apache-2.0", "type": "module", + "main": "./index.ts", + "types": "./index.ts", "exports": { ".": "./index.ts", "./collection": "./collection.ts", @@ -12,16 +14,14 @@ "./queries": "./queries/index.ts", "./validationSchemas": "./validationSchemas.ts" }, - "main": "./index.ts", - "types": "./index.ts", "scripts": { "build": "pnpm run build:sqlite && pnpm run build:mysql && pnpm run build:postgresql", "build:mysql": "esbuild migrations/mysql/migrate.ts --bundle --platform=node --outfile=migrations/mysql/migrate.cjs", "build:postgresql": "esbuild migrations/postgresql/migrate.ts --bundle --platform=node --outfile=migrations/postgresql/migrate.cjs", "build:sqlite": "esbuild migrations/sqlite/migrate.ts --bundle --platform=node --outfile=migrations/sqlite/migrate.cjs", "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "migration:custom": "pnpm with-env tsx ./migrations/custom/run-custom.ts", "migration:mysql:drop": "pnpm with-env drizzle-kit drop --config ./configs/mysql.config.ts", "migration:mysql:generate": "pnpm with-env drizzle-kit generate --config ./configs/mysql.config.ts", @@ -42,7 +42,6 @@ "typecheck": "tsc --noEmit", "with-env": "dotenv -e ../../.env --" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@auth/core": "catalog:", "@homarr/common": "workspace:^0.1.0", @@ -63,15 +62,11 @@ "superjson": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/better-sqlite3": "catalog:", "@types/pg": "catalog:", "dotenv-cli": "catalog:", "esbuild": "catalog:", - "eslint": "catalog:", - "prettier": "catalog:", "tsx": "catalog:", "typescript": "catalog:" } diff --git a/packages/definitions/eslint.config.js b/packages/definitions/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/definitions/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/definitions/package.json b/packages/definitions/package.json index 0dee78c65..992fd0eca 100644 --- a/packages/definitions/package.json +++ b/packages/definitions/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,24 +11,23 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", + "format": "oxfmt --check .", "postinstall": "tsx ./src/docs/codegen.ts", - "lint": "eslint", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "fast-xml-parser": "catalog:", "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "tsx": "catalog:", "typescript": "catalog:" } diff --git a/packages/docker/eslint.config.js b/packages/docker/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/docker/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/docker/package.json b/packages/docker/package.json index f52507a38..7c3cf0ff0 100644 --- a/packages/docker/package.json +++ b/packages/docker/package.json @@ -4,11 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./shared": "./src/shared.ts", - "./env": "./src/env.ts" - }, "typesVersions": { "*": { "*": [ @@ -16,24 +11,25 @@ ] } }, + "exports": { + ".": "./index.ts", + "./shared": "./src/shared.ts", + "./env": "./src/env.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/core": "workspace:^0.1.0", "dockerode": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/dockerode": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/form/eslint.config.js b/packages/form/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/form/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/form/package.json b/packages/form/package.json index fcb7754ea..72f2b2ab8 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./types": "./src/types.ts" - }, "typesVersions": { "*": { "*": [ @@ -15,26 +11,25 @@ ] } }, + "exports": { + ".": "./index.ts", + "./types": "./src/types.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0", "@homarr/validation": "workspace:^0.1.0", "@mantine/form": "catalog:", - "mantine-form-zod-resolver": "catalog:", "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/form/src/index.ts b/packages/form/src/index.ts index f1d34f193..af8e4198e 100644 --- a/packages/form/src/index.ts +++ b/packages/form/src/index.ts @@ -1,5 +1,4 @@ -import { useForm } from "@mantine/form"; -import { zod4Resolver } from "mantine-form-zod-resolver"; +import { schemaResolver, useForm } from "@mantine/form"; import type { ZodDiscriminatedUnion, ZodIntersection, ZodObject, ZodPipe } from "zod/v4"; import { z } from "zod/v4"; @@ -34,6 +33,6 @@ export const useZodForm = < ...options, validateInputOnBlur: true, validateInputOnChange: true, - validate: zod4Resolver(schema), + validate: schemaResolver(schema, { sync: true }), }); }; diff --git a/packages/forms-collection/eslint.config.js b/packages/forms-collection/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/forms-collection/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/forms-collection/package.json b/packages/forms-collection/package.json index 720ec39c8..9641a13c4 100644 --- a/packages/forms-collection/package.json +++ b/packages/forms-collection/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/api": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0", @@ -35,10 +34,7 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/forms-collection/src/new-app/_form.tsx b/packages/forms-collection/src/new-app/_form.tsx index 82f5a7caa..05c7e3f6f 100644 --- a/packages/forms-collection/src/new-app/_form.tsx +++ b/packages/forms-collection/src/new-app/_form.tsx @@ -114,7 +114,7 @@ export const AppForm = ({ mt="md" /> - + diff --git a/packages/icons/eslint.config.js b/packages/icons/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/icons/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/icons/package.json b/packages/icons/package.json index 1025cb8bf..1b6b69949 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./local": "./src/local.ts" - }, "typesVersions": { "*": { "*": [ @@ -15,23 +11,23 @@ ] } }, + "exports": { + ".": "./index.ts", + "./local": "./src/local.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/core": "workspace:^0.1.0", "@homarr/db": "workspace:^0.1.0" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/image-proxy/eslint.config.js b/packages/image-proxy/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/image-proxy/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/image-proxy/package.json b/packages/image-proxy/package.json index 2cebf6a02..90a23b43b 100644 --- a/packages/image-proxy/package.json +++ b/packages/image-proxy/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./src/index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + ".": "./src/index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/core": "workspace:^0.1.0", @@ -28,11 +27,8 @@ "bcrypt": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/bcrypt": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/integrations/eslint.config.js b/packages/integrations/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/integrations/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/integrations/package.json b/packages/integrations/package.json index 9811d05da..29cc46b55 100644 --- a/packages/integrations/package.json +++ b/packages/integrations/package.json @@ -4,12 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./test-connection": "./src/base/test-connection/index.ts", - "./client": "./src/client.ts", - "./types": "./src/types.ts" - }, "typesVersions": { "*": { "*": [ @@ -17,13 +11,18 @@ ] } }, + "exports": { + ".": "./index.ts", + "./test-connection": "./src/base/test-connection/index.ts", + "./client": "./src/client.ts", + "./types": "./src/types.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@ctrl/deluge": "catalog:", "@ctrl/qbittorrent": "catalog:", @@ -52,12 +51,9 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/node-unifi": "catalog:", "@types/xml2js": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/modals-collection/eslint.config.js b/packages/modals-collection/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/modals-collection/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/modals-collection/package.json b/packages/modals-collection/package.json index 3b23100dd..e3b73b8c3 100644 --- a/packages/modals-collection/package.json +++ b/packages/modals-collection/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/api": "workspace:^0.1.0", "@homarr/common": "workspace:^0.1.0", @@ -42,10 +41,7 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/modals/eslint.config.js b/packages/modals/eslint.config.js deleted file mode 100644 index 1df6129af..000000000 --- a/packages/modals/eslint.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; -import reactConfig from "@homarr/eslint-config/react"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig, ...reactConfig]; diff --git a/packages/modals/package.json b/packages/modals/package.json index 8387be196..c4266cc78 100644 --- a/packages/modals/package.json +++ b/packages/modals/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/translation": "workspace:^0.1.0", "@homarr/ui": "workspace:^0.1.0", @@ -29,10 +28,7 @@ "react": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/notifications/eslint.config.js b/packages/notifications/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/notifications/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/notifications/package.json b/packages/notifications/package.json index 2409be83a..2e0dd5cee 100644 --- a/packages/notifications/package.json +++ b/packages/notifications/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./styles.css": "./src/styles.css" - }, "typesVersions": { "*": { "*": [ @@ -15,23 +11,23 @@ ] } }, + "exports": { + ".": "./index.ts", + "./styles.css": "./src/styles.css" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/ui": "workspace:^0.1.0", "@mantine/notifications": "catalog:", "@tabler/icons-react": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/old-import/eslint.config.js b/packages/old-import/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/old-import/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/old-import/package.json b/packages/old-import/package.json index 4f60fcad2..af34228f0 100644 --- a/packages/old-import/package.json +++ b/packages/old-import/package.json @@ -4,13 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./analyse": "./src/analyse/index.ts", - "./components": "./src/components/index.ts", - "./import": "./src/import/index.ts", - "./shared": "./src/shared.ts" - }, "typesVersions": { "*": { "*": [ @@ -18,13 +11,19 @@ ] } }, + "exports": { + ".": "./index.ts", + "./analyse": "./src/analyse/index.ts", + "./components": "./src/components/index.ts", + "./import": "./src/import/index.ts", + "./shared": "./src/shared.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/core": "workspace:^0.1.0", @@ -48,11 +47,8 @@ "zod-form-data": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/adm-zip": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/old-schema/eslint.config.js b/packages/old-schema/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/old-schema/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/old-schema/package.json b/packages/old-schema/package.json index 9db60a184..f01667cfd 100644 --- a/packages/old-schema/package.json +++ b/packages/old-schema/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,22 +11,21 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/ping/eslint.config.js b/packages/ping/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/ping/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/ping/package.json b/packages/ping/package.json index 6f0a9e6df..02cc73a6a 100644 --- a/packages/ping/package.json +++ b/packages/ping/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,22 +11,21 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/core": "workspace:^0.1.0" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/redis/eslint.config.js b/packages/redis/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/redis/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/redis/package.json b/packages/redis/package.json index 6a5d14a38..bb514a27c 100644 --- a/packages/redis/package.json +++ b/packages/redis/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^", "@homarr/core": "workspace:^", @@ -30,10 +29,7 @@ "superjson": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/request-handler/eslint.config.js b/packages/request-handler/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/request-handler/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/request-handler/package.json b/packages/request-handler/package.json index 5504d6031..dcca79f09 100644 --- a/packages/request-handler/package.json +++ b/packages/request-handler/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - "./*": "./src/*.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + "./*": "./src/*.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@extractus/feed-extractor": "catalog:", "@homarr/common": "workspace:^0.1.0", @@ -37,10 +36,7 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/server-settings/eslint.config.js b/packages/server-settings/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/server-settings/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/server-settings/package.json b/packages/server-settings/package.json index 494bc2a91..24b682229 100644 --- a/packages/server-settings/package.json +++ b/packages/server-settings/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,22 +11,21 @@ ] } }, + "exports": { + ".": "./index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/definitions": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/settings/eslint.config.js b/packages/settings/eslint.config.js deleted file mode 100644 index 5b19b6f8a..000000000 --- a/packages/settings/eslint.config.js +++ /dev/null @@ -1,9 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [ - { - ignores: [], - }, - ...baseConfig, -]; diff --git a/packages/settings/package.json b/packages/settings/package.json index ab2e62a2e..93f0a554e 100644 --- a/packages/settings/package.json +++ b/packages/settings/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./creator": "./src/creator.ts" - }, "typesVersions": { "*": { "*": [ @@ -15,13 +11,16 @@ ] } }, + "exports": { + ".": "./index.ts", + "./creator": "./src/creator.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/db": "workspace:^0.1.0", "@homarr/server-settings": "workspace:^0.1.0", @@ -31,10 +30,7 @@ "react-dom": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/spotlight/eslint.config.js b/packages/spotlight/eslint.config.js deleted file mode 100644 index 1df6129af..000000000 --- a/packages/spotlight/eslint.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; -import reactConfig from "@homarr/eslint-config/react"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig, ...reactConfig]; diff --git a/packages/spotlight/package.json b/packages/spotlight/package.json index c7903ee49..a3a36a3da 100644 --- a/packages/spotlight/package.json +++ b/packages/spotlight/package.json @@ -4,10 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./styles.css": "./src/styles.css" - }, "typesVersions": { "*": { "*": [ @@ -15,13 +11,16 @@ ] } }, + "exports": { + ".": "./index.ts", + "./styles.css": "./src/styles.css" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/api": "workspace:^0.1.0", "@homarr/auth": "workspace:^0.1.0", @@ -44,10 +43,7 @@ "use-deep-compare-effect": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/translation/eslint.config.js b/packages/translation/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/translation/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/translation/package.json b/packages/translation/package.json index e8e42b749..8fab918f3 100644 --- a/packages/translation/package.json +++ b/packages/translation/package.json @@ -4,6 +4,13 @@ "private": true, "license": "Apache-2.0", "type": "module", + "typesVersions": { + "*": { + "*": [ + "src/*" + ] + } + }, "exports": { ".": "./index.ts", "./client": "./src/client/index.ts", @@ -12,20 +19,12 @@ "./request": "./src/request.ts", "./dayjs": "./src/dayjs.ts" }, - "typesVersions": { - "*": { - "*": [ - "src/*" - ] - } - }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/definitions": "workspace:^0.1.0", @@ -38,10 +37,7 @@ "react-dom": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/ui/eslint.config.js b/packages/ui/eslint.config.js deleted file mode 100644 index 1df6129af..000000000 --- a/packages/ui/eslint.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; -import reactConfig from "@homarr/eslint-config/react"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig, ...reactConfig]; diff --git a/packages/ui/package.json b/packages/ui/package.json index a781debfd..9956f7fee 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -4,12 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./styles.css": "./src/styles.css", - "./hooks": "./src/hooks/index.ts", - "./icons": "./src/icons/index.ts" - }, "typesVersions": { "*": { "*": [ @@ -17,13 +11,18 @@ ] } }, + "exports": { + ".": "./index.ts", + "./styles.css": "./src/styles.css", + "./hooks": "./src/hooks/index.ts", + "./icons": "./src/icons/index.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/common": "workspace:^0.1.0", "@homarr/definitions": "workspace:^0.1.0", @@ -42,12 +41,9 @@ "svgson": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/crypto-js": "catalog:", "@types/css-modules": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/validation/eslint.config.js b/packages/validation/eslint.config.js deleted file mode 100644 index f7a5a7d36..000000000 --- a/packages/validation/eslint.config.js +++ /dev/null @@ -1,4 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig]; diff --git a/packages/validation/package.json b/packages/validation/package.json index 8cde9c838..db36ea5dc 100644 --- a/packages/validation/package.json +++ b/packages/validation/package.json @@ -4,9 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - "./*": "./src/*.ts" - }, "typesVersions": { "*": { "*": [ @@ -14,13 +11,15 @@ ] } }, + "exports": { + "./*": "./src/*.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@homarr/definitions": "workspace:^0.1.0", "@homarr/translation": "workspace:^0.1.0", @@ -28,10 +27,7 @@ "zod-form-data": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/widgets/eslint.config.js b/packages/widgets/eslint.config.js deleted file mode 100644 index 1df6129af..000000000 --- a/packages/widgets/eslint.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import baseConfig from "@homarr/eslint-config/base"; -import reactConfig from "@homarr/eslint-config/react"; - -/** @type {import('typescript-eslint').Config} */ -export default [...baseConfig, ...reactConfig]; diff --git a/packages/widgets/package.json b/packages/widgets/package.json index 4ee4834f8..8b8444b3d 100644 --- a/packages/widgets/package.json +++ b/packages/widgets/package.json @@ -4,12 +4,6 @@ "private": true, "license": "Apache-2.0", "type": "module", - "exports": { - ".": "./index.ts", - "./errors": "./src/errors/component.tsx", - "./modals": "./src/modals/index.ts", - "./prefetch": "./src/prefetch.ts" - }, "typesVersions": { "*": { "*": [ @@ -17,13 +11,18 @@ ] } }, + "exports": { + ".": "./index.ts", + "./errors": "./src/errors/component.tsx", + "./modals": "./src/modals/index.ts", + "./prefetch": "./src/prefetch.ts" + }, "scripts": { "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint", + "format": "oxfmt --check .", + "lint": "oxlint", "typecheck": "tsc --noEmit" }, - "prettier": "@homarr/prettier-config", "dependencies": { "@dnd-kit/core": "catalog:", "@dnd-kit/sortable": "catalog:", @@ -50,6 +49,7 @@ "@homarr/validation": "workspace:^0.1.0", "@mantine/charts": "catalog:", "@mantine/core": "catalog:", + "@mantine/form": "catalog:", "@mantine/hooks": "catalog:", "@tabler/icons-react": "catalog:", "@tiptap/extension-color": "catalog:", @@ -70,7 +70,6 @@ "@tiptap/starter-kit": "catalog:", "clsx": "catalog:", "dayjs": "catalog:", - "mantine-form-zod-resolver": "catalog:", "mantine-react-table": "catalog:", "next": "catalog:", "react": "catalog:", @@ -82,11 +81,8 @@ "zod": "catalog:" }, "devDependencies": { - "@homarr/eslint-config": "workspace:^0.2.0", - "@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig": "workspace:^0.1.0", "@types/video.js": "catalog:", - "eslint": "catalog:", "typescript": "catalog:" } } diff --git a/packages/widgets/src/_inputs/widget-dynamic-select-input.tsx b/packages/widgets/src/_inputs/widget-dynamic-select-input.tsx index 39b70b325..de8ef5021 100644 --- a/packages/widgets/src/_inputs/widget-dynamic-select-input.tsx +++ b/packages/widgets/src/_inputs/widget-dynamic-select-input.tsx @@ -25,9 +25,22 @@ export const WidgetDynamicSelectInput = ({ property, kind, options }: CommonWidg const [search, setSearch] = useState(""); const [debouncedSearch] = useDebouncedValue(search, 300); const { isPending, options: selectOptions } = options.useOptions(debouncedSearch, form.values.integrationIds); - const value = inputProps.value as DynamicSelectOption | null; + const currentOption = inputProps.value as DynamicSelectOption | null; const onChange = inputProps.onChange as (value: DynamicSelectOption | null) => void; + const getLabelForValue = (selectedValue: string) => { + const matched = selectOptions.find((option) => + typeof option === "string" ? option === selectedValue : option.value === selectedValue, + ); + if (!matched) { + return selectedValue; + } + if (typeof matched === "string") { + return matched; + } + return translateIfNecessary(t, matched.label) ?? selectedValue; + }; + return (