-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathknip.config.ts
87 lines (85 loc) · 2.03 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { KnipConfig } from "knip";
import mdx from "knip/dist/compilers/mdx";
const config: KnipConfig = {
paths: {
"@/*": ["./app/*"],
},
ignore: [
".github/**/*",
".svgrrc.js",
".storybook/**/*",
"./codemods/**/*",
"./e2e/**/*",
"./embed/**/*",
"./eslint/**/*",
"./k6/**/*",
"./scripts/**/*",
"./app/docs/**/*",
"./app/graphql/client.tsx",
"./app/graphql/devtools.*",
"./app/graphql/resolvers/**/*",
"./app/graphql/query-hooks.ts",
"./app/graphql/resolver-types.ts",
"./app/pages/docs/**/*",
"./app/public/**/*",
"./app/static-pages/**/*",
"./app/templates/email/**/*",
"./app/typings/**/*",
"./**/*.config.*",
"./**/*.mock.ts",
"./**/*.setup.*",
"./**/*.spec.ts",
],
ignoreDependencies: [
// Needed by eslint.
"@typescript-eslint/utils",
// Used in eslint, without explicit import.
"eslint-plugin-storybook",
"@types/eslint",
// Used in e2e tests.
"@argos-ci/playwright",
"pixelmatch",
"@types/pixelmatch",
"pngjs",
"@types/pngjs",
"@playwright/test",
"playwright-testing-library",
"@playwright-testing-library/test",
// Codegen packages are used through scripts.
"@graphql-codegen/*",
"@lingui/cli",
// Used in development.
"prettier",
"@urql/devtools",
// Used in a script.
"fs-extra",
"@types/fs-extra",
// Used in Storybook.
"storybook",
"@storybook/nextjs",
// Used in e2e and scripts. Not sure why it's not detected.
"isomorphic-unfetch",
// Used in scripts, which we ignore to not have a "not used files" error.
"dotenv-cli",
// Used to generate icons.
"@svgr/cli",
// Used in load tests.
"@types/k6",
// Used in unit tests.
"ts-jest",
// Do we still need this?
"babel-core",
"@babel/standalone",
"@babel/runtime",
"core-js",
"import-move-codemod",
],
rules: {
binaries: "warn",
unresolved: "warn",
},
compilers: {
mdx: mdx.compiler,
},
};
export default config;