-
-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathknip.ts
More file actions
70 lines (65 loc) · 1.94 KB
/
knip.ts
File metadata and controls
70 lines (65 loc) · 1.94 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
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'],
ignoreFiles: ['global.d.ts'],
},
'cli': {
project: ['src/**/*.ts!', '!src/mock-*.ts'],
},
'docs': {
entry: ['app/**/*.{ts,vue}'],
ignoreDependencies: ['docus', 'better-sqlite3', '@nuxtjs/mdc', 'nuxt!'],
},
},
}
export default config