require:
  - rubocop-sorbet

AllCops:
  TargetRubyVersion: 3.0
  DisabledByDefault: true
  Include:
    - '**/*.rbi'

## Layout

Layout/AccessModifierIndentation:
  Enabled: true

Layout/ArgumentAlignment:
  Enabled: true

Layout/BlockAlignment:
  Enabled: true

Layout/BlockEndNewline:
  Enabled: true

Layout/ClassStructure:
  Enabled: true
  ExpectedOrder:
    - module_inclusion
    - constants
    - macros
    - public_attribute_macros
    - protected_attribute_macros
    - private_attribute_macros
    - initializer
    - public_methods
    - protected_methods
    - private_methods
    - public_class_methods

Layout/ClosingParenthesisIndentation:
  Enabled: true

Layout/CommentIndentation:
  Enabled: true

Layout/EmptyComment:
  Enabled: true

Layout/EmptyLineAfterMagicComment:
  Enabled: true

Layout/EmptyLineBetweenDefs:
  Enabled: true
  AllowAdjacentOneLineDefs: true

Layout/EmptyLines:
  Enabled: true

Layout/EmptyLinesAroundAccessModifier:
  Enabled: true

Layout/EmptyLinesAroundArguments:
  Enabled: true

Layout/EmptyLinesAroundAttributeAccessor:
  Enabled: true

Layout/EmptyLinesAroundBlockBody:
  Enabled: true

Layout/EmptyLinesAroundClassBody:
  Enabled: true

Layout/EmptyLinesAroundModuleBody:
  Enabled: true

Layout/EndOfLine:
  Enabled: true
  EnforcedStyle: lf

Layout/ExtraSpacing:
  Enabled: true

Layout/FirstMethodArgumentLineBreak:
  Enabled: true

Layout/FirstMethodParameterLineBreak:
  Enabled: true

Layout/FirstParameterIndentation:
  Enabled: true

Layout/IndentationConsistency:
  Enabled: true

Layout/IndentationStyle:
  Enabled: true
  EnforcedStyle: spaces

Layout/IndentationWidth:
  Enabled: true

Layout/InitialIndentation:
  Enabled: true

Layout/LeadingCommentSpace:
  Enabled: true

Layout/LeadingEmptyLines:
  Enabled: true

# TODO: make Tapioca break long lines?
Layout/LineLength:
  Enabled: false

Layout/MultilineBlockLayout:
  Enabled: true

Layout/MultilineMethodArgumentLineBreaks:
  Enabled: true

Layout/MultilineMethodCallBraceLayout:
  Enabled: true

Layout/MultilineMethodCallIndentation:
  Enabled: true

Layout/ParameterAlignment:
  Enabled: true

Layout/RedundantLineBreak:
  Enabled: true
  InspectBlocks: true

Layout/SpaceAfterColon:
  Enabled: true

Layout/SpaceAfterComma:
  Enabled: true

Layout/SpaceAfterMethodName:
  Enabled: true

Layout/SpaceAfterSemicolon:
  Enabled: true

Layout/SpaceAroundEqualsInParameterDefault:
  Enabled: true

Layout/SpaceAroundKeyword:
  Enabled: true

Layout/SpaceAroundMethodCallOperator:
  Enabled: true

Layout/SpaceBeforeBlockBraces:
  Enabled: true

Layout/SpaceBeforeBrackets:
  Enabled: true

Layout/SpaceBeforeComma:
  Enabled: true

Layout/SpaceBeforeComment:
  Enabled: true

Layout/SpaceBeforeFirstArg:
  Enabled: true

Layout/SpaceBeforeSemicolon:
  Enabled: true

Layout/SpaceInsideParens:
  Enabled: true

Layout/TrailingEmptyLines:
  Enabled: true
  EnforcedStyle: final_newline

Layout/TrailingWhitespace:
  Enabled: true

## Lint

Lint/DuplicateMethods:
  Enabled: true

Lint/EmptyFile:
  Enabled: true
  AllowComments: false

Lint/Syntax:
  Enabled: true

## Sorbet

Sorbet:
  DisabledByDefault: true

Sorbet/EnforceSigilOrder:
  Enabled: true

Sorbet/EnforceSingleSigil:
  Enabled: true

Sorbet/ForbidExtendTSigHelpersInShims:
  Enabled: true

Sorbet/ForbidIncludeConstLiteral:
  Enabled: true

Sorbet/ForbidSuperclassConstLiteral:
  Enabled: true

Sorbet/OneAncestorPerLine:
  Enabled: true

Sorbet/SignatureBuildOrder:
  Enabled: true

Sorbet/SingleLineRbiClassModuleDefinitions:
  Enabled: true

Sorbet/TypeAliasName:
  Enabled: true

Sorbet/ValidSigil:
  Enabled: true
  RequireSigilOnAllFiles: true
  MinimumStrictness: "false"
  SuggestedStrictness: "true"

## Style

Style/BlockDelimiters:
  Enabled: true

Style/ClassAndModuleChildren:
  Enabled: true
  EnforcedStyle: compact

Style/DefWithParentheses:
  Enabled: true

Style/EmptyMethod:
  Enabled: true
  EnforcedStyle: compact

Style/FrozenStringLiteralComment:
  Enabled: true
  EnforcedStyle: never

Style/MethodCallWithArgsParentheses:
  Enabled: true
  IgnoreMacros: true

Style/MethodCallWithoutArgsParentheses:
  Enabled: true

Style/MethodDefParentheses:
  Enabled: true

Style/MixinGrouping:
  Enabled: true
  EnforcedStyle: separated

Style/MixinUsage:
  Enabled: true

Style/ModuleFunction:
  Enabled: true
  EnforcedStyle: forbidden
