forked from selfxyz/self
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknip.config.ts
More file actions
169 lines (142 loc) · 3.32 KB
/
Copy pathknip.config.ts
File metadata and controls
169 lines (142 loc) · 3.32 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import type { KnipConfig } from 'knip';
const config: KnipConfig = {
// Global ignores for files that should stay
ignore: [
// Documentation and examples
'**/docs/**',
'**/examples/**',
// Configuration files
'react-native.config.cjs',
'**/.eslintrc.*',
'**/metro.config.*',
'**/babel.config.*',
'**/jest.config.*',
'**/tsconfig*.json',
// Build and deployment scripts
'scripts/**',
'fastlane/**',
// Native platform files
'app/android/**',
'app/ios/**',
// Web build artifacts
'app/web/**',
// Test setup files
'**/__setup__/**',
'**/__mocks__/**',
// Test files (often appear unused but are run by test runners)
'**/*.test.ts',
'**/*.test.js',
'tests/**',
// Utility files that may be used dynamically
'**/loader.ts',
'**/cryptoLoader.ts',
'**/version.cjs',
],
// Global dependency ignores
ignoreDependencies: [
// CLI tools and global utilities
'gitleaks',
'husky',
'patch-package',
'postinstall-postinstall',
// Platform-specific dependencies (may not be detected)
'@react-native-community/cli',
'@react-native/gradle-plugin',
// Type-only dependencies
'@types/*',
// Build tools that may not show usage
'tsup',
'tsx',
'ts-node',
],
// Workspace-specific configurations
workspaces: {
'app': {
entry: [
'index.js',
'web/main.tsx'
],
ignore: [
// React Native config files
'declarations.d.ts',
'tamagui.config.ts',
// Test utilities
'src/mocks/**',
'src/utils/testingUtils.ts',
],
ignoreDependencies: [
// Platform-specific animations
'@tamagui/animations-css',
'@tamagui/animations-react-native',
// Web-specific dependencies
'react-native-web',
'react-native-svg-web',
// Development tools
'expo-modules-core',
'lottie-react',
],
},
'circuits': {
ignore: [
// Test files (circuits are tested but files may appear unused)
'tests/**',
],
ignoreDependencies: [
// Circom ecosystem (usage may not be detected)
'circom*',
'@zk-email/*',
'@zk-kit/*',
'snarkjs',
'circomlibjs',
],
},
'contracts': {
ignore: [
// Deployment and testing infrastructure
'ignition/**',
'scripts/**',
'test/**',
],
ignoreDependencies: [
// Hardhat ecosystem
'@nomiclabs/*',
'@nomicfoundation/*',
'hardhat*',
// Testing utilities
'mocha',
'chai*',
// Contract dependencies
'@openzeppelin/*',
'snarkjs',
],
},
'common': {
ignoreDependencies: [
// May be used in re-exported modules
'axios',
'buffer',
'elliptic',
'jsrsasign',
'node-forge',
],
},
'sdk/core': {
ignoreDependencies: [
// Core crypto libraries
'js-sha*',
'node-forge',
'poseidon-lite',
'uuid',
],
},
'sdk/qrcode': {
ignoreDependencies: [
// QR code crypto dependencies
'js-sha*',
'node-forge',
'poseidon-lite',
],
},
},
};
export default config;