From 07d13022cce46044569d9b4580485e5145fefb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E6=B8=B8=E5=90=9B?= Date: Mon, 30 Aug 2021 10:43:10 +0800 Subject: [PATCH] fix: add type for markdown-it-link-attributes (#179) --- package.json | 1 + pnpm-lock.yaml | 28 ++++++++++++++++++++++++++++ vite.config.ts | 1 - 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d29c8a..456a38f 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@antfu/eslint-config": "^0.7.0", "@iconify/json": "^1.1.393", "@intlify/vite-plugin-vue-i18n": "^2.4.0", + "@types/markdown-it-link-attributes": "^3.0.1", "@types/nprogress": "^0.2.0", "@vitejs/plugin-vue": "^1.6.0", "@vue/compiler-sfc": "^3.2.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc05334..d0193c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,7 @@ specifiers: '@antfu/eslint-config': ^0.7.0 '@iconify/json': ^1.1.393 '@intlify/vite-plugin-vue-i18n': ^2.4.0 + '@types/markdown-it-link-attributes': ^3.0.1 '@types/nprogress': ^0.2.0 '@vitejs/plugin-vue': ^1.6.0 '@vue/compiler-sfc': ^3.2.6 @@ -52,6 +53,7 @@ devDependencies: '@antfu/eslint-config': 0.7.0_eslint@7.32.0+typescript@4.3.5 '@iconify/json': 1.1.393 '@intlify/vite-plugin-vue-i18n': 2.4.0_c492082eb9facedb3ae01550d308af38 + '@types/markdown-it-link-attributes': 3.0.1 '@types/nprogress': 0.2.0 '@vitejs/plugin-vue': 1.6.0_@vue+compiler-sfc@3.2.6 '@vue/compiler-sfc': 3.2.6 @@ -1542,6 +1544,28 @@ packages: resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} dev: true + /@types/linkify-it/3.0.2: + resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} + dev: true + + /@types/markdown-it-link-attributes/3.0.1: + resolution: {integrity: sha512-K8RnNb1q8j7rDOJbMF7AnlhCC/45BjrQ8z3WZWOrvkBIl8u9RXvmBdG/hfpnmK1JhhEZcmFEKWt+ilW1Mly+2Q==} + dependencies: + '@types/markdown-it': 12.2.1 + dev: true + + /@types/markdown-it/12.2.1: + resolution: {integrity: sha512-iij+ilRX/vxtUPCREjn74xzHo/RorHJDwOsJ6X+TgKw7zSvazhVXnDfwlTnyLOMdiVUjtRYU4CrcUZ7Aci4PmQ==} + dependencies: + '@types/linkify-it': 3.0.2 + '@types/mdurl': 1.0.2 + highlight.js: 10.7.3 + dev: true + + /@types/mdurl/1.0.2: + resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} + dev: true + /@types/node/16.7.1: resolution: {integrity: sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==} dev: true @@ -3580,6 +3604,10 @@ packages: hasBin: true dev: true + /highlight.js/10.7.3: + resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + dev: true + /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true diff --git a/vite.config.ts b/vite.config.ts index 2db5a5b..5949fe5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,7 +11,6 @@ import AutoImport from 'unplugin-auto-import/vite' import { VitePWA } from 'vite-plugin-pwa' import VueI18n from '@intlify/vite-plugin-vue-i18n' import Prism from 'markdown-it-prism' -// @ts-expect-error missing types import LinkAttributes from 'markdown-it-link-attributes' const markdownWrapperClasses = 'prose prose-sm m-auto text-left'