Skip to content

Commit 785b3ea

Browse files
justin808claude
andcommitted
Fix RuboCop configuration paths after monorepo restructuring
After moving files into react_on_rails/ directory, the RuboCop configuration had several path issues: 1. Main .rubocop.yml had exclude patterns referencing 'react_on_rails/...' paths that should be relative (e.g., 'lib/...' instead of 'react_on_rails/lib/...') 2. spec/dummy/.rubocop.yml was inheriting from '../../../.rubocop.yml' (3 levels up - workspace root) instead of '../../.rubocop.yml' (2 levels up - react_on_rails directory) 3. spec/react_on_rails/.rubocop.yml had the same incorrect inheritance path 4. Removed ERB code that dynamically excludes git-ignored files as it was causing path resolution issues These fixes allow RuboCop to run correctly from within the react_on_rails directory without configuration errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 19a6ec5 commit 785b3ea

File tree

3 files changed

+28
-31
lines changed

3 files changed

+28
-31
lines changed

react_on_rails/.rubocop.yml

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,17 @@ AllCops:
1818
- '**/*.rake'
1919

2020
Exclude:
21-
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
22-
- <%= path.sub(/^!! /, '') %>
23-
<% end %>
2421
- '**/*.js'
2522
- '**/node_modules/**/*'
2623
- '**/public/**/*'
2724
- '**/tmp/**/*'
2825
- 'coverage/**/*'
2926
- 'gen-examples/examples/**/*'
3027
- 'node_modules/**/*'
31-
- 'react_on_rails_pro/**/*' # Exclude pro package (has its own linting)
32-
- 'react_on_rails/spec/dummy/bin/*'
33-
- 'react_on_rails/spec/fixtures/**/*'
34-
- 'react_on_rails/spec/react_on_rails/dummy-for-generators/**/*'
28+
- '../react_on_rails_pro/**/*' # Exclude pro package (has its own linting)
29+
- 'spec/dummy/bin/*'
30+
- 'spec/fixtures/**/*'
31+
- 'spec/react_on_rails/dummy-for-generators/**/*'
3532
- 'tmp/**/*'
3633
- 'vendor/**/*'
3734

@@ -61,17 +58,17 @@ Style/HashTransformValues:
6158

6259
Lint/AssignmentInCondition:
6360
Exclude:
64-
- 'react_on_rails/spec/dummy/bin/spring'
61+
- 'spec/dummy/bin/spring'
6562

6663
Lint/SuppressedException:
6764
Exclude:
68-
- 'react_on_rails/spec/dummy/bin/rails'
69-
- 'react_on_rails/spec/dummy/bin/rake'
65+
- 'spec/dummy/bin/rails'
66+
- 'spec/dummy/bin/rake'
7067

7168
Metrics/AbcSize:
7269
Max: 28
7370
Exclude:
74-
- 'react_on_rails/lib/generators/react_on_rails/install_generator.rb' # Generator setup methods require comprehensive error handling
71+
- 'lib/generators/react_on_rails/install_generator.rb' # Generator setup methods require comprehensive error handling
7572

7673
Metrics/CyclomaticComplexity:
7774
Max: 7
@@ -82,8 +79,8 @@ Metrics/PerceivedComplexity:
8279
Metrics/ClassLength:
8380
Max: 150
8481
Exclude:
85-
- 'react_on_rails/lib/generators/react_on_rails/base_generator.rb' # Generator complexity justified
86-
- 'react_on_rails/lib/react_on_rails/dev/server_manager.rb' # Dev tool with comprehensive help system
82+
- 'lib/generators/react_on_rails/base_generator.rb' # Generator complexity justified
83+
- 'lib/react_on_rails/dev/server_manager.rb' # Dev tool with comprehensive help system
8784

8885
Metrics/ParameterLists:
8986
Max: 5
@@ -92,23 +89,23 @@ Metrics/ParameterLists:
9289
Metrics/MethodLength:
9390
Max: 41
9491
Exclude:
95-
- 'react_on_rails/lib/generators/react_on_rails/install_generator.rb' # Generator setup methods require comprehensive error handling
92+
- 'lib/generators/react_on_rails/install_generator.rb' # Generator setup methods require comprehensive error handling
9693

9794
Metrics/ModuleLength:
9895
Max: 180
9996
Exclude:
100-
- 'react_on_rails/spec/react_on_rails/engine_spec.rb' # Comprehensive engine tests require many examples
97+
- 'spec/react_on_rails/engine_spec.rb' # Comprehensive engine tests require many examples
10198

10299
Naming/RescuedExceptionsVariableName:
103100
Enabled: false
104101

105102
RSpec/AnyInstance:
106103
Exclude:
107-
- 'react_on_rails/spec/react_on_rails/git_utils_spec.rb'
108-
- 'react_on_rails/spec/react_on_rails/locales_to_js_spec.rb'
109-
- 'react_on_rails/spec/react_on_rails/binstubs/dev_spec.rb'
110-
- 'react_on_rails/spec/react_on_rails/binstubs/dev_static_spec.rb'
111-
- 'react_on_rails/spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require system mocking
104+
- 'spec/react_on_rails/git_utils_spec.rb'
105+
- 'spec/react_on_rails/locales_to_js_spec.rb'
106+
- 'spec/react_on_rails/binstubs/dev_spec.rb'
107+
- 'spec/react_on_rails/binstubs/dev_static_spec.rb'
108+
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require system mocking
112109

113110
RSpec/DescribeClass:
114111
Enabled: false
@@ -124,11 +121,11 @@ RSpec/NestedGroups:
124121

125122
RSpec/BeforeAfterAll:
126123
Exclude:
127-
- 'react_on_rails/spec/react_on_rails/generators/dev_tests_generator_spec.rb'
128-
- 'react_on_rails/spec/react_on_rails/generators/install_generator_spec.rb'
129-
- 'react_on_rails/spec/react_on_rails/binstubs/dev_spec.rb'
130-
- 'react_on_rails/spec/react_on_rails/binstubs/dev_static_spec.rb'
131-
- 'react_on_rails/spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require global setup
124+
- 'spec/react_on_rails/generators/dev_tests_generator_spec.rb'
125+
- 'spec/react_on_rails/generators/install_generator_spec.rb'
126+
- 'spec/react_on_rails/binstubs/dev_spec.rb'
127+
- 'spec/react_on_rails/binstubs/dev_static_spec.rb'
128+
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require global setup
132129

133130
RSpec/MessageChain:
134131
Enabled: false
@@ -138,14 +135,14 @@ RSpec/MultipleExpectations:
138135

139136
RSpec/MultipleDescribes:
140137
Exclude:
141-
- 'react_on_rails/spec/dummy/spec/system/integration_spec.rb'
138+
- 'spec/dummy/spec/system/integration_spec.rb'
142139

143140
RSpec/MultipleMemoizedHelpers:
144141
Max: 12
145142

146143
Style/GlobalVars:
147144
Exclude:
148-
- 'react_on_rails/spec/dummy/config/environments/development.rb'
145+
- 'spec/dummy/config/environments/development.rb'
149146

150147
RSpec/NoExpectationExample:
151148
AllowedPatterns:
@@ -154,9 +151,9 @@ RSpec/NoExpectationExample:
154151

155152
RSpec/InstanceVariable:
156153
Exclude:
157-
- 'react_on_rails/spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require global variable management
154+
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require global variable management
158155

159156
RSpec/StubbedMock:
160157
Exclude:
161-
- 'react_on_rails/spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests use mixed stub/mock patterns
158+
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests use mixed stub/mock patterns
162159

react_on_rails/spec/dummy/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inherit_from:
2-
- ../../../.rubocop.yml
2+
- ../../.rubocop.yml
33

44
AllCops:
55
Exclude:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inherit_from:
2-
- ../../../.rubocop.yml
2+
- ../../.rubocop.yml
33

44
Metrics/BlockLength:
55
Max: 145

0 commit comments

Comments
 (0)