lib/scss_lint/config.rb in scss-lint-0.23.1 vs lib/scss_lint/config.rb in scss-lint-0.24.0

- old
+ new

@@ -126,15 +126,14 @@ wildcard_options = options['linters'].delete(class_name) LinterRegistry.linters.each do |linter_class| name = linter_name(linter_class) + next unless name.match(class_name_regex) - if name.match(class_name_regex) - old_options = options['linters'].fetch(name, {}) - options['linters'][name] = smart_merge(old_options, wildcard_options) - end + old_options = options['linters'].fetch(name, {}) + options['linters'][name] = smart_merge(old_options, wildcard_options) end end options end @@ -185,10 +184,10 @@ File.open(file, 'r').read end # Merge two hashes, concatenating lists and further merging nested hashes. def smart_merge(parent, child) - parent.merge(child) do |key, old, new| + parent.merge(child) do |_key, old, new| case old when Array old + new when Hash smart_merge(old, new)