Skip to content

Instantly share code, notes, and snippets.

@elias19r
Last active February 21, 2024 00:34
Show Gist options
  • Save elias19r/2e8b6c5b430787c1df30ad8e3a22d646 to your computer and use it in GitHub Desktop.
Save elias19r/2e8b6c5b430787c1df30ad8e3a22d646 to your computer and use it in GitHub Desktop.
require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-thread_safety
AllCops:
TargetRubyVersion: 3.2.0
NewCops: enable
# https://docs.rubocop.org/rubocop/cops_layout.html
Layout/ArrayAlignment:
Enabled: false
Layout/EmptyLinesAroundExceptionHandlingKeywords:
Enabled: false
Layout/EndAlignment:
Enabled: false
Layout/FirstHashElementIndentation:
Enabled: false
Layout/HashAlignment:
Enabled: false
Layout/LineEndStringConcatenationIndentation:
Enabled: false
Layout/LineLength:
Exclude:
- spec/**/*_spec.rb
- config/routes.rb
Max: 160
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Layout/SpaceInsideArrayPercentLiteral:
Enabled: false
Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: false
# https://docs.rubocop.org/rubocop/cops_lint.html
Lint/MixedRegexpCaptureTypes:
Enabled: false
# https://docs.rubocop.org/rubocop/cops_metrics.html
Metrics/AbcSize:
Exclude:
- db/migrate/*.rb
Max: 50
Metrics/BlockLength:
Exclude:
- db/schema.rb
- config/routes.rb
- spec/**/*.rb
Max: 60
Metrics/BlockNesting:
Max: 6
Metrics/ClassLength:
Max: 200
Metrics/CyclomaticComplexity:
Max: 20
Metrics/MethodLength:
Exclude:
- spec/**/*.rb
Max: 80
Metrics/ParameterLists:
Max: 6
MaxOptionalParameters: 6
Metrics/PerceivedComplexity:
Max: 30
# https://docs.rubocop.org/rubocop/cops_naming.html
Naming/MethodParameterName:
MinNameLength: 1
Naming/VariableNumber:
Enabled: false
# https://docs.rubocop.org/rubocop-rails/cops_rails.html
Rails/ActionOrder:
ExpectedOrder:
- index
- show
- new
- create
- edit
- update
- destroy
Rails/ApplicationController:
Enabled: false
Rails/DynamicFindBy:
Enabled: false
Rails/I18nLocaleTexts:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html
RSpec/BeEq:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/ImplicitSubject:
Enabled: false
RSpec/LetBeforeExamples:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/NestedGroups:
Max: 6
# https://docs.rubocop.org/rubocop/cops_style.html
Style/BlockComments:
Enabled: false
Style/Documentation:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/GuardClause:
Enabled: false
Style/HashEachMethods:
Enabled: false
Style/HashSyntax:
Enabled: false
Style/HashTransformValues:
Enabled: false
Style/IfInsideElse:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/Lambda:
Enabled: false
Style/ModuleFunction:
Enabled: false
Style/MultilineBlockChain:
Enabled: false
Style/MutableConstant:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/NegatedIfElseCondition:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/SafeNavigation:
Enabled: false
Style/SoleNestedConditional:
Enabled: false
Style/StringConcatenation:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArguments:
Enabled: false
Style/TrailingCommaInArrayLiteral:
Enabled: false
Style/TrailingCommaInHashLiteral:
Enabled: false
Style/TrailingUnderscoreVariable:
Enabled: false
Style/WordArray:
Enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment