Commit 97d4414
Fix Knip configuration after monorepo restructure (#2041)
## Summary
Fixes the failing "Detect dead code" CI job on master after the monorepo
restructure.
## Problem
After moving packages to `packages/react-on-rails` and
`packages/react-on-rails-pro`, Knip was detecting false positives:
- `jest.config.base.js` marked as unused (but it's used by both
packages)
- Test dependencies in root `package.json` marked as unused (shared by
child workspaces)
- `mock-fs` dependencies in Pro package marked as unused
- Some dependencies marked as unused that are now properly detected
## Changes
1. **Added `jest.config.base.js` as entry point** - This shared Jest
config is imported by both packages
2. **Removed `nps` from ignoreBinaries** - No longer referenced in
package.json scripts
3. **Added test dependencies to root ignoreDependencies**:
- `@testing-library/dom`, `@testing-library/jest-dom`,
`@testing-library/react`
- `@types/react-dom`, `create-react-class`, `jest-fetch-mock`
- `prop-types`, `react`, `react-dom`, `redux`
4. **Added Pro package ignoreDependencies**: `@types/mock-fs`, `mock-fs`
5. **Removed now-detected dependencies** from spec/dummy
## Testing
CI will validate the fix by running `yarn run knip --exclude binaries`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Updated dependency checking configuration to exclude test-related
packages from checks across multiple workspaces.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude <[email protected]>1 parent 276507d commit 97d4414
1 file changed
+17
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
92 | 106 | | |
93 | 107 | | |
94 | 108 | | |
| |||
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 141 | | |
131 | 142 | | |
132 | 143 | | |
| |||
136 | 147 | | |
137 | 148 | | |
138 | 149 | | |
139 | | - | |
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
144 | | - | |
145 | | - | |
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
| |||
0 commit comments