X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Fajv%2Flib%2Fdotjs%2Fitems.js;h=bee5d67da246f354c106e70ad5b1979ef901554c;hp=139c1d9470b87591a945883ee6ac72cf4f4c5ffe;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hpb=b3950616b54221c40a7dab9099bda675007e5b6e diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/ajv/lib/dotjs/items.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/ajv/lib/dotjs/items.js index 139c1d94..bee5d67d 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/ajv/lib/dotjs/items.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/ajv/lib/dotjs/items.js @@ -66,7 +66,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; var $passData = $data + '[' + $i + ']'; $it.schema = $sch; @@ -89,7 +89,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { } } } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { $it.schema = $additionalItems; $it.schemaPath = it.schemaPath + '.additionalItems'; $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; @@ -113,7 +113,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) { $closingBraces += '}'; } } - } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath;