-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknip.config.ts
More file actions
83 lines (80 loc) · 2.14 KB
/
knip.config.ts
File metadata and controls
83 lines (80 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
81
82
83
import type { KnipConfig } from 'knip';
const config: KnipConfig = {
entry: [
// Extension entry points
'src/pages/popup/index.tsx',
'src/pages/options/index.tsx',
'src/pages/devtools/index.tsx',
'src/pages/background/index.ts',
// Vite config files
'vite.config.base.ts',
'vite.config.chrome.ts',
'vite.config.firefox.ts',
'vitest.config.ts',
// Custom plugins
'custom-vite-plugins.ts',
],
project: ['src/**/*.{ts,tsx}', '*.{ts,tsx}'],
ignore: [
// Build outputs
'dist_chrome/**',
'dist_firefox/**',
// Coverage reports
'coverage/**',
// Dependencies
'node_modules/**',
// Public assets (icons, etc.)
'public/**',
// Config files that are imported but not analyzed
'manifest.json',
'manifest.dev.json',
'src/components/ui/**',
'src/test/utils.ts',
'src/types/index.ts',
'src/types/messages.ts',
'src/types/segment.ts',
],
ignoreDependencies: [
// Build tools that are used but not imported
'vite',
'@crxjs/vite-plugin',
'@vitejs/plugin-react',
'vite-tsconfig-paths',
'@tailwindcss/vite',
'nodemon',
'ts-node',
// Testing tools
'vitest',
'@vitest/coverage-v8',
'@vitest/ui',
'jsdom',
'@testing-library/react',
'@testing-library/jest-dom',
'@testing-library/user-event',
'@testing-library/dom',
// ESLint plugins (configured but not imported)
'eslint',
'@eslint/js',
'@typescript-eslint/eslint-plugin',
'@typescript-eslint/parser',
'eslint-config-prettier',
'eslint-plugin-import',
'eslint-plugin-jsx-a11y',
'eslint-plugin-react',
'eslint-plugin-react-hooks',
// Prettier (formatting tool, configured but not imported)
'prettier',
],
paths: {
'@src/*': ['src/*'],
'@assets/*': ['src/assets/*'],
'@locales/*': ['src/locales/*'],
'@pages/*': ['src/pages/*'],
'@components/*': ['src/components/*'],
'@lib/*': ['src/lib/*'],
'@hooks/*': ['src/hooks/*'],
},
// Ignore files that are referenced in manifest but not directly imported
ignoreBinaries: ['vite', 'vitest', 'nodemon', 'prettier'],
};
export default config;