From 7c6a26eea00951463326fb386db9f0e222e03a0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 04:01:44 +0000 Subject: [PATCH 1/9] Bump rollup from 4.20.0 to 4.22.4 Bumps [rollup](https://github.com/rollup/rollup) from 4.20.0 to 4.22.4. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.20.0...v4.22.4) --- updated-dependencies: - dependency-name: rollup dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 151 ++++++++++++++++++++-------------------------- 1 file changed, 67 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6b5748d3..25d65d39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2465,224 +2465,208 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", - "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", - "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", - "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", - "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", - "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", - "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", - "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", - "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", - "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", "cpu": [ "ppc64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", - "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", "cpu": [ "riscv64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", - "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", "cpu": [ "s390x" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", - "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", - "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", - "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", - "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", "cpu": [ "ia32" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", - "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" @@ -9487,11 +9471,10 @@ } }, "node_modules/rollup": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", - "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "1.0.5" }, @@ -9503,22 +9486,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.20.0", - "@rollup/rollup-android-arm64": "4.20.0", - "@rollup/rollup-darwin-arm64": "4.20.0", - "@rollup/rollup-darwin-x64": "4.20.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", - "@rollup/rollup-linux-arm-musleabihf": "4.20.0", - "@rollup/rollup-linux-arm64-gnu": "4.20.0", - "@rollup/rollup-linux-arm64-musl": "4.20.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", - "@rollup/rollup-linux-riscv64-gnu": "4.20.0", - "@rollup/rollup-linux-s390x-gnu": "4.20.0", - "@rollup/rollup-linux-x64-gnu": "4.20.0", - "@rollup/rollup-linux-x64-musl": "4.20.0", - "@rollup/rollup-win32-arm64-msvc": "4.20.0", - "@rollup/rollup-win32-ia32-msvc": "4.20.0", - "@rollup/rollup-win32-x64-msvc": "4.20.0", + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", "fsevents": "~2.3.2" } }, From 333748da1a92c8bf513e19fcbc8138a9a357963a Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Thu, 26 Sep 2024 13:14:49 +1000 Subject: [PATCH 2/9] Fix eslint configuration and version conflicts --- eslint.config.mjs | 491 +++---------------------------------------- package-lock.json | 522 +++++++++++++++++++++++++++++----------------- package.json | 14 +- 3 files changed, 364 insertions(+), 663 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 060ac850..b801612f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,466 +1,35 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import stylisticJs from "@stylistic/eslint-plugin-js"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import parser from "svelte-eslint-parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ +// @ts-check + +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import eslintPluginSvelte from 'eslint-plugin-svelte'; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...tseslint.configs.strict, + ...tseslint.configs.stylistic, + ...eslintPluginSvelte.configs['flat/recommended'], + { ignores: [ - "**/.DS_Store", - "**/node_modules", - "build", - ".svelte-kit", - "package", - "**/.env", - "**/.env.*", - "!**/.env.example", - "**/pnpm-lock.yaml", - "**/package-lock.json", - "**/yarn.lock", - "**/svelte.config.js", - "**/vitest.config.ts", - "eslint.config.mjs", + "**/.DS_Store", + "**/node_modules", + "build", + ".svelte-kit", + "package", + "**/.env", + "**/.env.*", + "!**/.env.example", + "**/pnpm-lock.yaml", + "**/package-lock.json", + "**/yarn.lock", + "**/svelte.config.js", + "**/vitest.config.ts", + "eslint.config.mjs", ], -}, ...compat.extends( - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:svelte/recommended", -), { - plugins: { - "@typescript-eslint": typescriptEslint, - "@stylistic/js": stylisticJs, - }, - - languageOptions: { - globals: { - ...globals.node, - ...globals.jest, - ...globals.browser, - document: "readonly", - navigator: "readonly", - window: "readonly", - }, - - parser: tsParser, - ecmaVersion: 2022, - sourceType: "module", - - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - - project: "./tsconfig.json", - extraFileExtensions: [".svelte"], - }, - }, - rules: { - "@typescript-eslint/no-floating-promises": "error", - "@stylistic/js/operator-linebreak": ["error", "before"], - - "no-void": ["error", { - allowAsStatement: true, - }], - - "@typescript-eslint/no-var-requires": 0, - "@typescript-eslint/no-unused-vars": 0, - "@typescript-eslint/no-explicit-any": 0, - "no-var": "warn", - "object-shorthand": 0, - - "accessor-pairs": ["error", { - setWithoutGet: true, - enforceForClassMembers: true, - }], - - "array-bracket-spacing": ["error", "never"], - - "array-callback-return": ["error", { - allowImplicit: false, - checkForEach: false, - }], - - "arrow-spacing": ["error", { - before: true, - after: true, - }], - - "block-spacing": ["error", "always"], - - "brace-style": ["error", "1tbs", { - allowSingleLine: true, - }], - - camelcase: ["error", { - allow: ["^UNSAFE_"], - properties: "never", - ignoreGlobals: true, - ignoreDestructuring: true, - }], - - "comma-dangle": ["error", { - arrays: "only-multiline", - objects: "only-multiline", - imports: "only-multiline", - exports: "only-multiline", - functions: "only-multiline", - }], - - "comma-spacing": ["error", { - before: false, - after: true, - }], - - "comma-style": ["error", "last"], - - "computed-property-spacing": ["error", "never", { - enforceForClassMembers: true, - }], - - "constructor-super": "error", - curly: ["error", "multi-line"], - "default-case-last": "error", - "dot-location": ["error", "property"], - - "dot-notation": ["error", { - allowKeywords: true, - }], - - "eol-last": "error", - - eqeqeq: ["error", "always", { - null: "ignore", - }], - - "func-call-spacing": ["error", "never"], - - "generator-star-spacing": ["error", { - before: true, - after: true, - }], - - indent: ["error", 2, { - SwitchCase: 1, - VariableDeclarator: 1, - outerIIFEBody: 1, - MemberExpression: 1, - - FunctionDeclaration: { - parameters: 1, - body: 1, - }, - - FunctionExpression: { - parameters: 1, - body: 1, - }, - - CallExpression: { - arguments: 1, - }, - - ArrayExpression: 1, - ObjectExpression: 1, - ImportDeclaration: 1, - flatTernaryExpressions: false, - ignoreComments: false, - - ignoredNodes: [ - "TemplateLiteral *", - "JSXElement", - "JSXElement > *", - "JSXAttribute", - "JSXIdentifier", - "JSXNamespacedName", - "JSXMemberExpression", - "JSXSpreadAttribute", - "JSXExpressionContainer", - "JSXOpeningElement", - "JSXClosingElement", - "JSXFragment", - "JSXOpeningFragment", - "JSXClosingFragment", - "JSXText", - "JSXEmptyExpression", - "JSXSpreadChild", - ], - - offsetTernaryExpressions: true, - }], - - "key-spacing": ["error", { - beforeColon: false, - afterColon: true, - }], - - "keyword-spacing": ["error", { - before: true, - after: true, - }], - - "lines-between-class-members": ["error", "always", { - exceptAfterSingleLine: true, - }], - - "multiline-ternary": ["error", "always-multiline"], - - "new-cap": ["error", { - newIsCap: true, - capIsNew: false, - properties: true, - }], - - "new-parens": "error", - "no-array-constructor": "error", - "no-async-promise-executor": "error", - "no-caller": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-const-assign": "error", - - "no-constant-condition": ["error", { - checkLoops: false, - }], - - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-args": "error", - "no-dupe-class-members": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-useless-backreference": "error", - - "no-empty": ["error", { - allowEmptyCatch: true, - }], - - "no-empty-character-class": "error", - "no-empty-pattern": "error", - "no-eval": "error", - "no-ex-assign": "error", - "no-extend-native": "error", - "no-extra-bind": "error", - "no-extra-boolean-cast": "error", - "no-extra-parens": ["error", "functions"], - "no-fallthrough": "error", - "no-floating-decimal": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-implied-eval": "error", - "no-import-assign": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-iterator": "error", - - "no-labels": ["error", { - allowLoop: false, - allowSwitch: false, - }], - - "no-lone-blocks": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-prototype-builtins": "error", - "no-useless-catch": "error", - - "no-mixed-operators": ["error", { - groups: [ - ["==", "!=", "===", "!==", ">", ">=", "<", "<="], - ["&&", "||"], - ["in", "instanceof"], - ], - - allowSamePrecedence: true, - }], - - "no-mixed-spaces-and-tabs": "error", - "no-multi-spaces": "error", - "no-multi-str": "error", - - "no-multiple-empty-lines": ["error", { - max: 1, - maxEOF: 0, - }], - - "no-new": "error", - "no-new-func": "error", - "no-new-object": "error", - "no-new-symbol": "error", - "no-new-wrappers": "error", - "no-obj-calls": "error", - "no-octal": "error", - "no-octal-escape": "error", - "no-proto": "error", - - "no-redeclare": ["error", { - builtinGlobals: false, - }], - - "no-regex-spaces": "error", - "no-return-assign": ["error", "except-parens"], - - "no-self-assign": ["error", { - props: true, - }], - - "no-self-compare": "error", - "no-sequences": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-tabs": "error", - "no-template-curly-in-string": "error", - "no-this-before-super": "error", - "no-throw-literal": "error", - "no-trailing-spaces": "error", - "no-undef": "error", - "no-undef-init": "error", - "no-unexpected-multiline": "error", - "no-unmodified-loop-condition": "error", - - "no-unneeded-ternary": ["error", { - defaultAssignment: false, - }], - - "no-unreachable": "error", - "no-unreachable-loop": "error", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - - "no-unused-expressions": ["error", { - allowShortCircuit: true, - allowTernary: true, - allowTaggedTemplates: true, - }], - - "no-use-before-define": ["error", { - functions: false, - classes: false, - variables: false, - }], - - "no-useless-call": "error", - "no-useless-computed-key": "error", - "no-useless-constructor": "error", - "no-useless-escape": "error", - "no-useless-rename": "error", - "no-useless-return": "error", - "no-whitespace-before-property": "error", - "no-with": "error", - - "object-curly-newline": ["error", { - multiline: true, - consistent: true, - }], - - "object-curly-spacing": ["error", "always"], - - "object-property-newline": ["error", { - allowMultiplePropertiesPerLine: true, - }], - - "one-var": ["error", { - initialized: "never", - }], - - "padded-blocks": ["error", { - blocks: "never", - switches: "never", - classes: "never", - }], - - "prefer-const": ["error", { - destructuring: "all", - }], - - "prefer-promise-reject-errors": "error", - - "prefer-regex-literals": ["error", { - disallowRedundantWrapping: true, - }], - - "quote-props": ["error", "as-needed"], - - quotes: ["error", "single", { - avoidEscape: true, - allowTemplateLiterals: false, - }], - - "rest-spread-spacing": ["error", "never"], - semi: [2, "always"], - - "semi-spacing": ["error", { - before: false, - after: true, - }], - - "space-before-blocks": ["error", "always"], - "space-before-function-paren": ["off"], - "space-in-parens": ["error", "never"], - "space-infix-ops": "error", - - "space-unary-ops": ["error", { - words: true, - nonwords: false, - }], - - "spaced-comment": ["error", "always", { - line: { - markers: ["*package", "!", "/", ",", "="], - }, - - block: { - balanced: true, - markers: ["*package", "!", ",", ":", "::", "flow-include"], - exceptions: ["*"], - }, - }], - - "symbol-description": "error", - "template-curly-spacing": ["error", "never"], - "template-tag-spacing": ["error", "never"], - "unicode-bom": ["error", "never"], - - "use-isnan": ["error", { - enforceForSwitchCase: true, - enforceForIndexOf: true, - }], - - "valid-typeof": ["error", { - requireStringLiterals: true, - }], - - "wrap-iife": ["error", "any", { - functionPrototypeMethods: true, - }], - - "yield-star-spacing": ["error", "both"], - yoda: ["error", "never"], + "@typescript-eslint/no-explicit-any": "off", }, -}, { - files: ["**/*.svelte"], + }, +); - languageOptions: { - parser: parser, - ecmaVersion: 5, - sourceType: "script", - parserOptions: { - parser: "@typescript-eslint/parser", - }, - }, -}]; diff --git a/package-lock.json b/package-lock.json index 2363bd3e..38b89272 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,9 +26,7 @@ "validator": "^13.12.0" }, "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.11.0", - "@stylistic/eslint-plugin-js": "^2.1.0", + "@eslint/js": "^9.11.1", "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-node": "^5.0.1", "@sveltejs/kit": "^2.0.0", @@ -36,20 +34,19 @@ "@testing-library/svelte": "^5.1.0", "@types/color": "^3.0.6", "@types/debug": "^4.1.12", - "@types/eslint": "^8.56.0", + "@types/eslint": "^9.6.1", + "@types/eslint__js": "^8.42.3", "@types/jsonwebtoken": "^9.0.6", "@types/mime-types": "^2.1.4", "@types/node": "^20.12.12", "@types/semver": "^7.5.8", "@types/spinnies": "^0.5.3", "@types/validator": "^13.12.0", - "@typescript-eslint/eslint-plugin": "^7.0.0", - "@typescript-eslint/parser": "^7.0.0", "asciinema-player": "github:MaddyGuthridge/asciinema-player", "chalk": "^5.3.0", "cross-fetch": "^4.0.0", - "eslint": "^9.11.0", - "eslint-plugin-svelte": "^2.35.1", + "eslint": "^9.11.1", + "eslint-plugin-svelte": "^2.44.0", "globals": "^15.9.0", "jest-extended": "^4.0.2", "simple-git": "^3.25.0", @@ -58,7 +55,8 @@ "svelte-jester": "^3.0.0", "sync-request-curl": "^3.0.0", "tslib": "^2.4.1", - "typescript": "^5.0.0", + "typescript": "^5.6.2", + "typescript-eslint": "^8.7.0", "vite": "^5.4.6", "vitest": "^2.0.5" } @@ -1219,6 +1217,16 @@ "node": "*" } }, + "node_modules/@eslint/core": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", + "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", @@ -1281,9 +1289,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.11.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.0.tgz", - "integrity": "sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ==", + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", + "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", "dev": true, "license": "MIT", "engines": { @@ -2730,36 +2738,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@stylistic/eslint-plugin-js": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.6.2.tgz", - "integrity": "sha512-wCr/kVctAPayMU3pcOI1MKR7MoKIh6VKZU89lPklAqtJoxT+Em6RueiiARbpznUYG5eg3LymiU+aMD+aIZXdqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "^9.6.0", - "acorn": "^8.12.1", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "peerDependencies": { - "eslint": ">=8.40.0" - } - }, - "node_modules/@stylistic/eslint-plugin-js/node_modules/@types/eslint": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.0.tgz", - "integrity": "sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, "node_modules/@sveltejs/adapter-auto": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.2.4.tgz", @@ -3043,9 +3021,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.11", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz", - "integrity": "sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "dev": true, "license": "MIT", "dependencies": { @@ -3053,6 +3031,16 @@ "@types/json-schema": "*" } }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -3204,170 +3192,178 @@ "license": "MIT", "peer": true }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", + "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", + "@typescript-eslint/typescript-estree": "8.7.0", + "@typescript-eslint/utils": "8.7.0", + "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", + "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", "dev": true, "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", + "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "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" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", + "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/types": "8.7.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependencies": { - "eslint": "^8.56.0" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "node_modules/@typescript-eslint/utils": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", + "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.7.0", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/typescript-estree": "8.7.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", + "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", + "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", + "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "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" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -3379,25 +3375,25 @@ } } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", + "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/types": "8.7.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", @@ -3687,16 +3683,6 @@ "dequal": "^2.0.3" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/asciinema-player": { "version": "3.7.2-rc.3", "resolved": "git+ssh://git@github.com/MaddyGuthridge/asciinema-player.git#a6504ee6e380c7fc639c4fb7c6a104246e5d054b", @@ -4700,19 +4686,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/dom-accessibility-api": { "version": "0.5.16", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", @@ -4902,21 +4875,24 @@ } }, "node_modules/eslint": { - "version": "9.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.0.tgz", - "integrity": "sha512-yVS6XODx+tMFMDFcG4+Hlh+qG7RM6cCJXtQhCKLSsr3XkLvWggHjCqjfh0XsPPnt1c56oaT6PMgW9XWQQjdHXA==", + "version": "9.11.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", + "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.11.0", "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.6.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.11.0", + "@eslint/js": "9.11.1", "@eslint/plugin-kit": "^0.2.0", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -4978,9 +4954,9 @@ } }, "node_modules/eslint-plugin-svelte": { - "version": "2.43.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.43.0.tgz", - "integrity": "sha512-REkxQWvg2pp7QVLxQNa+dJ97xUqRe7Y2JJbSWkHSuszu0VcblZtXkPBPckkivk99y5CdLw4slqfPylL2d/X4jQ==", + "version": "2.44.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.44.0.tgz", + "integrity": "sha512-wav4MOs02vBb1WjvTCYItwJCxMkuk2Z4p+K/eyjL0N/z7ahXLP+0LtQQjiKc2ezuif7GnZLbD1F3o1VHzSvdVg==", "dev": true, "license": "MIT", "dependencies": { @@ -4994,7 +4970,7 @@ "postcss-safe-parser": "^6.0.0", "postcss-selector-parser": "^6.1.0", "semver": "^7.6.2", - "svelte-eslint-parser": "^0.41.0" + "svelte-eslint-parser": "^0.41.1" }, "engines": { "node": "^14.17.0 || >=16.0.0" @@ -5042,6 +5018,13 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5636,27 +5619,6 @@ "dev": true, "license": "MIT" }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", @@ -8714,16 +8676,6 @@ "dev": true, "license": "ISC" }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", @@ -9740,6 +9692,7 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -10265,9 +10218,9 @@ } }, "node_modules/svelte-eslint-parser": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.41.0.tgz", - "integrity": "sha512-L6f4hOL+AbgfBIB52Z310pg1d2QjRqm7wy3kI1W6hhdhX5bvu7+f0R6w4ykp5HoDdzq+vGhIJmsisaiJDGmVfA==", + "version": "0.41.1", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.41.1.tgz", + "integrity": "sha512-08ndI6zTghzI8SuJAFpvMbA/haPSGn3xz19pjre19yYMw8Nw/wQJ2PrZBI/L8ijGTgtkWCQQiLLy+Z1tfaCwNA==", "dev": true, "license": "MIT", "dependencies": { @@ -10750,9 +10703,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10763,6 +10716,185 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.7.0.tgz", + "integrity": "sha512-nEHbEYJyHwsuf7c3V3RS7Saq+1+la3i0ieR3qP0yjqWSzVmh8Drp47uOl9LjbPANac4S7EFSqvcYIKXUUwIfIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.7.0", + "@typescript-eslint/parser": "8.7.0", + "@typescript-eslint/utils": "8.7.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", + "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.7.0", + "@typescript-eslint/type-utils": "8.7.0", + "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", + "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "8.7.0", + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/typescript-estree": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", + "debug": "^4.3.4" + }, + "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" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", + "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", + "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", + "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "8.7.0", + "@typescript-eslint/visitor-keys": "8.7.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "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.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", + "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.7.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "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/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/package.json b/package.json index 8eb83689..5ed59106 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "validator": "^13.12.0" }, "devDependencies": { - "@stylistic/eslint-plugin-js": "^2.1.0", + "@eslint/js": "^9.11.1", "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-node": "^5.0.1", "@sveltejs/kit": "^2.0.0", @@ -41,20 +41,19 @@ "@testing-library/svelte": "^5.1.0", "@types/color": "^3.0.6", "@types/debug": "^4.1.12", - "@types/eslint": "^8.56.0", + "@types/eslint": "^9.6.1", + "@types/eslint__js": "^8.42.3", "@types/jsonwebtoken": "^9.0.6", "@types/mime-types": "^2.1.4", "@types/node": "^20.12.12", "@types/semver": "^7.5.8", "@types/spinnies": "^0.5.3", "@types/validator": "^13.12.0", - "@typescript-eslint/eslint-plugin": "^7.0.0", - "@typescript-eslint/parser": "^7.0.0", "asciinema-player": "github:MaddyGuthridge/asciinema-player", "chalk": "^5.3.0", "cross-fetch": "^4.0.0", - "eslint": "^9.11.0", - "eslint-plugin-svelte": "^2.35.1", + "eslint": "^9.11.1", + "eslint-plugin-svelte": "^2.44.0", "globals": "^15.9.0", "jest-extended": "^4.0.2", "simple-git": "^3.25.0", @@ -63,7 +62,8 @@ "svelte-jester": "^3.0.0", "sync-request-curl": "^3.0.0", "tslib": "^2.4.1", - "typescript": "^5.0.0", + "typescript": "^5.6.2", + "typescript-eslint": "^8.7.0", "vite": "^5.4.6", "vitest": "^2.0.5" } From 73a365efdc57eff0f75336a62b4ee9f17bcfbf1d Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Thu, 26 Sep 2024 13:48:18 +1000 Subject: [PATCH 3/9] Partially fix eslint --- src/lib/OrderedRecord.ts | 2 +- src/lib/packageInfo.ts | 4 ++-- src/lib/repoInfo.ts | 4 ++-- src/lib/server/auth.ts | 2 +- src/lib/server/data/group.ts | 2 +- src/lib/server/data/index.ts | 2 +- src/lib/server/data/item.ts | 4 ++-- src/lib/server/data/migrations/v0.1.0.ts | 16 ++++++++-------- src/lib/server/git.ts | 4 ++-- tests/backend/readme.test.ts | 2 +- tests/setup/globalSetup.ts | 6 ++---- tests/setup/jestExtended.d.ts | 6 +++--- 12 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/lib/OrderedRecord.ts b/src/lib/OrderedRecord.ts index 8572f01f..62cc6d6c 100644 --- a/src/lib/OrderedRecord.ts +++ b/src/lib/OrderedRecord.ts @@ -2,7 +2,7 @@ export type RecordItems = [K, V][]; /** Ordered record, basically a record + ordering */ -export type OrderedRecord = { +export interface OrderedRecord { __record: Record __order: K[] get: (key: K) => V diff --git a/src/lib/packageInfo.ts b/src/lib/packageInfo.ts index dd529d4f..05a3fe3f 100644 --- a/src/lib/packageInfo.ts +++ b/src/lib/packageInfo.ts @@ -1,7 +1,7 @@ import type { ProvidedPackageInfo, PackageProvider, PackageInfo } from '$lib/server/data/itemPackage'; /** Info required to register a package provider */ -type ProviderInfo = { +interface ProviderInfo { /** Name of provider (eg Pypi) */ name: string /** Icon id to use (from LineAwesome) */ @@ -10,7 +10,7 @@ type ProviderInfo = { makeUrl: (id: string) => string /** Return a command to install the package with the given ID */ makeInstallCmd: (id: string) => string -}; +} export const packageProviders: Record = { // Pypi (Python) diff --git a/src/lib/repoInfo.ts b/src/lib/repoInfo.ts index 964bfe2f..4c207d16 100644 --- a/src/lib/repoInfo.ts +++ b/src/lib/repoInfo.ts @@ -1,7 +1,7 @@ import type { ProvidedRepoInfo, RepoProvider, RepoInfo } from '$lib/server/data/itemRepo'; /** Info required to register a repo provider */ -type RepoProviderInfo = { +interface RepoProviderInfo { /** Name of provider (eg GitHub) */ name: string /** Icon id to use (from LineAwesome) */ @@ -16,7 +16,7 @@ type RepoProviderInfo = { * Function is undefined if fetching star counts is unavailable. */ getStarCount: ((repo: string) => Promise) | undefined -}; +} export const repoProviders: Record = { // GitHub diff --git a/src/lib/server/auth.ts b/src/lib/server/auth.ts index f096db88..13856831 100644 --- a/src/lib/server/auth.ts +++ b/src/lib/server/auth.ts @@ -164,7 +164,7 @@ export async function revokeSession(token: string): Promise { } /** Credentials provided after first run */ -export type FirstRunCredentials = { +export interface FirstRunCredentials { username: string, password: string, token: string, diff --git a/src/lib/server/data/group.ts b/src/lib/server/data/group.ts index 35f16187..dcebc504 100644 --- a/src/lib/server/data/group.ts +++ b/src/lib/server/data/group.ts @@ -154,7 +154,7 @@ export async function deleteGroup(id: string) { * Overall data for a group, comprised of the group's `info.json`, `README.md` * and potentially other data as required. */ -export type GroupData = { +export interface GroupData { info: GroupInfo, readme: string, } diff --git a/src/lib/server/data/index.ts b/src/lib/server/data/index.ts index 03b72a81..fe97687f 100644 --- a/src/lib/server/data/index.ts +++ b/src/lib/server/data/index.ts @@ -19,7 +19,7 @@ import migrate from './migrations'; import { getReadme } from './readme'; /** Public global data for the portfolio */ -export type PortfolioGlobals = { +export interface PortfolioGlobals { config: ConfigJson, readme: string, groups: Record, diff --git a/src/lib/server/data/item.ts b/src/lib/server/data/item.ts index b212880e..aa4cde6b 100644 --- a/src/lib/server/data/item.ts +++ b/src/lib/server/data/item.ts @@ -208,10 +208,10 @@ export async function deleteItem(groupId: string, itemId: string) { * Overall data for an item, comprised of the item's `info.json`, `README.md` * and potentially other data as required. */ -export type ItemData = { +export interface ItemData { info: ItemInfoFull, readme: string, -}; +} /** Return full data for the item */ export async function getItemData(groupId: string, itemId: string) { diff --git a/src/lib/server/data/migrations/v0.1.0.ts b/src/lib/server/data/migrations/v0.1.0.ts index 0ee64078..b024e654 100644 --- a/src/lib/server/data/migrations/v0.1.0.ts +++ b/src/lib/server/data/migrations/v0.1.0.ts @@ -31,9 +31,9 @@ import { setupGitignore } from '../../git'; import { capitalize } from '$lib/util'; import { unsafeLoadConfig, unsafeLoadGroupInfo, unsafeLoadItemInfo } from './unsafeLoad'; -type OldConfig = { name: string }; +interface OldConfig { name: string } -type OldItemInfo = { +interface OldItemInfo { name: string; description: string; color: string; @@ -50,24 +50,24 @@ type OldItemInfo = { package?: PackageInfo; visibility?: 'filtered'; sort?: number; -}; +} /** How to display links within a group */ -type GroupLinkDisplayOptions = { +interface GroupLinkDisplayOptions { title: string; display: 'card' | 'chip'; reverseLookup: boolean; -}; +} -type OldGroupInfo = { +interface OldGroupInfo { name: string; description: string; color: string; associations?: Record; -}; +} /** Minimal representation of old global data */ -type OldGlobals = { +interface OldGlobals { config: OldConfig, groups: Record, items: Record>, diff --git a/src/lib/server/git.ts b/src/lib/server/git.ts index 6395a6b4..c4b7d47f 100644 --- a/src/lib/server/git.ts +++ b/src/lib/server/git.ts @@ -9,7 +9,7 @@ config.local.json `.trimStart(); /** Status information of a git repo */ -export type RepoStatus = { +export interface RepoStatus { /** The repo URL */ url: string /** The current branch */ @@ -24,7 +24,7 @@ export type RepoStatus = { behind: number /** Changes for files */ changes: FileStatusResult[], -}; +} /** Return status info for repo */ export async function getRepoStatus(): Promise { diff --git a/tests/backend/readme.test.ts b/tests/backend/readme.test.ts index 470f02a7..8553a20b 100644 --- a/tests/backend/readme.test.ts +++ b/tests/backend/readme.test.ts @@ -1,5 +1,5 @@ import type { ApiClient } from '$endpoints'; -import { beforeEach, describe, expect, it, test } from 'vitest'; +import { beforeEach, describe, expect, test } from 'vitest'; import { setup } from './helpers'; import genReadmeTests from './readmeCases'; import { readFile } from 'fs/promises'; diff --git a/tests/setup/globalSetup.ts b/tests/setup/globalSetup.ts index 0d028e82..2f78f20b 100644 --- a/tests/setup/globalSetup.ts +++ b/tests/setup/globalSetup.ts @@ -21,7 +21,7 @@ export async function setup() { // If it succeeded, there is no need to start the server, it is already // running return; - } catch {} + } catch { /* empty */ } // It failed, start up the server if (!HOST) { @@ -44,9 +44,7 @@ export async function setup() { try { await api().debug.echo('Wait for server startup'); return; - } catch (e) { - // console.error(e); - } + } catch { /* empty */ } } // If we reach this point, the server failed to start in-time server.kill('SIGTERM'); diff --git a/tests/setup/jestExtended.d.ts b/tests/setup/jestExtended.d.ts index da8a9544..21d4bbcd 100644 --- a/tests/setup/jestExtended.d.ts +++ b/tests/setup/jestExtended.d.ts @@ -3,7 +3,7 @@ import type CustomMatchers from 'jest-extended'; import 'vitest'; declare module 'vitest' { - interface Assertion extends CustomMatchers {} - interface AsymmetricMatchersContaining extends CustomMatchers {} - interface ExpectStatic extends CustomMatchers {} + type Assertion = CustomMatchers + type AsymmetricMatchersContaining = CustomMatchers + type ExpectStatic = CustomMatchers } From 5568b247cb1f8d70147cd5f554a353a8d0421b51 Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Thu, 26 Sep 2024 16:30:37 +1000 Subject: [PATCH 4/9] Work more on linting --- eslint.config.mjs | 12 ++++++++++++ src/lib/server/data/migrations/index.ts | 2 +- src/lib/server/links.ts | 2 +- src/lib/transition.ts | 2 +- src/routes/admin/firstrun/+page.server.ts | 2 +- src/routes/admin/firstrun/+page.svelte | 2 +- src/routes/admin/login/+page.server.ts | 2 +- src/routes/admin/login/+page.svelte | 2 +- src/routes/api/debug/clear/+server.ts | 2 +- src/routes/api/debug/echo/+server.ts | 2 +- src/routes/api/group/+server.ts | 2 +- src/routes/api/group/[groupId]/+server.ts | 4 ++-- .../group/[groupId]/item/[itemId]/readme/+server.ts | 6 +++--- src/routes/api/group/[groupId]/readme/+server.ts | 2 +- src/routes/api/readme/+server.ts | 7 +++---- tests/backend/admin/auth/login.test.ts | 2 +- tests/backend/admin/firstrun.test.ts | 2 +- tests/backend/admin/git/commit.test.ts | 6 ++---- tests/backend/admin/git/init.test.ts | 4 +--- tests/backend/helpers.ts | 2 +- 20 files changed, 37 insertions(+), 30 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b801612f..f61cfeaf 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -3,6 +3,7 @@ import eslint from '@eslint/js'; import tseslint from 'typescript-eslint'; import eslintPluginSvelte from 'eslint-plugin-svelte'; +import globals from 'globals'; export default tseslint.config( eslint.configs.recommended, @@ -27,8 +28,19 @@ export default tseslint.config( "**/vitest.config.ts", "eslint.config.mjs", ], + languageOptions: { + globals: { + ...globals.node, + ...globals.browser, + } + }, rules: { + // Allow explicit any, to avoid type gymnastics "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": ["error", { + argsIgnorePattern: "^_", + caughtErrors: "none", + }] }, }, ); diff --git a/src/lib/server/data/migrations/index.ts b/src/lib/server/data/migrations/index.ts index 2e4b43dc..94444551 100644 --- a/src/lib/server/data/migrations/index.ts +++ b/src/lib/server/data/migrations/index.ts @@ -17,7 +17,7 @@ const migrations: Record = { }; /** Update config versions (only for minor, non-breaking changes to config.json) */ -export async function updateConfigVersions(dataDir: string) { +export async function updateConfigVersions(_dataDir: string) { const config = await getConfig(); config.version = version; await setConfig(config); diff --git a/src/lib/server/links.ts b/src/lib/server/links.ts index 8d1cb502..551893e5 100644 --- a/src/lib/server/links.ts +++ b/src/lib/server/links.ts @@ -55,7 +55,7 @@ export async function changeLinkStyle( // Find linked group and update style // This code is sorta yucky imo let foundMatch = false; - for (const [linkInfo, items] of item.links) { + for (const [linkInfo, /* items */] of item.links) { if (linkInfo.groupId === otherGroupId) { linkInfo.style = style; foundMatch = true; diff --git a/src/lib/transition.ts b/src/lib/transition.ts index bd0d7a0c..1c77a534 100644 --- a/src/lib/transition.ts +++ b/src/lib/transition.ts @@ -11,7 +11,7 @@ import { quintOut } from 'svelte/easing'; export const [send, receive] = crossfade({ duration: (d) => Math.sqrt(d * 200), - fallback(node, params) { + fallback(node /*, params */) { const style = getComputedStyle(node); const transform = style.transform === 'none' ? '' : style.transform; diff --git a/src/routes/admin/firstrun/+page.server.ts b/src/routes/admin/firstrun/+page.server.ts index 08aff93b..34b2923c 100644 --- a/src/routes/admin/firstrun/+page.server.ts +++ b/src/routes/admin/firstrun/+page.server.ts @@ -1,7 +1,7 @@ import { redirect } from '@sveltejs/kit'; import { dataDirIsInit } from '$lib/server/data/dataDir.js'; -export async function load({ params }) { +export async function load() { if (await dataDirIsInit()) { redirect(303, '/'); } diff --git a/src/routes/admin/firstrun/+page.svelte b/src/routes/admin/firstrun/+page.svelte index 815f6099..adfa42e4 100644 --- a/src/routes/admin/firstrun/+page.svelte +++ b/src/routes/admin/firstrun/+page.svelte @@ -1,11 +1,11 @@ diff --git a/src/components/chip/ItemChip.svelte b/src/components/chip/ItemChip.svelte index 7e280547..fc5bda7b 100644 --- a/src/components/chip/ItemChip.svelte +++ b/src/components/chip/ItemChip.svelte @@ -5,8 +5,8 @@ export let globals: PortfolioGlobals; export let groupId: string; export let itemId: string; - export let link: boolean = false; - export let selected: boolean = false; + export let link = false; + export let selected = false; $: item = globals.items[groupId][itemId]; diff --git a/src/components/chip/ItemChipList.svelte b/src/components/chip/ItemChipList.svelte index 3a9731b9..f53434f5 100644 --- a/src/components/chip/ItemChipList.svelte +++ b/src/components/chip/ItemChipList.svelte @@ -14,7 +14,7 @@ export let items: FilterOptions; /** Whether to link each chip to its respective page */ - export let link: boolean = false; + export let link = false; // Smoooooooooooth scrolling // ================================================== diff --git a/src/components/markdown/EditableMarkdown.svelte b/src/components/markdown/EditableMarkdown.svelte index 43bce407..6084c513 100644 --- a/src/components/markdown/EditableMarkdown.svelte +++ b/src/components/markdown/EditableMarkdown.svelte @@ -7,7 +7,7 @@ /** Whether we are currently editing the markdown */ export let editing: boolean; - const originalSource = source; + // const originalSource = source; {#if editing} diff --git a/src/components/markdown/Markdown.svelte b/src/components/markdown/Markdown.svelte index 454815dd..2bbb1222 100644 --- a/src/components/markdown/Markdown.svelte +++ b/src/components/markdown/Markdown.svelte @@ -19,6 +19,8 @@ $: rendered = marked(source); // https://stackoverflow.com/a/75688200/6335363 + // TODO: Find a way to automagically disable this but only for Svelte + // eslint-disable-next-line @typescript-eslint/no-unused-expressions $: rendered && markdownRender && applySyntaxHighlighting(markdownRender); function applySyntaxHighlighting(renderElement: HTMLDivElement) { diff --git a/src/components/markdown/MarkdownEditor.svelte b/src/components/markdown/MarkdownEditor.svelte index 323a2cb1..846f0ed0 100644 --- a/src/components/markdown/MarkdownEditor.svelte +++ b/src/components/markdown/MarkdownEditor.svelte @@ -5,7 +5,7 @@ export let source: string; - const dispatch = createEventDispatcher<{ submit: void }>(); + const dispatch = createEventDispatcher<{ submit: undefined }>(); function handleKeypress(e: KeyboardEvent) { if (e.ctrlKey && e.key === 'Enter') { diff --git a/src/components/modals/Modal.svelte b/src/components/modals/Modal.svelte index bfec9178..1af24464 100644 --- a/src/components/modals/Modal.svelte +++ b/src/components/modals/Modal.svelte @@ -16,10 +16,6 @@ const dispatch = createEventDispatcher<{ close: object, }>(); - - const bubbleClick = (groupId: string, itemId: string, e: MouseEvent) => { - - }; diff --git a/src/components/navbar/Navbar.svelte b/src/components/navbar/Navbar.svelte index cbe7aa79..3ff6c13d 100644 --- a/src/components/navbar/Navbar.svelte +++ b/src/components/navbar/Navbar.svelte @@ -4,8 +4,6 @@ import api from '$endpoints'; import type { ConfigJson } from '$lib/server/data/config'; import Separator from '$components/Separator.svelte'; - import NewGroupModal from '$components/modals/NewGroupModal.svelte'; - import NewItemModal from '$components/modals/NewItemModal.svelte'; export let path: { url: string, txt: string }[]; export let config: ConfigJson; diff --git a/src/lib/server/data/dataDir.ts b/src/lib/server/data/dataDir.ts index c609ca12..e664cd6e 100644 --- a/src/lib/server/data/dataDir.ts +++ b/src/lib/server/data/dataDir.ts @@ -1,6 +1,6 @@ import path from 'path'; import fs from 'fs/promises'; -import simpleGit, { CheckRepoActions, type SimpleGit } from 'simple-git'; +import simpleGit, { CheckRepoActions } from 'simple-git'; /** Returns the path to the data repository */ export function getDataDir(): string { diff --git a/src/routes/[group]/[item]/+page.svelte b/src/routes/[group]/[item]/+page.svelte index a7e4ecd5..64a1d99c 100644 --- a/src/routes/[group]/[item]/+page.svelte +++ b/src/routes/[group]/[item]/+page.svelte @@ -3,7 +3,6 @@ import { IconCard, RepoCard, PackageCard, CardList, ItemCardGrid } from '$components/card'; import { ItemChipList } from '$components/chip'; import Background from '$components/Background.svelte'; - import Paper from '$components/Paper.svelte'; import EditableMarkdown from '$components/markdown'; import api from '$endpoints'; import consts from '$lib/consts'; From 1c0bbea4a3f9d5ac3c3044fda9f34fece5541e94 Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Thu, 26 Sep 2024 17:42:27 +1000 Subject: [PATCH 7/9] Fix type definitions for vitest jest-extended --- tests/setup/jestExtended.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/setup/jestExtended.d.ts b/tests/setup/jestExtended.d.ts index 21d4bbcd..75f901dc 100644 --- a/tests/setup/jestExtended.d.ts +++ b/tests/setup/jestExtended.d.ts @@ -1,9 +1,12 @@ +// Need to use interfaces, as they don't register the extended type definitions +// otherwise. +/* eslint-disable @typescript-eslint/no-empty-object-type */ // https://jest-extended.jestcommunity.dev/docs/getting-started/setup#use-with-vitest import type CustomMatchers from 'jest-extended'; import 'vitest'; declare module 'vitest' { - type Assertion = CustomMatchers - type AsymmetricMatchersContaining = CustomMatchers - type ExpectStatic = CustomMatchers + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} + interface ExpectStatic extends CustomMatchers {} } From ad45f8fb416702036eb2f57a154fd1a87af83a75 Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Thu, 26 Sep 2024 17:46:45 +1000 Subject: [PATCH 8/9] Fix broken async catch statements --- tests/backend/admin/git/commit.test.ts | 2 +- tests/backend/helpers.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/backend/admin/git/commit.test.ts b/tests/backend/admin/git/commit.test.ts index 086e7838..c46aa6f7 100644 --- a/tests/backend/admin/git/commit.test.ts +++ b/tests/backend/admin/git/commit.test.ts @@ -41,7 +41,7 @@ it('Gives a 400 when no data dir set up', async () => { it('Gives a 400 when there are no current changes', async () => { const { api } = await setup(gitRepos.TEST_REPO_RW); // Need to do an earlier commit because a data migration may have occurred - await api.admin.git.commit('First commit').catch(); + await api.admin.git.commit('First commit').catch(e => {void e}); // Second commit fails as there are no changes await expect(api.admin.git.commit('Second commit')).rejects.toMatchObject({ code: 400, diff --git a/tests/backend/helpers.ts b/tests/backend/helpers.ts index 8cb875b6..071805f5 100644 --- a/tests/backend/helpers.ts +++ b/tests/backend/helpers.ts @@ -91,5 +91,5 @@ export async function forceRewindDataRepoGit(api: ApiClient) { await git.reset(['--hard', OLD_COMMIT_HASH]); await api.admin.data.refresh(); // Attempt to make a commit just in case of data migrations - await api.admin.git.commit('Migrate data').catch(); + await api.admin.git.commit('Migrate data').catch(e => {void e}); } From 9b97b1220d286885834d42d22311af05156d10ab Mon Sep 17 00:00:00 2001 From: Maddy Guthridge Date: Sat, 28 Sep 2024 15:40:22 +1000 Subject: [PATCH 9/9] Run CI on version branches --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7de3347f..7b5ac816 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Test and lint on: push: - branches: [ "main" ] + branches: [ "main", "v[0-9]+.[0-9]+.x", "v[0-9]+.x" ] pull_request: - branches: [ "main" ] + branches: [ "main", "v[0-9]+.[0-9]+.x", "v[0-9]+.x" ] jobs: test: