From bdcb20708249190a33442d1ada4793a611edff60 Mon Sep 17 00:00:00 2001 From: Quentin Ruhier Date: Fri, 13 Dec 2024 17:01:10 +0100 Subject: [PATCH 1/7] chore: improve eslint & prettier config --- .prettierrc | 11 +- eslint.config.js | 53 ++-- package.json | 14 +- yarn.lock | 612 ++++++++++++++--------------------------------- 4 files changed, 229 insertions(+), 461 deletions(-) diff --git a/.prettierrc b/.prettierrc index e9c9f029..8296facc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,11 +1,8 @@ { "semi": false, "singleQuote": true, - "trailingComma": "es5", - "printWidth": 80, - "tabWidth": 2, - "jsxSingleQuote": false, - "jsxBracketSameLine": false, - "arrowParens": "always", - "endOfLine": "lf" + "plugins": ["@trivago/prettier-plugin-sort-imports"], + "importOrder": ["^react$", "^@/(.*)$", "^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true } diff --git a/eslint.config.js b/eslint.config.js index fa3faf3a..55db6d64 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,30 +1,45 @@ +import js from '@eslint/js' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' import globals from 'globals' -import pluginJs from '@eslint/js' import tseslint from 'typescript-eslint' -import pluginReact from 'eslint-plugin-react' -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' -export default [ - { files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, - { languageOptions: { globals: globals.browser } }, - pluginJs.configs.recommended, - ...tseslint.configs.recommended, - pluginReact.configs.flat['jsx-runtime'], - eslintPluginPrettierRecommended, +export default tseslint.config( { - settings: { react: { version: '18.3' } }, - rules: { - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-namespace': 'off', - '@typescript-eslint/no-unused-expressions': 'off', - '@typescript-eslint/no-unused-vars': 'off', - '@typescript-eslint/no-empty-object-type': 'off', - }, + ignores: ['dist', 'src/vite-env.d.ts'], + }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['src/**/*.{ts,tsx}'], languageOptions: { + ecmaVersion: 2020, globals: { + ...globals.browser, + ...globals.worker, importScripts: 'readonly', workbox: 'readonly', }, + parserOptions: { + project: './tsconfig.json', + }, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + // see https://typescript-eslint.netlify.app/rules/no-unused-vars/ + '@typescript-eslint/no-unused-vars': [ + 'error', + { argsIgnorePattern: '^_$' }, + ], + '@typescript-eslint/no-explicit-any': ['off'], + '@typescript-eslint/no-namespace': ['off'], + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], }, }, -] +) diff --git a/package.json b/package.json index 8035dcab..c5d526a8 100644 --- a/package.json +++ b/package.json @@ -41,27 +41,27 @@ "zod": "^3.22.4" }, "devDependencies": { + "@eslint/js": "^9.16.0", "@originjs/vite-plugin-federation": "^1.2.3", "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^16.0.1", - "@eslint/js": "^9.13.0", + "@trivago/prettier-plugin-sort-imports": "^5.2.0", "@types/node": "^20.16.10", "@types/react": "^18.3.10", "@types/react-dom": "^18.2.22", "@vitejs/plugin-react": "^4.3.2", "@vitest/coverage-v8": "^2.1.3", - "jsdom": "^25.0.1", - "eslint": "^9.13.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react": "^7.37.2", + "eslint": "^9.16.0", + "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.11.0", + "jsdom": "^25.0.1", "kill-port": "^2.0.1", "prettier": "^3.2.5", "ts-node": "^10.9.2", "typescript": "^5.6.2", - "typescript-eslint": "^8.11.0", + "typescript-eslint": "^8.18.0", "vite": "^5.4.8", "vite-envs": "^4.4.5", "vite-plugin-pwa": "^0.19.8", diff --git a/yarn.lock b/yarn.lock index fb9b5074..bcc95f3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -70,6 +70,17 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" +"@babel/generator@^7.26.2": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== + dependencies: + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + "@babel/helper-annotate-as-pure@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz#d8eac4d2dc0d7b6e11fa6e535332e0d3184f06b4" @@ -239,6 +250,13 @@ dependencies: "@babel/types" "^7.26.0" +"@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== + dependencies: + "@babel/types" "^7.26.3" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz#cc2e53ebf0a0340777fff5ed521943e253b4d8fe" @@ -829,6 +847,14 @@ "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" +"@babel/types@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1075,29 +1101,31 @@ dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.11.0": +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": version "4.12.1" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/config-array@^0.18.0": - version "0.18.0" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" - integrity sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw== +"@eslint/config-array@^0.19.0": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.1.tgz#734aaea2c40be22bbb1f2a9dac687c57a6a4c984" + integrity sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA== dependencies: - "@eslint/object-schema" "^2.1.4" + "@eslint/object-schema" "^2.1.5" debug "^4.3.1" minimatch "^3.1.2" -"@eslint/core@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.7.0.tgz#a1bb4b6a4e742a5ff1894b7ee76fbf884ec72bd3" - integrity sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw== +"@eslint/core@^0.9.0": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.1.tgz#31763847308ef6b7084a4505573ac9402c51f9d1" + integrity sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q== + dependencies: + "@types/json-schema" "^7.0.15" -"@eslint/eslintrc@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" - integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1109,20 +1137,20 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.13.0", "@eslint/js@^9.13.0": - version "9.13.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.13.0.tgz#c5f89bcd57eb54d5d4fa8b77693e9c28dc97e547" - integrity sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA== +"@eslint/js@9.16.0", "@eslint/js@^9.16.0": + version "9.16.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" + integrity sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg== -"@eslint/object-schema@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" - integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== +"@eslint/object-schema@^2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.5.tgz#8670a8f6258a2be5b2c620ff314a1d984c23eb2e" + integrity sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ== -"@eslint/plugin-kit@^0.2.0": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz#5eff371953bc13e3f4d88150e2c53959f64f74f6" - integrity sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw== +"@eslint/plugin-kit@^0.2.3": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz#2b78e7bb3755784bb13faa8932a1d994d6537792" + integrity sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg== dependencies: levn "^0.4.1" @@ -1151,7 +1179,7 @@ resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== -"@humanfs/node@^0.16.5": +"@humanfs/node@^0.16.6": version "0.16.6" resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== @@ -1164,11 +1192,16 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/retry@^0.3.0", "@humanwhocodes/retry@^0.3.1": +"@humanwhocodes/retry@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== + "@inseefr/lunatic@^3.4.8": version "3.4.8" resolved "https://registry.yarnpkg.com/@inseefr/lunatic/-/lunatic-3.4.8.tgz#6f036b7db4cfbc5fbd80746b394a192100144742" @@ -1467,11 +1500,6 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@pkgr/core@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" - integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== - "@popperjs/core@^2.11.8": version "2.11.8" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" @@ -1685,6 +1713,18 @@ dependencies: "@babel/runtime" "^7.12.5" +"@trivago/prettier-plugin-sort-imports@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-5.2.0.tgz#a9dfdc3aa8bda1fc868a46575fa3c2d8f067bf42" + integrity sha512-yEIJ7xMKYQwyNRjxSdi4Gs37iszikAjxfky+3hu9bn24u8eHLJNDMAoOTyowp8p6EpSl8IQMdkfBx+WnJTttsw== + dependencies: + "@babel/generator" "^7.26.2" + "@babel/parser" "^7.26.2" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.26.0" + javascript-natural-sort "^0.7.1" + lodash "^4.17.21" + "@tsconfig/node10@^1.0.7": version "1.0.11" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" @@ -1855,62 +1895,62 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.11.tgz#11af57b127e32487774841f7a4e54eab166d03c4" integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== -"@typescript-eslint/eslint-plugin@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz#c2ef660bb83fd1432368319312a2581fc92ccac1" - integrity sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw== +"@typescript-eslint/eslint-plugin@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz#0901933326aea4443b81df3f740ca7dfc45c7bea" + integrity sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.12.2" - "@typescript-eslint/type-utils" "8.12.2" - "@typescript-eslint/utils" "8.12.2" - "@typescript-eslint/visitor-keys" "8.12.2" + "@typescript-eslint/scope-manager" "8.18.0" + "@typescript-eslint/type-utils" "8.18.0" + "@typescript-eslint/utils" "8.18.0" + "@typescript-eslint/visitor-keys" "8.18.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.12.2.tgz#2e8173b34e1685e918b2d571c16c906d3747bad2" - integrity sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw== +"@typescript-eslint/parser@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.0.tgz#a1c9456cbb6a089730bf1d3fc47946c5fb5fe67b" + integrity sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q== dependencies: - "@typescript-eslint/scope-manager" "8.12.2" - "@typescript-eslint/types" "8.12.2" - "@typescript-eslint/typescript-estree" "8.12.2" - "@typescript-eslint/visitor-keys" "8.12.2" + "@typescript-eslint/scope-manager" "8.18.0" + "@typescript-eslint/types" "8.18.0" + "@typescript-eslint/typescript-estree" "8.18.0" + "@typescript-eslint/visitor-keys" "8.18.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz#6db0213745e6392c8e90fe9af5915e6da32eb94a" - integrity sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ== +"@typescript-eslint/scope-manager@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz#30b040cb4557804a7e2bcc65cf8fdb630c96546f" + integrity sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw== dependencies: - "@typescript-eslint/types" "8.12.2" - "@typescript-eslint/visitor-keys" "8.12.2" + "@typescript-eslint/types" "8.18.0" + "@typescript-eslint/visitor-keys" "8.18.0" -"@typescript-eslint/type-utils@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz#132b0c52d45f6814e6f2e32416c7951ed480b016" - integrity sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ== +"@typescript-eslint/type-utils@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz#6f0d12cf923b6fd95ae4d877708c0adaad93c471" + integrity sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow== dependencies: - "@typescript-eslint/typescript-estree" "8.12.2" - "@typescript-eslint/utils" "8.12.2" + "@typescript-eslint/typescript-estree" "8.18.0" + "@typescript-eslint/utils" "8.18.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.12.2.tgz#8d70098c0e90442495b53d0296acdca6d0f3f73c" - integrity sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA== +"@typescript-eslint/types@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.0.tgz#3afcd30def8756bc78541268ea819a043221d5f3" + integrity sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA== -"@typescript-eslint/typescript-estree@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz#206df9b1cbff212aaa9401985ef99f04daa84da5" - integrity sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow== +"@typescript-eslint/typescript-estree@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz#d8ca785799fbb9c700cdff1a79c046c3e633c7f9" + integrity sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg== dependencies: - "@typescript-eslint/types" "8.12.2" - "@typescript-eslint/visitor-keys" "8.12.2" + "@typescript-eslint/types" "8.18.0" + "@typescript-eslint/visitor-keys" "8.18.0" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -1918,23 +1958,23 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.12.2.tgz#726cc9f49f5866605bd15bbc1768ffc15637930e" - integrity sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A== +"@typescript-eslint/utils@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.0.tgz#48f67205d42b65d895797bb7349d1be5c39a62f7" + integrity sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.12.2" - "@typescript-eslint/types" "8.12.2" - "@typescript-eslint/typescript-estree" "8.12.2" + "@typescript-eslint/scope-manager" "8.18.0" + "@typescript-eslint/types" "8.18.0" + "@typescript-eslint/typescript-estree" "8.18.0" -"@typescript-eslint/visitor-keys@8.12.2": - version "8.12.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz#94d7410f78eb6d134b9fcabaf1eeedb910ba8c38" - integrity sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA== +"@typescript-eslint/visitor-keys@8.18.0": + version "8.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz#7b6d33534fa808e33a19951907231ad2ea5c36dd" + integrity sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw== dependencies: - "@typescript-eslint/types" "8.12.2" - eslint-visitor-keys "^3.4.3" + "@typescript-eslint/types" "8.18.0" + eslint-visitor-keys "^4.2.0" "@ungap/structured-clone@^1.0.0": version "1.2.0" @@ -2140,61 +2180,6 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" -array-includes@^3.1.6, array-includes@^3.1.8: - version "3.1.8" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" - integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-object-atoms "^1.0.0" - get-intrinsic "^1.2.4" - is-string "^1.0.7" - -array.prototype.findlast@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" - integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-errors "^1.3.0" - es-object-atoms "^1.0.0" - es-shim-unscopables "^1.0.2" - -array.prototype.flat@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" - integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" - integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - -array.prototype.tosorted@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" - integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.3" - es-errors "^1.3.0" - es-shim-unscopables "^1.0.2" - arraybuffer.prototype.slice@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" @@ -2526,7 +2511,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-spawn@^7.0.0, cross-spawn@^7.0.2: +cross-spawn@^7.0.0: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2535,6 +2520,15 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^7.0.5: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -2682,7 +2676,7 @@ define-data-property@^1.0.1, define-data-property@^1.1.4: es-errors "^1.3.0" gopd "^1.0.1" -define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: +define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -2728,13 +2722,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - dom-accessibility-api@^0.5.9: version "0.5.16" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" @@ -2809,7 +2796,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: version "1.23.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== @@ -2873,26 +2860,6 @@ es-errors@^1.2.1, es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-iterator-helpers@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.1.0.tgz#f6d745d342aea214fe09497e7152170dc333a7a6" - integrity sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.3" - es-errors "^1.3.0" - es-set-tostringtag "^2.0.3" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - globalthis "^1.0.4" - has-property-descriptors "^1.0.2" - has-proto "^1.0.3" - has-symbols "^1.0.3" - internal-slot "^1.0.7" - iterator.prototype "^1.1.3" - safe-array-concat "^1.1.2" - es-object-atoms@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" @@ -2909,13 +2876,6 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" -es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" - integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== - dependencies: - hasown "^2.0.0" - es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -3006,44 +2966,17 @@ escape-string-regexp@^5.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== -eslint-config-prettier@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" - integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== +eslint-plugin-react-hooks@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.1.0.tgz#3d34e37d5770866c34b87d5b499f5f0b53bf0854" + integrity sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw== -eslint-plugin-prettier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" - integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.9.1" - -eslint-plugin-react@^7.37.2: - version "7.37.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz#cd0935987876ba2900df2f58339f6d92305acc7a" - integrity sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w== - dependencies: - array-includes "^3.1.8" - array.prototype.findlast "^1.2.5" - array.prototype.flatmap "^1.3.2" - array.prototype.tosorted "^1.1.4" - doctrine "^2.1.0" - es-iterator-helpers "^1.1.0" - estraverse "^5.3.0" - hasown "^2.0.2" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.1.2" - object.entries "^1.1.8" - object.fromentries "^2.0.8" - 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-plugin-react-refresh@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.16.tgz#149dbc9279bd16942409f1c1d2f0dce3299430ef" + integrity sha512-slterMlxAhov/DZO8NScf6mEeMBBXodFUolijDvrtTxyezyLoTQaa73FyYus/VbTdftd8wBgBxPMRk3poleXNQ== -eslint-scope@^8.1.0: +eslint-scope@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== @@ -3056,36 +2989,36 @@ eslint-visitor-keys@^3.4.3: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-visitor-keys@^4.1.0, eslint-visitor-keys@^4.2.0: +eslint-visitor-keys@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -eslint@^9.13.0: - version "9.13.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.13.0.tgz#7659014b7dda1ff876ecbd990f726e11c61596e6" - integrity sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA== +eslint@^9.16.0: + version "9.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6" + integrity sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.11.0" - "@eslint/config-array" "^0.18.0" - "@eslint/core" "^0.7.0" - "@eslint/eslintrc" "^3.1.0" - "@eslint/js" "9.13.0" - "@eslint/plugin-kit" "^0.2.0" - "@humanfs/node" "^0.16.5" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.16.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.3.1" + "@humanwhocodes/retry" "^0.4.1" "@types/estree" "^1.0.6" "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.5" debug "^4.3.2" escape-string-regexp "^4.0.0" - eslint-scope "^8.1.0" - eslint-visitor-keys "^4.1.0" - espree "^10.2.0" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -3100,7 +3033,6 @@ eslint@^9.13.0: minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.3" - text-table "^0.2.0" esniff@^2.0.1: version "2.0.1" @@ -3112,7 +3044,7 @@ esniff@^2.0.1: event-emitter "^0.3.5" type "^2.7.2" -espree@^10.0.1, espree@^10.2.0: +espree@^10.0.1, espree@^10.3.0: version "10.3.0" resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== @@ -3135,7 +3067,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -3211,11 +3143,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -3453,7 +3380,7 @@ globals@^15.11.0: resolved "https://registry.yarnpkg.com/globals/-/globals-15.11.0.tgz#b96ed4c6998540c6fb824b24b5499216d2438d6e" integrity sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw== -globalthis@^1.0.3, globalthis@^1.0.4: +globalthis@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== @@ -3743,13 +3670,6 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-async-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" - integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA== - dependencies: - has-tostringtag "^1.0.0" - is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -3784,7 +3704,7 @@ is-data-view@^1.0.1: dependencies: is-typed-array "^1.1.13" -is-date-object@^1.0.1, is-date-object@^1.0.5: +is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -3801,25 +3721,11 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-finalizationregistry@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6" - integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw== - dependencies: - call-bind "^1.0.2" - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-generator-function@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -3832,11 +3738,6 @@ is-hexadecimal@^2.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027" integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg== -is-map@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" - integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== - is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -3892,11 +3793,6 @@ is-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" integrity sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA== -is-set@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" - integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== - is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" @@ -3930,11 +3826,6 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" -is-weakmap@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" - integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== - is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -3942,14 +3833,6 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-weakset@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" - integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ== - dependencies: - call-bind "^1.0.7" - get-intrinsic "^1.2.4" - isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -3991,17 +3874,6 @@ istanbul-reports@^3.1.7: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -iterator.prototype@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.3.tgz#016c2abe0be3bbdb8319852884f60908ac62bf9c" - integrity sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ== - dependencies: - define-properties "^1.2.1" - get-intrinsic "^1.2.1" - has-symbols "^1.0.3" - reflect.getprototypeof "^1.0.4" - set-function-name "^2.0.1" - jackspeak@^3.1.2: version "3.4.3" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" @@ -4021,6 +3893,11 @@ jake@^10.8.5: filelist "^1.0.4" minimatch "^3.1.2" +javascript-natural-sort@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59" + integrity sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4114,16 +3991,6 @@ jsonpointer@^5.0.0: resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== -"jsx-ast-utils@^2.4.1 || ^3.0.0": - version "3.3.5" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" - integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== - dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - object.assign "^4.1.4" - object.values "^1.1.6" - jwt-decode@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-4.0.0.tgz#2270352425fd413785b2faf11f6e755c5151bd4b" @@ -4751,7 +4618,7 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.4, object.assign@^4.1.5: +object.assign@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -4761,34 +4628,6 @@ object.assign@^4.1.4, object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" - integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-object-atoms "^1.0.0" - -object.fromentries@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" - integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-object-atoms "^1.0.0" - -object.values@^1.1.6, object.values@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" - integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-object-atoms "^1.0.0" - oidc-spa@^5.4.0: version "5.5.3" resolved "https://registry.yarnpkg.com/oidc-spa/-/oidc-spa-5.5.3.tgz#96e02d3ae08024e19bc090f2a3700310e649c2be" @@ -4975,13 +4814,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.2.5: version "3.3.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" @@ -5192,19 +5024,6 @@ redux@^4.2.1: dependencies: "@babel/runtime" "^7.9.2" -reflect.getprototypeof@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859" - integrity sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg== - dependencies: - call-bind "^1.0.7" - define-properties "^1.2.1" - es-abstract "^1.23.1" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - globalthis "^1.0.3" - which-builtin-type "^1.1.3" - regenerate-unicode-properties@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz#626e39df8c372338ea9b8028d1f99dc3fd9c3db0" @@ -5333,15 +5152,6 @@ resolve@^1.14.2, resolve@^1.19.0, resolve@^1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.5: - version "2.0.0-next.5" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" - integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -5492,7 +5302,7 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.2" -set-function-name@^2.0.1, set-function-name@^2.0.2: +set-function-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== @@ -5628,7 +5438,7 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.matchall@^4.0.11, string.prototype.matchall@^4.0.6: +string.prototype.matchall@^4.0.6: version "4.0.11" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg== @@ -5646,14 +5456,6 @@ string.prototype.matchall@^4.0.11, string.prototype.matchall@^4.0.6: set-function-name "^2.0.2" side-channel "^1.0.6" -string.prototype.repeat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a" - integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trim@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" @@ -5766,14 +5568,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.9.1: - version "0.9.2" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.2.tgz#a3a935eca7922d48b9e7d6c61822ee6c3ae4ec62" - integrity sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw== - dependencies: - "@pkgr/core" "^0.1.0" - tslib "^2.6.2" - temp-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" @@ -5808,11 +5602,6 @@ test-exclude@^7.0.1: glob "^10.4.1" minimatch "^9.0.4" -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - timers-ext@^0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.8.tgz#b4e442f10b7624a29dd2aa42c295e257150cf16c" @@ -5897,9 +5686,9 @@ trough@^2.0.0: integrity sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw== ts-api-utils@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" - integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== + version "1.4.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== ts-node@^10.9.2: version "10.9.2" @@ -5930,11 +5719,6 @@ tsconfck@^3.0.3: resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.4.tgz#de01a15334962e2feb526824339b51be26712229" integrity sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ== -tslib@^2.6.2: - version "2.8.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b" - integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== - tss-react@^4.9.13: version "4.9.13" resolved "https://registry.yarnpkg.com/tss-react/-/tss-react-4.9.13.tgz#e6ac0bfea3977e58b5ef5a261cd0b035e6bd8254" @@ -6005,14 +5789,14 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" -typescript-eslint@^8.11.0: - version "8.12.2" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.12.2.tgz#e273d69af30b478b1c410f4159d675ce7925f9a7" - integrity sha512-UbuVUWSrHVR03q9CWx+JDHeO6B/Hr9p4U5lRH++5tq/EbFq1faYZe50ZSBePptgfIKLEti0aPQ3hFgnPVcd8ZQ== +typescript-eslint@^8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.18.0.tgz#41026f27a3481185f3239d817ae5b960572145a0" + integrity sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ== dependencies: - "@typescript-eslint/eslint-plugin" "8.12.2" - "@typescript-eslint/parser" "8.12.2" - "@typescript-eslint/utils" "8.12.2" + "@typescript-eslint/eslint-plugin" "8.18.0" + "@typescript-eslint/parser" "8.18.0" + "@typescript-eslint/utils" "8.18.0" typescript@^5.6.2: version "5.6.3" @@ -6326,34 +6110,6 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-builtin-type@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.4.tgz#592796260602fc3514a1b5ee7fa29319b72380c3" - integrity sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w== - dependencies: - function.prototype.name "^1.1.6" - has-tostringtag "^1.0.2" - is-async-function "^2.0.0" - is-date-object "^1.0.5" - is-finalizationregistry "^1.0.2" - is-generator-function "^1.0.10" - is-regex "^1.1.4" - is-weakref "^1.0.2" - isarray "^2.0.5" - which-boxed-primitive "^1.0.2" - which-collection "^1.0.2" - which-typed-array "^1.1.15" - -which-collection@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" - integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== - dependencies: - is-map "^2.0.3" - is-set "^2.0.3" - is-weakmap "^2.0.2" - is-weakset "^2.0.3" - which-typed-array@^1.1.14, which-typed-array@^1.1.15: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" From c5baf3e4bd967ac65b902846ea80a1fadc77acd9 Mon Sep 17 00:00:00 2001 From: Quentin Ruhier Date: Fri, 13 Dec 2024 17:10:39 +0100 Subject: [PATCH 2/7] chore: update test & format scripts --- package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c5d526a8..b3264209 100644 --- a/package.json +++ b/package.json @@ -5,16 +5,17 @@ "type": "module", "scripts": { "dev": "vite --port 5001 --strictPort", - "test": "vitest", + "test": "vitest run", + "test:watch": "vitest", "test:coverage": "vitest --coverage", "build": "tsc && vite build", "postbuild": "node build/remote-env.cjs remoteEntry.js", "preview": "vite preview --port 5001 --strictPort", - "_format": "prettier 'src/**/*.{ts,tsx,js,jsx,json,md}'", + "_format": "prettier --ignore-unknown .", "format": "npm run _format -- --write", - "lint": "eslint src/", "format:check": "npm run _format -- --list-different", - "stop": "kill-port --port 5000,5001,5002" + "lint": "eslint ./src", + "stop": "kill-port --port 5000,5001,5002", }, "dependencies": { "@emotion/react": "^11.11.4", From dcfad178c996afe5caccc190d80387703856c565 Mon Sep 17 00:00:00 2001 From: Quentin Ruhier Date: Fri, 13 Dec 2024 18:33:02 +0100 Subject: [PATCH 3/7] chore: add allias for imports --- src/bootstrap.tsx | 11 +-- src/core/adapters/datastore/default.ts | 5 +- src/core/adapters/localSyncStorage/default.ts | 3 +- .../parser/localSyncObjectSchema.ts | 3 +- src/core/adapters/oidc/default.ts | 4 +- src/core/adapters/oidc/mock.ts | 3 +- src/core/adapters/queenApi/default.ts | 16 ++-- src/core/adapters/queenApi/mock.ts | 9 ++- .../queenApi/mockData/surveySample.ts | 2 +- .../queenApi/parserSchema/surveyUnitSchema.ts | 8 +- src/core/bootstrap.ts | 28 ++++--- src/core/index.ts | 3 +- src/core/ports/DataStore.ts | 2 +- src/core/ports/QueenApi.ts | 8 +- src/core/tools/SurveyModelBreaking.ts | 6 +- src/core/tools/axiosError.test.ts | 9 ++- src/core/tools/axiosError.ts | 3 +- src/core/tools/externalResources.test.ts | 26 ++++--- src/core/tools/externalResources.ts | 31 ++++---- src/core/tools/fetchUrl.test.ts | 3 +- .../collectSurvey/eventSender.test.ts | 12 +-- .../usecases/collectSurvey/eventSender.ts | 4 +- src/core/usecases/collectSurvey/thunks.ts | 17 ++-- src/core/usecases/reviewSurvey/thunks.ts | 8 +- src/core/usecases/synchronizeData/evt.ts | 6 +- .../usecases/synchronizeData/selectors.ts | 10 ++- src/core/usecases/synchronizeData/state.ts | 19 ++--- src/core/usecases/synchronizeData/thunks.ts | 78 ++++++++++--------- src/core/usecases/userAuthentication.ts | 2 +- src/core/usecases/visualizeSurvey/thunks.ts | 20 ++--- src/createCore.tsx | 2 +- src/i18n/resources/en.ts | 3 +- src/i18n/resources/fr.ts | 3 +- src/ui/components/ErrorComponent.tsx | 4 +- .../orchestrator/Breadcrumb/Breadcrumb.tsx | 10 ++- .../components/orchestrator/Header/Header.tsx | 13 ++-- .../orchestrator/LoopPanel/LoopPanel.tsx | 9 ++- src/ui/components/orchestrator/Menu/Menu.tsx | 7 +- .../Menu/StopNavigation/StopNavigation.tsx | 7 +- .../components/orchestrator/NavBar/NavBar.tsx | 10 ++- .../components/orchestrator/Orchestrator.tsx | 23 +++--- .../buttons/Continue/Continue.tsx | 4 +- .../buttons/PrevNext/PrevNext.tsx | 9 ++- .../orchestrator/tools/functions.tsx | 14 ++-- .../orchestrator/tools/getQueenNavigation.ts | 24 +++--- .../tools/useNavigationButtons.tsx | 6 +- src/ui/pages/Error/Error.tsx | 5 +- src/ui/pages/External/External.tsx | 9 ++- src/ui/pages/collect/Collect.tsx | 8 +- src/ui/pages/env/DisplayEnvValues.tsx | 5 +- src/ui/pages/review/Review.tsx | 13 ++-- src/ui/pages/synchronize/LoadingDisplay.tsx | 8 +- src/ui/pages/synchronize/SynchronizeData.tsx | 11 ++- src/ui/pages/visualize/Visualize.tsx | 10 ++- src/ui/pages/visualize/VisualizeForm.tsx | 5 +- src/ui/routing/Layout.tsx | 4 +- src/ui/routing/loader/collectLoader.test.ts | 10 ++- src/ui/routing/loader/collectLoader.ts | 3 +- src/ui/routing/loader/protectedLoader.test.ts | 6 +- src/ui/routing/loader/protectedLoader.ts | 2 +- src/ui/routing/loader/reviewLoader.test.ts | 10 ++- src/ui/routing/loader/reviewLoader.ts | 3 +- .../routing/loader/surveyUnitLoader.test.ts | 12 +-- src/ui/routing/loader/surveyUnitLoader.ts | 7 +- src/ui/routing/loader/visualizeLoader.test.ts | 6 +- src/ui/routing/loader/visualizeLoader.ts | 3 +- src/ui/routing/routes.tsx | 21 ++--- src/unsubscribe_old_sw.ts | 4 +- tsconfig.json | 4 +- 69 files changed, 386 insertions(+), 290 deletions(-) diff --git a/src/bootstrap.tsx b/src/bootstrap.tsx index e0f95d68..9c4e36b7 100644 --- a/src/bootstrap.tsx +++ b/src/bootstrap.tsx @@ -1,9 +1,10 @@ import { createRoot } from 'react-dom/client' import { RouterProvider } from 'react-router-dom' -import { unsubscribeOldSW } from 'unsubscribe_old_sw' -import { CoreProvider } from 'createCore' -import { createRouter, type RoutingStrategy } from 'ui/routing/createRouter' -import { CenteredSpinner } from 'ui/components/CenteredSpinner' + +import { CoreProvider } from '@/createCore' +import { CenteredSpinner } from '@/ui/components/CenteredSpinner' +import { type RoutingStrategy, createRouter } from '@/ui/routing/createRouter' +import { unsubscribeOldSW } from '@/unsubscribe_old_sw' const mount = ({ mountPoint, @@ -24,7 +25,7 @@ const mount = ({ root.render( }> - + , ) return () => queueMicrotask(() => root.unmount()) diff --git a/src/core/adapters/datastore/default.ts b/src/core/adapters/datastore/default.ts index 10ebde7f..d8640a31 100644 --- a/src/core/adapters/datastore/default.ts +++ b/src/core/adapters/datastore/default.ts @@ -1,7 +1,8 @@ -import type { Paradata, SurveyUnit } from 'core/model' -import type { DataStore } from 'core/ports/DataStore' import Dexie, { type Table } from 'dexie' +import type { Paradata, SurveyUnit } from '@/core/model' +import type { DataStore } from '@/core/ports/DataStore' + type Tables = { surveyUnit: Table paradata: Table diff --git a/src/core/adapters/localSyncStorage/default.ts b/src/core/adapters/localSyncStorage/default.ts index 902d5b5b..5e6b7fe9 100644 --- a/src/core/adapters/localSyncStorage/default.ts +++ b/src/core/adapters/localSyncStorage/default.ts @@ -1,7 +1,8 @@ import type { LocalStorageObject, LocalSyncStorage, -} from 'core/ports/LocalSyncStorage' +} from '@/core/ports/LocalSyncStorage' + import { localStorageObjectSchema } from './parser/localSyncObjectSchema' export function createLocalSyncStorage(params: { diff --git a/src/core/adapters/localSyncStorage/parser/localSyncObjectSchema.ts b/src/core/adapters/localSyncStorage/parser/localSyncObjectSchema.ts index 52ddbe5d..6df1a86a 100644 --- a/src/core/adapters/localSyncStorage/parser/localSyncObjectSchema.ts +++ b/src/core/adapters/localSyncStorage/parser/localSyncObjectSchema.ts @@ -1,7 +1,8 @@ -import type { LocalStorageObject } from 'core/ports/LocalSyncStorage' import { type Equals, assert } from 'tsafe' import { z } from 'zod' +import type { LocalStorageObject } from '@/core/ports/LocalSyncStorage' + export const localStorageObjectSchema = z.object({ error: z.boolean(), surveyUnitsSuccess: z.array(z.string()), diff --git a/src/core/adapters/oidc/default.ts b/src/core/adapters/oidc/default.ts index 1d67dba1..b302066e 100644 --- a/src/core/adapters/oidc/default.ts +++ b/src/core/adapters/oidc/default.ts @@ -1,5 +1,7 @@ -import type { Oidc } from 'core/ports/Oidc' import { createOidc as createOidcSpa } from 'oidc-spa' + +import type { Oidc } from '@/core/ports/Oidc' + import { getMockedOidc } from './mock' export function createOidc(params: { diff --git a/src/core/adapters/oidc/mock.ts b/src/core/adapters/oidc/mock.ts index 0dc13b3f..9c2f16e2 100644 --- a/src/core/adapters/oidc/mock.ts +++ b/src/core/adapters/oidc/mock.ts @@ -1,6 +1,7 @@ -import type { Oidc } from 'core/ports/Oidc' import { id } from 'tsafe/id' +import type { Oidc } from '@/core/ports/Oidc' + export function createOidc(params: { isUserLoggedIn: boolean }): () => Promise { diff --git a/src/core/adapters/queenApi/default.ts b/src/core/adapters/queenApi/default.ts index 6fcb2b37..64726bd1 100644 --- a/src/core/adapters/queenApi/default.ts +++ b/src/core/adapters/queenApi/default.ts @@ -1,4 +1,5 @@ import axios, { AxiosError } from 'axios' + import type { Campaign, IdAndQuestionnaireId, @@ -6,9 +7,10 @@ import type { Questionnaire, RequiredNomenclatures, SurveyUnit, -} from 'core/model' -import type { QueenApi } from 'core/ports/QueenApi' -import { handleAxiosError } from 'core/tools/axiosError' +} from '@/core/model' +import type { QueenApi } from '@/core/ports/QueenApi' +import { handleAxiosError } from '@/core/tools/axiosError' + import { campaignSchema, idAndQuestionnaireIdSchema, @@ -50,7 +52,7 @@ export function createApiClient(params: { return Promise.reject(error) } return Promise.reject(handleAxiosError(error)) - } + }, ) return { axiosInstance } })() @@ -65,14 +67,14 @@ export function createApiClient(params: { axiosInstance .get(`/api/survey-units/interviewer`) .then(({ data }) => - data.map((surveyUnit) => surveyUnitSchema.parse(surveyUnit)) + data.map((surveyUnit) => surveyUnitSchema.parse(surveyUnit)), ), getSurveyUnit: (idSurveyUnit) => axiosInstance .get>(`/api/survey-unit/${idSurveyUnit}`) .then(({ data }) => - surveyUnitSchema.parse({ id: idSurveyUnit, ...data }) + surveyUnitSchema.parse({ id: idSurveyUnit, ...data }), ), putSurveyUnit: (surveyUnit) => axiosInstance @@ -100,7 +102,7 @@ export function createApiClient(params: { getRequiredNomenclaturesByCampaign: (idNomenclature) => axiosInstance .get( - `/api/questionnaire/${idNomenclature}/required-nomenclatures` + `/api/questionnaire/${idNomenclature}/required-nomenclatures`, ) .then(({ data }) => requiredNomenclaturesSchema.parse(data)), diff --git a/src/core/adapters/queenApi/mock.ts b/src/core/adapters/queenApi/mock.ts index 5ef5a80b..bea24b3d 100644 --- a/src/core/adapters/queenApi/mock.ts +++ b/src/core/adapters/queenApi/mock.ts @@ -1,6 +1,7 @@ -import type { QueenApi } from 'core/ports/QueenApi' +import type { SurveyUnit } from '@/core/model' +import type { QueenApi } from '@/core/ports/QueenApi' + import { surveySample } from './mockData/surveySample' -import type { SurveyUnit } from 'core/model' export function createApiClient(): QueenApi { return { @@ -15,13 +16,13 @@ export function createApiClient(): QueenApi { Promise.resolve(createSUMocked({ idSu: idSurveyUnit })), putSurveyUnit: (surveyUnit) => Promise.resolve( - console.log('putSurveyUnit', `id: ${surveyUnit.id}`, surveyUnit) + console.log('putSurveyUnit', `id: ${surveyUnit.id}`, surveyUnit), ), putSurveyUnitsData: (surveyUnitsData) => Promise.resolve(console.table(surveyUnitsData)), postSurveyUnitInTemp: (surveyUnit) => Promise.resolve( - console.log('postSurveyUnitInTemp', `id: ${surveyUnit.id}`, surveyUnit) + console.log('postSurveyUnitInTemp', `id: ${surveyUnit.id}`, surveyUnit), ), getCampaigns: () => Promise.resolve([ diff --git a/src/core/adapters/queenApi/mockData/surveySample.ts b/src/core/adapters/queenApi/mockData/surveySample.ts index 3b8549fc..f7a3afee 100644 --- a/src/core/adapters/queenApi/mockData/surveySample.ts +++ b/src/core/adapters/queenApi/mockData/surveySample.ts @@ -1,4 +1,4 @@ -import type { Questionnaire } from 'core/model/Questionnaire' +import type { Questionnaire } from '@/core/model/Questionnaire' export const surveySample = { componentType: 'Questionnaire', diff --git a/src/core/adapters/queenApi/parserSchema/surveyUnitSchema.ts b/src/core/adapters/queenApi/parserSchema/surveyUnitSchema.ts index 1db45732..f406d72a 100644 --- a/src/core/adapters/queenApi/parserSchema/surveyUnitSchema.ts +++ b/src/core/adapters/queenApi/parserSchema/surveyUnitSchema.ts @@ -1,6 +1,8 @@ import { z } from 'zod' + +import type { PageTag } from '@/core/model' + import { surveyUnitDataSchema } from './surveyUnitDataSchema' -import type { PageTag } from 'core/model' export const idAndQuestionnaireIdSchema = z.object({ id: z.string(), @@ -23,7 +25,7 @@ const stateDataSchema = z.object({ { message: 'currentPage must be in the format `${number}.${number}#${number}` or `${number}`', - } + }, ), }) @@ -35,7 +37,7 @@ export const surveyUnitSchema = z.object({ z.object({ name: z.string(), value: z.string(), - }) + }), ) .optional(), data: surveyUnitDataSchema, diff --git a/src/core/bootstrap.ts b/src/core/bootstrap.ts index 5e362caa..a951d6ee 100644 --- a/src/core/bootstrap.ts +++ b/src/core/bootstrap.ts @@ -1,9 +1,11 @@ -import { usecases } from './usecases' -import { createCore, type GenericCore } from 'redux-clean-architecture' -import type { Oidc } from 'core/ports/Oidc' -import type { DataStore } from 'core/ports/DataStore' -import type { QueenApi } from 'core/ports/QueenApi' +import { type GenericCore, createCore } from 'redux-clean-architecture' + +import type { DataStore } from '@/core/ports/DataStore' +import type { Oidc } from '@/core/ports/Oidc' +import type { QueenApi } from '@/core/ports/QueenApi' + import type { LocalSyncStorage } from './ports/LocalSyncStorage' +import { usecases } from './usecases' type ParamsOfBootstrapCore = { apiUrl: string @@ -30,16 +32,16 @@ export type Thunks = Core['types']['Thunks'] export type CreateEvt = Core['types']['CreateEvt'] export async function bootstrapCore( - params: ParamsOfBootstrapCore + params: ParamsOfBootstrapCore, ): Promise<{ core: Core }> { const { apiUrl, oidcParams } = params const getOidc = await (async () => { if (oidcParams === undefined || oidcParams.issuerUri === '') { - const { createOidc } = await import('core/adapters/oidc/mock') + const { createOidc } = await import('@/core/adapters/oidc/mock') return createOidc({ isUserLoggedIn: true }) } - const { createOidc } = await import('core/adapters/oidc/default') + const { createOidc } = await import('@/core/adapters/oidc/default') return createOidc({ issuerUri: oidcParams.issuerUri, @@ -50,11 +52,11 @@ export async function bootstrapCore( const queenApi = await (async () => { if (apiUrl === '') { // When no apiUrl is provided, we use the mock - const { createApiClient } = await import('core/adapters/queenApi/mock') + const { createApiClient } = await import('@/core/adapters/queenApi/mock') return createApiClient() } - const { createApiClient } = await import('core/adapters/queenApi/default') + const { createApiClient } = await import('@/core/adapters/queenApi/default') return createApiClient({ apiUrl, @@ -70,7 +72,9 @@ export async function bootstrapCore( })() const dataStore = await (async () => { - const { createDataStore } = await import('core/adapters/datastore/default') + const { createDataStore } = await import( + '@/core/adapters/datastore/default' + ) /** * TODO : replace schema (There are impact on legacy queens) schema: { @@ -91,7 +95,7 @@ export async function bootstrapCore( const localSyncStorage = await (async () => { const { createLocalSyncStorage } = await import( - 'core/adapters/localSyncStorage/default' + '@/core/adapters/localSyncStorage/default' ) return createLocalSyncStorage({ localStorageKey: 'QUEEN_SYNC_RESULT' }) diff --git a/src/core/index.ts b/src/core/index.ts index 3cfbbd7c..7c928689 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -3,7 +3,8 @@ NOTE: Only here do we export the API for a specific framework (here react). In the rest of the core directory everything is agnostic to React */ import { createReactApi } from 'redux-clean-architecture/react' -import { bootstrapCore } from 'core/bootstrap' + +import { bootstrapCore } from '@/core/bootstrap' export const { createCoreProvider, useCore, useCoreState } = createReactApi({ bootstrapCore, diff --git a/src/core/ports/DataStore.ts b/src/core/ports/DataStore.ts index 76abd94b..492c86aa 100644 --- a/src/core/ports/DataStore.ts +++ b/src/core/ports/DataStore.ts @@ -1,4 +1,4 @@ -import type { Paradata, SurveyUnit } from 'core/model' +import type { Paradata, SurveyUnit } from '@/core/model' export type DataStore = { updateSurveyUnit: (surveyUnit: SurveyUnit) => Promise diff --git a/src/core/ports/QueenApi.ts b/src/core/ports/QueenApi.ts index 23d13423..542d851a 100644 --- a/src/core/ports/QueenApi.ts +++ b/src/core/ports/QueenApi.ts @@ -6,11 +6,11 @@ import type { Questionnaire, RequiredNomenclatures, SurveyUnit, -} from 'core/model' +} from '@/core/model' export type QueenApi = { getSurveyUnitsIdsAndQuestionnaireIdsByCampaign: ( - idCampaign: string + idCampaign: string, ) => Promise /** * Endpoint in development @@ -28,13 +28,13 @@ export type QueenApi = { * /api/survey-units/data */ putSurveyUnitsData: ( - surveyUnitsData: Omit[] + surveyUnitsData: Omit[], ) => Promise postSurveyUnitInTemp: (surveyUnit: SurveyUnit) => Promise getCampaigns: () => Promise getQuestionnaire: (idQuestionnaire: string) => Promise getRequiredNomenclaturesByCampaign: ( - idCampaign: string + idCampaign: string, ) => Promise getNomenclature: (idNomenclature: string) => Promise postParadata: (paradata: Paradata) => Promise diff --git a/src/core/tools/SurveyModelBreaking.ts b/src/core/tools/SurveyModelBreaking.ts index 8b0ad155..dd3277a5 100644 --- a/src/core/tools/SurveyModelBreaking.ts +++ b/src/core/tools/SurveyModelBreaking.ts @@ -1,6 +1,6 @@ -import { LUNATIC_MODEL_VERSION_BREAKING } from 'core/constants' -import type { Questionnaire } from 'core/model' -import { getTranslation } from 'i18n' +import { LUNATIC_MODEL_VERSION_BREAKING } from '@/core/constants' +import type { Questionnaire } from '@/core/model' +import { getTranslation } from '@/i18n' const { t } = getTranslation('errorMessage') diff --git a/src/core/tools/axiosError.test.ts b/src/core/tools/axiosError.test.ts index e363b8a4..b576684c 100644 --- a/src/core/tools/axiosError.test.ts +++ b/src/core/tools/axiosError.test.ts @@ -1,8 +1,9 @@ -import { describe, it, expect, vi } from 'vitest' -import { handleAxiosError } from './axiosError' import { AxiosError } from 'axios' +import { describe, expect, it, vi } from 'vitest' + +import { handleAxiosError } from './axiosError' -vi.mock('i18n', () => ({ +vi.mock('@/i18n', () => ({ getTranslation: () => ({ t: (keyMessage: string) => keyMessage }), })) @@ -19,7 +20,7 @@ describe('handleAxiosError', () => { const result = handleAxiosError(error) expect(result.message).toBe( - "Une erreur s'est produite lors du traitement de la requête. Veuillez réessayer plus tard." + "Une erreur s'est produite lors du traitement de la requête. Veuillez réessayer plus tard.", ) }) diff --git a/src/core/tools/axiosError.ts b/src/core/tools/axiosError.ts index 2ff490e9..e28f6582 100644 --- a/src/core/tools/axiosError.ts +++ b/src/core/tools/axiosError.ts @@ -1,5 +1,6 @@ import { AxiosError } from 'axios' -import { getTranslation } from 'i18n' + +import { getTranslation } from '@/i18n' const { t } = getTranslation('errorMessage') diff --git a/src/core/tools/externalResources.test.ts b/src/core/tools/externalResources.test.ts index 86a26315..eaf38b20 100644 --- a/src/core/tools/externalResources.test.ts +++ b/src/core/tools/externalResources.test.ts @@ -1,4 +1,14 @@ -import { describe, it, expect, vi, beforeAll, beforeEach } from 'vitest' +import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest' + +import { EXTERNAL_RESOURCES_URL } from '@/core/constants' +import type { + ExternalQuestionnaire, + ExternalQuestionnaires, + ExternalQuestionnairesFiltered, + ExternalQuestionnairesWrapper, + Manifest, +} from '@/core/model' + import { filterTransformedManifest, getExternalQuestionnaireFiltered, @@ -7,14 +17,6 @@ import { getTransformedManifest, } from './externalResources' import { fetchUrl } from './fetchUrl' -import type { - ExternalQuestionnaire, - ExternalQuestionnaires, - ExternalQuestionnairesFiltered, - ExternalQuestionnairesWrapper, - Manifest, -} from 'core/model' -import { EXTERNAL_RESOURCES_URL } from 'core/constants' vi.mock('./fetchUrl', () => { return { @@ -139,7 +141,7 @@ describe('filterTransformedManifest', () => { const result = await filterTransformedManifest( cacheName, - transformedManifest + transformedManifest, ) const expectedResult = [ @@ -164,7 +166,7 @@ describe('filterTransformedManifest', () => { const result = await filterTransformedManifest( cacheName, - transformedManifest + transformedManifest, ) expect(result).toEqual(transformedManifest) @@ -176,7 +178,7 @@ describe('filterTransformedManifest', () => { const result = await filterTransformedManifest( cacheName, - transformedManifest + transformedManifest, ) expect(result).toEqual([]) diff --git a/src/core/tools/externalResources.ts b/src/core/tools/externalResources.ts index 808b726a..5c4ee5d4 100644 --- a/src/core/tools/externalResources.ts +++ b/src/core/tools/externalResources.ts @@ -1,12 +1,13 @@ +import { EXTERNAL_RESOURCES_URL } from '@/core/constants' import type { ExternalQuestionnaire, ExternalQuestionnaires, ExternalQuestionnairesFiltered, ExternalQuestionnairesWrapper, Manifest, -} from 'core/model' +} from '@/core/model' + import { fetchUrl } from './fetchUrl' -import { EXTERNAL_RESOURCES_URL } from 'core/constants' const EXTERNAL_QUESTIONNAIRES_KEYWORD = 'gide' @@ -21,7 +22,7 @@ export async function getExternalQuestionnaires(): Promise { // get the manifest for a questionnaireId const manifest = await fetchUrl({ @@ -30,7 +31,7 @@ export async function getTransformedManifest( // Transform the manifest values into resource URLs, and get an array of these resource URLs const transformedManifest = Object.values(manifest).map( - (resourceUrl) => `${EXTERNAL_RESOURCES_URL}/${resourceUrl}` + (resourceUrl) => `${EXTERNAL_RESOURCES_URL}/${resourceUrl}`, ) return transformedManifest @@ -39,7 +40,7 @@ export async function getTransformedManifest( // Filter resources from manifest that are already cached, to avoid useless requests (overly large files). export async function filterTransformedManifest( cacheName: string, - transformedManifest: string[] + transformedManifest: string[], ): Promise { // Open the specified cache const cacheForManifest = await caches.open(cacheName) @@ -51,12 +52,12 @@ export async function filterTransformedManifest( // Get all urls from the cache const cachedUrls = (await cacheForManifest.keys()).map( - (request) => request.url + (request) => request.url, ) // filter the transformedManifest for keeping only files that are not cached yet const uncachedResources = transformedManifest.filter( - (resourceUrl) => !cachedUrls.includes(resourceUrl) + (resourceUrl) => !cachedUrls.includes(resourceUrl), ) return uncachedResources @@ -64,13 +65,13 @@ export async function filterTransformedManifest( // Cache every external resources (not already cached) for a particular questionnaire export async function getResourcesFromExternalQuestionnaire( - questionnaire: ExternalQuestionnaire + questionnaire: ExternalQuestionnaire, ): Promise { const transformedManifest = await getTransformedManifest(questionnaire.id) const filteredTransformedManifest = await filterTransformedManifest( questionnaire.cacheName, - transformedManifest + transformedManifest, ) const manifestCache = await caches.open(questionnaire.cacheName) @@ -80,13 +81,13 @@ export async function getResourcesFromExternalQuestionnaire( // Separate, from the list of external questionnaires, those that are needed and those that are not needed export function getExternalQuestionnaireFiltered( neededQuestionnaireIds: string[], - externalQuestionnaires: ExternalQuestionnaires + externalQuestionnaires: ExternalQuestionnaires, ): ExternalQuestionnairesFiltered { return externalQuestionnaires.reduce( (result, questionnaire) => { // Check if the current questionnaire's id matches any of the needed IDs const isNeeded = neededQuestionnaireIds.some((neededId) => - neededId.toLowerCase().includes(questionnaire.id.toLowerCase()) + neededId.toLowerCase().includes(questionnaire.id.toLowerCase()), ) // If the external questionnaire is needed @@ -105,16 +106,16 @@ export function getExternalQuestionnaireFiltered( { neededQuestionnaires: [], notNeededQuestionnaires: [], - } as ExternalQuestionnairesFiltered + } as ExternalQuestionnairesFiltered, ) } // Get the list of caches where cacheName includes externalQuestionnairesKeyword, and that are not in needed external questionnaires export async function getOldExternalCacheNames( - neededQuestionnaires: ExternalQuestionnaires + neededQuestionnaires: ExternalQuestionnaires, ): Promise { const neededCaches = neededQuestionnaires.map( - (questionnaire) => questionnaire.cacheName + (questionnaire) => questionnaire.cacheName, ) const oldExternalCacheNames = (await caches.keys()).filter( @@ -122,7 +123,7 @@ export async function getOldExternalCacheNames( cacheName .toLowerCase() .includes(EXTERNAL_QUESTIONNAIRES_KEYWORD.toLowerCase()) && - !neededCaches.includes(cacheName) + !neededCaches.includes(cacheName), ) return oldExternalCacheNames diff --git a/src/core/tools/fetchUrl.test.ts b/src/core/tools/fetchUrl.test.ts index cdfdafac..b0f46e4b 100644 --- a/src/core/tools/fetchUrl.test.ts +++ b/src/core/tools/fetchUrl.test.ts @@ -1,5 +1,6 @@ -import { vi, describe, beforeEach, it, expect } from 'vitest' import axios from 'axios' +import { beforeEach, describe, expect, it, vi } from 'vitest' + import { fetchUrl } from './fetchUrl' vi.mock('axios') diff --git a/src/core/usecases/collectSurvey/eventSender.test.ts b/src/core/usecases/collectSurvey/eventSender.test.ts index 4e28fe5a..13ea2582 100644 --- a/src/core/usecases/collectSurvey/eventSender.test.ts +++ b/src/core/usecases/collectSurvey/eventSender.test.ts @@ -1,9 +1,11 @@ -import { vi, describe, beforeEach, it, expect } from 'vitest' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +import type { EventQuestionnaireState } from '@/core/model/QuestionnaireState' + import { - sendQuestionnaireStateChangedEvent, sendCloseEvent, + sendQuestionnaireStateChangedEvent, } from './eventSender' -import type { EventQuestionnaireState } from 'core/model/QuestionnaireState' describe('Event Dispatchers', () => { beforeEach(() => { @@ -27,7 +29,7 @@ describe('Event Dispatchers', () => { surveyUnit: surveyUnitId, state: state, }, - }) + }), ) }) @@ -46,7 +48,7 @@ describe('Event Dispatchers', () => { command: 'CLOSE_QUEEN', surveyUnit: surveyUnitId, }, - }) + }), ) }) }) diff --git a/src/core/usecases/collectSurvey/eventSender.ts b/src/core/usecases/collectSurvey/eventSender.ts index f96e0788..a67fc020 100644 --- a/src/core/usecases/collectSurvey/eventSender.ts +++ b/src/core/usecases/collectSurvey/eventSender.ts @@ -1,4 +1,4 @@ -import type { EventQuestionnaireState } from 'core/model/QuestionnaireState' +import type { EventQuestionnaireState } from '@/core/model/QuestionnaireState' type UpdateSurveyUnitData = { type: string @@ -22,7 +22,7 @@ const sendEvent = (data: UpdateSurveyUnitData | CloseQueenData) => { export const sendQuestionnaireStateChangedEvent = ( surveyUnitId: string, - state: EventQuestionnaireState + state: EventQuestionnaireState, ) => { const data: UpdateSurveyUnitData = { type: eventType, diff --git a/src/core/usecases/collectSurvey/thunks.ts b/src/core/usecases/collectSurvey/thunks.ts index fdb8e613..54637b55 100644 --- a/src/core/usecases/collectSurvey/thunks.ts +++ b/src/core/usecases/collectSurvey/thunks.ts @@ -1,12 +1,13 @@ -import type { Thunks } from 'core/bootstrap' -import type { SurveyUnit } from 'core/model' -import type { QuestionnaireState } from 'core/model/QuestionnaireState' -import { isSurveyCompatibleWithQueen } from 'core/tools/SurveyModelBreaking' +import type { Thunks } from '@/core/bootstrap' +import type { SurveyUnit } from '@/core/model' +import type { QuestionnaireState } from '@/core/model/QuestionnaireState' +import { isSurveyCompatibleWithQueen } from '@/core/tools/SurveyModelBreaking' +import { getTranslation } from '@/i18n' + import { sendCloseEvent, sendQuestionnaireStateChangedEvent, } from './eventSender' -import { getTranslation } from 'i18n' const { t } = getTranslation('errorMessage') @@ -24,8 +25,8 @@ export const thunks = { if (!surveyUnit || !surveyUnit.questionnaireId) { return Promise.reject( new Error( - `Impossible de récupérer le questionnaire de l'unité d'enquête ${surveyUnitId}` - ) + `Impossible de récupérer le questionnaire de l'unité d'enquête ${surveyUnitId}`, + ), ) } return surveyUnit.questionnaireId @@ -64,7 +65,7 @@ export const thunks = { t('wrongQuestionnaire', { surveyUnitId, questionnaireId, - }) + }), ) } return surveyUnit diff --git a/src/core/usecases/reviewSurvey/thunks.ts b/src/core/usecases/reviewSurvey/thunks.ts index 7c66c055..f1210bdb 100644 --- a/src/core/usecases/reviewSurvey/thunks.ts +++ b/src/core/usecases/reviewSurvey/thunks.ts @@ -1,6 +1,6 @@ -import type { Thunks } from 'core/bootstrap' -import { isSurveyCompatibleWithQueen } from 'core/tools/SurveyModelBreaking' -import { getTranslation } from 'i18n' +import type { Thunks } from '@/core/bootstrap' +import { isSurveyCompatibleWithQueen } from '@/core/tools/SurveyModelBreaking' +import { getTranslation } from '@/i18n' const { t } = getTranslation('errorMessage') @@ -34,7 +34,7 @@ export const thunks = { t('wrongQuestionnaire', { surveyUnitId, questionnaireId, - }) + }), ) } return surveyUnit diff --git a/src/core/usecases/synchronizeData/evt.ts b/src/core/usecases/synchronizeData/evt.ts index 94c670c0..f9ebac59 100644 --- a/src/core/usecases/synchronizeData/evt.ts +++ b/src/core/usecases/synchronizeData/evt.ts @@ -1,5 +1,7 @@ -import type { CreateEvt } from 'core/bootstrap' import { Evt } from 'evt' + +import type { CreateEvt } from '@/core/bootstrap' + import { name } from './state' export const createEvt = (({ evtAction }) => { @@ -18,7 +20,7 @@ export const createEvt = (({ evtAction }) => { evt.post({ action: 'redirect', }) - } + }, ) return evt diff --git a/src/core/usecases/synchronizeData/selectors.ts b/src/core/usecases/synchronizeData/selectors.ts index 81f22f55..9e5d04e0 100644 --- a/src/core/usecases/synchronizeData/selectors.ts +++ b/src/core/usecases/synchronizeData/selectors.ts @@ -1,8 +1,10 @@ -import type { State as RootState } from 'core/bootstrap' import { createSelector } from 'redux-clean-architecture' -import { name } from './state' import { assert } from 'tsafe/assert' +import type { State as RootState } from '@/core/bootstrap' + +import { name } from './state' + const state = (rootState: RootState) => rootState[name] const downloadingState = createSelector(state, (state) => { @@ -82,7 +84,7 @@ const main = createSelector( nomenclatureProgress, surveyProgress, externalResourcesProgress, - uploadProgress + uploadProgress, ) => { switch (state.stateDescription) { case 'not running': @@ -108,7 +110,7 @@ const main = createSelector( } } } - } + }, ) export const selectors = { diff --git a/src/core/usecases/synchronizeData/state.ts b/src/core/usecases/synchronizeData/state.ts index 1ec25885..9556dc6a 100644 --- a/src/core/usecases/synchronizeData/state.ts +++ b/src/core/usecases/synchronizeData/state.ts @@ -1,7 +1,8 @@ import { createUsecaseActions } from 'redux-clean-architecture' -import { id } from 'tsafe/id' import { assert } from 'tsafe/assert' -import { EXTERNAL_RESOURCES_URL } from 'core/constants' +import { id } from 'tsafe/id' + +import { EXTERNAL_RESOURCES_URL } from '@/core/constants' export type State = State.NotRunning | State.Running @@ -43,7 +44,7 @@ export const { reducer, actions } = createUsecaseActions({ initialState: id( id({ stateDescription: 'not running', - }) + }), ), reducers: { runningDownload: () => @@ -62,7 +63,7 @@ export const { reducer, actions } = createUsecaseActions({ // undefined : external synchro is not triggered so we don't want the progress bar totalExternalResources: EXTERNAL_RESOURCES_URL ? Infinity : undefined, externalResourcesCompleted: 0, - }) + }), ), runningUpload: () => id( @@ -71,11 +72,11 @@ export const { reducer, actions } = createUsecaseActions({ type: 'upload', total: Infinity, surveyUnitCompleted: 0, - }) + }), ), updateDownloadTotalSurveyUnit: ( state, - { payload }: { payload: { totalSurveyUnit: number } } + { payload }: { payload: { totalSurveyUnit: number } }, ) => { const { totalSurveyUnit } = payload assert(state.stateDescription === 'running' && state.type === 'download') @@ -96,7 +97,7 @@ export const { reducer, actions } = createUsecaseActions({ }, setDownloadTotalSurvey: ( state, - { payload }: { payload: { totalSurvey: number } } + { payload }: { payload: { totalSurvey: number } }, ) => { const { totalSurvey } = payload assert(state.stateDescription === 'running' && state.type === 'download') @@ -111,7 +112,7 @@ export const { reducer, actions } = createUsecaseActions({ }, setDownloadTotalNomenclature: ( state, - { payload }: { payload: { totalNomenclature: number } } + { payload }: { payload: { totalNomenclature: number } }, ) => { const { totalNomenclature } = payload assert(state.stateDescription === 'running' && state.type === 'download') @@ -126,7 +127,7 @@ export const { reducer, actions } = createUsecaseActions({ }, setDownloadTotalExternalResources: ( state, - { payload }: { payload: { totalExternalResources: number } } + { payload }: { payload: { totalExternalResources: number } }, ) => { const { totalExternalResources } = payload assert(state.stateDescription === 'running' && state.type === 'download') diff --git a/src/core/usecases/synchronizeData/thunks.ts b/src/core/usecases/synchronizeData/thunks.ts index dca9f8f8..337124f5 100644 --- a/src/core/usecases/synchronizeData/thunks.ts +++ b/src/core/usecases/synchronizeData/thunks.ts @@ -1,14 +1,16 @@ -import type { Thunks } from 'core/bootstrap' -import { actions, name } from './state' import { AxiosError } from 'axios' -import type { Questionnaire } from 'core/model' + +import type { Thunks } from '@/core/bootstrap' +import { EXTERNAL_RESOURCES_URL } from '@/core/constants' +import type { Questionnaire } from '@/core/model' import { getExternalQuestionnaireFiltered, getExternalQuestionnaires, getOldExternalCacheNames, getResourcesFromExternalQuestionnaire, -} from 'core/tools/externalResources' -import { EXTERNAL_RESOURCES_URL } from 'core/constants' +} from '@/core/tools/externalResources' + +import { actions, name } from './state' const EXTERNAL_RESOURCES_ROOT_CACHE_NAME = 'cache-root-external' @@ -42,14 +44,14 @@ export const thunks = { const questionnaireIds = [ ...new Set( campaigns.map(({ questionnaireIds }) => questionnaireIds).flat() ?? - [] + [], ), ] dispatch( actions.setDownloadTotalSurvey({ totalSurvey: questionnaireIds.length, - }) + }), ) /* @@ -71,15 +73,15 @@ export const thunks = { }) .catch(() => { console.error( - ` Questionnaire : An error occurred and we were unable to retrieve survey ${questionnaireId}` + ` Questionnaire : An error occurred and we were unable to retrieve survey ${questionnaireId}`, ) return { success: false as const, questionnaireId, questionnaire: undefined, } - }) - ) + }), + ), ) const { questionnaireIdInSuccess, questionnaires } = @@ -94,7 +96,7 @@ export const thunks = { { questionnaireIdInSuccess: [], questionnaires: [] } as { questionnaireIdInSuccess: string[] questionnaires: Questionnaire[] - } + }, ) /* @@ -109,7 +111,7 @@ export const thunks = { dispatch( actions.updateDownloadTotalSurveyUnit({ totalSurveyUnit: arrayOfIds.length, - }) + }), ) return Promise.all( arrayOfIds.map(({ id }) => @@ -118,7 +120,7 @@ export const thunks = { .then((surveyUnit) => { dataStore.updateSurveyUnit(surveyUnit) return questionnaireIdInSuccess.includes( - surveyUnit.questionnaireId + surveyUnit.questionnaireId, ) }) .then((isSurveyWellDownload) => { @@ -135,16 +137,16 @@ export const thunks = { ) { console.error( `An error occurred while fetching surveyUnit : ${id}, synchronization continue`, - error + error, ) return } throw error - }) - ) + }), + ), ) - }) - ) + }), + ), ) /* @@ -155,13 +157,13 @@ export const thunks = { questionnaires .map((q) => q?.suggesters) .flat() - .map((suggester) => suggester?.name) + .map((suggester) => suggester?.name), ) dispatch( actions.setDownloadTotalNomenclature({ totalNomenclature: suggestersNames.length, - }) + }), ) //We don't store the data, but instead, we simply initiate the request for the service worker to cache the response @@ -172,13 +174,13 @@ export const thunks = { .catch((error) => { console.error( `Nomenclature : An error occurred and we were unable to retrieve nomenclature ${nomenclatureId}`, - error + error, ) }) .finally(() => { dispatch(actions.downloadNomenclatureCompleted()) - }) - ) + }), + ), ) /* @@ -197,7 +199,7 @@ export const thunks = { ) { console.error( `An error occurred while fetching external questionnaires list`, - error + error, ) } throw error @@ -206,14 +208,14 @@ export const thunks = { const { neededQuestionnaires, notNeededQuestionnaires } = getExternalQuestionnaireFiltered( questionnaireIdInSuccess, - externalQuestionnaires + externalQuestionnaires, ) // set the total of needed external questionnaires for progress bar dispatch( actions.setDownloadTotalExternalResources({ totalExternalResources: neededQuestionnaires.length, - }) + }), ) // add in cache the missing external resources for needed questionnaires @@ -221,22 +223,22 @@ export const thunks = { neededQuestionnaires.map(async (questionnaire) => { await getResourcesFromExternalQuestionnaire(questionnaire) .then(() => - dispatch(actions.downloadExternalResourceCompleted()) + dispatch(actions.downloadExternalResourceCompleted()), ) .catch((error) => console.error( `An error occurred while fetching external resources of questionnaire ${questionnaire.id}`, - error - ) + error, + ), ) - }) + }), ) // delete the cache of every not needed external questionnaires const prDeleteExternalResources = Promise.all( notNeededQuestionnaires.map((questionnaire) => - caches.delete(questionnaire.cacheName) - ) + caches.delete(questionnaire.cacheName), + ), ) // delete the root-cache of external resources if no external questionnaire is needed @@ -250,7 +252,7 @@ export const thunks = { await getOldExternalCacheNames(neededQuestionnaires) const prDeleteOldExternalCaches = Promise.all( - oldExternalCacheNames.map((cacheName) => caches.delete(cacheName)) + oldExternalCacheNames.map((cacheName) => caches.delete(cacheName)), ) // We await untill the promises for external resources are finished @@ -269,7 +271,7 @@ export const thunks = { } catch (error) { console.error( 'An unknown error occurred while we were fetching data so we stop the synchronization.', - error + error, ) localSyncStorage.addError(true) dispatch(actions.downloadFailed()) @@ -317,13 +319,13 @@ export const thunks = { .postSurveyUnitInTemp(surveyUnit) .then(() => localSyncStorage.addIdToSurveyUnitsInTempZone( - surveyUnit.id - ) + surveyUnit.id, + ), ) .catch((postError: Error) => { console.error( 'Error: Unable to post surveyUnit in tempZone', - postError + postError, ) throw postError }) @@ -337,7 +339,7 @@ export const thunks = { .catch((error) => { console.error('Error: Unable to upload data', error) throw error - }) + }), ) await Promise.all(surveyUnitPromises) } diff --git a/src/core/usecases/userAuthentication.ts b/src/core/usecases/userAuthentication.ts index 1e7e6cce..f62db7ae 100644 --- a/src/core/usecases/userAuthentication.ts +++ b/src/core/usecases/userAuthentication.ts @@ -1,4 +1,4 @@ -import type { Thunks } from 'core/bootstrap' +import type { Thunks } from '@/core/bootstrap' export const name = 'userAuthentication' diff --git a/src/core/usecases/visualizeSurvey/thunks.ts b/src/core/usecases/visualizeSurvey/thunks.ts index a382bafc..4e42bf56 100644 --- a/src/core/usecases/visualizeSurvey/thunks.ts +++ b/src/core/usecases/visualizeSurvey/thunks.ts @@ -1,16 +1,18 @@ -import type { Thunks } from 'core/bootstrap' +import { AxiosError } from 'axios' + +import type { Thunks } from '@/core/bootstrap' import type { Nomenclature, Questionnaire, SurveyUnit, WrappedQuestionnaire, -} from 'core/model' +} from '@/core/model' +import { isSurveyCompatibleWithQueen } from '@/core/tools/SurveyModelBreaking' +import { fetchUrl } from '@/core/tools/fetchUrl' +import { makeSearchParamsObjSchema } from '@/core/tools/makeSearchParamsObjectSchema' +import { getTranslation } from '@/i18n' + import { searchParamsSchema } from './parser/searchParamsSchema' -import { makeSearchParamsObjSchema } from 'core/tools/makeSearchParamsObjectSchema' -import { fetchUrl } from 'core/tools/fetchUrl' -import { isSurveyCompatibleWithQueen } from 'core/tools/SurveyModelBreaking' -import { getTranslation } from 'i18n' -import { AxiosError } from 'axios' const { t } = getTranslation('errorMessage') @@ -25,7 +27,7 @@ export const thunks = { const { requestUrl } = params const url = new URL(requestUrl) const result = makeSearchParamsObjSchema(searchParamsSchema).safeParse( - url.searchParams + url.searchParams, ) if (!result.success) { @@ -62,7 +64,7 @@ export const thunks = { }) const isWrappedQuestionnaire = ( - source: Questionnaire | WrappedQuestionnaire + source: Questionnaire | WrappedQuestionnaire, ): source is WrappedQuestionnaire => { return ( typeof source === 'object' && diff --git a/src/createCore.tsx b/src/createCore.tsx index 8ae1c9fd..6eccc99b 100644 --- a/src/createCore.tsx +++ b/src/createCore.tsx @@ -1,4 +1,4 @@ -import { createCoreProvider } from 'core' +import { createCoreProvider } from '@/core' export const { CoreProvider, prCore } = createCoreProvider({ apiUrl: import.meta.env.VITE_QUEEN_API_URL, diff --git a/src/i18n/resources/en.ts b/src/i18n/resources/en.ts index 34b0e31f..6e87ea97 100644 --- a/src/i18n/resources/en.ts +++ b/src/i18n/resources/en.ts @@ -1,4 +1,5 @@ -import { LUNATIC_MODEL_VERSION_BREAKING } from 'core/constants' +import { LUNATIC_MODEL_VERSION_BREAKING } from '@/core/constants' + import type { Translations } from '../types' export const translations: Translations<'en'> = { diff --git a/src/i18n/resources/fr.ts b/src/i18n/resources/fr.ts index d95314dd..bdf5b582 100644 --- a/src/i18n/resources/fr.ts +++ b/src/i18n/resources/fr.ts @@ -1,4 +1,5 @@ -import { LUNATIC_MODEL_VERSION_BREAKING } from 'core/constants' +import { LUNATIC_MODEL_VERSION_BREAKING } from '@/core/constants' + import type { Translations } from '../types' export const translations: Translations<'fr'> = { diff --git a/src/ui/components/ErrorComponent.tsx b/src/ui/components/ErrorComponent.tsx index 794c4724..cfb31b61 100644 --- a/src/ui/components/ErrorComponent.tsx +++ b/src/ui/components/ErrorComponent.tsx @@ -1,9 +1,9 @@ import Stack from '@mui/material/Stack' import Typography from '@mui/material/Typography' -import { useTranslation } from 'i18n' - import { tss } from 'tss-react/mui' +import { useTranslation } from '@/i18n' + export function ErrorComponent(props: { message: string }) { const { message } = props diff --git a/src/ui/components/orchestrator/Breadcrumb/Breadcrumb.tsx b/src/ui/components/orchestrator/Breadcrumb/Breadcrumb.tsx index 7b1ad6d8..2aa83e06 100644 --- a/src/ui/components/orchestrator/Breadcrumb/Breadcrumb.tsx +++ b/src/ui/components/orchestrator/Breadcrumb/Breadcrumb.tsx @@ -1,8 +1,10 @@ -import Button from '@mui/material/Button' import Breadcrumbs from '@mui/material/Breadcrumbs' +import Button from '@mui/material/Button' import { tss } from 'tss-react/mui' + +import { useTranslation } from '@/i18n' + import type { GoToPage, OverviewItem } from '../lunaticType' -import { useTranslation } from 'i18n' type BreadCrumbProps = { sequence: OverviewItem | undefined @@ -26,7 +28,7 @@ export function BreadCrumb(props: BreadCrumbProps) {