Skip to content

Instantly share code, notes, and snippets.

@ZeroPivot
Forked from dsandstrom/.rubocop.yml
Last active September 30, 2021 17:53
Show Gist options
  • Save ZeroPivot/93b4e254b97ec7b9e683a695baec7e51 to your computer and use it in GitHub Desktop.
Save ZeroPivot/93b4e254b97ec7b9e683a695baec7e51 to your computer and use it in GitHub Desktop.
Rubocop config files for Ruby 3.0 / Rails 6+
##
# .rubocop.yml
AllCops:
TargetRubyVersion: 2.5
Include:
- 'config.ru'
- 'Gemfile'
- 'Guardfile'
- 'Rakefile'
Exclude:
- 'app/views/**/*'
- 'bin/*'
- 'db/schema.rb'
- 'db/migrate/*'
- 'log/**/*'
- 'node_modules/**/*'
- 'public/**/*'
- 'script/**/*'
- 'vendor/**/*'
- 'tmp/**/*'
- '.git/**/*'
Documentation:
Enabled: false
IndentationConsistency:
EnforcedStyle: 'rails'
Metrics/BlockLength:
Exclude:
- 'Guardfile'
Naming/FileName:
Exclude:
- 'Gemfile'
- 'Guardfile'
- 'Rakefile'
Rails:
Enabled: true
##
# ./spec/.rubocop.yml
inherit_from:
- ../.rubocop.yml
StringLiterals:
EnforcedStyle: double_quotes
Exclude:
- './*_helper.rb'
# describe block
Metrics/BlockLength:
Enabled: false
##
# ./spec/support/.rubocop.yml
inherit_from:
- ../../.rubocop.yml
##
# ./spec/fabricators/.rubocop.yml
inherit_from:
- ../../.rubocop.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment