Skip to content

Instantly share code, notes, and snippets.

@phallguy
Last active September 23, 2024 21:14
Show Gist options
  • Save phallguy/1cc417a2777244c1319d730c3818c64c to your computer and use it in GitHub Desktop.
Save phallguy/1cc417a2777244c1319d730c3818c64c to your computer and use it in GitHub Desktop.
inherit_from: ../.rubocop.yml
require:
- rubocop-rails
- rubocop-minitest
Minitest/MultipleAssertions:
Enabled: false
Minitest/EmptyLineBeforeAssertionMethods:
Enabled: false
Rails/RefuteMethods:
Enabled: false
Rails/SkipsModelValidations:
Exclude:
- "test/**/*.rb"
AllowedMethods:
- touch
Rails/HelperInstanceVariable:
Enabled: false
Rails/Delegate:
AutoCorrect: false
Enabled: false
Minitest/RefutePredicate:
Enabled: false
Minitest/AssertPredicate:
Enabled: false
Minitest/AssertMatch:
AutoCorrect: false
Rails/TimeZone:
Enabled: false
Rails/Output:
Enabled: false
Rails/Presence:
AutoCorrect: false
Rails/EnumSyntax:
AutoCorrect: false
Style/SoleNestedConditional:
Enabled: false
Style/MutableConstant:
Enabled: false
# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
# any parameters. The file can be placed either in your home
# directory or in some project directory.
#
# RuboCop will start looking for the configuration file in the directory
# where the inspected file is and continue its way up to the root directory.
#
# https://github.com/rubocop/rubocop/blob/master/docs/modules/ROOT/pages/configuration.adoc
#
AllCops:
Exclude:
- '**/db/schema.rb'
TargetRubyVersion: 3.3
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: true
NewCops: enable
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: false
Layout/HashAlignment:
Enabled: false
Layout/EmptyLineBetweenDefs:
Enabled: false
Layout/IndentationConsistency:
EnforcedStyle: indented_internal_methods
AutoCorrect: true
Layout/IndentationWidth:
Enabled: true
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Enabled: false
Lint/Debugger:
DebuggerMethods:
Rails:
Enabled: false
save_screenshot: ~
Lint/AmbiguousOperator:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
AllowSafeAssignment: true
Lint/AmbiguousRegexpLiteral:
Enabled: false
Lint/UselessAccessModifier:
Enabled: false
Lint/UselessAssignment:
Enabled: false
Lint/SuppressedException:
Enabled: false
Lint/RequireParentheses:
Enabled: true
Lint/UnusedBlockArgument:
Enabled: false
Layout/TrailingEmptyLines:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/BlockNesting:
Max: 4
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Layout/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/ParameterLists:
Enabled: false
Naming/AccessorMethodName:
Enabled: false
Naming/BlockForwarding:
Enabled: false
Naming/PredicateName:
Enabled: false
Style/RescueModifier:
AutoCorrect: false
Style/KeywordParametersOrder:
AutoCorrect: false
Style/WordArray:
AutoCorrect: false
Style/RaiseArgs:
Enabled: false
Style/NegatedIfElseCondition:
AutoCorrect: false
Style/AccessorGrouping:
Enabled: false
Style/RedundantParentheses:
AutoCorrect: false
Style/RedundantAssignment:
Enabled: false
Style/RedundantLineContinuation:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/ArgumentsForwarding:
AutoCorrect: false
Enabled: false
Style/Documentation:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/GuardClause:
Enabled: false
AutoCorrect: false
Style/GlobalStdStream:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/IfInsideElse:
Enabled: true
AutoCorrect: false
Style/NegatedIf:
Enabled: false
Style/MultipleComparison:
Enabled: false
Style/AndOr:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/Next:
Enabled: true
AutoCorrect: false
Style/NumericPredicate:
Enabled: false
Style/ParallelAssignment:
Enabled: false
Style/RedundantSelf:
Enabled: true
AutoCorrect: false
Style/SingleLineMethods:
Enabled: false
Style/SoleNestedConditional:
Enabled: true
AutoCorrect: false
Style/ConditionalAssignment:
Enabled: false
AutoCorrect: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInArguments:
Enabled: false
Style/MultilineBlockChain:
Enabled: false
Style/MethodCallWithArgsParentheses:
Enabled: true
IgnoreMacros: true
AllowedMethods: ['raise', 'require', 'captured_redirect_to', 'redirect_to', 'render', 'head', 'redirect_back', 'assert', 'get', 'post', 'assert_equal', 'assert_raises', 'assert', 'refute', 'yield', 'refute_same', 'assert_same', 'visit', 'visit_and_wait', 'assert_stimulus_controller']
IncludedMacros: []
AllowParenthesesInMultilineCall: false
AllowParenthesesInChaining: false
AllowParenthesesInCamelCaseMethod: false
EnforcedStyle: require_parentheses
Style/RedundantReturn:
Enabled: false
AutoCorrect: false
Style/SymbolProc:
Enabled: false
Style/TrailingUnderscoreVariable:
Enabled: false
Style/TrivialAccessors:
Enabled: false
AutoCorrect: false
Style/HashLikeCase:
Enabled: false
Style/HashSyntax:
Enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment