-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathknip.config.ts
More file actions
46 lines (45 loc) · 1.63 KB
/
knip.config.ts
File metadata and controls
46 lines (45 loc) · 1.63 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
39
40
41
42
43
44
45
46
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck -- KnipConfig is very expensive and we only need this when modifying the config
import type { KnipConfig } from 'knip';
export default {
workspaces: {
'.': {
// MDX auto-import components; referenced via astro-auto-import, not static imports
entry: ['src/components/mdx/*.astro'],
ignoreBinaries: ['down', 'up', 'ssh-add'],
ignoreDependencies: [
'@astrojs/markdown-remark', // peer dep, used transitively by remark pipeline
'@spectralcodex/scripts', // used via pnpm --filter in scripts, not imported
'@xsynaptic/image-server', // workspace package used at deploy time
'eslint-plugin-jsx-a11y', // transitive dep required by eslint-plugin-astro jsx-a11y-strict
'p-limit', // used in workspace packages (image-loader, scripts)
],
},
'packages/content-demo': {
ignore: ['collections/**'],
},
'packages/content': {
entry: ['format-content.mjs', 'global.d.ts'],
ignore: ['collections/**'],
ignoreDependencies: [
'textlint-plugin-mdx', // referenced in .textlintrc.json
'textlint-rule-diacritics',
'textlint-rule-terminology',
'@textlint-rule/textlint-rule-pattern',
],
},
'packages/react-map-component': {
ignoreDependencies: ['astro'],
},
'packages/remark-img-group': {
ignoreDependencies: ['@types/unist'], // ambient types for unist ecosystem
},
'packages/scripts': {
ignoreDependencies: [
'@astrojs/markdown-remark', // peer dep
'@fontsource/.+', // loaded dynamically via require.resolve in og-image
'astro', // used via CLI, not imported
],
},
},
} satisfies KnipConfig;