1
+ inherit_gem :
2
+ rubocop-rails :
3
+ - config/rails.yml
4
+
1
5
AllCops :
2
6
TargetRubyVersion : 2.4
3
- # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
4
- # to ignore them, so only the ones explicitly set in this file are enabled.
5
- DisabledByDefault : true
6
- Exclude :
7
- - ' **/templates/**/*'
8
- - ' **/vendor/**/*'
7
+
8
+ # frozen_string_literal: true
9
+ Style/FrozenStringLiteralComment :
10
+ Enabled : true
11
+ EnforcedStyle : when_needed
9
12
10
13
# Prefer &&/|| over and/or.
11
14
Style/AndOr :
@@ -17,78 +20,78 @@ Style/BracesAroundHashParameters:
17
20
Enabled : true
18
21
19
22
# Align `when` with `case`.
20
- Style /CaseIndentation :
23
+ Layout /CaseIndentation :
21
24
Enabled : true
22
25
23
26
# Align comments with method definitions.
24
- Style /CommentIndentation :
27
+ Layout /CommentIndentation :
25
28
Enabled : true
26
29
27
30
# No extra empty lines.
28
- Style /EmptyLines :
31
+ Layout /EmptyLines :
29
32
Enabled : true
30
33
31
34
# In a regular class definition, no empty lines around the body.
32
- Style /EmptyLinesAroundClassBody :
35
+ Layout /EmptyLinesAroundClassBody :
33
36
Enabled : true
34
37
35
38
# In a regular method definition, no empty lines around the body.
36
- Style /EmptyLinesAroundMethodBody :
39
+ Layout /EmptyLinesAroundMethodBody :
37
40
Enabled : true
38
41
39
42
# In a regular module definition, no empty lines around the body.
40
- Style /EmptyLinesAroundModuleBody :
43
+ Layout /EmptyLinesAroundModuleBody :
41
44
Enabled : true
42
45
43
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
46
+ # Use Ruby >= 1.9 syntax for hashes. Prefer {a: :b} over { :a => :b }.
44
47
Style/HashSyntax :
45
48
Enabled : true
46
49
47
50
# Method definitions after `private` or `protected` isolated calls need one
48
51
# extra level of indentation.
49
- Style /IndentationConsistency :
52
+ Layout /IndentationConsistency :
50
53
Enabled : true
51
- EnforcedStyle : rails
54
+ EnforcedStyle : normal
52
55
53
56
# Two spaces, no tabs (for indentation).
54
- Style /IndentationWidth :
57
+ Layout /IndentationWidth :
55
58
Enabled : true
56
59
57
- Style /SpaceAfterColon :
60
+ Layout /SpaceAfterColon :
58
61
Enabled : true
59
62
60
- Style /SpaceAfterComma :
63
+ Layout /SpaceAfterComma :
61
64
Enabled : true
62
65
63
- Style /SpaceAroundEqualsInParameterDefault :
66
+ Layout /SpaceAroundEqualsInParameterDefault :
64
67
Enabled : true
65
68
66
- Style /SpaceAroundKeyword :
69
+ Layout /SpaceAroundKeyword :
67
70
Enabled : true
68
71
69
- Style /SpaceAroundOperators :
72
+ Layout /SpaceAroundOperators :
70
73
Enabled : true
71
74
72
- Style /SpaceBeforeFirstArg :
73
- Enabled : true
75
+ Layout /SpaceBeforeFirstArg :
76
+ Enabled : true
74
77
75
78
# Defining a method with parameters needs parentheses.
76
79
Style/MethodDefParentheses :
77
80
Enabled : true
78
81
79
82
# Use `foo {}` not `foo{}`.
80
- Style /SpaceBeforeBlockBraces :
83
+ Layout /SpaceBeforeBlockBraces :
81
84
Enabled : true
82
85
83
86
# Use `foo { bar }` not `foo {bar}`.
84
- Style /SpaceInsideBlockBraces :
87
+ Layout /SpaceInsideBlockBraces :
85
88
Enabled : true
86
89
87
90
# Use `{a: 1}` not `{ a:1 }`.
88
- Style /SpaceInsideHashLiteralBraces :
91
+ Layout /SpaceInsideHashLiteralBraces :
89
92
Enabled : false
90
93
91
- Style /SpaceInsideParens :
94
+ Layout /SpaceInsideParens :
92
95
Enabled : true
93
96
94
97
# Check quotes usage according to lint rule below.
@@ -97,15 +100,15 @@ Style/StringLiterals:
97
100
EnforcedStyle : double_quotes
98
101
99
102
# Detect hard tabs, no hard tabs.
100
- Style /Tab :
103
+ Layout /Tab :
101
104
Enabled : true
102
105
103
106
# Blank lines should not have any spaces.
104
- Style /TrailingBlankLines :
107
+ Layout /TrailingBlankLines :
105
108
Enabled : true
106
109
107
110
# No trailing whitespace.
108
- Style /TrailingWhitespace :
111
+ Layout /TrailingWhitespace :
109
112
Enabled : true
110
113
111
114
# Use quotes for string literals when they are enough.
0 commit comments