-
-
Save ZeroPivot/93b4e254b97ec7b9e683a695baec7e51 to your computer and use it in GitHub Desktop.
Rubocop config files for Ruby 3.0 / Rails 6+
This file contains 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 | |
# rubocop config files for Ruby 3.0 / Rails 6+ project | |
AllCops: | |
TargetRubyVersion: 3.0 | |
NewCops: enable | |
SuggestExtensions: true | |
Include: | |
- 'config.ru' | |
- 'Gemfile' | |
- 'Guardfile' | |
- 'Rakefile' | |
- 'app/**/*.rb' | |
- 'config/**/*.rb' | |
- 'lib/**/*.rb' | |
- 'spec/**/*.rb' | |
- 'db/seeds.rb' | |
Exclude: | |
- 'bin/*' | |
- 'db/schema.rb' | |
- 'db/migrate/*' | |
- 'log/**/*' | |
- 'node_modules/**/*' | |
- 'public/**/*' | |
- 'script/**/*' | |
- 'vendor/**/*' | |
- 'tmp/**/*' | |
- '.git/**/*' | |
- 'app/views/**/*' | |
Layout/IndentationConsistency: | |
EnforcedStyle: 'indented_internal_methods' | |
Layout/LineLength: | |
Max: 80 | |
Metrics/BlockLength: | |
Exclude: | |
- 'Guardfile' | |
- 'config/environments/*' | |
Metrics/ClassLength: | |
Exclude: | |
- 'db/seeds.rb' | |
Max: 150 | |
Metrics/ModuleLength: | |
Max: 150 | |
Naming/FileName: | |
Exclude: | |
- 'Gemfile' | |
- 'Guardfile' | |
- 'Rakefile' | |
Style/Documentation: | |
Enabled: false | |
Style/StringLiterals: | |
Enabled: true | |
EnforcedStyle: single_quotes |
This file contains 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
# spec/.rubocop.yml | |
inherit_from: | |
- ../.rubocop.yml | |
StringLiterals: | |
EnforcedStyle: double_quotes | |
Exclude: | |
- './*_helper.rb' | |
# describe block | |
Metrics/BlockLength: | |
Enabled: false |
This file contains 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
# spec/fabricators/.rubocop.yml | |
inherit_from: | |
- ../../.rubocop.yml |
This file contains 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
# spec/support/.rubocop.yml | |
inherit_from: | |
- ../../.rubocop.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment