Skip to content

Commit

Permalink
feat: warn if the primary option is false
Browse files Browse the repository at this point in the history
  • Loading branch information
Mouvedia committed Aug 8, 2022
1 parent 66cdca0 commit a945727
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/utils/validateOptions.js
Expand Up @@ -66,6 +66,12 @@ function validate(opts, ruleName, complain) {
const actual = opts.actual;
const optional = opts.optional;

if (actual === false) {
return complain(
`Invalid option value \`false\` for rule "${ruleName}". Are you trying to disable this rule? If so use \`null\` instead`,
);
}

if (actual === null || arrayEqual(actual, [null])) {
return;
}
Expand Down

0 comments on commit a945727

Please sign in to comment.