diff --git a/.github/workflows/website-playwright-dev-test.yml b/.github/workflows/website-playwright-dev-test.yml index 0ba158be0..4d705e931 100644 --- a/.github/workflows/website-playwright-dev-test.yml +++ b/.github/workflows/website-playwright-dev-test.yml @@ -49,3 +49,5 @@ jobs: npx playwright screenshot localhost:3000 test.png sleep 5 npx playwright screenshot localhost:3000 test.png + env: + CONFIG_DIR: "tests/config" diff --git a/website/.eslintrc.cjs b/website/.eslintrc.cjs deleted file mode 100644 index c128a47a9..000000000 --- a/website/.eslintrc.cjs +++ /dev/null @@ -1,286 +0,0 @@ -module.exports = { - extends: ['plugin:@typescript-eslint/recommended', 'plugin:astro/recommended'], - env: { - es6: true, - node: true, - }, - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.eslint.json', - sourceType: 'module', - tsConfigRootDir: __dirname, - warnOnUnsupportedTypeScriptVersion: true, - }, - plugins: [ - 'eslint-plugin-import', - 'eslint-plugin-prefer-arrow', - '@typescript-eslint', - 'eslint-plugin-react', - 'react-hooks', - '@tanstack/eslint-plugin-query', - ], - settings: { - react: { - pragma: 'React', // Pragma to use, default to "React" - version: 'detect', // React version. "detect" automatically picks the version you have installed. - }, - }, - ignorePatterns: ['dist', '.eslintrc.cjs', 'tailwind.config.cjs', 'astro.config.mjs', 'colors.cjs'], - overrides: [ - { - // Define the configuration for `.astro` file. - files: ['*.astro'], - // Allows Astro components to be parsed. - parser: 'astro-eslint-parser', - // Parse the script in `.astro` as TypeScript by adding the following configuration. - // It's the setting you need when using TypeScript. - parserOptions: { - parser: '@typescript-eslint/parser', - extraFileExtensions: ['.astro'], - }, - rules: { - '@typescript-eslint/naming-convention': 'off', - 'react/jsx-no-useless-fragment': 'off', - }, - }, - ], - rules: { - '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': [ - 'error', - { - default: 'array', - }, - ], - '@typescript-eslint/consistent-type-assertions': 'off', - '@typescript-eslint/dot-notation': 'error', - '@typescript-eslint/indent': 'off', - '@typescript-eslint/member-delimiter-style': [ - 'off', - { - multiline: { - delimiter: 'none', - requireLast: true, - }, - singleline: { - delimiter: 'semi', - requireLast: false, - }, - }, - ], - '@typescript-eslint/naming-convention': [ - 'error', - { - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'allow', - trailingUnderscore: 'allow', - }, - { - selector: 'variable', - format: ['camelCase', 'UPPER_CASE', 'PascalCase'], - leadingUnderscore: 'allow', - trailingUnderscore: 'allow', - }, - { - selector: 'property', - format: null, - }, - { - selector: 'enumMember', - format: ['camelCase', 'UPPER_CASE', 'PascalCase'], - }, - { - selector: 'import', - format: null, - }, - { - selector: 'typeLike', - format: ['PascalCase'], - }, - ], - '@typescript-eslint/no-empty-function': 'error', - '@typescript-eslint/no-empty-interface': 'error', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }], - '@typescript-eslint/no-for-in-array': 'error', - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-namespace': 'error', - '@typescript-eslint/no-parameter-properties': 'off', - '@typescript-eslint/no-this-alias': 'error', - '@typescript-eslint/no-unnecessary-qualifier': 'error', - '@typescript-eslint/no-unnecessary-type-arguments': 'error', - '@typescript-eslint/no-unnecessary-type-assertion': 'error', - '@typescript-eslint/no-unused-expressions': 'error', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/only-throw-error': 'error', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-function-type': 'error', - '@typescript-eslint/prefer-namespace-keyword': 'error', - '@typescript-eslint/prefer-readonly': 'error', - '@typescript-eslint/promise-function-async': 'off', - '@typescript-eslint/quotes': 'off', - '@typescript-eslint/restrict-plus-operands': 'error', - '@typescript-eslint/no-unnecessary-condition': 'error', - 'no-unused-vars': 'off', //Note: you must disable base rule if @typescript-eslint/no-unused-vars is enabled - '@typescript-eslint/no-unused-vars': [ - 'error', - { - caughtErrors: 'none', - }, - ], - '@typescript-eslint/semi': ['off', null], - '@typescript-eslint/strict-boolean-expressions': [ - 'error', - { - allowNullableObject: true, - allowNullableBoolean: false, - allowNullableString: false, - }, - ], - '@typescript-eslint/triple-slash-reference': [ - 'error', - { - path: 'always', - types: 'prefer-import', - lib: 'always', - }, - ], - '@typescript-eslint/type-annotation-spacing': 'off', - '@typescript-eslint/unified-signatures': 'error', - '@typescript-eslint/no-redeclare': 'error', - 'arrow-parens': ['off', 'always'], - 'brace-style': ['off', 'off'], - 'comma-dangle': 'off', - 'complexity': 'off', - 'constructor-super': 'error', - 'eol-last': 'off', - 'eqeqeq': ['error', 'smart'], - 'guard-for-in': 'error', - 'id-blacklist': [ - 'error', - 'any', - 'Number', - 'number', - 'String', - 'string', - 'Boolean', - 'boolean', - 'Undefined', - 'undefined', - ], - 'id-match': 'error', - 'import/no-cycle': 'error', - 'import/no-deprecated': 'warn', - 'import/no-extraneous-dependencies': 'off', - 'import/no-internal-modules': 'off', - 'import/order': [ - 'error', - { - 'groups': ['builtin', 'external', 'internal'], - 'newlines-between': 'always', - 'alphabetize': { order: 'asc' }, - }, - ], - 'linebreak-style': 'off', - 'max-classes-per-file': 'off', - 'max-len': 'off', - 'new-parens': 'off', - 'newline-per-chained-call': 'off', - 'no-bitwise': 'error', - 'no-caller': 'error', - 'no-cond-assign': 'error', - 'no-console': 'error', - 'no-debugger': 'error', - 'no-duplicate-case': 'error', - 'no-duplicate-imports': 'error', - 'no-empty': 'error', - 'no-eval': 'error', - 'no-extra-bind': 'error', - 'no-extra-semi': 'off', - 'no-fallthrough': 'off', - 'no-invalid-this': 'off', - 'no-irregular-whitespace': 'off', - 'no-multiple-empty-lines': 'off', - 'no-new-func': 'error', - 'no-new-wrappers': 'error', - 'no-redeclare': 'off', - 'no-return-await': 'error', - 'no-sequences': 'error', - 'no-sparse-arrays': 'error', - 'no-template-curly-in-string': 'error', - 'no-trailing-spaces': 'off', - 'no-undef-init': 'error', - 'no-unsafe-finally': 'error', - 'no-unused-labels': 'error', - 'no-var': 'error', - 'no-void': ['error', { allowAsStatement: true }], - 'object-shorthand': 'error', - 'one-var': ['error', 'never'], - 'prefer-const': 'error', - 'quote-props': 'off', - 'radix': 'error', - 'react/jsx-curly-spacing': 'off', - 'react/jsx-equals-spacing': 'off', - 'react/jsx-wrap-multilines': 'off', - 'space-before-function-paren': 'off', - 'space-in-parens': ['off', 'never'], - 'spaced-comment': [ - 'error', - 'always', - { - markers: ['/'], - }, - ], - 'use-isnan': 'error', - 'valid-typeof': 'off', - '@typescript-eslint/explicit-member-accessibility': [ - 'error', - { - overrides: { - constructors: 'no-public', - }, - }, - ], - '@typescript-eslint/member-ordering': 'error', - '@typescript-eslint/consistent-type-imports': [ - 'error', - { - fixStyle: 'inline-type-imports', - }, - ], - 'no-restricted-imports': [ - 'error', - { - patterns: ['.*/**/dist'], - }, - ], - 'react/destructuring-assignment': ['error', 'always'], - 'react/function-component-definition': [ - 'error', - { - namedComponents: 'arrow-function', - unnamedComponents: 'arrow-function', - }, - ], - 'react/no-deprecated': 'error', - 'react/no-children-prop': 'error', - 'react/no-is-mounted': 'error', - 'react/no-unstable-nested-components': 'warn', - 'react/forbid-component-props': 'off', // icons accept a style prop - // Prettier is stubborn, need to accept its rules in case of conflict - // See https://github.com/loculus-project/loculus/pull/283#issuecomment-1733872357 - 'react/self-closing-comp': 'off', - 'react/void-dom-elements-no-children': 'error', - 'react/jsx-boolean-value': ['warn', 'never'], - 'react/jsx-curly-brace-presence': ['warn', 'never'], - 'react/jsx-fragments': ['error', 'syntax'], - 'react/jsx-uses-react': 'error', - 'react/jsx-pascal-case': 'error', - 'react/jsx-no-useless-fragment': 'error', - 'react/no-string-refs': 'error', - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'error', - }, -}; diff --git a/website/eslint.config.js b/website/eslint.config.js new file mode 100644 index 000000000..d8aec72fc --- /dev/null +++ b/website/eslint.config.js @@ -0,0 +1,188 @@ +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import react from 'eslint-plugin-react'; +import parser from '@typescript-eslint/parser'; +import eslintPluginAstro from 'eslint-plugin-astro'; +import astroParser from 'astro-eslint-parser'; +import importPlugin from 'eslint-plugin-import'; +import reactHooks from 'eslint-plugin-react-hooks'; +import pluginQuery from '@tanstack/eslint-plugin-query'; + +const importRules = { + 'import/no-cycle': 'error', + 'import/no-deprecated': 'error', + 'import/no-extraneous-dependencies': 'error', + 'import/no-internal-modules': 'off', + 'import/order': [ + 'error', + { + 'groups': ['builtin', 'external', 'internal'], + 'newlines-between': 'always', + 'alphabetize': { order: 'asc' }, + }, + ], +}; + +const importRulesAstro = { + ...importRules, + 'import/no-deprecated': 'off', +}; + +const enableFromEslint = { + 'no-console': 'error', +}; + +const disableFromTypescriptEsLint = { + '@typescript-eslint/no-confusing-void-expression': 'off', + '@typescript-eslint/consistent-type-definitions': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/consistent-indexed-object-style': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/prefer-reduce-type-parameter': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/triple-slash-reference': 'off', + '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-dynamic-delete': 'off', +}; + +const typescriptEslintConfig = { + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: 'default', + format: ['camelCase'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow', + }, + { + selector: 'function', + format: ['camelCase', 'PascalCase'], + }, + { + selector: 'variable', + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow', + }, + { + selector: 'enumMember', + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + }, + { + selector: 'import', + format: null, + }, + { + selector: 'typeLike', + format: ['PascalCase'], + }, + { + selector: 'property', + format: null, + filter: { + regex: '^[0-9]+$', + match: true, + }, + }, + ], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], +}; + +const restrictTemplateExpressions = { + '@typescript-eslint/restrict-template-expressions': [ + 'error', + { + allowNumber: true, + allow: [{ name: ['unknown', 'Error', 'URLSearchParams', 'URL'], from: 'lib' }], + }, + ], +}; + +const disableFromReact = { + 'react/no-unescaped-entities': 'off', + 'react/display-name': 'off', + 'react/react-in-jsx-scope': 'off', + 'react/jsx-no-target-blank': 'off', +}; + +export default tseslint.config( + { + ignores: ['**/.astro/content.d.ts'], + files: ['**/*.ts', '**/*.tsx'], + extends: [ + eslint.configs.recommended, + ...tseslint.configs.strictTypeChecked, + ...tseslint.configs.stylisticTypeChecked, + ], + languageOptions: { + parser: parser, + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + ecmaFeatures: { + jsx: true, + }, + }, + }, + plugins: { + react, + 'import': importPlugin, + 'react-hooks': reactHooks, + }, + rules: { + ...react.configs.flat.recommended.rules, + ...importRules, + ...typescriptEslintConfig, + ...restrictTemplateExpressions, + ...disableFromTypescriptEsLint, + ...disableFromReact, + ...enableFromEslint, + }, + settings: { + react: { + version: 'detect', + }, + }, + }, + { + files: ['**/*.spec.ts', '**/*.spec.tsx'], + rules: { + '@typescript-eslint/no-unsafe-member-access': 'off', + }, + }, + { + files: ['**/*.astro'], + extends: [ + eslint.configs.recommended, + ...eslintPluginAstro.configs.recommended, + ...tseslint.configs.strict, + ...tseslint.configs.stylistic, + ], + rules: { + ...typescriptEslintConfig, + ...disableFromTypescriptEsLint, + ...enableFromEslint, + ...importRulesAstro, + }, + languageOptions: { + parser: astroParser, + }, + plugins: { + import: importPlugin, + }, + }, + ...pluginQuery.configs['flat/recommended'], +); diff --git a/website/package-lock.json b/website/package-lock.json index 5a031b815..fbff02e74 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -45,6 +45,7 @@ "@astrojs/react": "^4.0.0", "@astrojs/tailwind": "^5.1.3", "@emotion/styled": "^11.14.0", + "@eslint/js": "^9.17.0", "@iconify/json": "^2.2.279", "@playwright/test": "^1.49.0", "@tailwindcss/forms": "^0.5.9", @@ -63,13 +64,13 @@ "@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/parser": "^8.18.0", "@vitejs/plugin-react": "^4.3.4", + "astro-eslint-parser": "^1.1.0", "cross-env": "^7.0.3", "daisyui": "^4.12.14", - "eslint": "^8.57.0", + "eslint": "^9.17.0", "eslint-plugin-astro": "^1.3.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.1.0", "happy-dom": "^15.11.7", @@ -80,7 +81,9 @@ "sass": "^1.82.0", "tailwindcss": "^3.4.16", "typescript": "^5.7.2", + "typescript-eslint": "^8.18.0", "uuid": "^11.0.3", + "vite": "^6.0.3", "vitest": "2.1.8" } }, @@ -321,135 +324,6 @@ "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0-beta" } }, - "node_modules/@astrojs/react/node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/react/node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" - } - }, - "node_modules/@astrojs/react/node_modules/vite": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.3.tgz", - "integrity": "sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.24.0", - "postcss": "^8.4.49", - "rollup": "^4.23.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, "node_modules/@astrojs/tailwind": { "version": "5.1.3", "dev": true, @@ -1348,22 +1222,78 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -1371,7 +1301,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1379,6 +1309,8 @@ }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "license": "MIT", "dependencies": { @@ -1387,14 +1319,13 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1402,6 +1333,8 @@ }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { @@ -1411,23 +1344,37 @@ "node": "*" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", + "node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/js": { - "version": "8.57.0", + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@floating-ui/core": { @@ -1490,37 +1437,42 @@ "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "Apache-2.0", "engines": { - "node": "*" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -1535,10 +1487,19 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@iconify/json": { "version": "2.2.279", @@ -3285,6 +3246,13 @@ "version": "2.0.4", "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "dev": true, @@ -3671,31 +3639,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/mocker": { - "version": "2.1.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "2.1.8", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.12" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, "node_modules/@vitest/pretty-format": { "version": "2.1.8", "dev": true, @@ -3892,6 +3835,8 @@ }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", "dependencies": { @@ -4257,14 +4202,16 @@ } }, "node_modules/astro-eslint-parser": { - "version": "1.0.2", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/astro-eslint-parser/-/astro-eslint-parser-1.1.0.tgz", + "integrity": "sha512-F6NW1RJo5pp2kPnnM97M5Ohw8zAGjv83MpxHqfAochH68n/kiXN57+hYaNUCA7XkScoVNr6yzvly3hsY34TGfQ==", "dev": true, "license": "MIT", "dependencies": { "@astrojs/compiler": "^2.0.0", - "@typescript-eslint/scope-manager": "^7.0.0", - "@typescript-eslint/types": "^7.0.0", - "@typescript-eslint/typescript-estree": "^7.0.0", + "@typescript-eslint/scope-manager": "^7.0.0 || ^8.0.0", + "@typescript-eslint/types": "^7.0.0 || ^8.0.0", + "@typescript-eslint/typescript-estree": "^7.0.0 || ^8.0.0", "astrojs-compiler-sync": "^1.0.0", "debug": "^4.3.4", "entities": "^4.5.0", @@ -4282,69 +4229,10 @@ "url": "https://github.com/sponsors/ota-meshi" } }, - "node_modules/astro-eslint-parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/astro-eslint-parser/node_modules/@typescript-eslint/types": { "version": "7.18.0", "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/astro-eslint-parser/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/astro-eslint-parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/astro-eslint-parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -4353,32 +4241,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/astro-eslint-parser/node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/astro-eslint-parser/node_modules/eslint-scope": { - "version": "8.0.2", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/astro-eslint-parser/node_modules/eslint-visitor-keys": { "version": "4.0.0", "dev": true, @@ -4390,22 +4252,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/astro-eslint-parser/node_modules/espree": { - "version": "10.1.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/astro-eslint-parser/node_modules/semver": { "version": "7.6.3", "dev": true, @@ -4417,22 +4263,6 @@ "node": ">=10" } }, - "node_modules/astro/node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/astro/node_modules/aria-query": { "version": "5.3.2", "license": "Apache-2.0", @@ -4450,116 +4280,6 @@ "node": ">=10" } }, - "node_modules/astro/node_modules/vite": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.3.tgz", - "integrity": "sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==", - "license": "MIT", - "dependencies": { - "esbuild": "^0.24.0", - "postcss": "^8.4.49", - "rollup": "^4.23.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/astro/node_modules/vite/node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" - } - }, "node_modules/astrojs-compiler-sync": { "version": "1.0.0", "dev": true, @@ -5296,7 +5016,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.5", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -5642,17 +5364,6 @@ "version": "1.1.3", "license": "MIT" }, - "node_modules/doctrine": { - "version": "3.0.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-accessibility-api": { "version": "0.5.16", "dev": true, @@ -6360,57 +6071,63 @@ } }, "node_modules/eslint": { - "version": "8.57.0", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@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.17.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@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.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "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", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-compat-utils": { @@ -6654,14 +6371,6 @@ "node": "*" } }, - "node_modules/eslint-plugin-prefer-arrow": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "peerDependencies": { - "eslint": ">=2.0.0" - } - }, "node_modules/eslint-plugin-react": { "version": "7.37.2", "dev": true, @@ -6754,7 +6463,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -6762,7 +6473,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6833,6 +6544,19 @@ "dev": true, "license": "MIT" }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "dev": true, @@ -6844,20 +6568,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -6877,17 +6587,6 @@ "node": "*" } }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -6899,28 +6598,32 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/espree": { - "version": "9.6.1", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -7098,6 +6801,8 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, "license": "MIT" }, @@ -7128,14 +6833,16 @@ "license": "MIT" }, "node_modules/file-entry-cache": { - "version": "6.0.1", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -7186,20 +6893,23 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.1", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true, "license": "ISC" }, @@ -7342,11 +7052,6 @@ "node": ">= 0.6" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/fsevents": { "version": "2.3.3", "license": "MIT", @@ -7465,25 +7170,6 @@ "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==", "license": "ISC" }, - "node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "license": "ISC", @@ -7494,26 +7180,6 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/globals": { "version": "11.12.0", "license": "MIT", @@ -8047,15 +7713,6 @@ "node": ">=8" } }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "license": "ISC" @@ -8368,14 +8025,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "license": "MIT", @@ -8682,6 +8331,8 @@ }, "node_modules/json-buffer": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, "license": "MIT" }, @@ -8691,6 +8342,8 @@ }, "node_modules/json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, "license": "MIT" }, @@ -8796,6 +8449,8 @@ }, "node_modules/keyv": { "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", "dependencies": { @@ -10471,14 +10126,6 @@ "node": ">= 0.8" } }, - "node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/one-time": { "version": "1.0.0", "license": "MIT", @@ -10722,14 +10369,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "license": "MIT", @@ -11764,20 +11403,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rollup": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", @@ -12540,6 +12165,8 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", "engines": { @@ -12710,11 +12337,6 @@ "version": "1.0.0", "license": "MIT" }, - "node_modules/text-table": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, "node_modules/thenify": { "version": "3.3.1", "license": "MIT", @@ -13038,6 +12660,29 @@ "node": ">=10" } }, + "node_modules/typescript-eslint": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.0.tgz", + "integrity": "sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.18.0", + "@typescript-eslint/parser": "8.18.0", + "@typescript-eslint/utils": "8.18.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, "node_modules/ufo": { "version": "1.5.4", "license": "MIT" @@ -13294,6 +12939,8 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -13369,19 +13016,20 @@ } }, "node_modules/vite": { - "version": "5.4.11", - "devOptional": true, + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.3.tgz", + "integrity": "sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==", "license": "MIT", "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" + "esbuild": "^0.24.0", + "postcss": "^8.4.49", + "rollup": "^4.23.0" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -13390,19 +13038,25 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", - "terser": "^5.4.0" + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "jiti": { + "optional": true + }, "less": { "optional": true }, @@ -13423,6 +13077,12 @@ }, "terser": { "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true } } }, @@ -13447,6 +13107,121 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-node/node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" + } + }, "node_modules/vitefu": { "version": "1.0.4", "license": "MIT", @@ -13527,6 +13302,93 @@ } } }, + "node_modules/vitest/node_modules/@vitest/mocker": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.8.tgz", + "integrity": "sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "2.1.8", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.12" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, "node_modules/volar-service-css": { "version": "0.0.61", "dev": true, @@ -14121,11 +13983,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, "node_modules/ws": { "version": "8.18.0", "dev": true, diff --git a/website/package.json b/website/package.json index f2471e751..065c0a42e 100644 --- a/website/package.json +++ b/website/package.json @@ -11,8 +11,8 @@ "build": "astro build", "preview": "astro preview", "astro": "astro", - "check-format": "eslint --cache \"./**/*.{ts,tsx,astro}\" && prettier --ignore-path \"../.gitignore\" --check \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"", - "format": "eslint --cache \"./**/*.{ts,tsx,astro}\" --fix && npm run format-fast", + "check-format": "eslint --cache . && prettier --ignore-path \"../.gitignore\" --check \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"", + "format": "eslint --cache . --fix && npm run format-fast", "format-fast": "prettier --ignore-path \"../.gitignore\" --write \"./**/*.{ts,tsx,json,astro,cjs,mjs,css,scss}\"", "test": "vitest", "test-fast": "vitest --bail=1", @@ -58,6 +58,7 @@ "@astrojs/react": "^4.0.0", "@astrojs/tailwind": "^5.1.3", "@emotion/styled": "^11.14.0", + "@eslint/js": "^9.17.0", "@iconify/json": "^2.2.279", "@playwright/test": "^1.49.0", "@tailwindcss/forms": "^0.5.9", @@ -76,13 +77,13 @@ "@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/parser": "^8.18.0", "@vitejs/plugin-react": "^4.3.4", + "astro-eslint-parser": "^1.1.0", "cross-env": "^7.0.3", "daisyui": "^4.12.14", - "eslint": "^8.57.0", + "eslint": "^9.17.0", "eslint-plugin-astro": "^1.3.1", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.1.0", "happy-dom": "^15.11.7", @@ -93,7 +94,9 @@ "sass": "^1.82.0", "tailwindcss": "^3.4.16", "typescript": "^5.7.2", + "typescript-eslint": "^8.18.0", "uuid": "^11.0.3", + "vite": "^6.0.3", "vitest": "2.1.8" } } diff --git a/website/playwright.config.ts b/website/playwright.config.ts index f5921a753..e303bdb3f 100644 --- a/website/playwright.config.ts +++ b/website/playwright.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/strict-boolean-expressions */ import { defineConfig, devices } from '@playwright/test'; /** diff --git a/website/src/components/ConfirmationDialog.tsx b/website/src/components/ConfirmationDialog.tsx index ff1a7aff1..fab69dad7 100644 --- a/website/src/components/ConfirmationDialog.tsx +++ b/website/src/components/ConfirmationDialog.tsx @@ -5,7 +5,7 @@ type ConfirmationDialogProps = { dialogText: string; confirmButtonText?: string; closeButtonText?: string; - onConfirmation: () => void; + onConfirmation: () => Promise | void; onClose: () => void; }; @@ -40,7 +40,10 @@ export const ConfirmationDialog: FC = ({
-
diff --git a/website/src/components/DataUseTerms/EditDataUseTermsModal.tsx b/website/src/components/DataUseTerms/EditDataUseTermsModal.tsx index bea20f498..7d602c051 100644 --- a/website/src/components/DataUseTerms/EditDataUseTermsModal.tsx +++ b/website/src/components/DataUseTerms/EditDataUseTermsModal.tsx @@ -1,5 +1,5 @@ import { DateTime } from 'luxon'; -import { useEffect, useState } from 'react'; +import { useEffect, useState, type FC } from 'react'; import DataUseTermsSelector from './DataUseTermsSelector'; import { errorToast, successToast } from './EditDataUseTermsToasts'; @@ -31,7 +31,7 @@ type LoadingState = { type ErrorState = { type: 'error'; - error: any; // not too happy about the 'any' here, but I think it's fine + error: unknown; // not too happy about the 'any' here, but I think it's fine }; type ResultType = 'allOpen' | 'mixed' | 'allRestricted'; @@ -47,23 +47,25 @@ type LoadedState = { earliestRestrictedUntil: DateTime | null; }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(#3451) use proper types function getLoadedState(rows: Record[]): LoadedState { const openAccessions: string[] = []; - const restrictedAccessions: Map = new Map(); + const restrictedAccessions = new Map(); let earliestRestrictedUntil: DateTime | null = null; rows.forEach((row) => { switch (row[DATA_USE_TERMS_FIELD] as DataUseTermsOption) { case openDataUseTermsOption: - openAccessions.push(row.accession); + openAccessions.push(row.accession as string); break; - case restrictedDataUseTermsOption: - const date = DateTime.fromFormat(row[DATA_USE_TERMS_RESTRICTED_UNTIL_FIELD], 'yyyy-MM-dd'); + case restrictedDataUseTermsOption: { + const date = DateTime.fromFormat(row[DATA_USE_TERMS_RESTRICTED_UNTIL_FIELD] as string, 'yyyy-MM-dd'); if (earliestRestrictedUntil === null || date < earliestRestrictedUntil) { earliestRestrictedUntil = date; } - restrictedAccessions.set(row.accession, row[DATA_USE_TERMS_RESTRICTED_UNTIL_FIELD]); + restrictedAccessions.set(row.accession as string, row[DATA_USE_TERMS_RESTRICTED_UNTIL_FIELD] as string); break; + } } }); @@ -87,7 +89,7 @@ function getLoadedState(rows: Record[]): LoadedState { type DataState = LoadingState | ErrorState | LoadedState; -export const EditDataUseTermsModal: React.FC = ({ +export const EditDataUseTermsModal: FC = ({ lapisUrl, clientConfig, accessToken, @@ -104,7 +106,6 @@ export const EditDataUseTermsModal: React.FC = ({ ...sequenceFilter.toApiParams(), fields: ['accession', DATA_USE_TERMS_FIELD, DATA_USE_TERMS_RESTRICTED_UNTIL_FIELD], }); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [sequenceFilter]); const [state, setState] = useState({ type: 'loading' }); @@ -121,7 +122,6 @@ export const EditDataUseTermsModal: React.FC = ({ const newState = getLoadedState(detailsHook.data.data); setState(newState); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [detailsHook.data, detailsHook.error, detailsHook.isLoading]); return ( @@ -157,7 +157,7 @@ interface EditControlProps { closeDialog: () => void; } -const EditControl: React.FC = ({ clientConfig, accessToken, state, closeDialog, sequenceFilter }) => { +const EditControl: FC = ({ clientConfig, accessToken, state, closeDialog, sequenceFilter }) => { const [dataUseTerms, setDataUseTerms] = useState(null); let affectedAccessions: string[] = []; @@ -205,7 +205,7 @@ const EditControl: React.FC = ({ clientConfig, accessToken, st /> ); - case 'allRestricted': + case 'allRestricted': { const earliestDateDisplay = state.earliestRestrictedUntil!.toFormat('yyyy-MM-dd'); return (
@@ -237,6 +237,7 @@ const EditControl: React.FC = ({ clientConfig, accessToken, st />
); + } } }; @@ -248,7 +249,7 @@ interface CancelSubmitButtonProps { closeDialog: () => void; } -const CancelSubmitButtons: React.FC = ({ +const CancelSubmitButtons: FC = ({ clientConfig, accessToken, closeDialog, diff --git a/website/src/components/Edit/EditPage.spec.tsx b/website/src/components/Edit/EditPage.spec.tsx index 59e8ae00f..97ae43f26 100644 --- a/website/src/components/Edit/EditPage.spec.tsx +++ b/website/src/components/Edit/EditPage.spec.tsx @@ -51,7 +51,7 @@ describe('EditPage', () => { await userEvent.click(submitButton); }); - test('should show original data and processed data', async () => { + test('should show original data and processed data', () => { renderEditPage(); expect(screen.getByText(/Original Data/i)).toBeInTheDocument(); @@ -67,7 +67,7 @@ describe('EditPage', () => { expect(screen.getByText('aminoAcidInsertion1,aminoAcidInsertion2')).toBeInTheDocument(); }); - test('should show error and warning tooltips', async () => { + test('should show error and warning tooltips', () => { renderEditPage(); expect(document.querySelector('.tooltip[data-tip="errorMessage"]')).toBeTruthy(); diff --git a/website/src/components/Edit/EditPage.tsx b/website/src/components/Edit/EditPage.tsx index 360f0fc5b..991996e78 100644 --- a/website/src/components/Edit/EditPage.tsx +++ b/website/src/components/Edit/EditPage.tsx @@ -98,7 +98,7 @@ const InnerEditPage: FC = ({ (message) => toast.error(message, { position: 'top-center', autoClose: false }), ); - const submitEditedDataForAccessionVersion = async () => { + const submitEditedDataForAccessionVersion = () => { if (isCreatingRevision) { submitRevision({ metadataFile: createMetadataTsv(editedMetadata, dataToEdit.submissionId, dataToEdit.accession), diff --git a/website/src/components/Group/GroupForm.tsx b/website/src/components/Group/GroupForm.tsx index 8b5f7d903..6b4db3c3c 100644 --- a/website/src/components/Group/GroupForm.tsx +++ b/website/src/components/Group/GroupForm.tsx @@ -82,7 +82,7 @@ export const GroupForm: FC = ({ title, buttonText, defaultGroupD setErrorMessage(undefined)} /> )} -
+ void internalOnSubmit(event)}>

The information you enter on this form will be publicly available on your group page. diff --git a/website/src/components/Navigation/DocsMenu.tsx b/website/src/components/Navigation/DocsMenu.tsx index b6c875855..c21f87cc2 100644 --- a/website/src/components/Navigation/DocsMenu.tsx +++ b/website/src/components/Navigation/DocsMenu.tsx @@ -1,11 +1,11 @@ import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/react'; import type { MDXInstance } from 'astro'; -import React from 'react'; +import { type FC } from 'react'; import XIcon from '~icons/material-symbols/close'; import MenuIcon from '~icons/material-symbols/menu'; -type Page = MDXInstance>; +type Page = MDXInstance>; // eslint-disable-line @typescript-eslint/no-explicit-any -- TODO(#3451) use a proper type interface DocsMenuProps { docsPages: Page[]; @@ -40,9 +40,11 @@ const groupPagesByDirectory = (pages: Page[]): GroupedPages => { // Sort pages within each directory Object.values(groupedPages).forEach((pages) => { pages.sort((a, b) => { - const orderA = a.frontmatter.order ?? Infinity; - const orderB = b.frontmatter.order ?? Infinity; - return orderA !== orderB ? orderA - orderB : a.frontmatter.title.localeCompare(b.frontmatter.title); + const orderA = (a.frontmatter.order ?? Infinity) as number; + const orderB = (b.frontmatter.order ?? Infinity) as number; + return orderA !== orderB + ? orderA - orderB + : (a.frontmatter.title as string).localeCompare(b.frontmatter.title as string); }); }); @@ -56,7 +58,7 @@ interface MenuItemProps { currentPageUrl: string; } -const MenuItem: React.FC = ({ page, currentPageUrl }) => ( +const MenuItem: FC = ({ page, currentPageUrl }) => (

  • = ({ page, currentPageUrl }) => ( page.url === currentPageUrl ? 'font-bold' : '' }`} > - {page.frontmatter.menuTitle ?? page.frontmatter.title} + {(page.frontmatter.menuTitle ?? page.frontmatter.title) as string}
  • ); @@ -76,7 +78,7 @@ interface MenuSectionProps { currentPageUrl: string; } -const MenuSection: React.FC = ({ dir, pages, indexPage, currentPageUrl }) => ( +const MenuSection: FC = ({ dir, pages, indexPage, currentPageUrl }) => (
  • {indexPage ? ( @@ -86,7 +88,7 @@ const MenuSection: React.FC = ({ dir, pages, indexPage, curren indexPage.url === currentPageUrl ? 'font-bold' : '' }`} > - {indexPage.frontmatter.title} + {indexPage.frontmatter.title as string} ) : ( toTitleCase(dir.replaceAll('-', ' ')) @@ -100,13 +102,13 @@ const MenuSection: React.FC = ({ dir, pages, indexPage, curren
  • ); -const DocsMenu: React.FC = ({ docsPages, currentPageUrl, title }) => { +const DocsMenu: FC = ({ docsPages, currentPageUrl, title }) => { const { groupedPages, indexPages } = groupPagesByDirectory(docsPages); // Sort directories based on index page order const sortedDirectories = Object.keys(groupedPages).sort((a, b) => { - const orderA = (a in indexPages ? indexPages[a].frontmatter.order : undefined) ?? Infinity; - const orderB = (b in indexPages ? indexPages[b].frontmatter.order : undefined) ?? Infinity; + const orderA = ((a in indexPages ? indexPages[a].frontmatter.order : undefined) ?? Infinity) as number; + const orderB = ((b in indexPages ? indexPages[b].frontmatter.order : undefined) ?? Infinity) as number; return orderA - orderB; }); diff --git a/website/src/components/Navigation/SandwichMenu.tsx b/website/src/components/Navigation/SandwichMenu.tsx index c7101c4fa..72d19aeb5 100644 --- a/website/src/components/Navigation/SandwichMenu.tsx +++ b/website/src/components/Navigation/SandwichMenu.tsx @@ -48,11 +48,7 @@ export const SandwichMenu: FC = ({ topNavigationItems, gitHub
    diff --git a/website/src/components/ReviewPage/ReviewCard.tsx b/website/src/components/ReviewPage/ReviewCard.tsx index b20eb4793..de28265f2 100644 --- a/website/src/components/ReviewPage/ReviewCard.tsx +++ b/website/src/components/ReviewPage/ReviewCard.tsx @@ -370,7 +370,7 @@ const KeyValueComponent: FC = ({ return (
    - {keyName} + {keyName} {value} diff --git a/website/src/components/SearchPage/CustomizeModal.tsx b/website/src/components/SearchPage/CustomizeModal.tsx index fad67075c..9b658923d 100644 --- a/website/src/components/SearchPage/CustomizeModal.tsx +++ b/website/src/components/SearchPage/CustomizeModal.tsx @@ -1,4 +1,5 @@ import { Dialog, DialogPanel, DialogTitle, Transition } from '@headlessui/react'; +import type { ChangeEvent, FC } from 'react'; const titleCaseWords = (str: string) => { return str @@ -10,11 +11,11 @@ const titleCaseWords = (str: string) => { interface CheckboxFieldProps { label: string; checked: boolean; - onChange?: (event: React.ChangeEvent) => void; + onChange?: (event: ChangeEvent) => void; disabled?: boolean; } -const CheckboxField: React.FC = ({ label, checked, onChange, disabled }) => ( +const CheckboxField: FC = ({ label, checked, onChange, disabled }) => (