style fix

master
Evgeny Poberezkin 2019-02-09 20:35:12 +00:00
parent fdfbd4402a
commit 33d1ac4682
2 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,7 @@ env:
rules:
block-scoped-var: 2
callback-return: 2
complexity: [2, 16]
complexity: [2, 18]
curly: [2, multi-or-nest, consistent]
dot-location: [2, property]
dot-notation: 2

View File

@ -258,10 +258,9 @@ function compile(schema, root, localRefs, baseId) {
if (self._opts.validateSchema !== false) {
var deps = rule.definition.dependencies;
if (deps && !deps.every(function(keyword) {
return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
})) {
return Object.prototype.hasOwnProperty.call(parentSchema, keyword);
}))
throw new Error('parent schema must have all required keywords: ' + deps.join(','));
}
var validateSchema = rule.definition.validateSchema;
if (validateSchema) {