-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathknip.ts
More file actions
38 lines (37 loc) 路 1.36 KB
/
Copy pathknip.ts
File metadata and controls
38 lines (37 loc) 路 1.36 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
import angularQuery from './packages/angular-query-experimental/package.json'
import type { KnipConfig } from 'knip'
export default {
ignore: ['scripts/*.{j,t}s', '**/ts-fixture/file.ts'],
treatConfigHintsAsErrors: true,
treatTagHintsAsErrors: true,
ignoreDependencies: ['@oxc-project/runtime'],
ignoreWorkspaces: ['examples/**', 'integrations/**'],
rules: { duplicates: 'warn' },
workspaces: {
'packages/angular-query-experimental': {
ignore: ['scripts/prepack.js'],
// Strict mode excludes optional dependencies. Read the declared names
// so removing a declaration still causes an unlisted dependency error.
ignoreDependencies: Object.keys(angularQuery.optionalDependencies).map(
(dependency) => `${dependency}!`,
),
},
'packages/query-codemods': {
entry: ['src/v4/**/*.cjs', 'src/v5/**/*.cjs'],
ignore: ['**/__testfixtures__/**'],
},
// Built types import 'react', which the consumer's '@types/react' provides.
'packages/react-query': {
ignoreDependencies: ['@types/react!'],
},
'packages/react-query-next-experimental': {
ignoreDependencies: ['@types/react!'],
},
'packages/react-query-persist-client': {
ignoreDependencies: ['@types/react!'],
},
'packages/vue-query': {
ignoreDependencies: ['vue2', 'vue2.7'],
},
},
} satisfies KnipConfig