Commit 67ab7e4
fix: Fix ESLint configuration and pre-commit hook for Pro package
This fix addresses two issues:
1. **ESLint configuration**: The `packages/react-on-rails-pro/**/*` files
were being linted with strict TypeScript rules that don't work for Pro
package code because it uses internal React on Rails APIs with complex
types that can't be resolved in the monorepo setup. Added ESLint config
overrides to disable problematic rules for Pro package files.
2. **Pre-commit hook**: The `bin/lefthook/eslint-lint` script was looking
for Pro files at `react_on_rails_pro/` (the old Pro gem directory) but
not at `packages/react-on-rails-pro/` (the new monorepo Pro package).
Updated the script to properly handle both directories since they use
different ESLint configurations.
Changes:
- Updated eslint.config.ts to disable import resolution and unsafe type
rules for packages/react-on-rails-pro files (placed after TypeScript
config to ensure rules are properly applied)
- Updated bin/lefthook/eslint-lint to lint packages/react-on-rails-pro
files with the root ESLint config
- Removed now-unnecessary eslint-disable comments from Pro package files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 838cb19 commit 67ab7e4
File tree
3 files changed
+39
-26
lines changed- bin/lefthook
- packages/react-on-rails-pro/tests
3 files changed
+39
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
| 32 | + | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
39 | | - | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | | - | |
| 47 | + | |
42 | 48 | | |
43 | | - | |
| 49 | + | |
44 | 50 | | |
45 | | - | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
| 54 | + | |
49 | 55 | | |
50 | | - | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 161 | | |
170 | 162 | | |
171 | 163 | | |
| |||
228 | 220 | | |
229 | 221 | | |
230 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
231 | 239 | | |
232 | 240 | | |
233 | 241 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | | - | |
| 135 | + | |
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| |||
0 commit comments