{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "value": { "type": "boolean" }, "options": { "type": "object", "additionalProperties": false, "description": "```ts\ntype Attr = {\n name: string;\n value: AttributeType | ValueRule;\n}\n\ntype ValueRule =\n | { enum: [string, ...string[]]; }\n | { pattern: string; }\n | { type: AttributeType; };\n```\n\n`AttributeType` is [The type API](/docs/api/types).", "description:ja": "```ts\ntype Attr = {\n name: string;\n value: AttributeType | ValueRule;\n}\n\ntype ValueRule =\n | { enum: [string, ...string[]]; }\n | { pattern: string; }\n | { type: AttributeType; };\n```\n\n`AttributeType`は[タイプAPI](/docs/api/types)を参照してください。", "properties": { "allowAttrs": { "oneOf": [ { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "object", "_type": "Attr", "additionalProperties": false, "required": ["name", "value"], "properties": { "name": { "type": "string" }, "value": { "oneOf": [ { "$ref": "#/definitions/enum" }, { "$ref": "#/definitions/pattern" }, { "$ref": "#/definitions/type" }, { "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/types/types.schema.json#/definitions/type" } ] } } } ] } }, { "type": "object", "_type": "Record", "additionalProperties": { "type": "object", "oneOf": [ { "$ref": "#/definitions/enum" }, { "$ref": "#/definitions/pattern" }, { "$ref": "#/definitions/type" } ] } } ], "description": "Specify the attributes **to allow**. This is useful when you want to intentionally specify attributes not present in the HTML Standard or when you want to avoid warnings for attributes required by frameworks. You can specify the attribute name only or provide patterns and data types for attribute values.", "description:ja": "**許可する**属性を指定します。これは、HTML標準に存在しない属性をあえて指定したい場合や、フレームワークなどで必要な属性を警告されないようにするものです。属性名だけの指定もできますし、属性値に対してのパターンやデータ型の指定が可能です。" }, "disallowAttrs": { "oneOf": [ { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "object", "_type": "Attr", "additionalProperties": false, "required": ["name", "value"], "properties": { "name": { "type": "string" }, "value": { "oneOf": [ { "$ref": "#/definitions/enum" }, { "$ref": "#/definitions/pattern" }, { "$ref": "#/definitions/type" }, { "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/types/types.schema.json#/definitions/type" } ] } } } ] } }, { "type": "object", "_type": "Record", "additionalProperties": { "type": "object", "oneOf": [ { "$ref": "#/definitions/enum" }, { "$ref": "#/definitions/pattern" }, { "$ref": "#/definitions/type" } ] } } ], "description": "Specify the attributes **to disallow**. Even if they are allowed in the HTML Standard, you can use this option to intentionally prohibit them based on your project's rules. The format for specifying disallowed attributes is the same as for `allowAttrs`, **but the meanings are reversed**.", "description:ja": "**許可しない**属性を指定します。HTML標準で許可されていたとしても、あえてプロジェクトのルールで禁止するような場合に利用します。指定内容は`allowAttrs`と同じ形式を受け取りますが、**その意味はすべて逆になります**。" }, "ignoreAttrNamePrefix": { "oneOf": [ { "type": "string" }, { "type": "array", "uniqueItems": true, "minItems": 1, "items": { "type": "string" } } ], "description": "Set prefixes to exclude special attributes or directives for the library and template engine that do not exist in the HTML specifications.", "description:ja": "HTMLの仕様には存在しない、Viewライブラリやテンプレートエンジン固有の属性およびディレクティブを除外するために、プレフィックスを設定します。" }, "allowToAddPropertiesForPretender": { "type": "boolean", "default": "true", "description": "Allow adding properties for a component that pretends to be an HTML native element. The default is `true`. It warns of finding a non-existence attribute if it is set `false` and you use the `pretenders` option.", "description:ja": "HTML要素に偽装しているコンポーネントのプロパティを追加できるようにします。デフォルトは`true`です。`pretenders`オプションを使用している場合に`false`に設定されていると、存在しない属性が見つかると警告します。" }, "attrs": { "deprecated": true, "type": "object", "additionalProperties": { "type": "object", "oneOf": [ { "$ref": "#/definitions/enum" }, { "$ref": "#/definitions/pattern" }, { "$ref": "#/definitions/type" }, { "type": "object", "additionalProperties": false, "required": ["disallowed"], "properties": { "disallowed": { "type": "boolean" } } } ] }, "description": "[Deprecated (since v3.7.0): Use `allowAttrs` or `disallowAttrs` instead.] Setting custom rule. Set either `enum`, `pattern`, `type` or `disallowed`.", "description:ja": "[非推奨(v3.7.0より): `allowAttrs`か`disallowAttrs`を利用してください] `enum` `pattern` `type` `disallowed` のいずれかで設定します。" } } }, "enum": { "type": "object", "additionalProperties": false, "required": ["enum"], "properties": { "enum": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minimum": 1 } } } }, "pattern": { "type": "object", "additionalProperties": false, "required": ["pattern"], "properties": { "pattern": { "type": "string" } } }, "type": { "type": "object", "additionalProperties": false, "required": ["type"], "properties": { "type": { "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/types/types.schema.json#/definitions/type" } } } }, "oneOf": [ { "$ref": "#/definitions/value" }, { "type": "object", "additionalProperties": false, "properties": { "value": { "$ref": "#/definitions/value" }, "options": { "$ref": "#/definitions/options" }, "option": { "$ref": "#/definitions/options", "deprecated": true }, "severity": { "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/ml-config/schema.json#/definitions/severity", "default": "error" }, "reason": { "type": "string" } } } ] }