# https://docs.rubocop.org/rubocop/1.9/index.html
require:
- rubocop-rails
- rubocop-performance
- rubocop-rake
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.6
DisplayCopNames: true
NewCops: enable
Exclude:
- 'bin/*'
- 'tmp/**/*'
- 'vendor/**/*'
Layout/DotPosition:
EnforcedStyle: leading
Layout/SpaceInsideArrayLiteralBrackets:
EnforcedStyle: no_space
Layout/LineLength:
Max: 120
Layout/MultilineArrayBraceLayout:
EnforcedStyle: new_line
Layout/MultilineHashBraceLayout:
EnforcedStyle: new_line
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: new_line
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent_relative_to_receiver
Lint/ScriptPermission:
Exclude:
- 'lib/generators/async_active_job/templates/*'
Metrics/BlockLength:
Max: 80
Exclude:
- "spec/**/*.rb"
Metrics/MethodLength:
Max: 40
Exclude:
- "spec/**/*.rb"
Metrics/ParameterLists:
Max: 3
CountKeywordArgs: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockNesting:
Max: 5
Exclude:
- "spec/**/*.rb"
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Style/Documentation:
Enabled: false
Style/SymbolArray:
EnforcedStyle: brackets
Style/WordArray:
EnforcedStyle: brackets
# All lambda will be like `->() {}`, `->() do end`.
Style/Lambda:
EnforcedStyle: literal
Style/ConditionalAssignment:
Enabled: false
Style/EmptyMethod:
EnforcedStyle: expanded
Style/SingleLineMethods:
AllowIfMethodIsEmpty: false
Style/FormatStringToken:
Enabled: false
Rails/NotNullColumn:
Enabled: false
RSpec/SharedExamples:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/NamedSubject:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/MessageSpies:
EnforcedStyle: receive
RSpec/ExpectChange:
EnforcedStyle: block
RSpec/Rails/HttpStatus:
EnforcedStyle: numeric