We use staging and preproduction environments, which are not valid by default. This rule is useful because misspelling the name of an environment might otherwise go unnoticed.
168 lines
2.6 KiB
YAML
168 lines
2.6 KiB
YAML
require: rubocop-rspec
|
|
|
|
AllCops:
|
|
DisplayCopNames: true
|
|
DisplayStyleGuide: true
|
|
Exclude:
|
|
- "db/migrate/**/*"
|
|
- "db/schema.rb"
|
|
TargetRubyVersion: 2.3
|
|
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
|
# to ignore them, so only the ones explicitly set in this file are enabled.
|
|
DisabledByDefault: true
|
|
|
|
Capybara/FeatureMethods:
|
|
Enabled: true
|
|
EnabledMethods:
|
|
- scenario
|
|
- xscenario
|
|
|
|
FactoryBot/AttributeDefinedStatically:
|
|
Enabled: true
|
|
|
|
Layout/IndentationConsistency:
|
|
EnforcedStyle: rails
|
|
|
|
Layout/IndentationWidth:
|
|
Enabled: true
|
|
|
|
Layout/EmptyLines:
|
|
Enabled: true
|
|
|
|
Layout/EndOfLine:
|
|
EnforcedStyle: lf
|
|
|
|
Layout/SpaceAfterColon:
|
|
Enabled: true
|
|
|
|
Layout/SpaceAfterComma:
|
|
Enabled: true
|
|
|
|
Layout/SpaceAfterMethodName:
|
|
Enabled: true
|
|
|
|
Layout/SpaceAfterNot:
|
|
Enabled: true
|
|
|
|
Layout/SpaceAfterSemicolon:
|
|
Enabled: true
|
|
|
|
Layout/SpaceAroundBlockParameters:
|
|
Enabled: true
|
|
|
|
Layout/SpaceAroundOperators:
|
|
Enabled: true
|
|
|
|
Layout/SpaceBeforeBlockBraces:
|
|
Enabled: true
|
|
|
|
Layout/SpaceBeforeComma:
|
|
Enabled: true
|
|
|
|
Layout/SpaceBeforeComment:
|
|
Enabled: true
|
|
|
|
Layout/SpaceBeforeFirstArg:
|
|
Enabled: true
|
|
|
|
Layout/SpaceBeforeSemicolon:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideArrayLiteralBrackets:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideArrayPercentLiteral:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideBlockBraces:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideHashLiteralBraces:
|
|
Enabled: true
|
|
EnforcedStyle: compact
|
|
|
|
Layout/SpaceInsideParens:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsidePercentLiteralDelimiters:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideRangeLiteral:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideReferenceBrackets:
|
|
Enabled: true
|
|
|
|
Layout/SpaceInsideStringInterpolation:
|
|
Enabled: true
|
|
|
|
Layout/Tab:
|
|
Enabled: true
|
|
|
|
Layout/TrailingBlankLines:
|
|
Enabled: true
|
|
|
|
Layout/TrailingWhitespace:
|
|
Enabled: true
|
|
|
|
Lint/LiteralAsCondition:
|
|
Enabled: true
|
|
|
|
Lint/UselessAssignment:
|
|
Enabled: true
|
|
|
|
Metrics/LineLength:
|
|
Max: 110
|
|
|
|
Rails/ActionFilter:
|
|
Enabled: true
|
|
|
|
Rails/ApplicationJob:
|
|
Enabled: true
|
|
|
|
Rails/ApplicationRecord:
|
|
Enabled: true
|
|
|
|
Rails/Date:
|
|
Enabled: true
|
|
|
|
Rails/HttpPositionalArguments:
|
|
Enabled: true
|
|
|
|
Rails/PluralizationGrammar:
|
|
Enabled: true
|
|
|
|
Rails/Presence:
|
|
Enabled: true
|
|
|
|
Rails/RelativeDateConstant:
|
|
Enabled: true
|
|
|
|
Rails/RequestReferer:
|
|
Enabled: true
|
|
|
|
Rails/SafeNavigation:
|
|
Enabled: true
|
|
ConvertTry: true
|
|
|
|
Rails/TimeZone:
|
|
Enabled: true
|
|
|
|
Rails/UnknownEnv:
|
|
Enabled: true
|
|
Environments:
|
|
- development
|
|
- test
|
|
- production
|
|
- preproduction
|
|
- staging
|
|
|
|
RSpec/NotToNot:
|
|
Enabled: true
|
|
|
|
Style/PercentLiteralDelimiters:
|
|
Enabled: true
|
|
|
|
Style/StringLiterals:
|
|
EnforcedStyle: double_quotes
|