-
Notifications
You must be signed in to change notification settings - Fork 237
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
1635 plug in validator tools #2206
Conversation
Co-authored-by: Ollie Beumkes <ollie-b-gds@users.noreply.github.com>
There's a couple TODOs that might need discussion. I'm also happy to refactor the |
1679395
to
3452750
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok so I'll approve, but I think we'll need to revisit the validator with a validator config solution to validate the plugins config.
lib/plugins/plugin-validator.js
Outdated
keysToValidate.forEach(key => { | ||
// Convert any strings to an array so that they can be processed | ||
let criteriaConfig = pluginConfig[key] | ||
if (typeof criteriaConfig === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to instead check that criteriaConfig is not an Array as it could be something other than a string.
Instead use if (!Array.isArray(criteriaConfig) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.