rubocop-rails-omakase 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/rubocop.yml +247 -0
  3. metadata +99 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fb4ad962a87aa715fe6eb4eb7de8ad05ab814a2c093ff6e011af7f5ab635d194
4
+ data.tar.gz: 438d2571bbd9fd23669bc62661d4c8643d1ecffc84079d8cc4b2d6182ba50a95
5
+ SHA512:
6
+ metadata.gz: 1c04ab4fa27c7166cdc5b9d20bb931670d004206a88fee1be3bde2e5503c97c389ca37ec0aaecbf84ed34268d329625307424431c1ea962d72b6a499567e6a6e
7
+ data.tar.gz: f780d92b2dc571589ca1c3d9d748ab5964b456225aa26ac789a49b1ccec74b8250355f275d25a9ecb65f4affb69e4e3c6a5b13cf8182493d5ca1847534fddb01
data/rubocop.yml ADDED
@@ -0,0 +1,247 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-minitest
5
+
6
+ inherit_mode:
7
+ merge:
8
+ - Exclude
9
+
10
+ AllCops:
11
+ SuggestExtensions: false
12
+ DisabledByDefault: true
13
+ Exclude:
14
+ - "data/**/*"
15
+ - "db/*schema.rb"
16
+ - "log/**/*"
17
+ - "node_modules/**/*"
18
+ - "public/**/*"
19
+ - "storage/**/*"
20
+ - "tmp/**/*"
21
+ - "vendor/**/*"
22
+
23
+ Performance:
24
+ Exclude:
25
+ - "test/**/*"
26
+
27
+ # Prefer assert_not over assert !
28
+ Rails/AssertNot:
29
+ Include:
30
+ - "test/**/*"
31
+
32
+ # Prefer assert_not_x over refute_x
33
+ Rails/RefuteMethods:
34
+ Include:
35
+ - "test/**/*"
36
+
37
+ # We generally prefer &&/|| but like low-precedence and/or in context
38
+ Style/AndOr:
39
+ Enabled: false
40
+
41
+ # Align `when` with `end`.
42
+ Layout/CaseIndentation:
43
+ Enabled: true
44
+ EnforcedStyle: end
45
+
46
+ # Align comments with method definitions.
47
+ Layout/CommentIndentation:
48
+ Enabled: true
49
+
50
+ Layout/ElseAlignment:
51
+ Enabled: true
52
+
53
+ # Align `end` with the matching keyword or starting expression except for
54
+ # assignments, where it should be aligned with the LHS.
55
+ Layout/EndAlignment:
56
+ Enabled: true
57
+ EnforcedStyleAlignWith: variable
58
+ AutoCorrect: true
59
+
60
+ Layout/EmptyLineAfterMagicComment:
61
+ Enabled: true
62
+
63
+ Layout/EmptyLinesAroundBlockBody:
64
+ Enabled: true
65
+
66
+ # In a regular class definition, no empty lines around the body.
67
+ Layout/EmptyLinesAroundClassBody:
68
+ Enabled: true
69
+
70
+ # In a regular method definition, no empty lines around the body.
71
+ Layout/EmptyLinesAroundMethodBody:
72
+ Enabled: true
73
+
74
+ # In a regular module definition, no empty lines around the body.
75
+ Layout/EmptyLinesAroundModuleBody:
76
+ Enabled: true
77
+
78
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
79
+ Style/HashSyntax:
80
+ Enabled: true
81
+ EnforcedShorthandSyntax: either
82
+
83
+ # Method definitions after `private` or `protected` isolated calls need one
84
+ # extra level of indentation.
85
+ #
86
+ # We break this rule in context, though, e.g. for private-only concerns,
87
+ # so we leave it disabled.
88
+ Layout/IndentationConsistency:
89
+ Enabled: false
90
+ EnforcedStyle: indented_internal_methods
91
+
92
+ # Two spaces, no tabs (for indentation).
93
+ #
94
+ # Doesn't behave properly with private-only concerns, so it's disabled.
95
+ Layout/IndentationWidth:
96
+ Enabled: false
97
+
98
+ Layout/LeadingCommentSpace:
99
+ Enabled: true
100
+
101
+ Layout/SpaceAfterColon:
102
+ Enabled: true
103
+
104
+ Layout/SpaceAfterComma:
105
+ Enabled: true
106
+
107
+ Layout/SpaceAroundEqualsInParameterDefault:
108
+ Enabled: true
109
+
110
+ Layout/SpaceAroundKeyword:
111
+ Enabled: true
112
+
113
+ Layout/SpaceBeforeComma:
114
+ Enabled: true
115
+
116
+ Layout/SpaceBeforeFirstArg:
117
+ Enabled: true
118
+
119
+ Style/DefWithParentheses:
120
+ Enabled: true
121
+
122
+ # Defining a method with parameters needs parentheses.
123
+ Style/MethodDefParentheses:
124
+ Enabled: true
125
+
126
+ # Use `foo {}` not `foo{}`.
127
+ Layout/SpaceBeforeBlockBraces:
128
+ Enabled: true
129
+
130
+ # Use `->(x, y) { x + y }` not `-> (x, y) { x + y }`
131
+ Layout/SpaceInLambdaLiteral:
132
+ Enabled: true
133
+
134
+ Style/StabbyLambdaParentheses:
135
+ Enabled: true
136
+
137
+ # Use `foo { bar }` not `foo {bar}`.
138
+ # Use `foo { }` not `foo {}`.
139
+ Layout/SpaceInsideBlockBraces:
140
+ Enabled: true
141
+ EnforcedStyleForEmptyBraces: space
142
+
143
+ # Use `[ a, [ b, c ] ]` not `[a, [b, c]]`
144
+ # Use `[]` not `[ ]`
145
+ Layout/SpaceInsideArrayLiteralBrackets:
146
+ Enabled: true
147
+ EnforcedStyle: space
148
+ EnforcedStyleForEmptyBrackets: no_space
149
+
150
+ # Use `%w[ a b ]` not `%w[ a b ]`.
151
+ Layout/SpaceInsideArrayPercentLiteral:
152
+ Enabled: true
153
+
154
+ # Use `{ a: 1 }` not `{a:1}`.
155
+ # Use `{}` not `{ }`.
156
+ Layout/SpaceInsideHashLiteralBraces:
157
+ Enabled: true
158
+ EnforcedStyle: space
159
+ EnforcedStyleForEmptyBraces: no_space
160
+
161
+ # Use `foo(bar)` not `foo( bar )`
162
+ Layout/SpaceInsideParens:
163
+ Enabled: true
164
+
165
+ # Requiring a space is not yet supported as of 0.59.2
166
+ # Use `%w[ foo ]` not `%w[foo]`
167
+ Layout/SpaceInsidePercentLiteralDelimiters:
168
+ Enabled: false
169
+ #EnforcedStyle: space
170
+
171
+ # Use `hash[:key]` not `hash[ :key ]`
172
+ Layout/SpaceInsideReferenceBrackets:
173
+ Enabled: true
174
+
175
+ # Use `"foo"` not `'foo'` unless escaping is required
176
+ Style/StringLiterals:
177
+ Enabled: true
178
+ EnforcedStyle: double_quotes
179
+ Include:
180
+ - "app/**/*"
181
+ - "config/**/*"
182
+ - "lib/**/*"
183
+ - "test/**/*"
184
+ - "Gemfile"
185
+
186
+ # Detect hard tabs, no hard tabs.
187
+ Layout/IndentationStyle:
188
+ Enabled: true
189
+
190
+ # Blank lines should not have any spaces.
191
+ Layout/TrailingEmptyLines:
192
+ Enabled: true
193
+
194
+ # No trailing whitespace.
195
+ Layout/TrailingWhitespace:
196
+ Enabled: true
197
+
198
+ # Use quotes for string literals when they are enough.
199
+ Style/RedundantPercentQ:
200
+ Enabled: false
201
+
202
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
203
+ Lint/RequireParentheses:
204
+ Enabled: true
205
+
206
+ Lint/RedundantStringCoercion:
207
+ Enabled: true
208
+
209
+ Lint/UriEscapeUnescape:
210
+ Enabled: true
211
+
212
+ Style/ParenthesesAroundCondition:
213
+ Enabled: true
214
+
215
+ Style/RedundantReturn:
216
+ Enabled: true
217
+ AllowMultipleReturnValues: true
218
+
219
+ Style/Semicolon:
220
+ Enabled: true
221
+ AllowAsExpressionSeparator: true
222
+
223
+ # Prefer Foo.method over Foo::method
224
+ Style/ColonMethodCall:
225
+ Enabled: true
226
+
227
+ Style/PercentLiteralDelimiters:
228
+ Enabled: true
229
+ PreferredDelimiters:
230
+ default: "()"
231
+ "%i": "[]"
232
+ "%I": "[]"
233
+ "%r": "{}"
234
+ "%w": "[]"
235
+ "%W": "[]"
236
+
237
+ Style/TrailingCommaInArrayLiteral:
238
+ Enabled: true
239
+
240
+ Style/TrailingCommaInHashLiteral:
241
+ Enabled: true
242
+
243
+ Performance/FlatMap:
244
+ Enabled: true
245
+
246
+ Performance/UnfreezeString:
247
+ Enabled: true
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-rails-omakase
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - David Heinemeier Hansson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-12-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-performance
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop-minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description:
70
+ email: david@hey.com
71
+ executables: []
72
+ extensions: []
73
+ extra_rdoc_files: []
74
+ files:
75
+ - rubocop.yml
76
+ homepage: https://github.com/rails/rubocop-rails-omakase
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubygems_version: 3.4.14
96
+ signing_key:
97
+ specification_version: 4
98
+ summary: Omakase Ruby styling for Rails
99
+ test_files: []