Skip to content

Commit

Permalink
fix: add rubocop-factory_bot and rubocop-capybara as they've been…
Browse files Browse the repository at this point in the history
… pulled out of `rubocop-rspec` (#462)
  • Loading branch information
G-Rath authored Aug 11, 2023
1 parent d08927d commit 245463f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# configuration which is copied into generated applications.
---
require:
- rubocop-capybara
- rubocop-factory_bot
- rubocop-performance
- rubocop-rails
- rubocop-rspec
Expand Down Expand Up @@ -233,9 +235,6 @@ RSpec/MultipleExpectations:
RSpec/ExampleLength:
Max: 30

RSpec/FactoryBot/SyntaxMethods:
Enabled: false

Rails/LexicallyScopedActionFilter:
Exclude:
- 'app/controllers/application_controller.rb'
Expand All @@ -246,3 +245,6 @@ RSpec/RepeatedExample:

RSpec/MultipleMemoizedHelpers:
Max: 10

FactoryBot/SyntaxMethods:
Enabled: false
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
source "https://rubygems.org"

gem "rubocop", "~> 1.31"
gem "rubocop-capybara", "~> 2.18"
gem "rubocop-factory_bot", "~> 2.23"
gem "rubocop-performance", "~> 1.14"
gem "rubocop-rails", "~> 2.15"
gem "rubocop-rspec", "~> 2.12"
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ PLATFORMS

DEPENDENCIES
rubocop (~> 1.31)
rubocop-capybara (~> 2.18)
rubocop-factory_bot (~> 2.23)
rubocop-performance (~> 1.14)
rubocop-rails (~> 2.15)
rubocop-rspec (~> 2.12)
Expand Down
2 changes: 2 additions & 0 deletions variants/backend-base/Gemfile.tt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ group :development do

gem "brakeman", require: false
gem "rubocop", require: false
gem "rubocop-factory_bot", require: false
gem "rubocop-capybara", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
Expand Down
9 changes: 5 additions & 4 deletions variants/backend-base/rubocop.yml.tt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
require:
- rubocop-capybara
- rubocop-factory_bot
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-capybara

# Built-in config:
# https://github.com/bbatsov/rubocop/blob/master/config/default.yml
Expand Down Expand Up @@ -274,9 +275,6 @@ RSpec/MultipleExpectations:
RSpec/ExampleLength:
Max: 30

RSpec/FactoryBot/SyntaxMethods:
Enabled: false

Rails/LexicallyScopedActionFilter:
Exclude:
- 'app/controllers/application_controller.rb'
Expand All @@ -287,3 +285,6 @@ RSpec/RepeatedExample:

RSpec/MultipleMemoizedHelpers:
Max: 10

FactoryBot/SyntaxMethods:
Enabled: false

0 comments on commit 245463f

Please sign in to comment.