-
Notifications
You must be signed in to change notification settings - Fork 3
/
.rubocop.yml
41 lines (41 loc) · 1.15 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
require: rubocop-rails
AllCops:
NewCops: disable
# The serializers go wrong with relationships, rubocop interprets
# them a `has_many` from ActiveRecord and autocorrects it to a
# proc. Which is not how the JSONApi serializer works
TargetRubyVersion: 2.5
Exclude:
- db/schema.rb
- app/serializers/**/*
Rails:
Enabled: true
Layout/LineLength:
Max: 100
Metrics/AbcSize:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/MethodCalledOnDoEndBlock:
Description: 'Avoid chaining a method call on a do...end block.'
Enabled: true
Metrics/ClassLength:
Max: 400
Style/Documentation:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
# I don't think there's a good way to enforce this sometime commit_sha1 is ok sometimes user_1 is ok
Naming/VariableNumber:
Enabled: false
# this one triggers a lot of false positive as orbf rules are "%{}"-based
Style/FormatStringToken:
EnforcedStyle: template
Rails/Delegate:
Enabled: false
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
EnforcedLastArgumentHashStyle: always_inspect
Layout/ArgumentAlignment:
Enabled: true