-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathknip.ts
More file actions
34 lines (33 loc) 路 1.09 KB
/
Copy pathknip.ts
File metadata and controls
34 lines (33 loc) 路 1.09 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
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',
'@types/react',
'@types/react-dom',
'react',
'react-dom',
],
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__/**'],
},
'packages/vue-query': {
ignoreDependencies: ['vue2', 'vue2.7'],
},
},
} satisfies KnipConfig