-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathknip.config.ts
More file actions
94 lines (79 loc) · 2.07 KB
/
Copy pathknip.config.ts
File metadata and controls
94 lines (79 loc) · 2.07 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import type { KnipConfig } from 'knip'
const config: KnipConfig = {
// Entry points for the project (beyond what plugins auto-detect)
entry: [
// MSW setup (dynamically required in layout.tsx)
'src/app/msw-provider.tsx',
'mocks/server.ts',
// Custom hooks
'src/hooks/**/*.ts',
// Redux store
'src/lib/redux/providers.tsx',
'src/lib/redux/store.ts',
],
project: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.mjs'],
// Ignore generated/build outputs
ignore: [
'.next/**',
'storybook-static/**',
'coverage/**',
'coverage-e2e/**',
'playwright-report/**',
'blob-report/**',
'public/mockServiceWorker.js',
'next-env.d.ts',
'src/lib/supabase/database.types.ts',
],
// Dynamic dependencies (CSS-only - not detectable by Knip)
// - tw-animate-css: @import 'tw-animate-css' in globals.css
// - tailwindcss-animate: @plugin "tailwindcss-animate" in globals.css
// - tailwind-scrollbar-hide: @plugin "tailwind-scrollbar-hide" in globals.css
ignoreDependencies: [
'tw-animate-css',
'tailwindcss-animate',
'tailwind-scrollbar-hide',
],
// Plugin configurations (plugins auto-detect their dependencies)
next: {
entry: ['next.config.ts'],
},
storybook: {
entry: [
'.storybook/main.ts',
'.storybook/preview.tsx',
'.storybook/vitest.setup.ts',
],
project: ['**/*.stories.tsx', '**/*.stories.ts'],
},
vitest: {
entry: ['vitest.config.ts'],
project: [
'src/tests/**/*.test.ts',
'src/tests/**/*.test.tsx',
'src/tests/setup.ts',
],
},
playwright: {
entry: ['playwright.config.ts'],
project: ['e2e/**/*.spec.ts', 'e2e/auth.setup.ts', 'e2e/helpers/**/*.ts'],
},
eslint: {
entry: ['eslint.config.mjs'],
},
postcss: {
entry: ['postcss.config.mjs'],
},
// Rules
rules: {
files: 'error',
dependencies: 'error',
devDependencies: 'error',
unlisted: 'error',
exports: 'warn',
types: 'warn',
duplicates: 'error',
enumMembers: 'off',
},
ignoreExportsUsedInFile: true,
}
export default config