-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathknip.config.ts
40 lines (36 loc) · 1.11 KB
/
knip.config.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
import type { KnipConfig } from 'knip'
type WorkspaceConfig = Exclude<KnipConfig['workspaces'], undefined>[keyof KnipConfig['workspaces']]
const defaultWorkspaceConfig: WorkspaceConfig = {
entry: ['src/index.ts', 'src/index-*.ts'],
project: ['src/**/*.ts'],
ignore: ['xy.config.ts'],
ignoreDependencies: [
'@xylabs/tsconfig*',
'@xylabs/ts-scripts-yarn3',
],
typescript: {
config: [
'tsconfig.json',
],
},
}
const config: KnipConfig = {
workspaces: {
'.': {
...defaultWorkspaceConfig,
ignoreDependencies: [
'eslint',
'@typescript-eslint/eslint-plugin',
'eslint-import-resolver-typescript',
'reflect-metadata',
'@typescript-eslint/parser',
],
},
'packages/*': { ...defaultWorkspaceConfig },
'packages/*/packages/*': { ...defaultWorkspaceConfig },
'packages/*/packages/*/packages/*': { ...defaultWorkspaceConfig },
'packages/*/packages/*/packages/*/packages/*': { ...defaultWorkspaceConfig },
'packages/*/packages/*/packages/*/packages/*/packages/*': { ...defaultWorkspaceConfig },
},
}
export default config