-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathknip.config.ts
More file actions
73 lines (71 loc) · 2.12 KB
/
Copy pathknip.config.ts
File metadata and controls
73 lines (71 loc) · 2.12 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
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
const appEntry = ["index.ts", "metro.config.js", "test/**/*.mjs"];
function exampleFor(platformPackage: string) {
return {
entry: appEntry,
ignore: ["babel.config.js"], // Knip doesn't understand pnpm layout?
ignoreDependencies: [
"@babel/preset-env",
"@react-native-webapis/web-storage",
"react-native-safe-area-context",
"react-native-test-app",
platformPackage,
],
};
}
/* oxlint-disable-next-line import/no-default-export */
export default {
ignore: [".github/actions/*/action.yml", ".github/workflows/*.yml"],
ignoreBinaries: [
"clang-format",
"ktlint",
"sips",
"swiftformat",
"swiftlint",
"tail",
"xcrun",
],
metro: false,
workspaces: {
".": {
entry: ["scripts/*.js", "scripts/*.ts"],
ignore: ["oxlint.config.ts"], // Knip doesn't understand pnpm layout?
ignoreDependencies: ["@nx/js", "@yarnpkg/*"],
},
"packages/app": {
entry: [
"*/template.config.mjs",
"android/gradle-wrapper.js",
"scripts/config-plugins/types.ts", // Knip does not yet parse @import tags
"ios/app.mjs",
"plugins/*.js",
"scripts/apply-config-plugins.mjs",
"scripts/config-plugins/index.mjs",
"scripts/internal/prepare-viewfinder.mts",
"scripts/types.ts", // Knip does not yet parse @import tags
],
ignoreDependencies: [
"@babel/core",
"@babel/preset-env",
"@react-native-community/template",
],
},
"packages/app/example": {
entry: appEntry,
ignore: ["babel.config.js"], // Knip doesn't understand pnpm layout?
ignoreDependencies: [
"@babel/preset-env",
"@react-native-webapis/web-storage",
"@rnx-kit/react-native-template-web",
"@wdio/types",
"appium",
"appium-uiautomator2-driver",
"appium-xcuitest-driver",
],
},
"packages/example-macos": exampleFor("react-native-macos"),
"packages/example-visionos": exampleFor(
"@react-native-community/cli-platform-apple"
),
"packages/example-windows": exampleFor("react-native-windows"),
},
};