File tree Expand file tree Collapse file tree
.cursor/skills/unused-exports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : unused-exports
3+ description : >-
4+ Find exported symbols that are never imported by another file. Use when the
5+ user says "check exports", "unused exports" or asks to clean up exports.
6+ ---
7+
8+ # unused-exports
9+
10+ ## Step 1: Run ts-unused-exports
11+
12+ Version is pinned to guard against supply chain attacks:
13+
14+ ``` sh
15+ npx ts-unused-exports@11.0.1 unit-tests/tsconfig.json \
16+ --findCompletelyUnusedFiles \
17+ --showLineNumber \
18+ --searchNamespaces
19+ ```
20+
21+ ## Step 2: Filter out entry points
22+
23+ Some exports are consumed externally by the OpenShift console framework, not by
24+ imports within this repo. Read ` package.json ` → ` consolePlugin.exposedModules `
25+ and ` console-extensions.json ` → ` $codeRef ` values to identify them. Exclude any
26+ finding that is a default export of an exposed module or is named in a
27+ ` $codeRef ` .
28+
29+ ## Step 3: Report findings
30+
31+ Group into ** unused exports** and ** completely unused files** . If nothing
32+ remains, report that all exports are accounted for. Do not modify any files.
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export type Tool = {
4646
4747export type OlsToolUIComponent = React . ComponentType < { tool : Tool } > ;
4848
49- export type HistoryCompression = {
49+ type HistoryCompression = {
5050 durationMs ?: number ;
5151 status : 'compressing' | 'done' ;
5252} ;
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../tsconfig.json" ,
3+ "include" : [" ." , " ../src" , " ../types.d.ts" ]
4+ }
You can’t perform that action at this time.
0 commit comments