diff --git a/.eslintrc b/.eslintrc index d13c83f85..cf7fd82e3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,7 +8,8 @@ "extends": [ "@casperiv/eslint-config", "@casperiv/eslint-config-react", - "@casperiv/eslint-config-next" + "@casperiv/eslint-config-next", + "plugin:deprecation/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { diff --git a/apps/client/src/components/auth/api-verification.tsx b/apps/client/src/components/auth/api-verification.tsx index af300a671..95768a1f7 100644 --- a/apps/client/src/components/auth/api-verification.tsx +++ b/apps/client/src/components/auth/api-verification.tsx @@ -16,7 +16,6 @@ export function ApiVerification(props: Props) { const { error } = useQuery({ refetchOnWindowFocus: false, - keepPreviousData: true, queryKey: ["api-verification"], retry: 0, queryFn: async () => { diff --git a/apps/client/src/components/dispatch/modals/tones-modal.tsx b/apps/client/src/components/dispatch/modals/tones-modal.tsx index cb7dc704c..2994c05cc 100644 --- a/apps/client/src/components/dispatch/modals/tones-modal.tsx +++ b/apps/client/src/components/dispatch/modals/tones-modal.tsx @@ -46,7 +46,7 @@ export function TonesModal({ types }: Props) { }); helpers.resetForm(); - await queryClient.resetQueries(["active-tones"]); + await queryClient.resetQueries({ queryKey: ["active-tones"] }); } } @@ -57,7 +57,7 @@ export function TonesModal({ types }: Props) { }); if (json) { - await queryClient.resetQueries(["active-tones"]); + await queryClient.resetQueries({ queryKey: ["active-tones"] }); resetForm(); toastMessage({ diff --git a/apps/client/src/hooks/realtime/use-active-dispatchers.ts b/apps/client/src/hooks/realtime/use-active-dispatchers.ts index 08721b5ee..b48b5c83d 100644 --- a/apps/client/src/hooks/realtime/use-active-dispatchers.ts +++ b/apps/client/src/hooks/realtime/use-active-dispatchers.ts @@ -46,7 +46,7 @@ export function useActiveDispatchers() { useListener( { eventName: SocketEvents.UpdateDispatchersState, checkHasListeners: true }, async () => { - await queryClient.resetQueries(["/dispatch"]); + await queryClient.resetQueries({ queryKey: ["/dispatch"] }); }, ); diff --git a/package.json b/package.json index 756579e8c..c5b3c0a7e 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@casperiv/eslint-config-next": "8.0.0", "@casperiv/eslint-config-react": "8.0.0", "eslint": "8.51.0", + "eslint-plugin-deprecation": "^2.0.0", "lerna": "^7.3.1", "lint-staged": "^15.0.1" }, diff --git a/packages/ui/src/components/button/button.tsx b/packages/ui/src/components/button/button.tsx index c4cc1b8b1..a6d0907ea 100644 --- a/packages/ui/src/components/button/button.tsx +++ b/packages/ui/src/components/button/button.tsx @@ -34,7 +34,7 @@ export const buttonVariants = cva( }, ); -type BaseButtonProps = Omit & AriaButtonProps; +type BaseButtonProps = Omit & AriaButtonProps; export type ButtonVariantProps = VariantProps; export type ButtonProps = BaseButtonProps & ButtonVariantProps; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae41dd590..208d32d32 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,9 @@ importers: eslint: specifier: 8.51.0 version: 8.51.0 + eslint-plugin-deprecation: + specifier: ^2.0.0 + version: 2.0.0(eslint@8.51.0)(typescript@5.2.2) lerna: specifier: ^7.3.1 version: 7.3.1 @@ -281,10 +284,10 @@ importers: version: 5.2.2 vite: specifier: ^4.4.11 - version: 4.4.11(@types/node@20.8.6) + version: 4.4.11(@types/node@20.8.6)(sass@1.69.4) vitest: specifier: ^0.34.6 - version: 0.34.6 + version: 0.34.6(sass@1.69.4) apps/client: dependencies: @@ -580,7 +583,7 @@ importers: version: 4.4.9(@types/node@20.8.0) vitest: specifier: ^0.34.6 - version: 0.34.6 + version: 0.34.6(sass@1.69.4) packages/permissions: devDependencies: @@ -595,7 +598,7 @@ importers: version: 4.4.9(@types/node@20.8.0) vitest: specifier: ^0.34.6 - version: 0.34.6 + version: 0.34.6(sass@1.69.4) packages/schemas: dependencies: @@ -911,7 +914,7 @@ importers: version: 4.4.9(@types/node@20.8.0) vitest: specifier: ^0.34.6 - version: 0.34.6 + version: 0.34.6(sass@1.69.4) packages: /@aashutoshrathi/word-wrap@1.2.6: @@ -14441,6 +14444,24 @@ packages: transitivePeerDependencies: - supports-color + /eslint-plugin-deprecation@2.0.0(eslint@8.51.0)(typescript@5.2.2): + resolution: + { + integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==, + } + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: ^4.2.4 || ^5.0.0 + dependencies: + "@typescript-eslint/utils": 6.4.1(eslint@8.51.0)(typescript@5.2.2) + eslint: 8.51.0 + tslib: 2.6.2 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-typescript@3.6.0)(eslint@8.51.0): resolution: { @@ -25187,6 +25208,19 @@ packages: - ts-node dev: false + /tsutils@3.21.0(typescript@5.2.2): + resolution: + { + integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==, + } + engines: { node: ">= 6" } + peerDependencies: + typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + dependencies: + tslib: 1.14.1 + typescript: 5.2.2 + dev: true + /tuf-js@1.1.7: resolution: { @@ -26157,7 +26191,7 @@ packages: - terser dev: true - /vite@4.4.11(@types/node@20.8.6): + /vite@4.4.11(@types/node@20.8.6)(sass@1.69.4): resolution: { integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==, @@ -26192,6 +26226,7 @@ packages: esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.28.1 + sass: 1.69.4 optionalDependencies: fsevents: 2.3.3 dev: true @@ -26314,74 +26349,6 @@ packages: fsevents: 2.3.3 dev: true - /vitest@0.34.6: - resolution: - { - integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==, - } - engines: { node: ">=v14.18.0" } - hasBin: true - peerDependencies: - "@edge-runtime/vm": "*" - "@vitest/browser": "*" - "@vitest/ui": "*" - happy-dom: "*" - jsdom: "*" - playwright: "*" - safaridriver: "*" - webdriverio: "*" - peerDependenciesMeta: - "@edge-runtime/vm": - optional: true - "@vitest/browser": - optional: true - "@vitest/ui": - optional: true - happy-dom: - optional: true - jsdom: - optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - "@types/chai": 4.3.5 - "@types/chai-subset": 1.3.3 - "@types/node": 20.8.6 - "@vitest/expect": 0.34.6 - "@vitest/runner": 0.34.6 - "@vitest/snapshot": 0.34.6 - "@vitest/spy": 0.34.6 - "@vitest/utils": 0.34.6 - acorn: 8.10.0 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.10 - debug: 4.3.4 - local-pkg: 0.4.3 - magic-string: 0.30.3 - pathe: 1.1.1 - picocolors: 1.0.0 - std-env: 3.4.3 - strip-literal: 1.3.0 - tinybench: 2.5.0 - tinypool: 0.7.0 - vite: 4.4.11(@types/node@20.8.6) - vite-node: 0.34.6(@types/node@20.8.6)(sass@1.69.4) - why-is-node-running: 2.2.2 - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - /vitest@0.34.6(sass@1.69.4): resolution: { @@ -26437,7 +26404,7 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.0 tinypool: 0.7.0 - vite: 4.5.0(@types/node@20.8.6)(sass@1.69.4) + vite: 4.4.11(@types/node@20.8.6)(sass@1.69.4) vite-node: 0.34.6(@types/node@20.8.6)(sass@1.69.4) why-is-node-running: 2.2.2 transitivePeerDependencies: