forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 2
/
knip.ts
125 lines (120 loc) · 3.31 KB
/
knip.ts
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
import type { KnipConfig } from 'knip' with { 'resolution-mode': 'import' };
export default {
rules: {
classMembers: 'off',
duplicates: 'off',
enumMembers: 'off',
exports: 'off',
nsExports: 'off',
nsTypes: 'off',
types: 'off',
unresolved: 'off',
},
workspaces: {
'.': {
entry: ['tools/release/changelog-renderer.js', 'tools/scripts/**/*.mts'],
ignoreDependencies: [
'@babel/code-frame',
'@babel/core',
'@babel/eslint-parser',
'@babel/parser',
'@babel/types',
'@nx/workspace',
'glob',
'husky',
'jest-specific-snapshot',
'make-dir',
'ncp',
'tmp',
// imported for type purposes only
'website',
],
},
'packages/ast-spec': {
ignore: [
'src/**/fixtures/**',
'tests/*.type-test.ts',
// @typescript-eslint/typescript-estree is not listed in dependencies to avoid circular dependency errors
// You can check a more detailed explanation in this file
'tests/util/parsers/typescript-estree-import.ts',
],
},
'packages/eslint-plugin': {
ignore: ['tests/fixtures/**'],
},
'packages/eslint-plugin-internal': {
ignore: ['tests/fixtures/**'],
},
'packages/integration-tests': {
ignore: ['fixtures/**'],
},
'packages/parser': {
ignore: ['tests/fixtures/**'],
},
'packages/scope-manager': {
ignore: ['tests/fixtures/**'],
},
'packages/type-utils': {
ignore: ['tests/fixtures/**'],
},
'packages/typescript-estree': {
entry: ['src/use-at-your-own-risk.ts'],
ignore: ['tests/fixtures/**'],
},
'packages/utils': {
ignore: ['tests/**/*.type-test.ts'],
},
'packages/website': {
entry: [
'docusaurus.config.mts',
'src/pages/**/*.tsx',
// imported in MDX docs
'src/components/**/*.tsx',
// used by Docusaurus
'src/theme/**/*.tsx',
'src/theme/prism-include-languages.js',
],
ignoreDependencies: [
// used in MDX docs
'raw-loader',
// it's imported only as type (esquery types are forked and defined in packages/website/typings/esquery.d.ts)
'esquery',
'@docusaurus/mdx-loader',
'@docusaurus/types',
'@docusaurus/plugin-content-docs',
'@docusaurus/plugin-content-blog',
'@docusaurus/theme-search-algolia',
'@docusaurus/ExecutionEnvironment',
'@docusaurus/Link',
'@docusaurus/router',
'@docusaurus/useDocusaurusContext',
'@docusaurus/useBaseUrl',
'@docusaurus/BrowserOnly',
'@docusaurus/module-type-aliases',
'@generated/docusaurus.config',
'^@theme/.*',
'^@theme-original/.*',
'docusaurus-plugin-typedoc',
'typedoc-plugin-markdown',
],
},
'packages/website-eslint': {
entry: [
'src/index.js',
'src/mock/assert.js',
'src/mock/empty.js',
'src/mock/eslint-rules.js',
'src/mock/eslint.js',
'src/mock/lru-cache.js',
'src/mock/path.js',
'src/mock/typescript.js',
'src/mock/util.js',
],
ignoreDependencies: [
// virtual module
'vt',
],
},
'tools/dummypkg': {},
},
} satisfies KnipConfig;