import type { KnipConfig } from 'knip' const config: KnipConfig = { workspaces: { '.': { entry: [ 'app/router.options.ts!', 'app/app.vue!', 'app/error.vue!', 'app/pages/**/*.vue!', 'app/components/**/*.vue!', 'app/components/**/*.d.vue.ts!', 'app/composables/**/*.ts!', 'app/middleware/**/*.ts!', 'app/plugins/**/*.ts!', 'app/utils/**/*.ts!', 'server/**/*.ts!', 'modules/**/*.ts!', 'config/**/*.ts!', 'lunaria/**/*.ts!', 'shared/**/*.ts!', 'i18n/**/*.ts', 'lunaria.config.ts', 'pwa-assets.config.ts', '.lighthouserc.cjs', 'lighthouse-setup.cjs', 'uno-preset-rtl.ts!', 'scripts/**/*.ts', ], project: [ '**/*.{ts,vue,cjs,mjs}', '!test/fixtures/**', '!test/test-utils/**', '!test/e2e/helpers/**', '!cli/src/**', ], ignoreDependencies: [ '@iconify-json/*', '@voidzero-dev/vite-plus-core', 'vite-plus!', 'puppeteer', /** Needs to be explicitly installed, even though it is not imported, to avoid type errors. */ 'unplugin-vue-router', 'vite-plugin-pwa', '@vueuse/shared', /** Some components import types from here, but installing it directly could lead to a version mismatch */ 'vue-router', /** Oxlint plugins don't get picked up yet */ '@e18e/eslint-plugin', 'eslint-plugin-regexp', /** Used in test/e2e/helpers/ which is excluded from knip project scope */ 'h3-next', ], ignoreUnresolved: ['#components', '#oauth/config'], }, 'cli': { project: ['src/**/*.ts!', '!src/mock-*.ts'], }, 'docs': { entry: ['app/**/*.{ts,vue}'], ignoreDependencies: ['docus', 'better-sqlite3', '@nuxtjs/mdc', 'nuxt!'], }, }, } export default config