.rubocop.yml
AllCops:
NewCops: enable
TargetRubyVersion: 2.6
Exclude:
- "db/**/*"
- "tmp/**/*"
- "log/**/*"
- "node_modules/**/*"
- "vendor/**/*"
- bin/**/*
# Rails specific
require:
- rubocop-rails
- rubocop-performance
Rails/OutputSafety:
Enabled: false # This disallows .html_safe
Rails/TimeZone:
Enabled: false # This enforces Time.zone.now
Rails/Date:
Enabled: false # This enforces Time.zone.today
Rails/HasAndBelongsToMany:
Enabled: false # This disallows HABTM.
Rails/I18nLocaleTexts:
Enabled: false # This should be enabled when #933 is merged
Rails/FindEach:
Enabled: false # Blanket find_each isn't a good idea
Rails/RakeEnvironment:
Enabled: false # There is no need for all rake tasks to load the environment
# Project styling
Style: # Style is not Rubocop's responsibility. Use an auto-formatter like rufo.
Enabled: false
Layout: # Layout is not Rubocop's responsibility. Use an auto-formatter like rufo.
Enabled: false
Metrics: # Rubocop metrics are useless.
Enabled: false
Naming/VariableNumber:
Enabled: false
Lint/ShadowingOuterLocalVariable: # shadowing is a language feature - we should use it where appropriate.
Enabled: false
# Concessions (remove these if possible / appropriate).
Bundler/OrderedGems:
Enabled: false # we have a ton of gems, grouped arbitrarily. Could be tackled later.