-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknip.config.ts
More file actions
71 lines (57 loc) · 1.43 KB
/
knip.config.ts
File metadata and controls
71 lines (57 loc) · 1.43 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
import type { KnipConfig } from 'knip'
const config: KnipConfig = {
// Next.js project detection
next: true,
// Entry points for the application
entry: [
'app/**/*.{ts,tsx}',
'lib/**/*.ts',
'components/**/*.{ts,tsx}',
'scripts/**/*.ts',
// Test entry points for orphaned test detection
'tests/**/*.{ts,tsx}',
'**/*.test.{ts,tsx}',
'**/*.spec.{ts,tsx}',
],
// All project files to analyze
project: ['**/*.{ts,tsx}'],
// Test file patterns for Vitest/Playwright
vitest: {
entry: ['tests/**/*.{test,spec}.{ts,tsx}', 'vitest.config.ts'],
},
playwright: {
entry: [
'tests/e2e/**/*.spec.ts',
'tests/e2e/**/*.setup.ts', // Playwright setup projects (e.g., auth.setup.ts)
'playwright.config.ts',
],
},
// Files and directories to ignore
ignore: [
// Build outputs
'.next/**',
'dist/**',
'build/**',
// Dependencies
'node_modules/**',
// Database migrations (intentionally versioned)
'drizzle/**',
// Static assets
'public/**',
// External MCP servers (separate repos)
'lance-context/**',
// Serena configuration
'.serena/**',
// Generated files
'next-env.d.ts',
'*.d.ts',
],
// Workspaces (if applicable)
workspaces: {
'.': {
entry: ['app/**/*.{ts,tsx}', 'lib/**/*.ts', 'components/**/*.{ts,tsx}', 'scripts/**/*.ts'],
project: ['**/*.{ts,tsx}'],
},
},
}
export default config