From 1aee95e116580489ca6a5c0258afd0969275b102 Mon Sep 17 00:00:00 2001 From: lfjnascimento Date: Mon, 24 Jun 2024 15:29:57 -0300 Subject: [PATCH] chore: add react-query and its eslint plugin --- dashboard/.eslintrc.cjs | 3 +- dashboard/package.json | 2 + dashboard/pnpm-lock.yaml | 90 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) diff --git a/dashboard/.eslintrc.cjs b/dashboard/.eslintrc.cjs index 141d57c..36ef0ec 100644 --- a/dashboard/.eslintrc.cjs +++ b/dashboard/.eslintrc.cjs @@ -5,7 +5,8 @@ module.exports = { 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', - 'plugin:storybook/recommended' + 'plugin:storybook/recommended', + 'plugin:@tanstack/eslint-plugin-query/recommended' ], ignorePatterns: ['dist', '.eslintrc.cjs'], parser: '@typescript-eslint/parser', diff --git a/dashboard/package.json b/dashboard/package.json index 8a331d1..1b6a396 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -16,6 +16,7 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.20", "@mui/x-charts": "^7.7.1", + "@tanstack/react-query": "^5.45.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "lucide-react": "^0.396.0", @@ -33,6 +34,7 @@ "@storybook/react": "^8.1.10", "@storybook/react-vite": "^8.1.10", "@storybook/test": "^8.1.10", + "@tanstack/eslint-plugin-query": "^5.43.1", "@types/node": "^20.14.8", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", diff --git a/dashboard/pnpm-lock.yaml b/dashboard/pnpm-lock.yaml index 8f35c7e..32a85db 100644 --- a/dashboard/pnpm-lock.yaml +++ b/dashboard/pnpm-lock.yaml @@ -17,6 +17,9 @@ dependencies: '@mui/x-charts': specifier: ^7.7.1 version: 7.7.1(@emotion/react@11.11.4)(@emotion/styled@11.11.5)(@mui/material@5.15.20)(@types/react@18.3.3)(react-dom@18.3.1)(react@18.3.1) + '@tanstack/react-query': + specifier: ^5.45.1 + version: 5.45.1(react@18.3.1) class-variance-authority: specifier: ^0.7.0 version: 0.7.0 @@ -64,6 +67,9 @@ devDependencies: '@storybook/test': specifier: ^8.1.10 version: 8.1.10 + '@tanstack/eslint-plugin-query': + specifier: ^5.43.1 + version: 5.43.1(eslint@8.57.0)(typescript@5.5.2) '@types/node': specifier: ^20.14.8 version: 20.14.8 @@ -3684,6 +3690,31 @@ packages: file-system-cache: 2.3.0 dev: true + /@tanstack/eslint-plugin-query@5.43.1(eslint@8.57.0)(typescript@5.5.2): + resolution: {integrity: sha512-5WZmkny6u/lSjzUpgnvn+vnA1KtIa7umNZYLqCg9TZK0lmz9SRP6Hnui1PI279eisDy/O+1yD0MfEHTJWlQGVw==} + peerDependencies: + eslint: ^8 || ^9 + dependencies: + '@typescript-eslint/utils': 8.0.0-alpha.28(eslint@8.57.0)(typescript@5.5.2) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@tanstack/query-core@5.45.0: + resolution: {integrity: sha512-RVfIZQmFUTdjhSAAblvueimfngYyfN6HlwaJUPK71PKd7yi43Vs1S/rdimmZedPWX/WGppcq/U1HOj7O7FwYxw==} + dev: false + + /@tanstack/react-query@5.45.1(react@18.3.1): + resolution: {integrity: sha512-mYYfJujKg2kxmkRRjA6nn4YKG3ITsKuH22f1kteJ5IuVQqgKUgbaSQfYwVP0gBS05mhwxO03HVpD0t7BMN7WOA==} + peerDependencies: + react: ^18.0.0 + dependencies: + '@tanstack/query-core': 5.45.0 + react: 18.3.1 + dev: false + /@testing-library/dom@9.3.4: resolution: {integrity: sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==} engines: {node: '>=14'} @@ -4033,6 +4064,14 @@ packages: '@typescript-eslint/visitor-keys': 7.13.1 dev: true + /@typescript-eslint/scope-manager@8.0.0-alpha.28: + resolution: {integrity: sha512-Iq8QFmJ2DH2tx7jfOraMZM1Y1axRfWh4t29JXRgbzvgiDQ2uHRHcaXqTulqsZXzJ0+vERNvNkOIPcQYGsNeGVQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + '@typescript-eslint/types': 8.0.0-alpha.28 + '@typescript-eslint/visitor-keys': 8.0.0-alpha.28 + dev: true + /@typescript-eslint/type-utils@7.13.1(eslint@8.57.0)(typescript@5.5.2): resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4063,6 +4102,11 @@ packages: engines: {node: ^18.18.0 || >=20.0.0} dev: true + /@typescript-eslint/types@8.0.0-alpha.28: + resolution: {integrity: sha512-HYg+e0EWVShx0FEX0MAjDinYLmd+wD6nGMpbaddB1iACYwqaJFbf7vw0l+hdLTJvQC6UY8ndRkaEsL68QEoIZQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: true + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.5.2): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4106,6 +4150,28 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@8.0.0-alpha.28(typescript@5.5.2): + resolution: {integrity: sha512-I/5ODd4XJ+TO0XrKwDaB4tVGVi6kz2LAlN3WPd7mZVVtW21HHByCILRhOF9RbC69gJQ/TGHFpWCmAcsq2RZisg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 8.0.0-alpha.28 + '@typescript-eslint/visitor-keys': 8.0.0-alpha.28 + debug: 4.3.5 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.4 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.5.2) + typescript: 5.5.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.5.2): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4142,6 +4208,22 @@ packages: - typescript dev: true + /@typescript-eslint/utils@8.0.0-alpha.28(eslint@8.57.0)(typescript@5.5.2): + resolution: {integrity: sha512-PnIz94+nbyjJisMI+KZqXMfw0wfIHvbyh0MGEx2M314wqm6SUWcxB5I8zduGQgJbRB0YFnboPS+MeSlBYPWrBQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@typescript-eslint/scope-manager': 8.0.0-alpha.28 + '@typescript-eslint/types': 8.0.0-alpha.28 + '@typescript-eslint/typescript-estree': 8.0.0-alpha.28(typescript@5.5.2) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4158,6 +4240,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@8.0.0-alpha.28: + resolution: {integrity: sha512-+ewAOeKDycydKMlnfmW8zAURTA8PR5Csyvxy6PJt4XRYjoquode9/eWaMt9Sp4Rz1FGMSVU9KxDRR83ASH/xkQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + '@typescript-eslint/types': 8.0.0-alpha.28 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true