summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def')
-rw-r--r--tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def b/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def
new file mode 100644
index 0000000000..5ad8d1d2d2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/ajv/lib/dot/defaults.def
@@ -0,0 +1,32 @@
+{{## def.assignDefault:
+ if ({{=$passData}} === undefined)
+ {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
+ {{= it.useDefault($sch.default) }}
+ {{??}}
+ {{= JSON.stringify($sch.default) }}
+ {{?}};
+#}}
+
+
+{{## def.defaultProperties:
+ {{
+ var $schema = it.schema.properties
+ , $schemaKeys = Object.keys($schema); }}
+ {{~ $schemaKeys:$propertyKey }}
+ {{ var $sch = $schema[$propertyKey]; }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + it.util.getProperty($propertyKey); }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}
+
+
+{{## def.defaultItems:
+ {{~ it.schema.items:$sch:$i }}
+ {{? $sch.default !== undefined }}
+ {{ var $passData = $data + '[' + $i + ']'; }}
+ {{# def.assignDefault }}
+ {{?}}
+ {{~}}
+#}}