-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathknip.ts
73 lines (71 loc) · 3.14 KB
/
knip.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
import type { KnipConfig } from 'knip'
const config: KnipConfig = {
workspaces: {
'.': {
entry: ['.github/scripts/*.ts', './scripts/**/*.js'],
ignoreBinaries: [
// Maybe we can remove these once we upgrade knip?
// See https://github.com/webpro-nl/knip/issues/735
'e2e:prebuild', // used in workflows to build the example app
'e2e:build:android-release', // used in workflows to build the example app
'typecheck', // used in workflows to typecheck the example app
'build:plugin', // used in postinstall script
],
ignoreDependencies: [
'@actions/github', // used in workflows
'@semantic-release/commit-analyzer', // imported by multi-semantic-release
'@semantic-release/github', // imported by multi-semantic-release
'@semantic-release/npm', // imported by multi-semantic-release
'@semantic-release/release-notes-generator', // imported by multi-semantic-release
'conventional-changelog-conventionalcommits', // used by semantic-release config preset
],
ignore: [
'scripts/dep-mismatch-check.ts', // Used to check for dependency mismatches across package.json files
],
},
'apps/example': {
entry: [
'index.tsx!',
'metro.config.js!',
'detox.config.js!',
'plugins/**/*.{js,ts}',
'e2e/**/*.{js,ts}',
],
ignoreDependencies: [
'@babel/core', // needed for react-native
// TODO: these ignores should be unnecessary once we use a recent version of knip with th expo plugin
// See https://github.com/webpro-nl/knip/pull/879
'expo-build-properties', // used in app.json
'expo-dev-client', // used in app.json
'expo-status-bar', // used in app.json
'@config-plugins/detox', // used in app.json
'babel-preset-expo', // not listed in package.json so we use the version used by expo
'ts-node', // used in workflows run by github actions from the example app dir
'@walletconnect/core', // used in e2e tests via @walletconnect/sign-client
'tslib', // for some reason this is triggered after applying multiple tsconfigs to "extends" of apps/example/tsconfig.json
'@tsconfig/node-lts', // used in e2e/tsconfig.json
],
},
'packages/@divvi/mobile': {
entry: ['index.js!', 'metro-config.js!', './scripts/**/*.js'],
project: ['src/**/*.ts!', 'src/**/*.tsx!', 'src/**/*.js!'],
ignoreDependencies: [
'babel-jest',
'jest-html-reporter',
'jest-junit',
'jest-snapshot',
'react-native-kill-packager',
'typescript-json-schema', // helps manage redux state migrations
'ts-node', // used in workflows run by github actions from the example app dir
'@types/jest',
'@tsconfig/node-lts', // used in plugin/tsconfig.json
],
ignore: [
'src/redux/reducersForSchemaGeneration.ts', // used for root state schema generation
'src/analytics/docs.ts', // documents analytics events, no references
'src/account/__mocks__/Persona.tsx', // unit test mocks
],
},
},
}
export default config