require: - rubocop-graphql - rubocop-performance - rubocop-rails - rubocop-rspec AllCops: Exclude: - bin/* - db/schema.rb - vendor/bundle/**/* NewCops: enable TargetRubyVersion: 3.1.2 # Layout Layout/ClassStructure: Categories: associations: - belongs_to - has_one - has_many - has_and_belongs_to_many attributes: - attr_accessor - attr_reader - attr_writer - attr_accessible - attribute callbacks: - before_validation - after_validation - before_save - around_save - before_create - around_create - after_create - after_save - after_commit macros: - accepts_nested_attributes_for - has_secure_token - serialize module_inclusion: - include - prepend - extend scopes: - default_scope - scope validations: - validate - validates - validates_each ExpectedOrder: - module_inclusion - scopes - public_constants - public_attributes - enum - encrypts - associations - validations - delegate - callbacks - macros - initializer - public_methods - public_class_methods - protected_methods - private_constants - private_attributes - private_methods Enabled: true Layout/EmptyLinesAroundClassBody: Enabled: true EnforcedStyle: empty_lines Layout/EmptyLinesAroundModuleBody: Enabled: true EnforcedStyle: empty_lines_except_namespace Layout/IndentationConsistency: Enabled: true EnforcedStyle: normal Layout/LineEndStringConcatenationIndentation: Enabled: false Layout/LineLength: AllowedPatterns: - \VCR.use_cassette\ Enabled: true Max: 120 Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented # Metrics Metrics/AbcSize: Max: 30 Metrics/BlockLength: AllowedMethods: - context - describe - expects - factory - it - promises - shared_examples - use_cassette CountAsOne: - array - hash - heredoc CountComments: false Enabled: true Exclude: - config/**/* - Gemfile Metrics/ClassLength: CountAsOne: - array - hash - heredoc CountComments: false Enabled: true Max: 200 Metrics/MethodLength: CountAsOne: - array - hash - heredoc CountComments: false Enabled: true Max: 20 Metrics/ModuleLength: CountAsOne: - array - hash - heredoc CountComments: false Enabled: true Max: 200 # RSpec RSpec/ExampleLength: CountAsOne: - array - hash - heredoc Max: 20 RSpec/LetSetup: Enabled: false RSpec/MultipleMemoizedHelpers: AllowSubject: true Enabled: true Max: 10 RSpec/NamedSubject: Enabled: false RSpec/NestedGroups: Max: 4 RSpec/MultipleExpectations: Max: 10 # Style Style/Documentation: Enabled: false Style/MultilineIfModifier: Enabled: false