require: rubocop-performance AllCops: DisplayCopNames: true TargetRubyVersion: 2.5 Exclude: - terser.gemspec - lib/terser/version.rb - "vendor/**/*" - "benchmark/*" - "gemfiles/vendor/**/*" Metrics/AbcSize: Max: 20 Metrics/BlockLength: Enabled: true Exclude: - "spec/**/*_spec.rb" Metrics/ClassLength: Enabled: false Layout/LineLength: Max: 150 Metrics/MethodLength: Max: 20 Style/Encoding: Enabled: false Style/HashSyntax: EnforcedStyle: hash_rockets Style/PercentLiteralDelimiters: Enabled: false Style/PreferredHashMethods: Enabled: false Style/SignalException: Enabled: false Style/StringLiterals: Enabled: false Style/SymbolArray: Enabled: false Style/Alias: Enabled: false Style/MutableConstant: Enabled: false Style/ExpandPathArguments: Enabled: false Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true Style/HashEachMethods: Enabled: true Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Layout/BeginEndAlignment: Enabled: true Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true Lint/BinaryOperatorWithIdenticalOperands: Enabled: true Lint/ConstantDefinitionInBlock: Enabled: true Lint/DeprecatedOpenSSLConstant: Enabled: true Lint/DuplicateElsifCondition: Enabled: true Lint/DuplicateRequire: Enabled: true Lint/DuplicateRescueException: Enabled: true Lint/EmptyConditionalBody: Enabled: true Lint/EmptyFile: Enabled: true Lint/FloatComparison: Enabled: true Lint/HashCompareByIdentity: Enabled: true Lint/IdentityComparison: Enabled: true Lint/MissingSuper: Enabled: true Lint/MixedRegexpCaptureTypes: Enabled: true Lint/OutOfRangeRegexpRef: Enabled: true Lint/RedundantSafeNavigation: Enabled: true Lint/SelfAssignment: Enabled: true Lint/TopLevelReturnWithArgument: Enabled: true Lint/TrailingCommaInAttributeDeclaration: Enabled: true Lint/UnreachableLoop: Enabled: true Lint/UselessMethodDefinition: Enabled: true Lint/UselessTimes: Enabled: true Style/AccessorGrouping: Enabled: true Style/BisectedAttrAccessor: Enabled: true Style/CaseLikeIf: Enabled: true Style/ClassEqualityComparison: Enabled: true Style/CombinableLoops: Enabled: true Style/ExplicitBlockArgument: Enabled: true Style/ExponentialNotation: Enabled: true Style/GlobalStdStream: Enabled: true Style/HashAsLastArrayItem: Enabled: true Style/HashLikeCase: Enabled: true Style/KeywordParametersOrder: Enabled: true Style/OptionalBooleanParameter: Enabled: true Style/RedundantAssignment: Enabled: true Style/RedundantFetchBlock: Enabled: true Style/RedundantFileExtensionInRequire: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/RedundantSelfAssignment: Enabled: true Style/RedundantBegin: Enabled: false Style/SingleArgumentDig: Enabled: true Style/SlicingWithRange: Enabled: true Style/SoleNestedConditional: Enabled: true Style/StringConcatenation: Enabled: true Lint/DuplicateRegexpCharacterClassElement: Enabled: true Lint/EmptyBlock: Enabled: true Lint/NoReturnInBeginEndBlocks: Enabled: true Lint/ToEnumArguments: Enabled: true Lint/UnmodifiedReduceAccumulator: Enabled: true Style/ArgumentsForwarding: Enabled: true Style/CollectionCompact: Enabled: true Style/DocumentDynamicEvalDefinition: Enabled: true Style/NegatedIfElseCondition: Enabled: true Style/SwapValues: Enabled: true Lint/DuplicateBranch: Enabled: true Lint/EmptyClass: Enabled: true Style/NilLambda: Enabled: true Gemspec/DateAssignment: # (new in 1.10) Enabled: true Layout/LineEndStringConcatenationIndentation: # (new in 1.18) Enabled: true Layout/SpaceBeforeBrackets: # (new in 1.7) Enabled: true Lint/AmbiguousAssignment: # (new in 1.7) Enabled: true Lint/DeprecatedConstants: # (new in 1.8) Enabled: true Lint/EmptyInPattern: # (new in 1.16) Enabled: true Lint/LambdaWithoutLiteralBlock: # (new in 1.8) Enabled: true Lint/NumberedParameterAssignment: # (new in 1.9) Enabled: true Lint/OrAssignmentToConstant: # (new in 1.9) Enabled: true Lint/RedundantDirGlobSort: # (new in 1.8) Enabled: true Lint/SymbolConversion: # (new in 1.9) Enabled: true Lint/TripleQuotes: # (new in 1.9) Enabled: true Lint/UnexpectedBlockArity: # (new in 1.5) Enabled: true Naming/InclusiveLanguage: # (new in 1.18) Enabled: true Style/EndlessMethod: # (new in 1.8) Enabled: true Style/HashConversion: # (new in 1.10) Enabled: true Style/HashExcept: # (new in 1.7) Enabled: true Style/IfWithBooleanLiteralBranches: # (new in 1.9) Enabled: true Style/InPatternThen: # (new in 1.16) Enabled: true Style/MultilineInPatternThen: # (new in 1.16) Enabled: true Style/QuotedSymbols: # (new in 1.16) Enabled: true Style/RedundantArgument: # (new in 1.4) Enabled: true Style/StringChars: # (new in 1.12) Enabled: true Performance/AncestorsInclude: Enabled: true Performance/ArraySemiInfiniteRangeSlice: Enabled: true Performance/BigDecimalWithNumericArgument: Enabled: true Performance/BlockGivenWithExplicitBlock: Enabled: true Performance/CollectionLiteralInLoop: Enabled: true Performance/ConstantRegexp: Enabled: true Performance/MethodObjectAsBlock: Enabled: true Performance/RedundantSortBlock: Enabled: true Performance/RedundantStringChars: Enabled: true Performance/ReverseFirst: Enabled: true Performance/SortReverse: Enabled: true Performance/Squeeze: Enabled: true Performance/StringInclude: Enabled: true Performance/Sum: Enabled: true Performance/MapCompact: # (new in 1.11) Enabled: true Performance/RedundantEqualityComparisonBlock: # (new in 1.10) Enabled: true Performance/RedundantSplitRegexpArgument: # (new in 1.10) Enabled: true