UNPKG

bemhint-deps-schema

Version:

Plugin for bemhint which checks *.deps.js to be written by specification

130 lines (120 loc) 4.4 kB
{ "$ref": "#/definitions/set", "definitions": { "set": { "type": ["string", "object", "array"], "switch": [ { "if": { "type": "object" }, "then": { "$ref": "#/definitions/entity" } }, { "if": { "type": "array" }, "then": { "items": { "type": ["string", "object"], "switch": [ { "if": { "type": "object" }, "then": { "$ref": "#/definitions/entity" } } ] } } } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "block": { "type": "string" }, "elem": { "$ref": "#/definitions/elemPlainEntity" }, "elems": { "type": ["string", "object", "array"], "switch": [ { "if": { "type": "object" }, "then": { "$ref": "#/definitions/elemEntity" } }, { "if": { "type": "array" }, "then": { "items": { "type": ["string", "object"], "switch": [ { "if": { "type": "object" }, "then": { "$ref": "#/definitions/elemEntity" } } ] } } } ] }, "mod": { "type": "string" }, "val": { "$ref": "#/definitions/modVal" }, "mods": { "$ref": "#/definitions/modifiers" }, "tech": { "type": "string" }, "include": { "enum": [false] }, "noDeps": { "$ref": "#/definitions/set" }, "mustDeps": { "$ref": "#/definitions/set" }, "shouldDeps": { "$ref": "#/definitions/set" } }, "dependencies": { "val": { "required": ["mod"] } } }, "elemPlainEntity": { "type": ["string", "array"], "items": { "type": "string" } }, "elemEntity": { "type": "object", "additionalProperties": false, "properties": { "elem": { "$ref": "#/definitions/elemPlainEntity" }, "mod": { "type": "string" }, "val": { "$ref": "#/definitions/modVal" }, "mods": { "$ref": "#/definitions/modifiers" }, "tech": { "type": "string" }, "include": { "enum": [false] }, "noDeps": { "$ref": "#/definitions/set" }, "mustDeps": { "$ref": "#/definitions/set" }, "shouldDeps": { "$ref": "#/definitions/set" } }, "dependencies": { "val": { "required": ["mod"] } }, "required": ["elem"] }, "modifiers": { "type": "object", "additionalProperties": { "type": ["boolean", "string", "array"], "switch": [ { "if": { "type": "boolean" }, "then": { "enum": [true] } }, { "if": { "type": "array" }, "then": { "items": { "type": "string" } } } ] } }, "modVal": { "type": ["string", "boolean"], "switch": [ { "if": { "type": "boolean" }, "then": { "enum": [true] } } ] } } }