require: - rubocop-capybara - rubocop-codeur - rubocop-minitest - rubocop-performance - rubocop-rails AllCops: Exclude: - 'db/schema.rb' - 'node_modules/**/*' - 'public/**/*' - 'tmp/**/*' - 'vendor/**/*' - 'bin/*' - 'test/dummy/db/schema.rb' - 'test/dummy/tmp/**/*' TargetRubyVersion: 3.1 TargetRailsVersion: 7 NewCops: enable Rails: Enabled: true Codeur/RailsAppPatterns: Enabled: true ForbiddenPatterns: - presenters - view_objects - modules Codeur/RailsAvoidInstanceMethodsInHelpers: Enabled: false Gemspec/RequireMFA: Enabled: false Gemspec/RequireRubyVersion: Enabled: false Layout/AccessModifierIndentation: Enabled: true EnforcedStyle: outdent IndentationWidth: 2 Layout/ArgumentAlignment: Enabled: true EnforcedStyle: with_first_argument Layout/ClassStructure: Enabled: true AutoCorrect: false ExpectedOrder: - module_inclusion - constants - attributes - delegated_type - belongs_to - has_many - has_one - attachments - public_delegate - class_macros - callbacks - state_machine - aasm - scope - default_scope - validations - public_class_methods - initializer - public_methods - protected_attribute_macros - protected_methods - private_attribute_macros - private_delegate - private_methods Categories: module_inclusion: - include - prepend - extend - devise attachments: - has_one_attached - has_many_attached - has_attached_file - has_one_variable_attached - clearable_attachments attributes: - attr_accessor - attr_reader - attr_writer - attr_readonly - emojify - unemojify - decode_ascii_emojis_from - remove_emojis_from - enum - humanize_enums - enumerize - monetize - serialize - has_secure_token - alias_attribute - friendly_id - slugs - slug - translate - obfuscate - store - store_accessor class_macros: - has_ancestry - acts_as_voter - acts_as_list - acts_as_tree - counter_culture - accepts_nested_attributes_for - paginates_per - ransack_alias - ransacker - ratyrate_rater - pg_search_scope - search_scope - sortable - tracked callbacks: - after_initialize - before_validation - around_validation - after_validation - before_save - around_save - after_save - before_create - around_create - after_create - before_update - around_update - after_update - before_destroy - around_destroy - after_destroy - after_commit - after_update_commit - after_create_commit - after_save_commit - after_rollback - after_discard validations: - validates_associated - validates - validate - validates_each - validates_attachment_format - validates_file - validates_image Layout/FirstArrayElementIndentation: Enabled: true EnforcedStyle: consistent Layout/FirstHashElementIndentation: Enabled: true EnforcedStyle: consistent Layout/HashAlignment: Enabled: true EnforcedHashRocketStyle: table EnforcedColonStyle: table Layout/LineLength: Enabled: true Max: 200 AutoCorrect: false Exclude: - 'db/migrate/*' Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented Layout/ParameterAlignment: Enabled: true EnforcedStyle: with_fixed_indentation IndentationWidth: 2 Lint/DuplicateMethods: Enabled: true Exclude: - 'db/migrate/*' Lint/MissingSuper: Enabled: false Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true Metrics/AbcSize: Enabled: true Max: 65 Exclude: - 'db/migrate/*' Metrics/BlockLength: Enabled: true Max: 60 Exclude: - 'config/routes.rb' - 'lib/tasks/**/*' - 'app/states/*' Metrics/ClassLength: Enabled: true Max: 300 Exclude: - 'app/models/**/*' Metrics/CyclomaticComplexity: Enabled: true Max: 10 Metrics/MethodLength: Enabled: true Max: 60 Exclude: - 'db/migrate/*' Metrics/ModuleLength: Enabled: true Max: 300 Metrics/PerceivedComplexity: Enabled: true Max: 10 Minitest/EmptyLineBeforeAssertionMethods: Enabled: false Minitest/MultipleAssertions: Enabled: true Max: 30 Minitest/TestMethodName: Enabled: false Minitest/AssertPredicate: Enabled: false Minitest/AssertOperator: Enabled: false # Disabled because it doesn't with symbols like: record_001 Naming/VariableNumber: Enabled: false Rails/BulkChangeTable: Enabled: false Rails/CreateTableWithTimestamps: Enabled: true Exclude: - 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb' Rails/EnvironmentVariableAccess: Enabled: true AllowReads: true Rails/FilePath: Enabled: true EnforcedStyle: arguments Rails/I18nLocaleTexts: Enabled: false Rails/ReversibleMigration: Enabled: true Exclude: - 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb' Rails/MigrationClassName: Enabled: false Rails/SaveBang: Enabled: false Rails/SkipsModelValidations: Enabled: false Exclude: - 'lib/tasks/**/*' - 'db/migrate/*.rb' Rails/TimeZone: Enabled: true AutoCorrect: false Rails/UnknownEnv: Enabled: true Environments: - development - test - staging - production Style/AsciiComments: Enabled: false Style/ClassAndModuleChildren: Enabled: true AutoCorrect: true Style/ConditionalAssignment: Enabled: false Style/Documentation: Enabled: false Style/EmptyMethod: Enabled: true EnforcedStyle: expanded Style/GuardClause: Enabled: true MinBodyLength: 3 Style/HashEachMethods: Enabled: true AutoCorrect: true Style/HashSyntax: Enabled: true EnforcedStyle: ruby19 EnforcedShorthandSyntax: never Style/HashTransformKeys: Enabled: true AutoCorrect: true Style/HashTransformValues: Enabled: true AutoCorrect: true Style/IfUnlessModifier: Enabled: false Style/MultipleComparison: Enabled: false Style/NestedTernaryOperator: Enabled: false Style/NumericPredicate: Enabled: false Style/StringLiterals: Enabled: true EnforcedStyle: single_quotes Style/SymbolArray: Enabled: true MinSize: 7 Style/FormatStringToken: Enabled: true Exclude: - 'config/routes.rb' - 'config/routes/*' Style/FrozenStringLiteralComment: SafeAutoCorrect: true