-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
184 lines (145 loc) · 3.59 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
require:
- rubocop-ordered_methods
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-rails
- standard
inherit_gem:
rubocop-ordered_methods:
- config/default.yml
rubocop-performance:
- config/default.yml
rubocop-rails:
- config/default.yml
rubocop-rspec:
- config/default.yml
standard:
- config/ruby-2.7.yml
AllCops:
TargetRubyVersion: 2.7.6
NewCops: enable
Exclude:
- "bin/**/*"
- "coverage/**/*"
- "db/migrate/*"
- "db/schema.rb"
- "lib/enum_migration.rb"
- "log/**/*"
- "node_modules/**/*"
- "public/**/*"
- "tmp/**/*"
- "vendor/**/*"
Layout/FirstHashElementLineBreak:
Enabled: true
Layout/FirstMethodArgumentLineBreak:
Enabled: true
Layout/HashAlignment:
Enabled: true
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
EnforcedLastArgumentHashStyle: always_inspect
Layout/MultilineArrayLineBreaks:
Enabled: true
Layout/MultilineArrayBraceLayout:
Enabled: true
EnforcedStyle: symmetrical
Layout/MultilineHashBraceLayout:
Enabled: true
EnforcedStyle: new_line
Layout/MultilineMethodCallBraceLayout:
Enabled: true
EnforcedStyle: new_line
Layout/MultilineHashKeyLineBreaks:
Enabled: true
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
Layout/ParameterAlignment:
Enabled: true
EnforcedStyle: with_fixed_indentation
Layout/RescueEnsureAlignment:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
# Yo ... `to_i` is gonna have to suffice for now because `Integer(possibly_nil, 10)` explodes, like,
# all the time
Lint/NumberConversion:
Enabled: false
Rails/DynamicFindBy:
Enabled: true
AllowedMethods:
- find_by_short_id
- find_by_slug # Generated by Slugify fairly often
- find_by_slug! # Samesies
- find_by_variant_slug
Rails/FilePath:
EnforcedStyle: arguments
Rails/HasAndBelongsToMany:
Enabled: false
Rails/RakeEnvironment:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Rails/UnknownEnv:
Enabled: true
Environments:
- development
- test
- production
- staging
RSpec/Capybara/FeatureMethods:
Enabled: true
EnabledMethods:
- scenario
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Enabled: true
Exclude:
- spec/system/**/*
RSpec/Dialect:
Enabled: false
# PreferredMethods:
# context: describe
RSpec/ExampleLength:
# Reasoning here is that, let's be honest, this is arbitrary AF. If the specs get out of control,
# we'll switch it back on and figure something out. Until then, when you're running assertions
# against large multi-line hashes, I'd rather have it be readable rather than arbitrarily short.
Enabled: false
RSpec/Focus:
AutoCorrect: false
Enabled: true
RSpec/MultipleExpectations:
Exclude:
- spec/controllers/**/*
- spec/system/**/*
Max: 6
RSpec/MultipleMemoizedHelpers:
Enabled: true
Exclude:
- spec/system/**/*
Max: 8
RSpec/NestedGroups:
Max: 5 # TODO: lower this again someday, but AFTER we pull the letter logic
RSpec/SharedExamples:
Enabled: false
Style/FrozenStringLiteralComment:
AutoCorrect: true
Enabled: true
Exclude:
- db/data_schema.rb
Style/MissingRespondToMissing:
Enabled: false # TODO: I dunno; maybe we do this. But for right now it's a pain in the neck
Style/StringLiterals:
EnforcedStyle: double_quotes
Enabled: true
Style/SymbolArray:
Enabled: true
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/WordArray:
Enabled: true