From a522850e5071b62c2c2609a6779de6855b6617eb Mon Sep 17 00:00:00 2001 From: Ryan W Date: Sun, 26 Sep 2021 14:55:23 -0700 Subject: [PATCH] add rubocop config --- .rubocop.yaml | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 .rubocop.yaml diff --git a/.rubocop.yaml b/.rubocop.yaml new file mode 100644 index 0000000..b96a476 --- /dev/null +++ b/.rubocop.yaml @@ -0,0 +1,111 @@ +require: + - rubocop-rails + +AllCops: + TargetRubyVersion: 3.0.2 + TargetRailsVersion: 7.0.0 + DisabledByDefault: true + Exclude: + - "bin/**/*" + - "vendor/**/*" + - "public/**/*" + - "node_modules/**/*" + +Layout/EmptyLineAfterMagicComment: + Enabled: true +Layout/TrailingEmptyLines: + Enabled: true +Layout/TrailingWhitespace: + Enabled: true + +Lint/BinaryOperatorWithIdenticalOperands: + Enabled: true +Lint/CircularArgumentReference: + Enabled: true +Lint/Debugger: + Enabled: true +Lint/DeprecatedClassMethods: + Enabled: true +Lint/DuplicateMethods: + Enabled: false +Lint/DuplicateHashKey: + Enabled: true +Lint/EachWithObjectArgument: + Enabled: true +Lint/ElseLayout: + Enabled: true +Lint/EmptyEnsure: + Enabled: true +Lint/EmptyInterpolation: + Enabled: true +Lint/EnsureReturn: + Enabled: true +Lint/FloatOutOfRange: + Enabled: true +Lint/FormatParameterMismatch: + Enabled: true +Lint/LiteralAsCondition: + Enabled: true +Lint/LiteralInInterpolation: + Enabled: true +Lint/Loop: + Enabled: true +Lint/NextWithoutAccumulator: + Enabled: true +Lint/RandOne: + Enabled: true +Lint/RequireParentheses: + Enabled: true +Lint/RescueException: + Enabled: true +Lint/RedundantStringCoercion: + Enabled: false +Lint/RedundantCopDisableDirective: + Enabled: true +Lint/RedundantSplatExpansion: + Enabled: false +Lint/UnreachableCode: + Enabled: true +Lint/UselessSetterCall: + Enabled: true +Lint/Void: + Enabled: true + +Naming/ClassAndModuleCamelCase: + Enabled: true + +# Security/Eval: +# Enabled: false +# Security/JSONLoad: +# Enabled: true +# Security/MarshalLoad: +# Enabled: true +# Security/Open: +# Enabled: false +# Security/YAMLLoad: +# Enabled: false + +# Style/EndBlock: +# Enabled: true +# Style/HashSyntax: +# Enabled: true +# Style/StringLiterals: +# Enabled: true +# EnforcedStyle: "double_quotes" +# Exclude: +# - "config/**/*.rb" +# - Rakefile +# Style/CaseEquality: +# Enabled: true +# Style/ClassMethods: +# Enabled: true +# Style/ClassVars: +# Enabled: true +# Style/CollectionMethods: +# Enabled: true +# PreferredMethods: +# collect: "map" +# collect!: "map!" +# inject: "reduce" +# detect: "find" +# find_all: "select"