default.yml in platform-style-0.2.1 vs default.yml in platform-style-0.3.0
- old
+ new
@@ -1,9 +1,11 @@
require:
+ - rubocop-factory_bot
- rubocop-graphql
- rubocop-performance
- rubocop-rails
+ - rubocop-restrictenv
- rubocop-rspec
AllCops:
Exclude:
- bin/*
@@ -47,40 +49,61 @@
- before_create
- around_create
- after_create
- after_save
- after_commit
+ encryption:
+ - encrypts
macros:
- accepts_nested_attributes_for
- acts_as_sequenced
- counter_culture
- has_secure_token
- - monetize
- - serialize
module_inclusion:
- include
- prepend
- extend
+ money:
+ - monetize
+ platform_prices:
+ - expose_financials
+ - platform_discounts
+ - platform_price
+ - platform_resource_key
+ - platform_shipping
+ - platform_tax
scopes:
- default_scope
- scope
+ serialisation:
+ - serialize
+ state_machine:
+ - aasm
validations:
- validate
- validates
- validates_each
+ versioning:
+ - has_paper_trail
ExpectedOrder:
- module_inclusion
+ - constants
- scopes
- public_constants
- public_attributes
- enum
- - encrypts
+ - serialisation
+ - encryption
- associations
- validations
- delegate
- callbacks
+ - platform_prices
+ - money
+ - versioning
- macros
+ - state_machine
- public_class_methods
- initializer
- public_methods
- protected_methods
- private_constants
@@ -107,20 +130,21 @@
AllowedPatterns:
- VCR.use_cassette
Enabled: true
Exclude:
- app/graphql/**/*
+ - db/migrate/*
Max: 120
Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented
# Metrics
Metrics/AbcSize:
- Max: 30
+ Max: 35
Exclude:
- db/data/*.rb
Metrics/BlockLength:
AllowedMethods:
@@ -129,10 +153,11 @@
- describe
- expects
- factory
- it
- mutation
+ - namespace
- parse
- promises
- routes.draw
- shared_examples
- use_cassette
@@ -191,17 +216,27 @@
Exclude:
- app/graphql/types/**/*.rb
- spec/factories/**/*.rb
- spec/requests/**/*.rb
+# Restrict ENV
+
+Restrictenv/NoEnvAccess:
+ Exclude:
+ - 'config/**/*'
+ - spec/rails_helper.rb
+
# RSpec
RSpec/ExampleLength:
CountAsOne:
- array
- hash
- heredoc
Max: 20
+
+RSpec/IndexedLet:
+ Enabled: false
RSpec/LetSetup:
Enabled: false
RSpec/MultipleMemoizedHelpers: