Last active
December 23, 2023 13:28
-
-
Save valdemarua/9126bcf89ed78783d9c0a86b0185000d to your computer and use it in GitHub Desktop.
Rubocop + Standardrb + Rubocop Rspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .rubocop-rails.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .rubocop-rspec.yml | |
RSpec/ExampleLength: | |
Enabled: false | |
RSpec/MultipleExpectations: | |
Enabled: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .rubocop.yml | |
inherit_mode: | |
merge: | |
- Exclude | |
require: | |
- rubocop-rails | |
- rubocop-rspec | |
- rubocop-performance | |
- standard/cop/block_single_line_braces | |
inherit_gem: | |
standard: config/base.yml | |
inherit_from: | |
- .rubocop_rails.yml | |
- .rubocop_rspec.yml | |
# Standardrb overrides | |
Style/TrailingCommaInArguments: | |
Description: 'Checks for trailing comma in argument lists.' | |
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' | |
EnforcedStyleForMultiline: comma | |
SupportedStylesForMultiline: | |
- comma | |
- consistent_comma | |
- no_comma | |
Enabled: true | |
Style/TrailingCommaInHashLiteral: | |
Description: 'Checks for trailing comma in hash literals.' | |
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' | |
EnforcedStyleForMultiline: comma | |
SupportedStylesForMultiline: | |
- comma | |
- consistent_comma | |
- no_comma | |
Enabled: true | |
Style/TrailingCommaInArrayLiteral: | |
Description: 'Checks for trailing comma in array literals.' | |
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas' | |
EnforcedStyleForMultiline: comma | |
SupportedStylesForMultiline: | |
- comma | |
- consistent_comma | |
- no_comma | |
Enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
# | |
# touch .rubocop.yml .rubocop-rspec.yml .rubocop-rails.yml | |
# | |
# Add gems to your Gemfile | |
group :development, :test do | |
gem "rubocop-rails" | |
gem "rubocop-rspec" | |
gem "rubocop-performance" | |
gem "standard", "~> 1.3" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment