From a9cbb30be345b23b36f1265fc99734394a659d20 Mon Sep 17 00:00:00 2001 From: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:50:21 +1200 Subject: [PATCH] style: rework the eslint config and apply the new rules (#399) * chore: upgrade eslint * chore: upgrade typescript-eslint * chore: fixups from the upgrade * chore: bump eslint-plugin-react-hooks to the latest beta * style: rework the eslint config * chore: report unused eslint disable directives * style: apply the eslint plugin rules * chore: remove @eslint/compat & @eslint/eslintrc * style: disable the "react/react-in-jsx-scope" rule * chore: remaining from "react/react-in-jsx-scope" --- eslint.config.mjs | 96 +++--- package.json | 16 +- pnpm-lock.yaml | 290 ++++++++---------- postbuild.cjs | 2 - .../primary-module/statistic-block/common.tsx | 6 +- src/components/ui/command.tsx | 3 +- src/components/ui/form.tsx | 6 +- src/components/ui/icons.tsx | 1 + src/components/ui/toggle-group.tsx | 2 +- src/i18next.d.ts | 2 +- src/lib/api/_dashboard.contract.ts | 2 +- src/lib/api/_user.contract.ts | 2 +- src/lib/types/router.ts | 2 - src/lib/types/search.ts | 2 +- src/routes/-components/auth/footer.tsx | 2 + .../-components/widget-grid/widget-facade.tsx | 4 +- .../widget-grid/widgets/vehicle-status.tsx | 4 +- .../-components/widget-picker/index.tsx | 12 +- src/routes/_auth/(dashboard)/index.tsx | 2 +- .../view-report/useReportValueFormatter.ts | 2 +- .../application/role-delete-dialog.tsx | 1 + .../application/user-edit-dialog.tsx | 8 +- .../-components/sidebar-navigation.tsx | 14 +- ...ings.application.permissions-and-roles.tsx | 2 +- src/tanstack-table.d.ts | 2 +- 25 files changed, 233 insertions(+), 252 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 628abfc1..0805d5fc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,43 +1,46 @@ // @ts-check -import { fixupConfigRules } from "@eslint/compat"; -import { FlatCompat } from "@eslint/eslintrc"; import eslintJs from "@eslint/js"; import eslintConfigPrettier from "eslint-config-prettier"; -import reactCompiler from "eslint-plugin-react-compiler"; -import reactJsxRuntime from "eslint-plugin-react/configs/jsx-runtime.js"; -import reactRecommended from "eslint-plugin-react/configs/recommended.js"; +import eslintReact from "eslint-plugin-react"; +import eslintReactCompiler from "eslint-plugin-react-compiler"; +import eslintReactHooks from "eslint-plugin-react-hooks"; import globals from "globals"; -import tsEslint from "typescript-eslint"; +import tseslint from "typescript-eslint"; -const compat = new FlatCompat({ - baseDirectory: import.meta.dirname, - recommendedConfig: eslintJs.configs.recommended, - allConfig: eslintJs.configs.all, -}); - -export default tsEslint.config( +export default tseslint.config( eslintJs.configs.recommended, - ...tsEslint.configs.recommended, - reactJsxRuntime, + ...tseslint.configs.recommended, + eslintConfigPrettier, + { + files: ["**.config.{cjs,mjs,ts,js}", "postbuild.cjs"], + languageOptions: { + globals: { ...globals.node }, + parserOptions: { tsconfigRootDir: import.meta.dirname }, + }, + rules: { + "@typescript-eslint/no-require-imports": "off", + }, + }, { - ignores: ["dist/**", "node_modules/**", "src/route-tree.gen.ts", "*.html"], + ignores: [ + "dist/**", + "node_modules/**", + "**.config.{cjs,mjs,ts,js}", + "src/**/*.gen.ts", + "*.html", + ], + }, + { + files: ["src/**/*.{ts,tsx}"], + ...eslintReact.configs.flat.recommended, }, - ...fixupConfigRules(compat.extends("plugin:react-hooks/recommended")), { - files: ["src/**/*.{ts,tsx}", "*.config.js", "*.config.cjs"], - ...reactRecommended, languageOptions: { - ...reactRecommended.languageOptions, - globals: { - ...globals.node, - ...globals.browser, - }, + ...eslintReact.configs.flat.recommended.languageOptions, + globals: { ...globals.browser }, parserOptions: { - // project: "./tsconfig.json", tsconfigRootDir: import.meta.dirname, - ecmaFeatures: { - jsx: true, - }, + ecmaFeatures: { jsx: true }, }, }, settings: { @@ -48,27 +51,34 @@ export default tsEslint.config( version: "detect", }, }, + }, + // {}, + { plugins: { - "react-compiler": reactCompiler, + "react-compiler": eslintReactCompiler, + // @ts-expect-error + "react-hooks": eslintReactHooks, }, + }, + { rules: { + ...eslintReactHooks.configs.recommended.rules, + "react-compiler/react-compiler": "error", + "no-extra-boolean-cast": "off", "no-case-declarations": "off", - "@typescript-eslint/no-unused-vars": "off", + + "react/display-name": "off", + "react/prop-types": "off", + "react/react-in-jsx-scope": "off", + + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/consistent-type-imports": "error", + "@typescript-eslint/no-empty-object-type": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/consistent-type-imports": "off", - "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-unnecessary-type-constraint": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/ban-ts-comment": "off", - "jsx-a11y/img-redundant-alt": "off", - "react/react-in-jsx-scope": "off", - "react/prop-types": "off", - "react/display-name": "off", - "react/no-unescaped-entities": "off", - "react/no-unknown-property": "off", - "react-compiler/react-compiler": "error", + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/no-unused-vars": "off", }, - }, - eslintConfigPrettier + } ); diff --git a/package.json b/package.json index 2e885de9..eaaa50c5 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev": "vite", "format": "prettier --check './src/**/*.{js,jsx,ts,tsx,css,md,json}' --config './prettier.config.cjs'", "format:fix": "prettier --write './src/**/*.{js,jsx,ts,tsx,css,md,json}' --config './prettier.config.cjs'", - "lint": "eslint --max-warnings 0 .", + "lint": "eslint --report-unused-disable-directives --max-warnings 0 .", "lint:fix": "eslint --fix --max-warnings 0 .", "postbuild": "node ./postbuild.cjs", "preview": "vite preview --port 3000", @@ -78,9 +78,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@eslint/compat": "^1.1.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.6.0", + "@eslint/js": "^9.8.0", "@ianvs/prettier-plugin-sort-imports": "^4.3.0", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", @@ -92,12 +90,12 @@ "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.19", "babel-plugin-react-compiler": "0.0.0-experimental-334f00b-20240725", - "eslint": "^9.6.0", + "eslint": "^9.8.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-react": "^7.34.3", + "eslint-plugin-react": "^7.35.0", "eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725", - "eslint-plugin-react-hooks": "^4.6.2", - "globals": "^15.8.0", + "eslint-plugin-react-hooks": "5.1.0-beta-26f2496093-20240514", + "globals": "^15.9.0", "postcss": "^8.4.39", "prettier": "^3.3.2", "prettier-plugin-tailwindcss": "^0.6.5", @@ -105,7 +103,7 @@ "tailwindcss": "^3.4.4", "tailwindcss-animate": "^1.0.7", "typescript": "^5.5.3", - "typescript-eslint": "^7.16.0", + "typescript-eslint": "^8.0.0", "vite": "^5.3.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 276a617a..e49a70af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -174,15 +174,9 @@ importers: specifier: ^3.23.8 version: 3.23.8 devDependencies: - '@eslint/compat': - specifier: ^1.1.0 - version: 1.1.0 - '@eslint/eslintrc': - specifier: ^3.1.0 - version: 3.1.0 '@eslint/js': - specifier: ^9.6.0 - version: 9.6.0 + specifier: ^9.8.0 + version: 9.8.0 '@ianvs/prettier-plugin-sort-imports': specifier: ^4.3.0 version: 4.3.0(prettier@3.3.2) @@ -217,23 +211,23 @@ importers: specifier: 0.0.0-experimental-334f00b-20240725 version: 0.0.0-experimental-334f00b-20240725 eslint: - specifier: ^9.6.0 - version: 9.6.0 + specifier: ^9.8.0 + version: 9.8.0 eslint-config-prettier: specifier: ^9.1.0 - version: 9.1.0(eslint@9.6.0) + version: 9.1.0(eslint@9.8.0) eslint-plugin-react: - specifier: ^7.34.3 - version: 7.34.3(eslint@9.6.0) + specifier: ^7.35.0 + version: 7.35.0(eslint@9.8.0) eslint-plugin-react-compiler: specifier: 0.0.0-experimental-9ed098e-20240725 - version: 0.0.0-experimental-9ed098e-20240725(eslint@9.6.0) + version: 0.0.0-experimental-9ed098e-20240725(eslint@9.8.0) eslint-plugin-react-hooks: - specifier: ^4.6.2 - version: 4.6.2(eslint@9.6.0) + specifier: 5.1.0-beta-26f2496093-20240514 + version: 5.1.0-beta-26f2496093-20240514(eslint@9.8.0) globals: - specifier: ^15.8.0 - version: 15.8.0 + specifier: ^15.9.0 + version: 15.9.0 postcss: specifier: ^8.4.39 version: 8.4.39 @@ -256,8 +250,8 @@ importers: specifier: ^5.5.3 version: 5.5.3 typescript-eslint: - specifier: ^7.16.0 - version: 7.16.0(eslint@9.6.0)(typescript@5.5.3) + specifier: ^8.0.0 + version: 8.0.0(eslint@9.8.0)(typescript@5.5.3) vite: specifier: ^5.3.5 version: 5.3.5(@types/node@20.14.10) @@ -677,24 +671,20 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/compat@1.1.0': - resolution: {integrity: sha512-s9Wi/p25+KbzxKlDm3VshQdImhWk+cbdblhwGNnyCU5lpSwtWa4v7VQCxSki0FAUrGA3s8nCWgYzAH41mwQVKQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/config-array@0.17.0': - resolution: {integrity: sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA==} + '@eslint/config-array@0.17.1': + resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.6.0': - resolution: {integrity: sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==} + '@eslint/js@9.8.0': + resolution: {integrity: sha512-MfluB7EUfxXtv3i/++oh89uzAr4PDI4nn201hsp+qaXqsjAWzinlZEHEfPgAX4doIlKvPG/i0A9dpKxOLII8yA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': @@ -1708,63 +1698,62 @@ packages: '@types/yargs@13.0.12': resolution: {integrity: sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ==} - '@typescript-eslint/eslint-plugin@7.16.0': - resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.0.0': + 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.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@7.16.0': - resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.0.0': + 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.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/scope-manager@7.16.0': - resolution: {integrity: sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.0.0': + resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.16.0': - resolution: {integrity: sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.0.0': + resolution: {integrity: sha512-mJAFP2mZLTBwAn5WI4PMakpywfWFH5nQZezUQdSKV23Pqo6o9iShQg1hP2+0hJJXP2LnZkWPphdIq4juYYwCeg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/types@7.16.0': - resolution: {integrity: sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.0.0': + resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.16.0': - resolution: {integrity: sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.0.0': + 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/utils@7.16.0': - resolution: {integrity: sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.0.0': + 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/visitor-keys@7.16.0': - resolution: {integrity: sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.0.0': + resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@vitejs/plugin-react@4.3.1': resolution: {integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==} @@ -1850,9 +1839,6 @@ packages: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} - array.prototype.toreversed@1.1.2: - resolution: {integrity: sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==} - array.prototype.tosorted@1.1.4: resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} engines: {node: '>= 0.4'} @@ -2173,20 +2159,20 @@ packages: peerDependencies: eslint: '>=7' - eslint-plugin-react-hooks@4.6.2: - resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} + eslint-plugin-react-hooks@5.1.0-beta-26f2496093-20240514: + resolution: {integrity: sha512-nCZD93/KYY5hNAWGhfvvrEXvLFIXJCMu2St7ciHeiWUp/lnS2RVgWawp2kNQamr9Y23C9lUA03TmDRNgbm05vg==} engines: {node: '>=10'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - eslint-plugin-react@7.34.3: - resolution: {integrity: sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==} + eslint-plugin-react@7.35.0: + resolution: {integrity: sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==} engines: {node: '>=4'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-scope@8.0.1: - resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: @@ -2197,8 +2183,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.6.0: - resolution: {integrity: sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==} + eslint@9.8.0: + resolution: {integrity: sha512-K8qnZ/QJzT2dLKdZJVX6W4XOwBzutMYmt0lqUS+JdXgd+HTYFlonFgkJ8s44d/zMPPCnOOk0kMWCApCPhiOy9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true @@ -2331,8 +2317,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.8.0: - resolution: {integrity: sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==} + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} engines: {node: '>=18'} globalthis@1.0.4: @@ -2733,10 +2719,6 @@ packages: resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} engines: {node: '>= 0.4'} - object.hasown@1.1.4: - resolution: {integrity: sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==} - engines: {node: '>= 0.4'} - object.values@1.2.0: resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} engines: {node: '>= 0.4'} @@ -3186,6 +3168,9 @@ packages: resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} engines: {node: '>= 0.4'} + string.prototype.repeat@1.0.0: + resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} + string.prototype.trim@1.2.9: resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} engines: {node: '>= 0.4'} @@ -3328,11 +3313,10 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} - typescript-eslint@7.16.0: - resolution: {integrity: sha512-kaVRivQjOzuoCXU6+hLnjo3/baxyzWVO5GrnExkFzETRYJKVHYkrJglOu2OCm8Hi9RPDWX1PTNNTpU5KRV0+RA==} - engines: {node: ^18.18.0 || >=20.0.0} + typescript-eslint@8.0.0: + resolution: {integrity: sha512-yQWBJutWL1PmpmDddIOl9/Mi6vZjqNCjqSGBMQ4vsc2Aiodk0SnbQQWPXbSy0HNuKCuGkw1+u4aQ2mO40TdhDQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -3950,16 +3934,14 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.6.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.8.0)': dependencies: - eslint: 9.6.0 + eslint: 9.8.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/regexpp@4.11.0': {} - '@eslint/compat@1.1.0': {} - - '@eslint/config-array@0.17.0': + '@eslint/config-array@0.17.1': dependencies: '@eslint/object-schema': 2.1.4 debug: 4.3.4 @@ -3981,7 +3963,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.6.0': {} + '@eslint/js@9.8.0': {} '@eslint/object-schema@2.1.4': {} @@ -4987,15 +4969,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0(eslint@9.6.0)(typescript@5.5.3))(eslint@9.6.0)(typescript@5.5.3)': + '@typescript-eslint/eslint-plugin@8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0)(typescript@5.5.3))(eslint@9.8.0)(typescript@5.5.3)': dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.16.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/scope-manager': 7.16.0 - '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/visitor-keys': 7.16.0 - eslint: 9.6.0 + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 8.0.0(eslint@9.8.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 8.0.0 + '@typescript-eslint/type-utils': 8.0.0(eslint@9.8.0)(typescript@5.5.3) + '@typescript-eslint/utils': 8.0.0(eslint@9.8.0)(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 8.0.0 + eslint: 9.8.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -5005,42 +4987,42 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.16.0(eslint@9.6.0)(typescript@5.5.3)': + '@typescript-eslint/parser@8.0.0(eslint@9.8.0)(typescript@5.5.3)': dependencies: - '@typescript-eslint/scope-manager': 7.16.0 - '@typescript-eslint/types': 7.16.0 - '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) - '@typescript-eslint/visitor-keys': 7.16.0 + '@typescript-eslint/scope-manager': 8.0.0 + '@typescript-eslint/types': 8.0.0 + '@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 8.0.0 debug: 4.3.4 - eslint: 9.6.0 + eslint: 9.8.0 optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.16.0': + '@typescript-eslint/scope-manager@8.0.0': dependencies: - '@typescript-eslint/types': 7.16.0 - '@typescript-eslint/visitor-keys': 7.16.0 + '@typescript-eslint/types': 8.0.0 + '@typescript-eslint/visitor-keys': 8.0.0 - '@typescript-eslint/type-utils@7.16.0(eslint@9.6.0)(typescript@5.5.3)': + '@typescript-eslint/type-utils@8.0.0(eslint@9.8.0)(typescript@5.5.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.3) + '@typescript-eslint/utils': 8.0.0(eslint@9.8.0)(typescript@5.5.3) debug: 4.3.4 - eslint: 9.6.0 ts-api-utils: 1.3.0(typescript@5.5.3) optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: + - eslint - supports-color - '@typescript-eslint/types@7.16.0': {} + '@typescript-eslint/types@8.0.0': {} - '@typescript-eslint/typescript-estree@7.16.0(typescript@5.5.3)': + '@typescript-eslint/typescript-estree@8.0.0(typescript@5.5.3)': dependencies: - '@typescript-eslint/types': 7.16.0 - '@typescript-eslint/visitor-keys': 7.16.0 + '@typescript-eslint/types': 8.0.0 + '@typescript-eslint/visitor-keys': 8.0.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -5052,20 +5034,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.16.0(eslint@9.6.0)(typescript@5.5.3)': + '@typescript-eslint/utils@8.0.0(eslint@9.8.0)(typescript@5.5.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) - '@typescript-eslint/scope-manager': 7.16.0 - '@typescript-eslint/types': 7.16.0 - '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) - eslint: 9.6.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.8.0) + '@typescript-eslint/scope-manager': 8.0.0 + '@typescript-eslint/types': 8.0.0 + '@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.3) + eslint: 9.8.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.16.0': + '@typescript-eslint/visitor-keys@8.0.0': dependencies: - '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/types': 8.0.0 eslint-visitor-keys: 3.4.3 '@vitejs/plugin-react@4.3.1(vite@5.3.5(@types/node@20.14.10))': @@ -5162,13 +5144,6 @@ snapshots: es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 - array.prototype.toreversed@1.1.2: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - array.prototype.tosorted@1.1.4: dependencies: call-bind: 1.0.7 @@ -5583,49 +5558,49 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@9.1.0(eslint@9.6.0): + eslint-config-prettier@9.1.0(eslint@9.8.0): dependencies: - eslint: 9.6.0 + eslint: 9.8.0 - eslint-plugin-react-compiler@0.0.0-experimental-9ed098e-20240725(eslint@9.6.0): + eslint-plugin-react-compiler@0.0.0-experimental-9ed098e-20240725(eslint@9.8.0): dependencies: '@babel/core': 7.24.9 '@babel/parser': 7.24.8 '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.24.9) - eslint: 9.6.0 + eslint: 9.8.0 hermes-parser: 0.20.1 zod: 3.23.8 zod-validation-error: 3.3.0(zod@3.23.8) transitivePeerDependencies: - supports-color - eslint-plugin-react-hooks@4.6.2(eslint@9.6.0): + eslint-plugin-react-hooks@5.1.0-beta-26f2496093-20240514(eslint@9.8.0): dependencies: - eslint: 9.6.0 + eslint: 9.8.0 - eslint-plugin-react@7.34.3(eslint@9.6.0): + eslint-plugin-react@7.35.0(eslint@9.8.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 array.prototype.flatmap: 1.3.2 - array.prototype.toreversed: 1.1.2 array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 9.6.0 + eslint: 9.8.0 estraverse: 5.3.0 + hasown: 2.0.2 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 object.entries: 1.1.8 object.fromentries: 2.0.8 - object.hasown: 1.1.4 object.values: 1.2.0 prop-types: 15.8.1 resolve: 2.0.0-next.5 semver: 6.3.1 string.prototype.matchall: 4.0.11 + string.prototype.repeat: 1.0.0 - eslint-scope@8.0.1: + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -5634,13 +5609,13 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.6.0: + eslint@9.8.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) - '@eslint-community/regexpp': 4.10.0 - '@eslint/config-array': 0.17.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.8.0) + '@eslint-community/regexpp': 4.11.0 + '@eslint/config-array': 0.17.1 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.6.0 + '@eslint/js': 9.8.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 @@ -5649,7 +5624,7 @@ snapshots: cross-spawn: 7.0.3 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.1 + eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 espree: 10.1.0 esquery: 1.5.0 @@ -5805,7 +5780,7 @@ snapshots: globals@14.0.0: {} - globals@15.8.0: {} + globals@15.9.0: {} globalthis@1.0.4: dependencies: @@ -6165,12 +6140,6 @@ snapshots: es-abstract: 1.23.3 es-object-atoms: 1.0.0 - object.hasown@1.1.4: - dependencies: - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - object.values@1.2.0: dependencies: call-bind: 1.0.7 @@ -6598,6 +6567,11 @@ snapshots: set-function-name: 2.0.2 side-channel: 1.0.6 + string.prototype.repeat@1.0.0: + dependencies: + define-properties: 1.2.1 + es-abstract: 1.23.3 + string.prototype.trim@1.2.9: dependencies: call-bind: 1.0.7 @@ -6753,15 +6727,15 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typescript-eslint@7.16.0(eslint@9.6.0)(typescript@5.5.3): + typescript-eslint@8.0.0(eslint@9.8.0)(typescript@5.5.3): dependencies: - '@typescript-eslint/eslint-plugin': 7.16.0(@typescript-eslint/parser@7.16.0(eslint@9.6.0)(typescript@5.5.3))(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/parser': 7.16.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) - eslint: 9.6.0 + '@typescript-eslint/eslint-plugin': 8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0)(typescript@5.5.3))(eslint@9.8.0)(typescript@5.5.3) + '@typescript-eslint/parser': 8.0.0(eslint@9.8.0)(typescript@5.5.3) + '@typescript-eslint/utils': 8.0.0(eslint@9.8.0)(typescript@5.5.3) optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: + - eslint - supports-color typescript@5.5.3: {} diff --git a/postbuild.cjs b/postbuild.cjs index c070746e..eba4141b 100644 --- a/postbuild.cjs +++ b/postbuild.cjs @@ -1,5 +1,3 @@ -/* eslint-disable no-undef */ -/* eslint-disable @typescript-eslint/no-var-requires */ const fs = require("node:fs"); const cp = require("node:child_process"); diff --git a/src/components/primary-module/statistic-block/common.tsx b/src/components/primary-module/statistic-block/common.tsx index 8ee7b7da..cb4374b7 100644 --- a/src/components/primary-module/statistic-block/common.tsx +++ b/src/components/primary-module/statistic-block/common.tsx @@ -1,4 +1,4 @@ -import { type ReactNode } from "react"; +import * as React from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; @@ -8,7 +8,7 @@ export const ModuleStatBlockContainer = ({ children, className, }: { - children: ReactNode; + children: React.ReactNode; className?: string; }) => { return ( @@ -28,7 +28,7 @@ export const ModuleStatBlock = ({ stat, }: { header: string; - stat?: ReactNode; + stat?: React.ReactNode; }) => { return ( diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx index 27b92bbc..8f03ef38 100644 --- a/src/components/ui/command.tsx +++ b/src/components/ui/command.tsx @@ -1,5 +1,6 @@ +/* eslint-disable react/no-unknown-property */ import * as React from "react"; -import { DialogProps } from "@radix-ui/react-dialog"; +import type { DialogProps } from "@radix-ui/react-dialog"; import { Command as CommandPrimitive } from "cmdk"; import { Dialog, DialogContent } from "@/components/ui/dialog"; diff --git a/src/components/ui/form.tsx b/src/components/ui/form.tsx index f7cd5c34..8fee2d7d 100644 --- a/src/components/ui/form.tsx +++ b/src/components/ui/form.tsx @@ -1,11 +1,9 @@ import * as React from "react"; -import * as LabelPrimitive from "@radix-ui/react-label"; +import type * as LabelPrimitive from "@radix-ui/react-label"; import { Slot } from "@radix-ui/react-slot"; +import type { ControllerProps, FieldPath, FieldValues } from "react-hook-form"; import { Controller, - ControllerProps, - FieldPath, - FieldValues, FormProvider, useController, useFormContext, diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx index d4a34806..ca704d4f 100644 --- a/src/components/ui/icons.tsx +++ b/src/components/ui/icons.tsx @@ -1,3 +1,4 @@ +import * as React from "react"; import { AlertCircleIcon, AlertTriangleIcon, diff --git a/src/components/ui/toggle-group.tsx b/src/components/ui/toggle-group.tsx index 0e00cb52..34683cb8 100644 --- a/src/components/ui/toggle-group.tsx +++ b/src/components/ui/toggle-group.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"; -import { VariantProps } from "class-variance-authority"; +import type { VariantProps } from "class-variance-authority"; import { toggleVariants } from "@/components/ui/toggle"; diff --git a/src/i18next.d.ts b/src/i18next.d.ts index 337482d3..12e43968 100644 --- a/src/i18next.d.ts +++ b/src/i18next.d.ts @@ -1,7 +1,7 @@ +import type { i18nextNsDefault } from "@/lib/config/i18next"; import { formatNsResources, i18nextNsDashboard, - i18nextNsDefault, i18nextNsFormat, i18nextNsLabels, i18nextNsLogin, diff --git a/src/lib/api/_dashboard.contract.ts b/src/lib/api/_dashboard.contract.ts index a84836b7..cadf89db 100644 --- a/src/lib/api/_dashboard.contract.ts +++ b/src/lib/api/_dashboard.contract.ts @@ -1,10 +1,10 @@ import { z } from "zod"; import { c } from "@/lib/api/c"; +import type { DashboardWidgetItemParsed } from "@/lib/schemas/dashboard"; import { DashboardStatsSchema, DashboardWidgetItemListSchema, - DashboardWidgetItemParsed, SalesStatusParse, ServerMessageListSchema, VehicleStatusCountListSchema, diff --git a/src/lib/api/_user.contract.ts b/src/lib/api/_user.contract.ts index 60359a8b..b0412fa9 100644 --- a/src/lib/api/_user.contract.ts +++ b/src/lib/api/_user.contract.ts @@ -1,8 +1,8 @@ import { z } from "zod"; import { c } from "@/lib/api/c"; +import type { UpdateUserInput } from "@/lib/schemas/user"; import { - UpdateUserInput, UserConfigurationsListSchema, UserLanguageListSchema, UserProfileSchema, diff --git a/src/lib/types/router.ts b/src/lib/types/router.ts index d747c192..7dc41fd4 100644 --- a/src/lib/types/router.ts +++ b/src/lib/types/router.ts @@ -1,5 +1,3 @@ -import * as React from "react"; - export type LinkComponentProps = React.PropsWithoutRef< TComp extends React.FC | React.Component ? TProps diff --git a/src/lib/types/search.ts b/src/lib/types/search.ts index 6c86b603..66f0331f 100644 --- a/src/lib/types/search.ts +++ b/src/lib/types/search.ts @@ -1,4 +1,4 @@ -import { AppModule } from "./app-module"; +import type { AppModule } from "./app-module"; export type GlobalSearchReturnType = { module: AppModule; diff --git a/src/routes/-components/auth/footer.tsx b/src/routes/-components/auth/footer.tsx index b48cef27..b14418c0 100644 --- a/src/routes/-components/auth/footer.tsx +++ b/src/routes/-components/auth/footer.tsx @@ -129,6 +129,7 @@ export default function AuthFooter() { className="inline-flex h-8 items-center rounded p-2 ring-offset-background transition-colors focus-within:text-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" href="https://github.com/seancassiere/nv-rental-clone" target="_blank" + rel="noreferrer" > @@ -136,6 +137,7 @@ export default function AuthFooter() { className="inline-flex h-8 items-center rounded p-2 ring-offset-background transition-colors focus-within:text-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" href="https://x.com/seancassiere" target="_blank" + rel="noreferrer" > diff --git a/src/routes/_auth/(dashboard)/-components/widget-grid/widget-facade.tsx b/src/routes/_auth/(dashboard)/-components/widget-grid/widget-facade.tsx index b397b83b..2f1244b4 100644 --- a/src/routes/_auth/(dashboard)/-components/widget-grid/widget-facade.tsx +++ b/src/routes/_auth/(dashboard)/-components/widget-grid/widget-facade.tsx @@ -12,7 +12,7 @@ import { useWidgetName } from "@/routes/_auth/(dashboard)/-components/useWidgetN import { cn } from "@/lib/utils"; -import { CommonWidgetProps } from "./widgets/_common"; +import type { CommonWidgetProps } from "./widgets/_common"; const SalesStatusWidget = React.lazy(() => import("./widgets/sales-status")); const VehicleStatusWidget = React.lazy( @@ -98,7 +98,7 @@ function NoWidgetAvailable(props: CommonWidgetProps) { -
No widget available for "{widgetName}".
+
No widget available for "{widgetName}".
); } diff --git a/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/vehicle-status.tsx b/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/vehicle-status.tsx index ce38ce6c..1070a7cd 100644 --- a/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/vehicle-status.tsx +++ b/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/vehicle-status.tsx @@ -209,8 +209,8 @@ function VehicleStatusItem(props: VehicleStatusItemProps) {

- {percentage} of your fleet is in the status of " - {readableVehicleStatus}" + {percentage} of your fleet is in the status of " + {readableVehicleStatus}"

diff --git a/src/routes/_auth/(dashboard)/-components/widget-picker/index.tsx b/src/routes/_auth/(dashboard)/-components/widget-picker/index.tsx index 53f32358..a20f9265 100644 --- a/src/routes/_auth/(dashboard)/-components/widget-picker/index.tsx +++ b/src/routes/_auth/(dashboard)/-components/widget-picker/index.tsx @@ -1,17 +1,19 @@ import * as React from "react"; +import type { + DragEndEvent, + DraggableAttributes, + DraggableSyntheticListeners, + DragStartEvent, + UniqueIdentifier, +} from "@dnd-kit/core"; import { DndContext, DragOverlay, - DragStartEvent, KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors, - type DragEndEvent, - type DraggableAttributes, - type DraggableSyntheticListeners, - type UniqueIdentifier, } from "@dnd-kit/core"; import { restrictToVerticalAxis } from "@dnd-kit/modifiers"; import { diff --git a/src/routes/_auth/(dashboard)/index.tsx b/src/routes/_auth/(dashboard)/index.tsx index 9c08606f..234820b5 100644 --- a/src/routes/_auth/(dashboard)/index.tsx +++ b/src/routes/_auth/(dashboard)/index.tsx @@ -175,7 +175,7 @@ function DashboardPage() {

- Jump into what's going on with your fleet. + Jump into what's going on with your fleet.

diff --git a/src/routes/_auth/(reports)/-components/view-report/useReportValueFormatter.ts b/src/routes/_auth/(reports)/-components/view-report/useReportValueFormatter.ts index 33f53da7..75ef8e76 100644 --- a/src/routes/_auth/(reports)/-components/view-report/useReportValueFormatter.ts +++ b/src/routes/_auth/(reports)/-components/view-report/useReportValueFormatter.ts @@ -1,7 +1,7 @@ import * as React from "react"; import { useTranslation } from "react-i18next"; -import { TReportDetail, TReportResult } from "@/lib/schemas/report"; +import type { TReportDetail, TReportResult } from "@/lib/schemas/report"; type OutputField = TReportDetail["outputFields"][number]; type Candidate = TReportResult[number]; diff --git a/src/routes/_auth/(settings)/-components/application/role-delete-dialog.tsx b/src/routes/_auth/(settings)/-components/application/role-delete-dialog.tsx index 8a76671b..d85cedb3 100644 --- a/src/routes/_auth/(settings)/-components/application/role-delete-dialog.tsx +++ b/src/routes/_auth/(settings)/-components/application/role-delete-dialog.tsx @@ -1,3 +1,4 @@ +import * as React from "react"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { useTranslation } from "react-i18next"; import { toast } from "sonner"; diff --git a/src/routes/_auth/(settings)/-components/application/user-edit-dialog.tsx b/src/routes/_auth/(settings)/-components/application/user-edit-dialog.tsx index abb18ffe..0992c472 100644 --- a/src/routes/_auth/(settings)/-components/application/user-edit-dialog.tsx +++ b/src/routes/_auth/(settings)/-components/application/user-edit-dialog.tsx @@ -41,12 +41,12 @@ import { Separator } from "@/components/ui/separator"; import { Switch } from "@/components/ui/switch"; import type { RoleListItem } from "@/lib/schemas/role"; -import { - buildUpdateUserSchema, +import type { + TUserProfile, + UpdateUserInput, UserLanguageItem, - type TUserProfile, - type UpdateUserInput, } from "@/lib/schemas/user"; +import { buildUpdateUserSchema } from "@/lib/schemas/user"; import { fetchLocationsListOptions } from "@/lib/query/location"; import { fetchRolesListOptions } from "@/lib/query/role"; import { diff --git a/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx b/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx index ccea2c25..f162ada5 100644 --- a/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx +++ b/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx @@ -1,14 +1,12 @@ -import React from "react"; -import { +import type { AnyRouter, - Link, - type AnyRoute, - type LinkOptions, - type RegisteredRouter, - type RoutePaths, + LinkOptions, + RegisteredRouter, + RoutePaths, } from "@tanstack/react-router"; +import { Link } from "@tanstack/react-router"; -import { LinkComponentProps } from "@/lib/types/router"; +import type { LinkComponentProps } from "@/lib/types/router"; import { cn } from "@/lib/utils"; diff --git a/src/routes/_auth/(settings)/settings.application.permissions-and-roles.tsx b/src/routes/_auth/(settings)/settings.application.permissions-and-roles.tsx index 2205bd09..94361f4c 100644 --- a/src/routes/_auth/(settings)/settings.application.permissions-and-roles.tsx +++ b/src/routes/_auth/(settings)/settings.application.permissions-and-roles.tsx @@ -33,7 +33,7 @@ import { Skeleton } from "@/components/ui/skeleton"; import { useDocumentTitle } from "@/lib/hooks/useDocumentTitle"; -import { RoleListItem } from "@/lib/schemas/role"; +import type { RoleListItem } from "@/lib/schemas/role"; import { fetchRoleByIdOptions, fetchRolesListOptions } from "@/lib/query/role"; import { EmptyState } from "@/routes/-components/empty-state"; diff --git a/src/tanstack-table.d.ts b/src/tanstack-table.d.ts index c2e8ba7b..0b774bed 100644 --- a/src/tanstack-table.d.ts +++ b/src/tanstack-table.d.ts @@ -1,6 +1,6 @@ import "@tanstack/react-table"; -import { RankingInfo } from "@tanstack/match-sorter-utils"; +import type { RankingInfo } from "@tanstack/match-sorter-utils"; declare module "@tanstack/react-table" { interface ColumnMeta {