Skip to content

Instantly share code, notes, and snippets.

@abumalick
Created August 29, 2022 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abumalick/4ebfbf5ea88b9056cea064911740769c to your computer and use it in GitHub Desktop.
Save abumalick/4ebfbf5ea88b9056cea064911740769c to your computer and use it in GitHub Desktop.
Rubocop rails configuration
# .rubocop.yml
# source: https://www.fastruby.io/blog/ruby/code-quality/how-we-use-rubocop-and-standardrb.html
require:
- standard
- rubocop-rails
- rubocop-rspec
inherit_gem:
standard: config/base.yml
AllCops:
NewCops: enable
Exclude:
- node_modules/**/*
- public/**/*
- vendor/**/*
Rails:
Enabled: true # enable rubocop-rails cops
RSpec:
Enabled: true # enable rubocop-rspec cops
RSpec/DescribeClass:
Enabled: false # ignore missing comments on classes
Bundler/DuplicatedGem:
Enabled: false # ignore duplicated gem errors because we will have duplicated gems when dual booting
# Gemfile
group :development, :test do
gem "standard", require: false
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment