Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Properly handle user supplied nil value in Config.read #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/eslint-rails/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module ESLintRails
class Config

def self.read(force_default: false)
# explicitly checking for nil incase the user passed in a nil value
# which would raise an error in #initialize
force_default = false if force_default.nil?
self.new(force_default: force_default).send(:read)
end

Expand Down