-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
44 lines (31 loc) · 1.39 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
# This config aims:
#
# - compact, readable and reusable source,
# - consistent constructions (same things stay the same in different context),
# - consistent indentation,
# - avoiding unnecessary lines in diffs
# - wise usage of Ruby features and expressiveness.
AllCops:
TargetRubyVersion: 2.2
Layout/AlignParameters: {EnforcedStyle: with_fixed_indentation}
# Allows copy-pasting to repl.
Layout/DotPosition: {EnforcedStyle: trailing}
Layout/SpaceInsideHashLiteralBraces: {EnforcedStyle: no_space}
# # Keep everything consistent.
Layout/SpaceBeforeBlockBraces: {EnforcedStyleForEmptyBraces: space}
# Offences named scopes and `expect {}.to change {}`.
Lint/AmbiguousBlockAssociation: {Enabled: false}
# It's removed from next rubocop version.
Lint/SplatKeywordArguments: {Enabled: false}
# Other metrics are just enough.
# This one offences all specs, routes and some initializers.
Metrics/BlockLength: {Enabled: false}
Metrics/LineLength: {Max: 100}
Metrics/MethodLength: {Max: 30}
Style/Alias: {EnforcedStyle: prefer_alias_method}
Style/FrozenStringLiteralComment: {EnforcedStyle: never}
Style/Lambda: {EnforcedStyle: literal}
Style/RescueStandardError: {EnforcedStyle: implicit}
Style/SignalException: {EnforcedStyle: only_raise}
Style/TrailingCommaInArrayLiteral: {EnforcedStyleForMultiline: consistent_comma}
Style/TrailingCommaInHashLiteral: {EnforcedStyleForMultiline: consistent_comma}