Skip to content

Commit edb6392

Browse files
authored
Fix knip ignoring shared-components (#31833)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 50d8fd2 commit edb6392

3 files changed

Lines changed: 43 additions & 533 deletions

File tree

knip.ts

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
import { KnipConfig } from "knip";
22

33
export default {
4-
entry: [
5-
"src/serviceworker/index.ts",
6-
"src/workers/*.worker.ts",
7-
"src/utils/exportUtils/exportJS.js",
8-
"src/vector/localstorage-fix.ts",
9-
"scripts/**",
10-
"playwright/**",
11-
"test/**",
12-
"res/decoder-ring/**",
13-
"res/jitsi_external_api.min.js",
14-
"docs/**",
15-
],
16-
project: ["**/*.{js,ts,jsx,tsx}"],
17-
ignore: [
18-
// Keep for now
19-
"src/hooks/useLocalStorageState.ts",
20-
"src/hooks/useTimeout.ts",
21-
"src/components/views/elements/InfoTooltip.tsx",
22-
"src/components/views/elements/StyledCheckbox.tsx",
4+
workspaces: {
5+
"packages/shared-components": {
6+
entry: ["src/index.ts"],
7+
},
8+
".": {
9+
entry: [
10+
"src/serviceworker/index.ts",
11+
"src/workers/*.worker.ts",
12+
"src/utils/exportUtils/exportJS.js",
13+
"src/vector/localstorage-fix.ts",
14+
"scripts/**",
15+
"playwright/**",
16+
"test/**",
17+
"res/decoder-ring/**",
18+
"res/jitsi_external_api.min.js",
19+
"docs/**",
20+
],
21+
ignore: [
22+
// Keep for now
23+
"src/hooks/useLocalStorageState.ts",
24+
"src/hooks/useTimeout.ts",
25+
"src/components/views/elements/InfoTooltip.tsx",
26+
"src/components/views/elements/StyledCheckbox.tsx",
2327

24-
"packages/**/*",
25-
],
28+
"packages/**/*",
29+
],
30+
},
31+
},
2632
ignoreDependencies: [
2733
// Required for `action-validator`
2834
"@action-validator/*",
@@ -52,13 +58,6 @@ export default {
5258
// would with a normal library).
5359
"@types/content-type",
5460
"@types/sdp-transform",
55-
56-
// Used in EW but failed because of "link:"
57-
"@element-hq/web-shared-components",
58-
],
59-
ignoreBinaries: [
60-
// Used in scripts & workflows
61-
"jq",
6261
],
6362
ignoreExportsUsedInFile: true,
6463
} satisfies KnipConfig;

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,13 @@
145145
"react-blurhash": "^0.3.0",
146146
"react-dom": "^19.0.0",
147147
"react-focus-lock": "^2.5.1",
148-
"react-merge-refs": "^3.0.2",
149148
"react-string-replace": "^2.0.0",
150149
"react-transition-group": "^4.4.1",
151150
"react-virtuoso": "^4.14.0",
152151
"rfc4648": "^1.4.0",
153152
"sanitize-filename": "^1.6.3",
154153
"sanitize-html": "2.17.0",
155154
"tar-js": "^0.3.0",
156-
"temporal-polyfill": "^0.3.0",
157155
"ua-parser-js": "1.0.40",
158156
"uuid": "^13.0.0",
159157
"what-input": "^5.2.10"
@@ -187,7 +185,6 @@
187185
"@playwright/test": "1.57.0",
188186
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
189187
"@sentry/webpack-plugin": "^4.0.0",
190-
"@storybook/react-vite": "^10.0.7",
191188
"@stylistic/eslint-plugin": "^5.0.0",
192189
"@svgr/webpack": "^8.0.0",
193190
"@testing-library/dom": "^10.4.0",
@@ -284,7 +281,6 @@
284281
"rimraf": "^6.0.0",
285282
"semver": "^7.5.2",
286283
"source-map-loader": "^5.0.0",
287-
"storybook": "^10.0.7",
288284
"stylelint": "^17.0.0",
289285
"stylelint-config-standard": "^40.0.0",
290286
"stylelint-scss": "^7.0.0",

0 commit comments

Comments
 (0)