From 954749a08f8490c0729531b89defd43b3c1a6c93 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:20:45 -0300 Subject: [PATCH] Lint the project with `antfu/eslint-config` and remove Prettier. (#26) --- website/.eslintrc.cjs | 38 +- website/.npmrc | 3 + website/.prettierignore | 18 - website/.prettierrc.js | 9 - website/package.json | 6 +- website/pnpm-lock.yaml | 618 +++++++++++++++++- website/src/.vitepress/config.ts | 53 +- website/src/.vitepress/config/constants.ts | 12 +- website/src/.vitepress/config/headConfig.ts | 6 +- .../.vitepress/config/hooks/generateFeed.ts | 30 +- .../.vitepress/config/hooks/generateMeta.ts | 74 +-- .../config/hooks/generateOgImages.ts | 54 +- .../src/.vitepress/config/markdownConfig.ts | 26 +- .../.vitepress/config/navigation/navbar.ts | 6 +- .../.vitepress/config/navigation/sidebar.ts | 8 +- .../.vitepress/config/scripts/languages.ts | 16 +- website/src/.vitepress/config/shortcodes.ts | 125 ++-- website/src/.vitepress/config/themeConfig.ts | 18 +- .../.vitepress/theme/components/Changelog.vue | 18 +- .../theme/components/ChangelogsList.vue | 20 +- .../theme/components/Contributors.vue | 37 +- .../theme/components/CustomNavBarMenu.vue | 18 +- .../theme/components/CustomNavScreenMenu.vue | 18 +- .../theme/components/DownloadButtons.vue | 10 +- .../Extensions/ExtensionFilters.vue | 89 ++- .../components/Extensions/ExtensionGroup.vue | 18 +- .../components/Extensions/ExtensionItem.vue | 26 +- .../components/Extensions/ExtensionList.vue | 14 +- .../Extensions/ExtensionsWrapper.vue | 78 +-- .../src/.vitepress/theme/components/News.vue | 6 +- .../theme/components/OgImageTemplate.vue | 30 +- .../theme/components/ReleaseDate.vue | 12 +- .../.vitepress/theme/data/changelogs.data.ts | 20 +- .../src/.vitepress/theme/data/news.data.ts | 22 +- .../src/.vitepress/theme/data/release.data.ts | 26 +- website/src/.vitepress/theme/index.ts | 24 +- .../queries/useExtensionsRepositoryQuery.ts | 47 +- 37 files changed, 1118 insertions(+), 535 deletions(-) create mode 100644 website/.npmrc delete mode 100644 website/.prettierignore delete mode 100644 website/.prettierrc.js diff --git a/website/.eslintrc.cjs b/website/.eslintrc.cjs index f949efd2..a44fd0aa 100644 --- a/website/.eslintrc.cjs +++ b/website/.eslintrc.cjs @@ -1,31 +1,21 @@ module.exports = { root: true, - env: { - browser: true, - es2021: true, - node: true, - "vue/setup-compiler-macros": true, - }, - parser: "vue-eslint-parser", - extends: [ - "plugin:vue/vue3-recommended", - "plugin:@typescript-eslint/recommended", - "standard", - ], - parserOptions: { - ecmaVersion: "latest", - parser: "@typescript-eslint/parser", - sourceType: "module", - }, - plugins: [ - "vue", - "@typescript-eslint", - ], + extends: ["@antfu"], rules: { "comma-dangle": ["error", "only-multiline"], - quotes: ["error", "double"], - indent: ["error", "tab"], - "no-tabs": 0, + "quotes": "off", + "no-tabs": "off", + "arrow-parens": ["error", "always"], + "@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }], + "indent": "off", + "semi": ["error", "never"], + "@typescript-eslint/indent": ["error", "tab"], + "@typescript-eslint/brace-style": ["error", "1tbs"], + "@typescript-eslint/semi": ["error", "never"], + "vue/no-extra-parens": "off", + "vue/html-indent": ["error", "tab"], + "curly": ["error", "all"], + "brace-style": ["error", "1tbs"], "no-console": "off", "no-debugger": "off", "vue/multi-word-component-names": "off", diff --git a/website/.npmrc b/website/.npmrc new file mode 100644 index 00000000..5f3d8770 --- /dev/null +++ b/website/.npmrc @@ -0,0 +1,3 @@ +public-hoist-pattern[]=*eslint-plugin-* +public-hoist-pattern[]=@typescript-eslint/eslint-plugin +public-hoist-pattern[]=@antfu/* diff --git a/website/.prettierignore b/website/.prettierignore deleted file mode 100644 index ebcd6143..00000000 --- a/website/.prettierignore +++ /dev/null @@ -1,18 +0,0 @@ -*.png -*.jpg -*.webm -*.webp -*.ico -*.svg -*.md -*.styl -*.vue -*.xml -*.otf -dist -pnpm-lock.yaml -cache -template -temp -!CHANGELOG.md -.temp diff --git a/website/.prettierrc.js b/website/.prettierrc.js deleted file mode 100644 index 28f95213..00000000 --- a/website/.prettierrc.js +++ /dev/null @@ -1,9 +0,0 @@ -export default { - tabWidth: 4, - useTabs: true, - printWidth: 120, - trailingComma: "es5", - bracketSpacing: true, - htmlWhitespaceSensitivity: "ignore", - endOfLine: "auto", -} diff --git a/website/package.json b/website/package.json index 41f89026..f36ae98e 100644 --- a/website/package.json +++ b/website/package.json @@ -22,17 +22,16 @@ "dev": "vitepress dev src", "build": "vitepress build src", "preview": "vitepress preview src", - "lint": "pnpm lint:es && pnpm lint:prettier && pnpm lint:mdl && pnpm lint:style", + "lint": "pnpm lint:es && pnpm lint:mdl && pnpm lint:style", "lint:fix": "pnpm lint:es:fix && pnpm lint:prettier:fix && pnpm lint:style:fix", "lint:es": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx", "lint:es:fix": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx --fix", - "lint:prettier": "prettier --check \"src/**/*\"", - "lint:prettier:fix": "prettier --check --write \"src/**/*\"", "lint:mdl": "markdownlint \"**/*.md\" \".github/**/*.md\" --enable sentences-per-line --disable MD025 MD033", "lint:style": "stylelint \"**/*.{styl,vue}\" \"src/.vitepress/**/*.{styl,vue}\"", "lint:style:fix": "stylelint --fix \"**/*.{styl,vue}\" \"src/.vitepress/**/*.{styl,vue}\"" }, "devDependencies": { + "@antfu/eslint-config": "^0.41.0", "@mdit/plugin-attrs": "^0.4.8", "@mdit/plugin-figure": "^0.4.8", "@mdit/plugin-img-lazyload": "^0.4.8", @@ -52,7 +51,6 @@ "lint-staged": "^14.0.1", "markdownlint": "^0.30.0", "markdownlint-cli": "^0.35.0", - "prettier": "^3.0.3", "sentences-per-line": "^0.2.1", "stylelint": "^15.10.3", "stylelint-stylus": "^0.18.0", diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 2e57da15..4c4ede9b 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -33,6 +33,9 @@ dependencies: version: 2.29.4 devDependencies: + '@antfu/eslint-config': + specifier: ^0.41.0 + version: 0.41.0(eslint@8.48.0)(typescript@5.2.2) '@mdit/plugin-attrs': specifier: ^0.4.8 version: 0.4.8 @@ -90,9 +93,6 @@ devDependencies: markdownlint-cli: specifier: ^0.35.0 version: 0.35.0 - prettier: - specifier: ^3.0.3 - version: 3.0.3 sentences-per-line: specifier: ^0.2.1 version: 0.2.1 @@ -272,6 +272,102 @@ packages: '@algolia/requester-common': 4.19.1 dev: true + /@antfu/eslint-config-basic@0.41.0(@typescript-eslint/eslint-plugin@6.5.0)(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-zcwFv+nEV/NroeeVWriNdnIGd9soOLRG8wIiVz4VVJ0BjONrqQR56HLG/gDxH/1GUYBnQCEcVxGUmegce08cnw==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + eslint: 8.48.0 + eslint-plugin-antfu: 0.41.0(eslint@8.48.0)(typescript@5.2.2) + eslint-plugin-eslint-comments: 3.2.0(eslint@8.48.0) + eslint-plugin-html: 7.1.0 + eslint-plugin-import: /eslint-plugin-i@2.28.0-2(@typescript-eslint/parser@6.5.0)(eslint@8.48.0) + eslint-plugin-jsonc: 2.9.0(eslint@8.48.0) + eslint-plugin-markdown: 3.0.1(eslint@8.48.0) + eslint-plugin-n: 16.0.2(eslint@8.48.0) + eslint-plugin-no-only-tests: 3.1.0 + eslint-plugin-promise: 6.1.1(eslint@8.48.0) + eslint-plugin-unicorn: 48.0.1(eslint@8.48.0) + eslint-plugin-unused-imports: 3.0.0(@typescript-eslint/eslint-plugin@6.5.0)(eslint@8.48.0) + eslint-plugin-yml: 1.8.0(eslint@8.48.0) + jsonc-eslint-parser: 2.3.0 + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + + /@antfu/eslint-config-ts@0.41.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-ng3GYpJGZgrxGwBVda/MgUpveH3LbEqdPCFi1+S5e62W4kf8rmEVbhc0I8w7/aKN0uNqir5SInYg8gob2maDAQ==} + peerDependencies: + eslint: '>=7.4.0' + typescript: '>=3.9' + dependencies: + '@antfu/eslint-config-basic': 0.41.0(@typescript-eslint/eslint-plugin@6.5.0)(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.5.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 + eslint-plugin-jest: 27.2.3(@typescript-eslint/eslint-plugin@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + dev: true + + /@antfu/eslint-config-vue@0.41.0(@typescript-eslint/eslint-plugin@6.5.0)(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-iJiEGRUgRmT3mQCmGl0hTMwq/ShXRjRPjpgsDcphKJyEF06ZIR/4gxHn+utQRLT2hD39DQN8gk0ZbpV3gWtf/g==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + '@antfu/eslint-config-basic': 0.41.0(@typescript-eslint/eslint-plugin@6.5.0)(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + '@antfu/eslint-config-ts': 0.41.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 + eslint-plugin-vue: 9.17.0(eslint@8.48.0) + local-pkg: 0.4.3 + transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + - typescript + dev: true + + /@antfu/eslint-config@0.41.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-510DginDPdzf45O6HOah3cK6NHXxobBc43IdBQCQmUGb+av9LIJjrd1idThFoyFh6m05iZ4YX/mhnhhJFqLiNw==} + peerDependencies: + eslint: '>=7.4.0' + dependencies: + '@antfu/eslint-config-vue': 0.41.0(@typescript-eslint/eslint-plugin@6.5.0)(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.5.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 + eslint-plugin-eslint-comments: 3.2.0(eslint@8.48.0) + eslint-plugin-html: 7.1.0 + eslint-plugin-import: /eslint-plugin-i@2.28.0-2(@typescript-eslint/parser@6.5.0)(eslint@8.48.0) + eslint-plugin-jsonc: 2.9.0(eslint@8.48.0) + eslint-plugin-n: 16.0.2(eslint@8.48.0) + eslint-plugin-promise: 6.1.1(eslint@8.48.0) + eslint-plugin-unicorn: 48.0.1(eslint@8.48.0) + eslint-plugin-vue: 9.17.0(eslint@8.48.0) + eslint-plugin-yml: 1.8.0(eslint@8.48.0) + jsonc-eslint-parser: 2.3.0 + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + - typescript + dev: true + /@babel/code-frame@7.22.13: resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} @@ -1118,6 +1214,12 @@ packages: '@types/mdurl': 1.0.2 dev: true + /@types/mdast@3.0.12: + resolution: {integrity: sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==} + dependencies: + '@types/unist': 2.0.8 + dev: true + /@types/mdurl@1.0.2: resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} dev: true @@ -1138,6 +1240,10 @@ packages: resolution: {integrity: sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==} dev: true + /@types/unist@2.0.8: + resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==} + dev: true + /@types/web-bluetooth@0.0.16: resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} dev: false @@ -1196,6 +1302,14 @@ packages: - supports-color dev: true + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + dev: true + /@typescript-eslint/scope-manager@6.5.0: resolution: {integrity: sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1224,11 +1338,37 @@ packages: - supports-color dev: true + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@typescript-eslint/types@6.5.0: resolution: {integrity: sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==} engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree@6.5.0(typescript@5.2.2): resolution: {integrity: sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1250,6 +1390,26 @@ packages: - supports-color dev: true + /@typescript-eslint/utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.1 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + eslint: 8.48.0 + eslint-scope: 5.1.1 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/utils@6.5.0(eslint@8.48.0)(typescript@5.2.2): resolution: {integrity: sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1269,6 +1429,14 @@ packages: - typescript dev: true + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@typescript-eslint/visitor-keys@6.5.0: resolution: {integrity: sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1743,6 +1911,11 @@ packages: fill-range: 7.0.1 dev: true + /builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true + /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: @@ -1807,6 +1980,18 @@ packages: engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: true + /character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: true + + /character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: true + + /character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: true + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -1822,6 +2007,18 @@ packages: fsevents: 2.3.3 dev: true + /ci-info@3.8.0: + resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + engines: {node: '>=8'} + dev: true + + /clean-regexp@1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /cli-cursor@4.0.0: resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2355,6 +2552,16 @@ packages: - supports-color dev: true + /eslint-plugin-antfu@0.41.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-JeEeDZgz7oqYPYWYNQHdXrKaW2nhJz/70jeMZUkaNjVp72cpsJPH3idiEhIhGu3wjFdsOMCoEkboT/DQXlCaqA==} + dependencies: + '@typescript-eslint/utils': 6.5.0(eslint@8.48.0)(typescript@5.2.2) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + /eslint-plugin-es-x@7.2.0(eslint@8.48.0): resolution: {integrity: sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2366,6 +2573,46 @@ packages: eslint: 8.48.0 dev: true + /eslint-plugin-eslint-comments@3.2.0(eslint@8.48.0): + resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} + engines: {node: '>=6.5.0'} + peerDependencies: + eslint: '>=4.19.1' + dependencies: + escape-string-regexp: 1.0.5 + eslint: 8.48.0 + ignore: 5.2.4 + dev: true + + /eslint-plugin-html@7.1.0: + resolution: {integrity: sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==} + dependencies: + htmlparser2: 8.0.2 + dev: true + + /eslint-plugin-i@2.28.0-2(@typescript-eslint/parser@6.5.0)(eslint@8.48.0): + resolution: {integrity: sha512-z48kG4qmE4TmiLcxbmvxMT5ycwvPkXaWW0XpU1L768uZaTbiDbxsHMEdV24JHlOR1xDsPpKW39BfP/pRdYIwFA==} + engines: {node: '>=12'} + peerDependencies: + eslint: ^7.2.0 || ^8 + dependencies: + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.48.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.48.0) + get-tsconfig: 4.7.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + resolve: 1.22.4 + semver: 7.5.4 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + dev: true + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.5.0)(eslint@8.48.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} @@ -2401,6 +2648,51 @@ packages: - supports-color dev: true + /eslint-plugin-jest@27.2.3(@typescript-eslint/eslint-plugin@6.5.0)(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^5.0.0 || ^6.0.0 + eslint: ^7.0.0 || ^8.0.0 + jest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + jest: + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /eslint-plugin-jsonc@2.9.0(eslint@8.48.0): + resolution: {integrity: sha512-RK+LeONVukbLwT2+t7/OY54NJRccTXh/QbnXzPuTLpFMVZhPuq1C9E07+qWenGx7rrQl0kAalAWl7EmB+RjpGA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + eslint: 8.48.0 + jsonc-eslint-parser: 2.3.0 + natural-compare: 1.4.0 + dev: true + + /eslint-plugin-markdown@3.0.1(eslint@8.48.0): + resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + eslint: 8.48.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-plugin-n@16.0.2(eslint@8.48.0): resolution: {integrity: sha512-Y66uDfUNbBzypsr0kELWrIz+5skicECrLUqlWuXawNSLUq3ltGlCwu6phboYYOTSnoTdHgTLrc+5Ydo6KjzZog==} engines: {node: '>=16.0.0'} @@ -2418,6 +2710,11 @@ packages: semver: 7.5.4 dev: true + /eslint-plugin-no-only-tests@3.1.0: + resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==} + engines: {node: '>=5.0.0'} + dev: true + /eslint-plugin-promise@6.1.1(eslint@8.48.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2427,6 +2724,45 @@ packages: eslint: 8.48.0 dev: true + /eslint-plugin-unicorn@48.0.1(eslint@8.48.0): + resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} + engines: {node: '>=16'} + peerDependencies: + eslint: '>=8.44.0' + dependencies: + '@babel/helper-validator-identifier': 7.22.5 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + ci-info: 3.8.0 + clean-regexp: 1.0.0 + eslint: 8.48.0 + esquery: 1.5.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + lodash: 4.17.21 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.5.4 + strip-indent: 3.0.0 + dev: true + + /eslint-plugin-unused-imports@3.0.0(@typescript-eslint/eslint-plugin@6.5.0)(eslint@8.48.0): + resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^6.0.0 + eslint: ^8.0.0 + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + dependencies: + '@typescript-eslint/eslint-plugin': 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2) + eslint: 8.48.0 + eslint-rule-composer: 0.3.0 + dev: true + /eslint-plugin-vue@9.17.0(eslint@8.48.0): resolution: {integrity: sha512-r7Bp79pxQk9I5XDP0k2dpUC7Ots3OSWgvGZNu3BxmKK6Zg7NgVtcOB6OCna5Kb9oQwJPl5hq183WD0SY5tZtIQ==} engines: {node: ^14.17.0 || >=16.0.0} @@ -2445,6 +2781,34 @@ packages: - supports-color dev: true + /eslint-plugin-yml@1.8.0(eslint@8.48.0): + resolution: {integrity: sha512-fgBiJvXD0P2IN7SARDJ2J7mx8t0bLdG6Zcig4ufOqW5hOvSiFxeUyc2g5I1uIm8AExbo26NNYCcTGZT0MXTsyg==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + dependencies: + debug: 4.3.4 + eslint: 8.48.0 + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-rule-composer@0.3.0: + resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} + engines: {node: '>=4.0.0'} + dev: true + + /eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + /eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2527,6 +2891,11 @@ packages: estraverse: 5.3.0 dev: true + /estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: true + /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -2681,6 +3050,14 @@ packages: - supports-color dev: true + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -2806,6 +3183,12 @@ packages: get-intrinsic: 1.2.1 dev: true + /get-tsconfig@4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -2953,6 +3336,10 @@ packages: engines: {node: '>=6'} dev: true + /hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + dev: true + /hosted-git-info@4.1.0: resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} engines: {node: '>=10'} @@ -3020,6 +3407,11 @@ packages: engines: {node: '>=0.8.19'} dev: true + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + /indent-string@5.0.0: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} @@ -3059,6 +3451,17 @@ packages: engines: {node: '>= 0.10'} dev: true + /is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: true + + /is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: true + /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: @@ -3092,6 +3495,13 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -3110,6 +3520,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: true + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -3132,6 +3546,10 @@ packages: is-extglob: 2.1.1 dev: true + /is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -3241,6 +3659,17 @@ packages: argparse: 2.0.1 dev: true + /jsesc@0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + dev: true + + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + dev: true + /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true @@ -3268,6 +3697,16 @@ packages: minimist: 1.2.8 dev: true + /jsonc-eslint-parser@2.3.0: + resolution: {integrity: sha512-9xZPKVYp9DxnM3sd1yAsh/d59iIaswDkai8oTxbursfKYbg/ibjX0IzFt35+VZ8iEW453TVTXztnRvYUQlAfUQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.10.0 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + semver: 7.5.4 + dev: true + /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true @@ -3359,6 +3798,18 @@ packages: wrap-ansi: 8.1.0 dev: true + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -3523,6 +3974,22 @@ packages: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} dev: true + /mdast-util-from-markdown@0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + dependencies: + '@types/mdast': 3.0.12 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: true + + /mdast-util-to-string@2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + dev: true + /mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} dev: true @@ -3575,6 +4042,15 @@ packages: engines: {node: '>= 0.6'} dev: true + /micromark@2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + dependencies: + debug: 4.3.4 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -3679,6 +4155,15 @@ packages: engines: {node: '>= 0.6'} dev: true + /normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.4 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + dev: true + /normalize-package-data@3.0.3: resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} engines: {node: '>=10'} @@ -3795,6 +4280,13 @@ packages: type-check: 0.4.0 dev: true + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -3802,6 +4294,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -3809,6 +4308,11 @@ packages: p-limit: 3.1.0 dev: true + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + /pako@0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} dev: true @@ -3827,6 +4331,17 @@ packages: hex-rgb: 4.3.0 dev: true + /parse-entities@2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: true + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -3897,6 +4412,11 @@ packages: hasBin: true dev: true + /pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + /postcss-html@1.5.0: resolution: {integrity: sha512-kCMRWJRHKicpA166kc2lAVUGxDZL324bkj/pVOb6RhjB0Z5Krl7mN0AsVkBhVIRZZirY0lyQXG38HCVaoKVNoA==} engines: {node: ^12 || >=14} @@ -3966,12 +4486,6 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier@3.0.3: - resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} - engines: {node: '>=14'} - hasBin: true - dev: true - /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -4019,6 +4533,15 @@ packages: unpipe: 1.0.0 dev: true + /read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + /read-pkg-up@8.0.0: resolution: {integrity: sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==} engines: {node: '>=12'} @@ -4028,6 +4551,16 @@ packages: type-fest: 1.4.0 dev: true + /read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.1 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + /read-pkg@6.0.0: resolution: {integrity: sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==} engines: {node: '>=12'} @@ -4053,6 +4586,11 @@ packages: strip-indent: 4.0.0 dev: true + /regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + dev: true + /regexp.prototype.flags@1.5.0: resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} engines: {node: '>= 0.4'} @@ -4062,6 +4600,13 @@ packages: functions-have-names: 1.2.3 dev: true + /regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: true + /remove-accents@0.4.2: resolution: {integrity: sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==} dev: false @@ -4081,6 +4626,10 @@ packages: engines: {node: '>=8'} dev: true + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + /resolve@1.22.4: resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true @@ -4203,6 +4752,11 @@ packages: engines: {node: '>=8.16.0'} dev: true + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: true + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -4448,6 +5002,13 @@ packages: engines: {node: '>=12'} dev: true + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + /strip-indent@4.0.0: resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} engines: {node: '>=12'} @@ -4669,6 +5230,20 @@ packages: strip-bom: 3.0.0 dev: true + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: true + + /tsutils@3.21.0(typescript@5.2.2): + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + dependencies: + tslib: 1.14.1 + typescript: 5.2.2 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -4681,6 +5256,16 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + + /type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: true + /type-fest@1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} @@ -4761,6 +5346,12 @@ packages: tiny-inflate: 1.0.3 dev: true + /unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.8 + dev: true + /universal-user-agent@6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: false @@ -5093,6 +5684,15 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true + /yaml-eslint-parser@1.2.2: + resolution: {integrity: sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==} + engines: {node: ^14.17.0 || >=16.0.0} + dependencies: + eslint-visitor-keys: 3.4.3 + lodash: 4.17.21 + yaml: 2.3.1 + dev: true + /yaml@2.3.1: resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} engines: {node: '>= 14'} diff --git a/website/src/.vitepress/config.ts b/website/src/.vitepress/config.ts index 37359cf8..81a03371 100644 --- a/website/src/.vitepress/config.ts +++ b/website/src/.vitepress/config.ts @@ -1,36 +1,43 @@ -import { URL, fileURLToPath } from "node:url"; -import { defineConfig, loadEnv } from "vitepress"; -import ElementPlus from "unplugin-element-plus/vite"; +import process from "node:process" +import { URL, fileURLToPath } from "node:url" +import { defineConfig, loadEnv } from "vitepress" +import ElementPlus from "unplugin-element-plus/vite" -import markdownConfig from "./config/markdownConfig"; // For use with loading Markdown plugins -import themeConfig from "./config/themeConfig"; // Theme related config -import headConfig from "./config/headConfig"; // Provides how to generate Meta head tags +import markdownConfig from "./config/markdownConfig" -import generateMeta from "./config/hooks/generateMeta"; // Enhanced meta generation -import generateFeed from "./config/hooks/generateFeed"; // Allows generation of RSS feed -import generateOgImages from "./config/hooks/generateOgImages"; +// For use with loading Markdown plugins +import themeConfig from "./config/themeConfig" -const title = "Tachiyomi"; -const description = "Read your favorite manga, webtoons, comics, and more – easier than ever on your Android."; +// Theme related config +import headConfig from "./config/headConfig" // Provides how to generate Meta head tags -const env = loadEnv("", process.cwd()); -const hostname: string = env.VITE_HOSTNAME || "http://localhost:4173"; +import generateMeta from "./config/hooks/generateMeta" + +// Enhanced meta generation +import generateFeed from "./config/hooks/generateFeed" // Allows generation of RSS feed +import generateOgImages from "./config/hooks/generateOgImages" + +const title = "Tachiyomi" +const description = "Read your favorite manga, webtoons, comics, and more – easier than ever on your Android." + +const env = loadEnv("", process.cwd()) +const hostname: string = env.VITE_HOSTNAME || "http://localhost:4173" export default defineConfig({ lastUpdated: true, cleanUrls: true, - title: title, - description: description, + title, + description, sitemap: { - hostname: hostname, + hostname, }, head: headConfig, markdown: markdownConfig, - themeConfig: themeConfig, + themeConfig, transformHead: async (context) => generateMeta(context, hostname), buildEnd: async (context) => { - generateFeed(context, hostname); - generateOgImages(context); + generateFeed(context, hostname) + generateOgImages(context) }, vite: { resolve: { @@ -39,20 +46,20 @@ export default defineConfig({ // Used to show the release version on navbar. find: /^.*\/VPNavBarMenu\.vue$/, replacement: fileURLToPath( - new URL("./theme/components/CustomNavBarMenu.vue", import.meta.url) + new URL("./theme/components/CustomNavBarMenu.vue", import.meta.url), ), }, { find: /^.*VPNavScreenMenu\.vue$/, replacement: fileURLToPath( - new URL("./theme/components/CustomNavScreenMenu.vue", import.meta.url) + new URL("./theme/components/CustomNavScreenMenu.vue", import.meta.url), ), }, - ] + ], }, plugins: [ElementPlus({})], ssr: { noExternal: ["element-plus"], }, }, -}); +}) diff --git a/website/src/.vitepress/config/constants.ts b/website/src/.vitepress/config/constants.ts index 3f6bb349..9fe681da 100644 --- a/website/src/.vitepress/config/constants.ts +++ b/website/src/.vitepress/config/constants.ts @@ -1,6 +1,6 @@ -export const GITHUB_EXTENSION_JSON = - "https://raw.githubusercontent.com/tachiyomiorg/tachiyomi-extensions/repo/index.json"; -export const GITHUB_STABLE_API = "https://api.github.com/repos/tachiyomiorg/tachiyomi/releases/latest"; -export const GITHUB_STABLE_RELEASE = "https://github.com/tachiyomiorg/tachiyomi/releases/latest"; -export const GITHUB_PREVIEW_API = "https://api.github.com/repos/tachiyomiorg/android-app-preview/releases/latest"; -export const GITHUB_PREVIEW_RELEASE = "https://github.com/tachiyomiorg/android-app-preview/releases/latest"; +export const GITHUB_EXTENSION_JSON + = "https://raw.githubusercontent.com/tachiyomiorg/tachiyomi-extensions/repo/index.json" +export const GITHUB_STABLE_API = "https://api.github.com/repos/tachiyomiorg/tachiyomi/releases/latest" +export const GITHUB_STABLE_RELEASE = "https://github.com/tachiyomiorg/tachiyomi/releases/latest" +export const GITHUB_PREVIEW_API = "https://api.github.com/repos/tachiyomiorg/android-app-preview/releases/latest" +export const GITHUB_PREVIEW_RELEASE = "https://github.com/tachiyomiorg/android-app-preview/releases/latest" diff --git a/website/src/.vitepress/config/headConfig.ts b/website/src/.vitepress/config/headConfig.ts index 4affe8a7..deb4fb8b 100644 --- a/website/src/.vitepress/config/headConfig.ts +++ b/website/src/.vitepress/config/headConfig.ts @@ -1,4 +1,4 @@ -import type { HeadConfig } from "vitepress"; +import type { HeadConfig } from "vitepress" const headConfig: HeadConfig[] = [ ["meta", { name: "darkreader-lock" }], @@ -54,6 +54,6 @@ const headConfig: HeadConfig[] = [ ], ["meta", { property: "og:locale", content: "en_US" }], ["meta", { property: "og:type", content: "website" }], -]; +] -export default headConfig; +export default headConfig diff --git a/website/src/.vitepress/config/hooks/generateFeed.ts b/website/src/.vitepress/config/hooks/generateFeed.ts index 1280d530..c048f6af 100644 --- a/website/src/.vitepress/config/hooks/generateFeed.ts +++ b/website/src/.vitepress/config/hooks/generateFeed.ts @@ -1,7 +1,7 @@ -import path from "path"; -import { writeFileSync } from "fs"; -import { Feed } from "feed"; -import { createContentLoader, type SiteConfig } from "vitepress"; +import path from "node:path" +import { writeFileSync } from "node:fs" +import { Feed } from "feed" +import { type SiteConfig, createContentLoader } from "vitepress" async function generateFeed(config: SiteConfig, hostname: string) { const feed = new Feed({ @@ -13,23 +13,23 @@ async function generateFeed(config: SiteConfig, hostname: string) { image: `${hostname}/img/logo.png`, favicon: `${hostname}/favicon.ico`, copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`, - }); + }) const posts = await createContentLoader("news/*.md", { excerpt: true, render: true, - }).load(); + }).load() // Filter everything that"s not of type `article` (e.g. index.md) - const filteredPosts = posts.filter((post) => post.frontmatter.type === "article"); + const filteredPosts = posts.filter((post) => post.frontmatter.type === "article") - filteredPosts.sort((a, b) => +new Date(b.frontmatter.date as string) - +new Date(a.frontmatter.date as string)); + filteredPosts.sort((a, b) => +new Date(b.frontmatter.date as string) - +new Date(a.frontmatter.date as string)) - for (const { url, excerpt, frontmatter, html } of filteredPosts) { - const fullUrl = `${hostname}${url}`; + for (const { url, frontmatter, html } of filteredPosts) { + const fullUrl = `${hostname}${url}` // Strip `​` from `html` string - const content = html?.replace(/​/g, ""); + const content = html?.replace(/​/g, "") feed.addItem({ title: frontmatter.title, @@ -37,12 +37,12 @@ async function generateFeed(config: SiteConfig, hostname: string) { link: fullUrl, // description: excerpt, description: frontmatter.description, - content: content, + content, date: frontmatter.date, - }); + }) } - writeFileSync(path.join(config.outDir, "feed.rss"), feed.rss2()); + writeFileSync(path.join(config.outDir, "feed.rss"), feed.rss2()) } -export default generateFeed; +export default generateFeed diff --git a/website/src/.vitepress/config/hooks/generateMeta.ts b/website/src/.vitepress/config/hooks/generateMeta.ts index f269a4a3..14124d3c 100644 --- a/website/src/.vitepress/config/hooks/generateMeta.ts +++ b/website/src/.vitepress/config/hooks/generateMeta.ts @@ -1,21 +1,21 @@ -import type { HeadConfig, TransformContext } from "vitepress"; +import type { HeadConfig, TransformContext } from "vitepress" -const generateMeta = (context: TransformContext, hostname: string) => { - const head: HeadConfig[] = []; - const { pageData } = context; +function generateMeta(context: TransformContext, hostname: string) { + const head: HeadConfig[] = [] + const { pageData } = context - const url = `${hostname}/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, "$2")}`; + const url = `${hostname}/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, "$2")}` - head.push(["link", { rel: "canonical", href: url }]); - head.push(["meta", { property: "og:url", content: url }]); - head.push(["meta", { name: "twitter:url", content: url }]); - head.push(["meta", { name: "twitter:card", content: "summary_large_image" }]); + head.push(["link", { rel: "canonical", href: url }]) + head.push(["meta", { property: "og:url", content: url }]) + head.push(["meta", { name: "twitter:url", content: url }]) + head.push(["meta", { name: "twitter:card", content: "summary_large_image" }]) if (pageData.frontmatter.theme) { - head.push(["meta", { name: "theme-color", content: pageData.frontmatter.theme }]); + head.push(["meta", { name: "theme-color", content: pageData.frontmatter.theme }]) } if (pageData.frontmatter.type) { - head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]); + head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]) } if (pageData.frontmatter.customMetaTitle) { head.push([ @@ -24,18 +24,18 @@ const generateMeta = (context: TransformContext, hostname: string) => { property: "og:title", content: pageData.frontmatter.customMetaTitle, }, - ]); + ]) head.push([ "meta", { name: "twitter:title", content: pageData.frontmatter.customMetaTitle, }, - ]); - head.push(["meta", { property: "og:site_name", content: "" }]); + ]) + head.push(["meta", { property: "og:site_name", content: "" }]) } else { - head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]); - head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]); + head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]) + head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]) } if (pageData.frontmatter.description) { head.push([ @@ -44,14 +44,14 @@ const generateMeta = (context: TransformContext, hostname: string) => { property: "og:description", content: pageData.frontmatter.description, }, - ]); + ]) head.push([ "meta", { name: "twitter:description", content: pageData.frontmatter.description, }, - ]); + ]) } if (pageData.frontmatter.image) { head.push([ @@ -60,30 +60,30 @@ const generateMeta = (context: TransformContext, hostname: string) => { property: "og:image", content: `${hostname}/${pageData.frontmatter.image.replace(/^\//, "")}`, }, - ]); + ]) head.push([ "meta", { name: "twitter:image", content: `${hostname}/${pageData.frontmatter.image.replace(/^\//, "")}`, }, - ]); + ]) } else { - const url = pageData.filePath.replace("index.md", "").replace(".md", ""); - const imageUrl = `${url}/__og_image__/og.png`.replace(/\/\//g, "/").replace(/^\//, ""); + const url = pageData.filePath.replace("index.md", "").replace(".md", "") + const imageUrl = `${url}/__og_image__/og.png`.replace(/\/\//g, "/").replace(/^\//, "") - head.push(["meta", { property: "og:image", content: `${hostname}/${imageUrl}` }]); - head.push(["meta", { property: "og:image:width", content: "1200" }]); - head.push(["meta", { property: "og:image:height", content: "628" }]); - head.push(["meta", { property: "og:image:type", content: "image/png" }]); - head.push(["meta", { property: "og:image:alt", content: pageData.frontmatter.title }]); - head.push(["meta", { name: "twitter:image", content: `${hostname}/${imageUrl}` }]); - head.push(["meta", { name: "twitter:image:width", content: "1200" }]); - head.push(["meta", { name: "twitter:image:height", content: "628" }]); - head.push(["meta", { name: "twitter:image:alt", content: pageData.frontmatter.title }]); + head.push(["meta", { property: "og:image", content: `${hostname}/${imageUrl}` }]) + head.push(["meta", { property: "og:image:width", content: "1200" }]) + head.push(["meta", { property: "og:image:height", content: "628" }]) + head.push(["meta", { property: "og:image:type", content: "image/png" }]) + head.push(["meta", { property: "og:image:alt", content: pageData.frontmatter.title }]) + head.push(["meta", { name: "twitter:image", content: `${hostname}/${imageUrl}` }]) + head.push(["meta", { name: "twitter:image:width", content: "1200" }]) + head.push(["meta", { name: "twitter:image:height", content: "628" }]) + head.push(["meta", { name: "twitter:image:alt", content: pageData.frontmatter.title }]) } if (pageData.frontmatter.tag) { - head.push(["meta", { property: "article:tag", content: pageData.frontmatter.tag }]); + head.push(["meta", { property: "article:tag", content: pageData.frontmatter.tag }]) } if (pageData.frontmatter.date) { head.push([ @@ -92,7 +92,7 @@ const generateMeta = (context: TransformContext, hostname: string) => { property: "article:published_time", content: pageData.frontmatter.date, }, - ]); + ]) } if (pageData.lastUpdated && pageData.frontmatter.lastUpdated !== false) { head.push([ @@ -101,10 +101,10 @@ const generateMeta = (context: TransformContext, hostname: string) => { property: "article:modified_time", content: new Date(pageData.lastUpdated).toISOString(), }, - ]); + ]) } - return head; -}; + return head +} -export default generateMeta; +export default generateMeta diff --git a/website/src/.vitepress/config/hooks/generateOgImages.ts b/website/src/.vitepress/config/hooks/generateOgImages.ts index 4acdfd16..a5fd3321 100644 --- a/website/src/.vitepress/config/hooks/generateOgImages.ts +++ b/website/src/.vitepress/config/hooks/generateOgImages.ts @@ -1,17 +1,17 @@ -import { mkdir, readFile, writeFile } from "fs/promises"; -import { dirname, resolve } from "path"; -import { fileURLToPath } from "url"; -import { createContentLoader } from "vitepress"; -import type { ContentData, SiteConfig } from "vitepress"; -import { type SatoriOptions, satoriVue } from "x-satori/vue"; -import { renderAsync } from "@resvg/resvg-js"; +import { mkdir, readFile, writeFile } from "node:fs/promises" +import { dirname, resolve } from "node:path" +import { fileURLToPath } from "node:url" +import { createContentLoader } from "vitepress" +import type { ContentData, SiteConfig } from "vitepress" +import { type SatoriOptions, satoriVue } from "x-satori/vue" +import { renderAsync } from "@resvg/resvg-js" -const __dirname = dirname(fileURLToPath(import.meta.url)); -const __fonts = resolve(__dirname, "../../fonts"); +const __dirname = dirname(fileURLToPath(import.meta.url)) +const __fonts = resolve(__dirname, "../../fonts") async function generateOgImages(config: SiteConfig) { - const pages = await createContentLoader("**/*.md", { excerpt: true }).load(); - const template = await readFile(resolve(__dirname, "../../theme/components/OgImageTemplate.vue"), "utf-8"); + const pages = await createContentLoader("**/*.md", { excerpt: true }).load() + const template = await readFile(resolve(__dirname, "../../theme/components/OgImageTemplate.vue"), "utf-8") const fonts: SatoriOptions["fonts"] = [ { @@ -38,9 +38,9 @@ async function generateOgImages(config: SiteConfig) { weight: 700, style: "normal", }, - ]; + ] - const filteredPages = pages.filter((p) => p.frontmatter.image === undefined); + const filteredPages = pages.filter((p) => p.frontmatter.image === undefined) for (const page of filteredPages) { await generateImage({ @@ -48,21 +48,21 @@ async function generateOgImages(config: SiteConfig) { template, outDir: config.outDir, fonts, - }); + }) } } -export default generateOgImages; +export default generateOgImages interface GenerateImagesOptions { - page: ContentData; - template: string; - outDir: string; - fonts: SatoriOptions["fonts"]; + page: ContentData + template: string + outDir: string + fonts: SatoriOptions["fonts"] } async function generateImage({ page, template, outDir, fonts }: GenerateImagesOptions) { - const { frontmatter, url } = page; + const { frontmatter, url } = page const options: SatoriOptions = { width: 1200, @@ -79,21 +79,21 @@ async function generateImage({ page, template, outDir, fonts }: GenerateImagesOp : frontmatter.description, dir: url.startsWith("/docs/faq/") ? "FAQ" : url.startsWith("/docs/guides/") ? "Guide" : undefined, }, - }; + } - const svg = await satoriVue(options, template); + const svg = await satoriVue(options, template) const render = await renderAsync(svg, { fitTo: { mode: "width", value: 1200, }, - }); + }) - const outputFolder = resolve(outDir, url.substring(1), "__og_image__"); - const outputFile = resolve(outputFolder, "og.png"); + const outputFolder = resolve(outDir, url.substring(1), "__og_image__") + const outputFile = resolve(outputFolder, "og.png") - await mkdir(outputFolder, { recursive: true }); + await mkdir(outputFolder, { recursive: true }) - return await writeFile(outputFile, render.asPng()); + return await writeFile(outputFile, render.asPng()) } diff --git a/website/src/.vitepress/config/markdownConfig.ts b/website/src/.vitepress/config/markdownConfig.ts index 1b723676..5e2f5136 100644 --- a/website/src/.vitepress/config/markdownConfig.ts +++ b/website/src/.vitepress/config/markdownConfig.ts @@ -1,14 +1,14 @@ -import type { MarkdownOptions } from "vitepress"; +import type { MarkdownOptions } from "vitepress" -import { attrs } from "@mdit/plugin-attrs"; -import { figure } from "@mdit/plugin-figure"; -import { imgLazyload } from "@mdit/plugin-img-lazyload"; -import { imgMark } from "@mdit/plugin-img-mark"; -import { imgSize } from "@mdit/plugin-img-size"; -import { include } from "@mdit/plugin-include"; -import { tabsMarkdownPlugin } from "vitepress-plugin-tabs"; -import shortcode_plugin from "markdown-it-shortcode-tag"; -import shortcodes from "./shortcodes"; +import { attrs } from "@mdit/plugin-attrs" +import { figure } from "@mdit/plugin-figure" +import { imgLazyload } from "@mdit/plugin-img-lazyload" +import { imgMark } from "@mdit/plugin-img-mark" +import { imgSize } from "@mdit/plugin-img-size" +import { include } from "@mdit/plugin-include" +import { tabsMarkdownPlugin } from "vitepress-plugin-tabs" +import shortcode_plugin from "markdown-it-shortcode-tag" +import shortcodes from "./shortcodes" const markdownConfig: MarkdownOptions = { config: (md) => { @@ -22,8 +22,8 @@ const markdownConfig: MarkdownOptions = { currentPath: (env) => env.filePath, }) .use(tabsMarkdownPlugin) - .use(shortcode_plugin, shortcodes); + .use(shortcode_plugin, shortcodes) }, -}; +} -export default markdownConfig; +export default markdownConfig diff --git a/website/src/.vitepress/config/navigation/navbar.ts b/website/src/.vitepress/config/navigation/navbar.ts index 6c88e65d..fd24c8a9 100644 --- a/website/src/.vitepress/config/navigation/navbar.ts +++ b/website/src/.vitepress/config/navigation/navbar.ts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" const nav: DefaultTheme.NavItem[] = [ { @@ -24,6 +24,6 @@ const nav: DefaultTheme.NavItem[] = [ }, ], }, -]; +] -export default nav; +export default nav diff --git a/website/src/.vitepress/config/navigation/sidebar.ts b/website/src/.vitepress/config/navigation/sidebar.ts index e7a9e12f..85c69fc0 100644 --- a/website/src/.vitepress/config/navigation/sidebar.ts +++ b/website/src/.vitepress/config/navigation/sidebar.ts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" const sidebar: DefaultTheme.SidebarMulti = { "/download/": defaultSidebar(), @@ -8,7 +8,7 @@ const sidebar: DefaultTheme.SidebarMulti = { "/changelogs/": defaultSidebar(), "/news/": defaultSidebar(), "/sandbox/": defaultSidebar(), -}; +} function defaultSidebar(): DefaultTheme.SidebarItem[] { return [ @@ -137,7 +137,7 @@ function defaultSidebar(): DefaultTheme.SidebarItem[] { }, ], }, - ]; + ] } -export default sidebar; +export default sidebar diff --git a/website/src/.vitepress/config/scripts/languages.ts b/website/src/.vitepress/config/scripts/languages.ts index c2a0db44..f6ff6245 100644 --- a/website/src/.vitepress/config/scripts/languages.ts +++ b/website/src/.vitepress/config/scripts/languages.ts @@ -1,21 +1,21 @@ export function simpleLangName(code: string) { if (code === "all") { - return "All"; + return "All" } - const namesInEnglish = new Intl.DisplayNames(["en"], { type: "language" }); - return capitalize(namesInEnglish.of(code)!, "en"); + const namesInEnglish = new Intl.DisplayNames(["en"], { type: "language" }) + return capitalize(namesInEnglish.of(code)!, "en") } export function langName(code: string) { if (code === "all") { - return "All"; + return "All" } - const namesInEnglish = new Intl.DisplayNames(["en"], { type: "language" }); - const namesInNative = new Intl.DisplayNames([code], { type: "language" }); - return `${capitalize(namesInEnglish.of(code)!, "en")} - ${capitalize(namesInNative.of(code)!, code)}`; + const namesInEnglish = new Intl.DisplayNames(["en"], { type: "language" }) + const namesInNative = new Intl.DisplayNames([code], { type: "language" }) + return `${capitalize(namesInEnglish.of(code)!, "en")} - ${capitalize(namesInNative.of(code)!, code)}` } function capitalize(string: string, locale: string) { - return string.charAt(0).toLocaleUpperCase(locale) + string.substring(1); + return string.charAt(0).toLocaleUpperCase(locale) + string.substring(1) } diff --git a/website/src/.vitepress/config/shortcodes.ts b/website/src/.vitepress/config/shortcodes.ts index 8b5c3948..71b76a70 100644 --- a/website/src/.vitepress/config/shortcodes.ts +++ b/website/src/.vitepress/config/shortcodes.ts @@ -1,86 +1,91 @@ const iconMappings = { - alertDecagramOutline: ``, - backupRestore: ``, - bookmarkBoxOutline: ``, - bookOpenOutline: ``, - cloudOffOutline: ``, - codeTags: ``, - cog: ``, - compassOutline: ``, - dotsHorizontal: ``, - downloadOutline: ``, - glasses: ``, - helpCircleOutline: ``, - history: ``, - informationOutline: ``, - labelOutline: ``, - paletteOutline: ``, - queryStats: ``, - security: ``, - sync: ``, -}; + alertDecagramOutline: '', + backupRestore: '', + bookmarkBoxOutline: '', + bookOpenOutline: '', + cloudOffOutline: '', + codeTags: '', + cog: '', + compassOutline: '', + dotsHorizontal: '', + downloadOutline: '', + glasses: '', + helpCircleOutline: '', + history: '', + informationOutline: '', + labelOutline: '', + paletteOutline: '', + queryStats: '', + security: '', + sync: '', +} -const navigationMappings = { +interface Navigation { + name: string + icon?: string + dependsOn?: string +} + +const navigationMappings: Record = { // Main menus - main_library: { name: "Library", icon: iconMappings["bookmarkBoxOutline"] }, - main_updates: { name: "Updates", icon: iconMappings["alertDecagramOutline"] }, - main_history: { name: "History", icon: iconMappings["history"] }, - main_browse: { name: "Browse", icon: iconMappings["compassOutline"] }, - main_more: { name: "More", icon: iconMappings["dotsHorizontal"] }, + "main_library": { name: "Library", icon: iconMappings.bookmarkBoxOutline }, + "main_updates": { name: "Updates", icon: iconMappings.alertDecagramOutline }, + "main_history": { name: "History", icon: iconMappings.history }, + "main_browse": { name: "Browse", icon: iconMappings.compassOutline }, + "main_more": { name: "More", icon: iconMappings.dotsHorizontal }, // Browse menu - sources: { name: "Sources", dependsOn: "main_browse" }, - extensions: { name: "Extensions", dependsOn: "main_browse" }, - migrate: { name: "Migrate", dependsOn: "main_browse" }, + "sources": { name: "Sources", dependsOn: "main_browse" }, + "extensions": { name: "Extensions", dependsOn: "main_browse" }, + "migrate": { name: "Migrate", dependsOn: "main_browse" }, // More menu - "downloaded-only": { name: "Downloaded only", icon: iconMappings["cloudOffOutline"], dependsOn: "main_more" }, - "incognito-mode": { name: "Incognito mode", icon: iconMappings["glasses"], dependsOn: "main_more" }, - "download-queue": { name: "Download queue", icon: iconMappings["downloadOutline"], dependsOn: "main_more" }, - categories: { name: "Categories", icon: iconMappings["labelOutline"], dependsOn: "main_more" }, - statistics: { name: "Statistics", icon: iconMappings["queryStats"], dependsOn: "main_more" }, - "backup-and-restore": { name: "Backup and restore", icon: iconMappings["backupRestore"], dependsOn: "main_more" }, - settings: { name: "Settings", icon: iconMappings["cog"], dependsOn: "main_more" }, - about: { name: "About", icon: iconMappings["informationOutline"], dependsOn: "main_more" }, - help: { name: "Help", icon: iconMappings["helpCircleOutline"], dependsOn: "main_more" }, + "downloaded-only": { name: "Downloaded only", icon: iconMappings.cloudOffOutline, dependsOn: "main_more" }, + "incognito-mode": { name: "Incognito mode", icon: iconMappings.glasses, dependsOn: "main_more" }, + "download-queue": { name: "Download queue", icon: iconMappings.downloadOutline, dependsOn: "main_more" }, + "categories": { name: "Categories", icon: iconMappings.labelOutline, dependsOn: "main_more" }, + "statistics": { name: "Statistics", icon: iconMappings.queryStats, dependsOn: "main_more" }, + "backup-and-restore": { name: "Backup and restore", icon: iconMappings.backupRestore, dependsOn: "main_more" }, + "settings": { name: "Settings", icon: iconMappings.cog, dependsOn: "main_more" }, + "about": { name: "About", icon: iconMappings.informationOutline, dependsOn: "main_more" }, + "help": { name: "Help", icon: iconMappings.helpCircleOutline, dependsOn: "main_more" }, // Settings submenu - appearance: { name: "Appearance", icon: iconMappings["paletteOutline"], dependsOn: "settings" }, - library: { name: "Library", icon: iconMappings["bookmarkBoxOutline"], dependsOn: "settings" }, - downloads: { name: "Downloads", icon: iconMappings["downloadOutline"], dependsOn: "settings" }, - tracking: { name: "Tracking", icon: iconMappings["sync"], dependsOn: "settings" }, - browse: { name: "Browse", icon: iconMappings["compassOutline"], dependsOn: "settings" }, - "security-and-privacy": { name: "Security and privacy", icon: iconMappings["security"], dependsOn: "settings" }, - reader: { name: "Reader", icon: iconMappings["bookOpenOutline"], dependsOn: "settings" }, - advanced: { name: "Advanced", icon: iconMappings["codeTags"], dependsOn: "settings" }, -}; + "appearance": { name: "Appearance", icon: iconMappings.paletteOutline, dependsOn: "settings" }, + "library": { name: "Library", icon: iconMappings.bookmarkBoxOutline, dependsOn: "settings" }, + "downloads": { name: "Downloads", icon: iconMappings.downloadOutline, dependsOn: "settings" }, + "tracking": { name: "Tracking", icon: iconMappings.sync, dependsOn: "settings" }, + "browse": { name: "Browse", icon: iconMappings.compassOutline, dependsOn: "settings" }, + "security-and-privacy": { name: "Security and privacy", icon: iconMappings.security, dependsOn: "settings" }, + "reader": { name: "Reader", icon: iconMappings.bookOpenOutline, dependsOn: "settings" }, + "advanced": { name: "Advanced", icon: iconMappings.codeTags, dependsOn: "settings" }, +} -function generateNavigationHtml(navKey) { - const navData = navigationMappings[navKey]; +function generateNavigationHtml(navKey: string) { + const navData = navigationMappings[navKey] if (!navData) { - return "Unsupported Navigation!"; + return "Unsupported Navigation!" } - const { name, icon, dependsOn } = navData; + const { name, icon, dependsOn } = navData - const iconHtml = icon ? icon : ""; - let html = `${iconHtml}${name}`; + const iconHtml = icon ?? "" + let html = `${iconHtml}${name}` if (dependsOn) { - html = `${generateNavigationHtml(dependsOn)} -> ${html}`; + html = `${generateNavigationHtml(dependsOn)} -> ${html}` } - return html; + return html } const shortcodes = { nav: { - render: function (attrs, env) { - const { method, to } = attrs; - return generateNavigationHtml(to); + render({ to }) { + return generateNavigationHtml(to) }, }, -}; +} -export default shortcodes; +export default shortcodes diff --git a/website/src/.vitepress/config/themeConfig.ts b/website/src/.vitepress/config/themeConfig.ts index 176d3b57..6a06056c 100644 --- a/website/src/.vitepress/config/themeConfig.ts +++ b/website/src/.vitepress/config/themeConfig.ts @@ -1,7 +1,7 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" -import nav from "./navigation/navbar"; -import sidebar from "./navigation/sidebar"; +import nav from "./navigation/navbar" +import sidebar from "./navigation/sidebar" const themeConfig: DefaultTheme.Config = { logo: { @@ -10,8 +10,8 @@ const themeConfig: DefaultTheme.Config = { height: 24, }, - nav: nav, - sidebar: sidebar, + nav, + sidebar, outline: [2, 3], @@ -43,11 +43,11 @@ const themeConfig: DefaultTheme.Config = { link: "https://reddit.com/r/Tachiyomi", ariaLabel: "Support subreddit", }, - //{ icon: "instagram", link: "https://instagram.com/tachiyomiorg", ariaLabel: "Instagram Page" }, + // { icon: "instagram", link: "https://instagram.com/tachiyomiorg", ariaLabel: "Instagram Page" }, ], footer: { - message: `Open-source Apache Licensed | Privacy policy | Powered by Netlify Netlify Logo`, + message: "Open-source Apache Licensed | Privacy policy | Powered by Netlify \"Netlify", copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`, }, @@ -67,6 +67,6 @@ const themeConfig: DefaultTheme.Config = { search: { provider: "local", }, -}; +} -export default themeConfig; +export default themeConfig diff --git a/website/src/.vitepress/theme/components/Changelog.vue b/website/src/.vitepress/theme/components/Changelog.vue index 5f6d77c2..1f270305 100644 --- a/website/src/.vitepress/theme/components/Changelog.vue +++ b/website/src/.vitepress/theme/components/Changelog.vue @@ -1,20 +1,20 @@ diff --git a/website/src/.vitepress/theme/components/ChangelogsList.vue b/website/src/.vitepress/theme/components/ChangelogsList.vue index e8a14fcb..9d5e1dd7 100644 --- a/website/src/.vitepress/theme/components/ChangelogsList.vue +++ b/website/src/.vitepress/theme/components/ChangelogsList.vue @@ -1,26 +1,26 @@