diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index de4d1f00..00000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -node_modules diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 40065526..00000000 --- a/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "root": true, - "extends": ["@nuxt/eslint-config"], - "rules": { - "semi": ["error", "never"], - "quotes": ["error", "single"], - "quote-props": ["error", "as-needed"], - "vue/multi-word-component-names": "off" - } -} diff --git a/.github/scripts/bump-edge.ts b/.github/scripts/bump-edge.ts index 8cc85bad..cd6c13e0 100644 --- a/.github/scripts/bump-edge.ts +++ b/.github/scripts/bump-edge.ts @@ -2,7 +2,7 @@ import { execSync } from 'node:child_process' import { inc } from 'semver' import { determineBumpType, loadWorkspace } from './utils' -async function main () { +async function main() { const workspace = await loadWorkspace(process.cwd()) const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim().slice(0, 8) diff --git a/.github/scripts/utils.ts b/.github/scripts/utils.ts index 527b84a3..350db417 100644 --- a/.github/scripts/utils.ts +++ b/.github/scripts/utils.ts @@ -5,22 +5,24 @@ import { execaSync } from 'execa' import { determineSemverChange, getGitDiff, loadChangelogConfig, parseCommits } from 'changelogen' export interface Dep { - name: string, - range: string, + name: string + range: string type: string } type ThenArg = T extends PromiseLike ? U : T export type Package = ThenArg> -export async function loadPackage (dir: string) { +export async function loadPackage(dir: string) { const pkgPath = resolve(dir, 'package.json') const data = JSON.parse(await fsp.readFile(pkgPath, 'utf-8').catch(() => '{}')) const save = () => fsp.writeFile(pkgPath, JSON.stringify(data, null, 2) + '\n') const updateDeps = (reviver: (dep: Dep) => Dep | void) => { for (const type of ['dependencies', 'devDependencies', 'optionalDependencies', 'peerDependencies']) { - if (!data[type]) { continue } + if (!data[type]) { + continue + } for (const e of Object.entries(data[type])) { const dep: Dep = { name: e[0], range: e[1] as string, type } delete data[type][dep.name] @@ -39,7 +41,7 @@ export async function loadPackage (dir: string) { } } -export async function loadWorkspace (dir: string) { +export async function loadWorkspace(dir: string) { const workspacePkg = await loadPackage(dir) const pkgDirs = (await globby(['packages/*'], { onlyDirectories: true })).sort() @@ -47,7 +49,9 @@ export async function loadWorkspace (dir: string) { for (const pkgDir of pkgDirs) { const pkg = await loadPackage(pkgDir) - if (!pkg.data.name) { continue } + if (!pkg.data.name) { + continue + } packages.push(pkg) } @@ -73,7 +77,9 @@ export async function loadWorkspace (dir: string) { const setVersion = (name: string, newVersion: string, opts: { updateDeps?: boolean } = {}) => { find(name).data.version = newVersion - if (!opts.updateDeps) { return } + if (!opts.updateDeps) { + return + } for (const pkg of packages) { pkg.updateDeps((dep) => { @@ -97,7 +103,7 @@ export async function loadWorkspace (dir: string) { } } -export async function determineBumpType () { +export async function determineBumpType() { const config = await loadChangelogConfig(process.cwd()) const commits = await getLatestCommits() @@ -106,7 +112,7 @@ export async function determineBumpType () { return bumpType === 'major' ? 'minor' : bumpType } -export async function getLatestCommits () { +export async function getLatestCommits() { const config = await loadChangelogConfig(process.cwd()) let latestRef diff --git a/build.config.ts b/build.config.ts index 6b639cb6..39c0e2cb 100644 --- a/build.config.ts +++ b/build.config.ts @@ -1,9 +1,9 @@ +import fs from 'node:fs' import { defineBuildConfig } from 'unbuild' -import fs from 'fs' export default defineBuildConfig({ entries: [ - 'src/config.ts', + 'src/config.ts' ], hooks: { 'rollup:done': () => { diff --git a/docs/.eslintrc.cjs b/docs/.eslintrc.cjs index 38db3138..824a625f 100644 --- a/docs/.eslintrc.cjs +++ b/docs/.eslintrc.cjs @@ -5,4 +5,4 @@ module.exports = { 'vue/max-attributes-per-line': 'off', 'vue/multi-word-component-names': 'off' } -} \ No newline at end of file +} diff --git a/docs/app.config.ts b/docs/app.config.ts index 30214568..1f49bf0b 100644 --- a/docs/app.config.ts +++ b/docs/app.config.ts @@ -43,4 +43,4 @@ export default defineAppConfig({ titleTemplate: 'Nuxt MDC' } -}) \ No newline at end of file +}) diff --git a/docs/package.json b/docs/package.json index f377f4ac..14f46819 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,7 +17,7 @@ "@nuxt/eslint-config": "^0.3.9", "@nuxtjs/plausible": "^1.0.0", "@types/node": "^20.12.7", - "eslint": "^8.57.0", + "eslint": "^9.1.1", "nuxt": "^3.11.2" } } diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..7271bec3 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,26 @@ +// @ts-check +import { createConfigForNuxt } from '@nuxt/eslint-config/flat' + +export default createConfigForNuxt({ + features: { + tooling: true, + stylistic: { + quoteProps: 'as-needed', + commaDangle: 'never', + braceStyle: '1tbs' + } + }, + dirs: { + src: [ + './playground', + './docs' + ] + } +}).overrideRules({ + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-invalid-void-type': 'off', + '@typescript-eslint/no-dynamic-delete': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/no-v-html': 'off', + 'vue/multi-word-component-names': 'off' +}) diff --git a/nuxt.config.ts b/nuxt.config.ts index 5aac96d2..30716909 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,4 +1,4 @@ -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' export default defineNuxtConfig({ typescript: { @@ -7,7 +7,7 @@ export default defineNuxtConfig({ paths: { '@nuxtjs/mdc/config': [ fileURLToPath(new URL('./src/config.ts', import.meta.url)) - ], + ] } } } diff --git a/package.json b/package.json index f65902e7..c26b9ca2 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "@types/mdurl": "^1.0.5", "@types/node": "^20.12.7", "changelogen": "^0.5.5", - "eslint": "^8.57.0", + "eslint": "^9.1.1", "nuxt": "^3.11.2", "rehype": "^13.0.1", "release-it": "^17.2.0", diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index dd57c6ae..91de713a 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -3,12 +3,11 @@ export default defineNuxtConfig({ '@nuxt/ui', '../src/module' ], - // @ts-ignore mdc: { highlight: { theme: { default: 'vitesse-light', - dark: 'material-theme-palenight', + dark: 'material-theme-palenight' }, preload: [ 'sql' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8853e660..c24bdfc0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -116,10 +116,10 @@ importers: devDependencies: '@nuxt/devtools': specifier: latest - version: 1.2.0(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) + version: 1.2.0(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) '@nuxt/eslint-config': specifier: ^0.3.9 - version: 0.3.9(eslint@8.57.0)(typescript@5.4.5) + version: 0.3.9(eslint@9.1.1)(typescript@5.4.5) '@nuxt/module-builder': specifier: ^0.5.5 version: 0.5.5(@nuxt/kit@3.11.2(rollup@4.16.4))(nuxi@3.11.1)(typescript@5.4.5) @@ -131,7 +131,7 @@ importers: version: 3.12.1(h3@1.11.1)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vitest@1.5.0(@types/node@20.12.7)(terser@5.30.4))(vue-router@4.3.2(vue@3.4.24(typescript@5.4.5)))(vue@3.4.24(typescript@5.4.5)) '@nuxt/ui': specifier: ^2.15.2 - version: 2.15.2(focus-trap@7.5.4)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) + version: 2.15.2(focus-trap@7.5.4)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) '@types/mdurl': specifier: ^1.0.5 version: 1.0.5 @@ -142,11 +142,11 @@ importers: specifier: ^0.5.5 version: 0.5.5 eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.1.1 + version: 9.1.1 nuxt: specifier: ^3.11.2 - version: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + version: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) rehype: specifier: ^13.0.1 version: 13.0.1 @@ -161,7 +161,7 @@ importers: devDependencies: nuxt: specifier: latest - version: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + version: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) packages: @@ -681,9 +681,9 @@ packages: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.0.2': + resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/js@9.1.1': resolution: {integrity: sha512-5WoDz3Y19Bg2BnErkZTp0en+c/i9PvgFS7MBe1+m60HjFr0hrphlAGp4yzI7pxpt4xShln4ZyYp4neJm8hmOkQ==} @@ -714,8 +714,8 @@ packages: peerDependencies: vue: ^3.2.0 - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} '@humanwhocodes/module-importer@1.0.1': @@ -725,6 +725,10 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + '@humanwhocodes/retry@0.2.3': + resolution: {integrity: sha512-X38nUbachlb01YMlvPFojKoiXq+LzZvuSce70KPMPdeM1Rj03k4dR7lDslhbqXn3Ang4EU3+EAmwEAsbrjHW3g==} + engines: {node: '>=18.18'} + '@iarna/toml@2.2.5': resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} @@ -2837,15 +2841,27 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.1: + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.1.1: + resolution: {integrity: sha512-b4cRQ0BeZcSEzPpY2PjFY70VbO32K7BStTGtBsnIGdTSEEQzBi8hPBcGQmTG2zUvFr9uLe0TK42bw8YszuHEqg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + espree@10.0.1: + resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2945,9 +2961,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} @@ -2968,9 +2984,9 @@ packages: resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} engines: {node: '>=18'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flat@6.0.1: resolution: {integrity: sha512-/3FfIa8mbrg3xE7+wAhWeV+bd7L2Mof+xtZb5dRDKZ+wDvYJK4WDYeIOuOhre5Yv5aQObZrlbRmk3RTSiuQBtw==} @@ -3150,6 +3166,10 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + globals@15.0.0: resolution: {integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==} engines: {node: '>=18'} @@ -6662,9 +6682,9 @@ snapshots: '@esbuild/win32-x64@0.20.2': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.1.1)': dependencies: - eslint: 8.57.0 + eslint: 9.1.1 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.0': {} @@ -6683,7 +6703,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/eslintrc@3.0.2': + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 10.0.1 + globals: 14.0.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color '@eslint/js@9.1.1': {} @@ -6708,7 +6740,7 @@ snapshots: '@tanstack/vue-virtual': 3.4.0(vue@3.4.24(typescript@5.4.5)) vue: 3.4.24(typescript@5.4.5) - '@humanwhocodes/config-array@0.11.14': + '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4 @@ -6720,6 +6752,8 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.2.3': {} + '@iarna/toml@2.2.5': {} '@iconify-json/heroicons@1.1.20': @@ -6912,12 +6946,12 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@1.2.0(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))': + '@nuxt/devtools-kit@1.2.0(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))': dependencies: '@nuxt/kit': 3.11.2(rollup@4.16.4) '@nuxt/schema': 3.11.2(rollup@4.16.4) execa: 7.2.0 - nuxt: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + nuxt: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) vite: 5.2.10(@types/node@20.12.7)(terser@5.30.4) transitivePeerDependencies: - rollup @@ -6936,10 +6970,10 @@ snapshots: rc9: 2.1.2 semver: 7.6.0 - '@nuxt/devtools@1.2.0(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5))': + '@nuxt/devtools@1.2.0(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5))': dependencies: '@antfu/utils': 0.7.7 - '@nuxt/devtools-kit': 1.2.0(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + '@nuxt/devtools-kit': 1.2.0(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) '@nuxt/devtools-wizard': 1.2.0 '@nuxt/kit': 3.11.2(rollup@4.16.4) '@vue/devtools-applet': 7.0.27(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) @@ -6960,7 +6994,7 @@ snapshots: launch-editor: 2.6.1 local-pkg: 0.5.0 magicast: 0.3.4 - nuxt: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + nuxt: 3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) nypm: 0.3.8 ohash: 1.1.3 pacote: 18.0.0 @@ -7001,34 +7035,34 @@ snapshots: - utf-8-validate - vue - '@nuxt/eslint-config@0.3.9(eslint@8.57.0)(typescript@5.4.5)': + '@nuxt/eslint-config@0.3.9(eslint@9.1.1)(typescript@5.4.5)': dependencies: '@eslint/js': 9.1.1 - '@nuxt/eslint-plugin': 0.3.9(eslint@8.57.0)(typescript@5.4.5) + '@nuxt/eslint-plugin': 0.3.9(eslint@9.1.1)(typescript@5.4.5) '@rushstack/eslint-patch': 1.10.2 - '@stylistic/eslint-plugin': 1.7.2(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/eslint-plugin': 7.7.1(@typescript-eslint/parser@7.7.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@stylistic/eslint-plugin': 1.7.2(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.7.1(@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5))(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/parser': 7.7.1(eslint@9.1.1)(typescript@5.4.5) + eslint: 9.1.1 eslint-config-flat-gitignore: 0.1.5 eslint-flat-config-utils: 0.2.3 - eslint-plugin-import-x: 0.5.0(eslint@8.57.0)(typescript@5.4.5) - eslint-plugin-jsdoc: 48.2.3(eslint@8.57.0) - eslint-plugin-unicorn: 52.0.0(eslint@8.57.0) - eslint-plugin-vue: 9.25.0(eslint@8.57.0) + eslint-plugin-import-x: 0.5.0(eslint@9.1.1)(typescript@5.4.5) + eslint-plugin-jsdoc: 48.2.3(eslint@9.1.1) + eslint-plugin-unicorn: 52.0.0(eslint@9.1.1) + eslint-plugin-vue: 9.25.0(eslint@9.1.1) globals: 15.0.0 pathe: 1.1.2 tslib: 2.6.2 - vue-eslint-parser: 9.4.2(eslint@8.57.0) + vue-eslint-parser: 9.4.2(eslint@9.1.1) transitivePeerDependencies: - supports-color - typescript - '@nuxt/eslint-plugin@0.3.9(eslint@8.57.0)(typescript@5.4.5)': + '@nuxt/eslint-plugin@0.3.9(eslint@9.1.1)(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) + eslint: 9.1.1 transitivePeerDependencies: - supports-color - typescript @@ -7148,7 +7182,7 @@ snapshots: '@nuxt/ui-templates@1.3.3': {} - '@nuxt/ui@2.15.2(focus-trap@7.5.4)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5))': + '@nuxt/ui@2.15.2(focus-trap@7.5.4)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5))': dependencies: '@egoist/tailwindcss-icons': 1.7.4(tailwindcss@3.4.3) '@headlessui/tailwindcss': 0.2.0(tailwindcss@3.4.3) @@ -7167,7 +7201,7 @@ snapshots: '@vueuse/math': 10.9.0(vue@3.4.24(typescript@5.4.5)) defu: 6.1.4 fuse.js: 6.6.2 - nuxt-icon: 0.6.10(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) + nuxt-icon: 0.6.10(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) ohash: 1.1.3 pathe: 1.1.2 scule: 1.3.0 @@ -7194,7 +7228,7 @@ snapshots: - vite - vue - '@nuxt/vite-builder@3.11.2(@types/node@20.12.7)(eslint@8.57.0)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(vue@3.4.24(typescript@5.4.5))': + '@nuxt/vite-builder@3.11.2(@types/node@20.12.7)(eslint@9.1.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(vue@3.4.24(typescript@5.4.5))': dependencies: '@nuxt/kit': 3.11.2(rollup@4.16.4) '@rollup/plugin-replace': 5.0.5(rollup@4.16.4) @@ -7228,7 +7262,7 @@ snapshots: unplugin: 1.10.1 vite: 5.2.10(@types/node@20.12.7)(terser@5.30.4) vite-node: 1.5.0(@types/node@20.12.7)(terser@5.30.4) - vite-plugin-checker: 0.6.4(eslint@8.57.0)(optionator@0.9.3)(typescript@5.4.5)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + vite-plugin-checker: 0.6.4(eslint@9.1.1)(optionator@0.9.3)(typescript@5.4.5)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) vue: 3.4.24(typescript@5.4.5) vue-bundle-renderer: 2.0.0 transitivePeerDependencies: @@ -7643,50 +7677,50 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} - '@stylistic/eslint-plugin-js@1.7.2(eslint@8.57.0)': + '@stylistic/eslint-plugin-js@1.7.2(eslint@9.1.1)': dependencies: '@types/eslint': 8.56.10 acorn: 8.11.3 escape-string-regexp: 4.0.0 - eslint: 8.57.0 + eslint: 9.1.1 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - '@stylistic/eslint-plugin-jsx@1.7.2(eslint@8.57.0)': + '@stylistic/eslint-plugin-jsx@1.7.2(eslint@9.1.1)': dependencies: - '@stylistic/eslint-plugin-js': 1.7.2(eslint@8.57.0) + '@stylistic/eslint-plugin-js': 1.7.2(eslint@9.1.1) '@types/eslint': 8.56.10 - eslint: 8.57.0 + eslint: 9.1.1 estraverse: 5.3.0 picomatch: 4.0.2 - '@stylistic/eslint-plugin-plus@1.7.2(eslint@8.57.0)(typescript@5.4.5)': + '@stylistic/eslint-plugin-plus@1.7.2(eslint@9.1.1)(typescript@5.4.5)': dependencies: '@types/eslint': 8.56.10 - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 6.21.0(eslint@9.1.1)(typescript@5.4.5) + eslint: 9.1.1 transitivePeerDependencies: - supports-color - typescript - '@stylistic/eslint-plugin-ts@1.7.2(eslint@8.57.0)(typescript@5.4.5)': + '@stylistic/eslint-plugin-ts@1.7.2(eslint@9.1.1)(typescript@5.4.5)': dependencies: - '@stylistic/eslint-plugin-js': 1.7.2(eslint@8.57.0) + '@stylistic/eslint-plugin-js': 1.7.2(eslint@9.1.1) '@types/eslint': 8.56.10 - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 6.21.0(eslint@9.1.1)(typescript@5.4.5) + eslint: 9.1.1 transitivePeerDependencies: - supports-color - typescript - '@stylistic/eslint-plugin@1.7.2(eslint@8.57.0)(typescript@5.4.5)': + '@stylistic/eslint-plugin@1.7.2(eslint@9.1.1)(typescript@5.4.5)': dependencies: - '@stylistic/eslint-plugin-js': 1.7.2(eslint@8.57.0) - '@stylistic/eslint-plugin-jsx': 1.7.2(eslint@8.57.0) - '@stylistic/eslint-plugin-plus': 1.7.2(eslint@8.57.0)(typescript@5.4.5) - '@stylistic/eslint-plugin-ts': 1.7.2(eslint@8.57.0)(typescript@5.4.5) + '@stylistic/eslint-plugin-js': 1.7.2(eslint@9.1.1) + '@stylistic/eslint-plugin-jsx': 1.7.2(eslint@9.1.1) + '@stylistic/eslint-plugin-plus': 1.7.2(eslint@9.1.1)(typescript@5.4.5) + '@stylistic/eslint-plugin-ts': 1.7.2(eslint@9.1.1)(typescript@5.4.5) '@types/eslint': 8.56.10 - eslint: 8.57.0 + eslint: 9.1.1 transitivePeerDependencies: - supports-color - typescript @@ -7781,16 +7815,16 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5))(eslint@9.1.1)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.7.1(eslint@9.1.1)(typescript@5.4.5) '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/type-utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/type-utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.7.1 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.1.1 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -7801,14 +7835,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.7.1(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5)': dependencies: '@typescript-eslint/scope-manager': 7.7.1 '@typescript-eslint/types': 7.7.1 '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.7.1 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.1.1 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -7824,12 +7858,12 @@ snapshots: '@typescript-eslint/types': 7.7.1 '@typescript-eslint/visitor-keys': 7.7.1 - '@typescript-eslint/type-utils@7.7.1(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.7.1(eslint@9.1.1)(typescript@5.4.5)': dependencies: '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.1.1 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -7870,29 +7904,29 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@6.21.0(eslint@9.1.1)(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) - eslint: 8.57.0 + eslint: 9.1.1 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.7.1(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.7.1(eslint@9.1.1)(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.7.1 '@typescript-eslint/types': 7.7.1 '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - eslint: 8.57.0 + eslint: 9.1.1 semver: 7.6.0 transitivePeerDependencies: - supports-color @@ -9452,12 +9486,12 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@0.5.0(eslint@8.57.0)(typescript@5.4.5): + eslint-plugin-import-x@0.5.0(eslint@9.1.1)(typescript@5.4.5): dependencies: - '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) debug: 4.3.4 doctrine: 3.0.0 - eslint: 8.57.0 + eslint: 9.1.1 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.3 is-glob: 4.0.3 @@ -9467,14 +9501,14 @@ snapshots: - supports-color - typescript - eslint-plugin-jsdoc@48.2.3(eslint@8.57.0): + eslint-plugin-jsdoc@48.2.3(eslint@9.1.1): dependencies: '@es-joy/jsdoccomment': 0.42.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.57.0 + eslint: 9.1.1 esquery: 1.5.0 is-builtin-module: 3.2.1 semver: 7.6.0 @@ -9482,15 +9516,15 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-unicorn@52.0.0(eslint@8.57.0): + eslint-plugin-unicorn@52.0.0(eslint@9.1.1): dependencies: '@babel/helper-validator-identifier': 7.22.20 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@eslint/eslintrc': 2.1.4 ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.37.0 - eslint: 8.57.0 + eslint: 9.1.1 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -9504,16 +9538,16 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-vue@9.25.0(eslint@8.57.0): + eslint-plugin-vue@9.25.0(eslint@9.1.1): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) + eslint: 9.1.1 globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.16 semver: 7.6.0 - vue-eslint-parser: 9.4.2(eslint@8.57.0) + vue-eslint-parser: 9.4.2(eslint@9.1.1) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -9523,40 +9557,43 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 + eslint-scope@8.0.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + eslint-visitor-keys@3.4.3: {} - eslint@8.57.0: + eslint-visitor-keys@4.0.0: {} + + eslint@9.1.1: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/eslintrc': 3.0.2 + '@eslint/js': 9.1.1 + '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.2.3 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.1 + eslint-visitor-keys: 4.0.0 + espree: 10.0.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -9568,6 +9605,12 @@ snapshots: transitivePeerDependencies: - supports-color + espree@10.0.1: + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 4.0.0 + espree@9.6.1: dependencies: acorn: 8.11.3 @@ -9684,9 +9727,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 file-uri-to-path@1.0.0: {} @@ -9710,11 +9753,10 @@ snapshots: path-exists: 5.0.0 unicorn-magic: 0.1.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flat@6.0.1: {} @@ -9914,6 +9956,8 @@ snapshots: dependencies: type-fest: 0.20.2 + globals@14.0.0: {} + globals@15.0.0: {} globalthis@1.0.3: @@ -11465,11 +11509,11 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - nuxt-icon@0.6.10(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)): + nuxt-icon@0.6.10(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)): dependencies: '@iconify/collections': 1.0.416 '@iconify/vue': 4.1.2(vue@3.4.24(typescript@5.4.5)) - '@nuxt/devtools-kit': 1.2.0(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) + '@nuxt/devtools-kit': 1.2.0(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)) '@nuxt/kit': 3.11.2(rollup@4.16.4) transitivePeerDependencies: - nuxt @@ -11478,15 +11522,15 @@ snapshots: - vite - vue - nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)): + nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.2.0(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@8.57.0)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) + '@nuxt/devtools': 1.2.0(@unocss/reset@0.59.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(nuxt@3.11.2(@parcel/watcher@2.4.1)(@types/node@20.12.7)(@unocss/reset@0.59.4)(encoding@0.1.13)(eslint@9.1.1)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.16.4))(vue@3.4.24(typescript@5.4.5)))(fuse.js@6.6.2)(ioredis@5.4.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(rollup@4.16.4)(unocss@0.59.4(postcss@8.4.38)(rollup@4.16.4)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)))(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4))(vue@3.4.24(typescript@5.4.5)) '@nuxt/kit': 3.11.2(rollup@4.16.4) '@nuxt/schema': 3.11.2(rollup@4.16.4) '@nuxt/telemetry': 2.5.4(rollup@4.16.4) '@nuxt/ui-templates': 1.3.3 - '@nuxt/vite-builder': 3.11.2(@types/node@20.12.7)(eslint@8.57.0)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(vue@3.4.24(typescript@5.4.5)) + '@nuxt/vite-builder': 3.11.2(@types/node@20.12.7)(eslint@9.1.1)(optionator@0.9.3)(rollup@4.16.4)(terser@5.30.4)(typescript@5.4.5)(vue@3.4.24(typescript@5.4.5)) '@unhead/dom': 1.9.7 '@unhead/ssr': 1.9.7 '@unhead/vue': 1.9.7(vue@3.4.24(typescript@5.4.5)) @@ -13439,7 +13483,7 @@ snapshots: - supports-color - terser - vite-plugin-checker@0.6.4(eslint@8.57.0)(optionator@0.9.3)(typescript@5.4.5)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)): + vite-plugin-checker@0.6.4(eslint@9.1.1)(optionator@0.9.3)(typescript@5.4.5)(vite@5.2.10(@types/node@20.12.7)(terser@5.30.4)): dependencies: '@babel/code-frame': 7.24.2 ansi-escapes: 4.3.2 @@ -13458,7 +13502,7 @@ snapshots: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - eslint: 8.57.0 + eslint: 9.1.1 optionator: 0.9.3 typescript: 5.4.5 @@ -13592,10 +13636,10 @@ snapshots: vue-devtools-stub@0.1.0: {} - vue-eslint-parser@9.4.2(eslint@8.57.0): + vue-eslint-parser@9.4.2(eslint@9.1.1): dependencies: debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.1.1 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 diff --git a/src/module.ts b/src/module.ts index 114a8863..fe342fd1 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1,10 +1,10 @@ +import fs from 'node:fs' import { defineNuxtModule, extendViteConfig, addComponent, addComponentsDir, createResolver, addServerHandler, addTemplate, addImports, addServerImports, hasNuxtModule } from '@nuxt/kit' -import fs from 'fs' -import type { ModuleOptions } from './types' import { defu } from 'defu' -import { registerMDCSlotTransformer } from './utils/vue-mdc-slot' import { resolve } from 'pathe' import type { BundledLanguage } from 'shiki' +import type { ModuleOptions } from './types' +import { registerMDCSlotTransformer } from './utils/vue-mdc-slot' import * as templates from './templates' import { addWasmSupport } from './utils' @@ -48,7 +48,7 @@ export default defineNuxtModule({ components: { prose: true, map: {} - }, + } }, async setup(options, nuxt) { resolveOptions(options) @@ -84,7 +84,7 @@ export default defineNuxtModule({ const alias = '#' + name const results = addTemplate({ ...options as any, - write: true, // Write to disk for Nitro to consume + write: true // Write to disk for Nitro to consume }) nuxt.options.nitro.alias ||= {} @@ -104,8 +104,7 @@ export default defineNuxtModule({ let path = resolve(layer.config.srcDir, 'mdc.config.ts') if (fs.existsSync(path)) { mdcConfigs.push(path) - } - else { + } else { path = resolve(layer.config.srcDir, 'mdc.config.js') if (fs.existsSync(path)) { mdcConfigs.push(path) @@ -117,14 +116,14 @@ export default defineNuxtModule({ registerTemplate({ filename: 'mdc-configs.mjs', getContents: templates.mdcConfigs, - options: { configs: mdcConfigs }, + options: { configs: mdcConfigs } }) // Add highlighter const nitroPreset = nuxt.options.nitro.preset as string || process.env.NITRO_PRESET || process.env.SERVER_PRESET || '' const useWasmAssets = !nuxt.options.dev && ( - !!nuxt.options.nitro.experimental?.wasm || - ['cloudflare-pages', 'cloudflare'].includes(nitroPreset) + !!nuxt.options.nitro.experimental?.wasm + || ['cloudflare-pages', 'cloudflare'].includes(nitroPreset) ) registerTemplate({ filename: 'mdc-highlighter.mjs', @@ -133,14 +132,14 @@ export default defineNuxtModule({ shikiPath: resolver.resolve('../dist/runtime/highlighter/shiki'), options: options.highlight, useWasmAssets - }, + } }) // Add imports template registerTemplate({ filename: 'mdc-imports.mjs', getContents: templates.mdcImports, - options, + options }) // Add components @@ -182,7 +181,7 @@ export default defineNuxtModule({ 'parse5', // transitive deps of rehype 'unist-util-visit', // from runtime/highlighter/rehype.ts 'unified', // deps by all the plugins - 'debug', // deps by many libraries but it's not an ESM + 'debug' // deps by many libraries but it's not an ESM ] const exclude = [ '@nuxtjs/mdc' // package itself, it's a build time module @@ -226,7 +225,6 @@ export default defineNuxtModule({ } }) - function resolveOptions(options: ModuleOptions) { if (options.highlight !== false) { options.highlight ||= {} diff --git a/src/runtime/components/MDC.vue b/src/runtime/components/MDC.vue index d83daa4e..80fc59ba 100644 --- a/src/runtime/components/MDC.vue +++ b/src/runtime/components/MDC.vue @@ -19,8 +19,8 @@ diff --git a/src/runtime/components/MDCSlot.vue b/src/runtime/components/MDCSlot.vue index e7ea09d2..5398c47d 100644 --- a/src/runtime/components/MDCSlot.vue +++ b/src/runtime/components/MDCSlot.vue @@ -1,7 +1,7 @@ \ No newline at end of file + diff --git a/test/fixtures/basic/pages/component-map/vue-component.vue b/test/fixtures/basic/pages/component-map/vue-component.vue index 89e51bea..cf4714a9 100644 --- a/test/fixtures/basic/pages/component-map/vue-component.vue +++ b/test/fixtures/basic/pages/component-map/vue-component.vue @@ -13,6 +13,7 @@ \ No newline at end of file + diff --git a/test/markdown/code-block-highlighted-lines.test.ts b/test/markdown/code-block-highlighted-lines.test.ts index 042644f3..377bd6b6 100644 --- a/test/markdown/code-block-highlighted-lines.test.ts +++ b/test/markdown/code-block-highlighted-lines.test.ts @@ -18,7 +18,7 @@ it('Highlighted code block', async () => { }) expect(body).toHaveProperty('type', 'root') expect(body.children).toHaveLength(2) - expect((body.children[0] as any).props?.highlights).toEqual([2,3]) + expect((body.children[0] as any).props?.highlights).toEqual([2, 3]) expect((body.children[0] as any).children[0].children[1].props.class).toEqual(['line', 'highlight']) expect((body.children[0] as any).children[0].children[2].props.class).toEqual(['line', 'highlight']) }) diff --git a/test/markdown/code-block-props.test.ts b/test/markdown/code-block-props.test.ts index b42d65cb..975a2202 100644 --- a/test/markdown/code-block-props.test.ts +++ b/test/markdown/code-block-props.test.ts @@ -64,4 +64,4 @@ it('Code block with Props', async () => { }, ] `) -}) \ No newline at end of file +}) diff --git a/test/markdown/code-block.test.ts b/test/markdown/code-block.test.ts index ebe2ae82..247fc3bc 100644 --- a/test/markdown/code-block.test.ts +++ b/test/markdown/code-block.test.ts @@ -52,4 +52,4 @@ it('Simple code block', async () => { }, ] `) -}) \ No newline at end of file +}) diff --git a/test/markdown/empty-paragraph.test.ts b/test/markdown/empty-paragraph.test.ts index 3f3fa5e2..fb93ea2f 100644 --- a/test/markdown/empty-paragraph.test.ts +++ b/test/markdown/empty-paragraph.test.ts @@ -10,21 +10,21 @@ world `.trim() it('No empty line or paragraph', async () => { - const { data, body } = await parseMarkdown(md) + const { data, body } = await parseMarkdown(md) - expect(Object.keys(data)).toHaveLength(2) + expect(Object.keys(data)).toHaveLength(2) - expect(body.children).toHaveLength(2) - expect(body.children).toMatchObject([ - { - type: 'element', - tag: 'p', - children: [{ type: 'text', value: 'hello'}] - }, - { - type: 'element', - tag: 'p', - children: [{ type: 'text', value: 'world'}] - } - ]) + expect(body.children).toHaveLength(2) + expect(body.children).toMatchObject([ + { + type: 'element', + tag: 'p', + children: [{ type: 'text', value: 'hello' }] + }, + { + type: 'element', + tag: 'p', + children: [{ type: 'text', value: 'world' }] + } + ]) }) diff --git a/test/markdown/heading-id.test.ts b/test/markdown/heading-id.test.ts index ffdf2daf..92125f77 100644 --- a/test/markdown/heading-id.test.ts +++ b/test/markdown/heading-id.test.ts @@ -15,23 +15,23 @@ const md = ` `.trim() it('Heading id', async () => { - const { data, body } = await parseMarkdown(md) + const { data, body } = await parseMarkdown(md) - expect(Object.keys(data)).toHaveLength(2) + expect(Object.keys(data)).toHaveLength(2) - const ids = [ - 'hello', - 'hello-world', - 'foo', - 'c-great' , - '_1-introduction', - 'ending-space', - 'slash-in-title', - 'starting-dash', - 'ending-dash', - 'dash' - ] - ids.forEach((id, index) => { - expect((body.children[index] as any).props.id).toEqual(id) - }) + const ids = [ + 'hello', + 'hello-world', + 'foo', + 'c-great', + '_1-introduction', + 'ending-space', + 'slash-in-title', + 'starting-dash', + 'ending-dash', + 'dash' + ] + ids.forEach((id, index) => { + expect((body.children[index] as any).props.id).toEqual(id) + }) }) diff --git a/test/markdown/inline-code-highlighted.test.ts b/test/markdown/inline-code-highlighted.test.ts index ae19f8c7..591947da 100644 --- a/test/markdown/inline-code-highlighted.test.ts +++ b/test/markdown/inline-code-highlighted.test.ts @@ -6,19 +6,19 @@ const md = ` `.trim() it('', async () => { - const { body } = await parseMarkdown(md, { - highlight: { - theme: 'github-dark' - } - }) + const { body } = await parseMarkdown(md, { + highlight: { + theme: 'github-dark' + } + }) - expect(body).toHaveProperty('type', 'root') - expect(body.children).toHaveLength(2) - expect(body).toHaveProperty('children[0].tag', 'p') - expect(body).toHaveProperty('children[0].children[0].tag', 'code') - expect(body).toHaveProperty('children[0].children[0].props.language', 'ts') - expect(body).toHaveProperty('children[0].children[0].props.className', 'language-ts shiki shiki-themes github-dark') - expect(body).toMatchInlineSnapshot(` + expect(body).toHaveProperty('type', 'root') + expect(body.children).toHaveLength(2) + expect(body).toHaveProperty('children[0].tag', 'p') + expect(body).toHaveProperty('children[0].children[0].tag', 'code') + expect(body).toHaveProperty('children[0].children[0].props.language', 'ts') + expect(body).toHaveProperty('children[0].children[0].props.className', 'language-ts shiki shiki-themes github-dark') + expect(body).toMatchInlineSnapshot(` { "children": [ { diff --git a/test/markdown/inline-code-props.test.ts b/test/markdown/inline-code-props.test.ts index 0c6a237b..aea6db1e 100644 --- a/test/markdown/inline-code-props.test.ts +++ b/test/markdown/inline-code-props.test.ts @@ -8,11 +8,11 @@ const md = ` it('', async () => { const { body } = await parseMarkdown(md) - expect(body).toHaveProperty('type', 'root') - expect(body).toHaveProperty('children[0].tag', 'p') - expect(body).toHaveProperty('children[0].children[0].tag', 'code') - expect(body).toHaveProperty('children[0].children[0].props.className', ['class-name-1', 'class-name-2']) - expect(body).toMatchInlineSnapshot(` + expect(body).toHaveProperty('type', 'root') + expect(body).toHaveProperty('children[0].tag', 'p') + expect(body).toHaveProperty('children[0].children[0].tag', 'code') + expect(body).toHaveProperty('children[0].children[0].props.className', ['class-name-1', 'class-name-2']) + expect(body).toMatchInlineSnapshot(` { "children": [ { diff --git a/test/markdown/single-block-component.test.ts b/test/markdown/single-block-component.test.ts index 046b7a80..a62236ae 100644 --- a/test/markdown/single-block-component.test.ts +++ b/test/markdown/single-block-component.test.ts @@ -8,7 +8,7 @@ Default slot `.trim() describe('Single Block Compoennt', () => { - it('', async() => { + it('', async () => { const { data, body } = await parseMarkdown(md) expect(Object.keys(data)).toHaveLength(2) @@ -22,4 +22,4 @@ describe('Single Block Compoennt', () => { } }) }) -}) \ No newline at end of file +}) diff --git a/test/markdown/unwrap-slot.test.ts b/test/markdown/unwrap-slot.test.ts index ca07a745..ec2c975a 100644 --- a/test/markdown/unwrap-slot.test.ts +++ b/test/markdown/unwrap-slot.test.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { flatUnwrap } from '../../src/runtime/utils/node' -const vnodes = [{__v_isVNode:true,__v_skip:true,type:'p',props:{},key:null,ref:null,scopeId:null,slotScopeIds:null,children:[{__v_isVNode:true,__v_skip:true,props:null,key:null,ref:null,scopeId:null,slotScopeIds:null,children:'I am an alert!',component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:{},anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:8,patchFlag:0,dynamicProps:null,dynamicChildren:null,appContext:null}],component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:{},anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:17,patchFlag:0,dynamicProps:null,dynamicChildren:null,appContext:null}] +const vnodes = [{ __v_isVNode: true, __v_skip: true, type: 'p', props: {}, key: null, ref: null, scopeId: null, slotScopeIds: null, children: [{ __v_isVNode: true, __v_skip: true, props: null, key: null, ref: null, scopeId: null, slotScopeIds: null, children: 'I am an alert!', component: null, suspense: null, ssContent: null, ssFallback: null, dirs: null, transition: null, el: {}, anchor: null, target: null, targetAnchor: null, staticCount: 0, shapeFlag: 8, patchFlag: 0, dynamicProps: null, dynamicChildren: null, appContext: null }], component: null, suspense: null, ssContent: null, ssFallback: null, dirs: null, transition: null, el: {}, anchor: null, target: null, targetAnchor: null, staticCount: 0, shapeFlag: 17, patchFlag: 0, dynamicProps: null, dynamicChildren: null, appContext: null }] it('Unwrap tags', async () => { const withoutUnwrap = flatUnwrap(vnodes as any) diff --git a/test/markdown/xss.test.ts b/test/markdown/xss.test.ts index 4592bfab..eaf53cdc 100644 --- a/test/markdown/xss.test.ts +++ b/test/markdown/xss.test.ts @@ -32,12 +32,12 @@ const md = `\ `.trim() it('XSS', async () => { - const { data, body } = await parseMarkdown(md) + const { data, body } = await parseMarkdown(md) - expect(Object.keys(data)).toHaveLength(2) + expect(Object.keys(data)).toHaveLength(2) - for (const node of (body.children[0] as MDCElement).children) { - const props = (node as MDCElement).props || {} - expect(Object.entries(props as Record).every(([k, v]) => validateProp(k, v))).toBeTruthy() - } + for (const node of (body.children[0] as MDCElement).children) { + const props = (node as MDCElement).props || {} + expect(Object.entries(props as Record).every(([k, v]) => validateProp(k, v))).toBeTruthy() + } }) diff --git a/test/utils/parser.ts b/test/utils/parser.ts index 4fa2fb34..4f6ed710 100644 --- a/test/utils/parser.ts +++ b/test/utils/parser.ts @@ -1,7 +1,7 @@ import { vi } from 'vitest' import { parseMarkdown as _parseMarkDown } from '../../src/runtime/parser' import type { MDCParseOptions } from '../../src/runtime/types' -import { rehypeHighlight } from '../../src/runtime/highlighter/rehype-nuxt' +import { rehypeHighlight } from '../../src/runtime/highlighter/rehype-nuxt' import { createShikiHighlighter } from '../../src/runtime/highlighter/shiki' vi.mock('#mdc-imports', () => { @@ -26,11 +26,11 @@ export const parseMarkdown = (md: string, options: MDCParseOptions = {}) => { const highlighter = createShikiHighlighter({ langs: [ import('shiki/langs/typescript.mjs'), - import('shiki/langs/javascript.mjs'), + import('shiki/langs/javascript.mjs') ], themes: [ import('shiki/themes/github-light.mjs'), - import('shiki/themes/github-dark.mjs'), + import('shiki/themes/github-dark.mjs') ], options: {}, getMdcConfigs: async () => []