Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix option validation of null #1965

Merged
merged 1 commit into from
Oct 9, 2016
Merged

Fix option validation of null #1965

merged 1 commit into from
Oct 9, 2016

Conversation

davidtheclark
Copy link
Contributor

Fixes #1964 and adds several tests to prevent future regressions.

Most of the diff in validateOptions.js is the result of pulling an unnecessarily nested function to the top level. The key difference is that I added this line (47):

if (actual === null || _.isEqual(actual, [null])) { return }

@jeddy3: If you think this looks good let's release the patch right away.

@jeddy3
Copy link
Member

jeddy3 commented Oct 9, 2016

@jeddy3: If you think this looks good let's release the patch right away.

Agreed. I'll merge and release now.

Thanks for doing the fix and for adding the tests!

I guess none of the core team is using null in their configs for the whitelist and blacklist rules. I suspect the regression only affected those who used the copy-pasta example config and used null to turn off the rules they didn't use (rather than delete them).

@jeddy3 jeddy3 merged commit 58c0dc8 into master Oct 9, 2016
@jeddy3 jeddy3 deleted the null-option-validation branch October 9, 2016 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants