Skip to content

Instantly share code, notes, and snippets.

@kypkyp
Created January 2, 2021 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kypkyp/b77239aa445eb46a3e2dfd665f22b784 to your computer and use it in GitHub Desktop.
Save kypkyp/b77239aa445eb46a3e2dfd665f22b784 to your computer and use it in GitHub Desktop.
rubocop.yml for me
inherit_from: .rubocop_todo.yml
require:
- rubocop-minitest
- rubocop-performance
- rubocop-rails
AllCops:
TargetRubyVersion: 2.7
NewCops: enable
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
# privated, protected 以下をインデント
Layout/IndentationConsistency:
EnforcedStyle: indented_internal_methods
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
# ハッシュは内側の空白を省略
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
# enumは配列で定義したほうが簡潔じゃない?
Rails/EnumHash:
Enabled: false
# 明らかに1000件以下のときはeachでよくない?
Rails/FindEach:
Enabled: false
# 将来的にはちゃんと英語化する必要がありそう
Style/AsciiComments:
Enabled: false
Style/Documentation:
Enabled: false
# 個人的に;があんまり好きじゃない
Style/EmptyMethod:
EnforcedStyle: expanded
# もうRuby3になるからいいよね……?
Style/FrozenStringLiteralComment:
Enabled: false
# 気持ち的にelsifじゃなくて入れ子なときがある
Style/IfInsideElse:
Enabled: false
# 条件文も
Style/SoleNestedConditional:
Enabled: false
# 文の複雑さで人間が判断すればよい
Style/IfUnlessModifier:
Enabled: false
# 文脈によって人間が使い分ける
Style/NumericPredicate:
Enabled: false
# %表記は正直分かりづらいと思っている……
Style/WordArray:
EnforcedStyle: brackets
Style/SymbolArray:
EnforcedStyle: brackets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment