.rubocop.yml
inherit_from:
- .rubocop_todo.yml
- node_modules/@prettier/plugin-ruby/rubocop.yml
require:
- rubocop-rails
- rubocop-performance
AllCops:
Exclude:
- node_modules/**/*
- bin/**/*
- vendor/**/*
NewCops: enable
Rails:
Enabled: true
# We're not actually using Rails methods here.
Rails/InverseOf:
Enabled: false
Rails/HasManyOrHasOneDependent:
Enabled: false
Rails/FindBy:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
# Filter out all the DSLs
Metrics/BlockLength:
CountAsOne:
- array
- hash
- heredoc
AllowedMethods:
- describe
- context
- background
- scenario
- namespace
- task
- included
- shared_context
- shared_examples
- state_machine
- configure
- draw
- feature
- subject
- let
- let!
- factory
- define
- guard
- transient
- it
Exclude:
- config/robots.rb
Metrics/ClassLength:
CountAsOne:
- array
- hash
- heredoc
Metrics/MethodLength:
CountAsOne:
- array
- hash
- heredoc
Naming/VariableNumber:
CheckSymbols:
false # Rubocop gets annoyed about our states. I'm disabling globally
# as I'm honestly not that bothered.