-
-
Notifications
You must be signed in to change notification settings - Fork 303
Expand file tree
/
Copy pathknip.ts
More file actions
80 lines (74 loc) · 2.14 KB
/
knip.ts
File metadata and controls
80 lines (74 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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/**',
'!lexicons/**',
],
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',
/** Required by @nuxtjs/i18n at runtime but not directly imported in production code */
'@intlify/shared',
/** 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,css}'],
ignoreDependencies: [
'docus',
'better-sqlite3',
'@nuxtjs/mdc',
'nuxt!',
'@nuxt/ui',
'tailwindcss',
],
},
},
}
export default config