-
Notifications
You must be signed in to change notification settings - Fork 9
/
knip.ts
57 lines (55 loc) · 1.49 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
/* eslint-disable @typescript-eslint/naming-convention */
import type { KnipConfig } from 'knip'
const config: KnipConfig = {
workspaces: {
'.': {
entry: ['scripts/*.ts']
},
'apps/backend': {
entry: [
'apps/{admin,client}/**/{main.ts,app.module.ts}',
'prisma/seed.ts'
],
project: ['**/*.ts'],
ignoreDependencies: [
'@nestjs/schematics', // used by NestJS CLI
'@types/mocha',
'graphql-type-json',
'prisma-nestjs-graphql',
'ts-loader' // used by NestJS CLI
],
paths: {
'@admin/*': ['apps/admin/src/*'],
'@client/*': ['apps/client/src/*'],
'@generated': ['apps/admin/src/@generated'],
'@libs/prisma': ['libs/prisma/src/index.ts'],
'@libs/cache': ['libs/cache/src/index.ts'],
'@libs/auth': ['libs/auth/src/index.ts'],
'@libs/exception': ['libs/exception/src/index.ts'],
'@libs/pipe': ['libs/pipe/src/index.ts'],
'@libs/constants': ['libs/constants/src/index.ts']
},
mocha: {
entry: ['{apps,libs}/**/*.spec.ts']
}
},
'apps/frontend': {
ignoreDependencies: [
'eslint-config-next', // used by ESLint
'sharp' // used by next/image
]
}
},
ignore: ['**/*.d.ts', 'collection/**'],
rules: {
classMembers: 'off',
unlisted: 'warn',
binaries: 'warn',
unresolved: 'warn'
},
ignoreExportsUsedInFile: {
interface: true,
type: true
}
}
export default config