Skip to content

Commit

Permalink
fix: shorthand config was not validated
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyOGo committed Apr 27, 2020
1 parent 346a5e5 commit eb34f80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ function validOptions(actual) {
&& !validProperties(actual.ignoreValues)
&& !validHash(actual.ignoreValues)) return false

if ('expandShorthand' in actual
&& typeof actual.expandShorthand !== 'boolean'
&& actual.expandShorthand !== null) return false

if ('recurseLonghand' in actual
&& typeof actual.recurseLonghand !== 'boolean'
&& actual.recurseLonghand !== null) return false

if ('message' in actual
&& typeof actual.message !== 'string'
&& actual.message !== null) return false
Expand Down

0 comments on commit eb34f80

Please sign in to comment.