Last active
June 4, 2018 01:26
-
-
Save necojackarc/f3c8323441b1bfc0d4f4 to your computer and use it in GitHub Desktop.
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
AllCops: | |
TargetRubyVersion: ~ | |
Include: | |
- '**/Rakefile' | |
- '**/config.ru' | |
Exclude: | |
- 'vendor/**/*' | |
- 'bin/*' | |
- 'config/**/*' | |
- 'db/**/*' | |
Rails: | |
Enabled: true | |
# Accept single-line methods if they have no body | |
SingleLineMethods: | |
AllowIfMethodIsEmpty: true | |
# Don't require top-level documentation of classes and modules | |
Documentation: | |
Enabled: false | |
# Allow chaining methods after multi-line blocks | |
MultilineBlockChain: | |
Enabled: false | |
# Allow using `->` literals for multi-line blocks | |
Lambda: | |
Enabled: false | |
# Accept both definition styles: nested and compact | |
ClassAndModuleChildren: | |
Enabled: false | |
# Don't restrict parameter names for single-line blocks | |
Style/SingleLineBlockParams: | |
Enabled: false | |
# Use `sprintf` instead of `format` and `%` | |
FormatString: | |
EnforcedStyle: sprintf | |
# Keep every line less than or equal to 80 characters | |
Metrics/LineLength: | |
Max: 80 | |
# Keep every method less than or equal 20 lines | |
MethodLength: | |
Max: 20 | |
# Keep ABC size in a class less than or equal to 30 | |
# This should be sync with `MethodLength` | |
Metrics/AbcSize: | |
Max: 30 | |
# Keep every class less than or equal to 200 lines | |
# This should be sync with `MethodLength` | |
Metrics/ClassLength: | |
Max: 200 | |
# Use double quotes for string literals unless they contains escape characters | |
StringLiterals: | |
EnforcedStyle: double_quotes | |
# Use `raise` instead of `fail` for exceptions | |
Style/SignalException: | |
EnforcedStyle: only_raise | |
# Use trailing commas in argument lists | |
Style/TrailingCommaInArguments: | |
EnforcedStyleForMultiline: comma | |
# Use trailing commas in array literals | |
Style/TrailingCommaInArrayLiteral: | |
EnforcedStyleForMultiline: comma | |
# Use trailing commas in hash literals | |
Style/TrailingCommaInHashLiteral: | |
EnforcedStyleForMultiline: comma | |
# Use parentheses for almost all percent literals | |
Style/PercentLiteralDelimiters: | |
PreferredDelimiters: | |
'%i': '()' | |
'%I': '()' | |
'%w': '()' | |
'%W': '()' | |
# Allow adding `has_` as a prefix of predicate methods | |
Naming/PredicateName: | |
NamePrefixBlacklist: | |
- is_ | |
- have_ | |
# Use `has_xxx?` methods of Hash | |
Style/PreferredHashMethods: | |
EnforcedStyle: verbose | |
# Allow using `{...}` as block literals anytime | |
# This setting is for `let` in RSpec | |
# Style/BlockDelimiters: | |
# Enabled: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment