@markuplint/ml-config
Advanced tools
Comparing version 3.0.0-alpha.0 to 3.0.0-alpha.1
@@ -0,1 +1,2 @@ | ||
import type { ParserOptions } from '@markuplint/ml-ast'; | ||
import type { RegexSelector } from '@markuplint/selector'; | ||
@@ -11,2 +12,3 @@ export type { RegexSelector } from '@markuplint/selector'; | ||
excludeFiles?: string[]; | ||
pretenders?: Pretender[]; | ||
rules?: Rules; | ||
@@ -24,8 +26,69 @@ nodeRules?: NodeRule[]; | ||
} | ||
export declare type ParserOptions = { | ||
ignoreFrontMatter?: boolean; | ||
}; | ||
export declare type SpecConfig = { | ||
[extensionPattern: string]: string; | ||
}; | ||
export declare type Pretender = { | ||
/** | ||
* Target node selectors | ||
*/ | ||
selector: string; | ||
/** | ||
* If it is a string, it is resolved as an element name. | ||
* An element has the same attributes as the pretended custom element | ||
* because attributes are just inherited. | ||
* | ||
* If it is an Object, It creates the element by that. | ||
*/ | ||
as: string | OriginalNode; | ||
}; | ||
export declare type OriginalNode = { | ||
/** | ||
* Element name | ||
*/ | ||
element: string; | ||
/** | ||
* Namespace | ||
* | ||
* Supports `"svg"` and `undefined` only. | ||
* If it is `undefined`, the namespace is HTML. | ||
*/ | ||
namespace?: 'svg'; | ||
/** | ||
* Attributes | ||
*/ | ||
attrs?: { | ||
/** | ||
* Attribute name | ||
*/ | ||
name: string; | ||
/** | ||
* If it omits this property, the attribute is resolved as a boolean. | ||
*/ | ||
value?: string | { | ||
fromAttr: string; | ||
}; | ||
}[]; | ||
/** | ||
* To have attributes the defined element has. | ||
*/ | ||
inheritAttrs?: boolean; | ||
/** | ||
* ARIA properties | ||
*/ | ||
aria?: PretenderARIA; | ||
}; | ||
/** | ||
* Pretender Node ARIA properties | ||
*/ | ||
export declare type PretenderARIA = { | ||
/** | ||
* Accessible name | ||
* | ||
* - If it is `true`, it assumes the element has any text on its accessible name. | ||
* - If it specifies `fromAttr` property, it assumes the accessible name refers to the value of the attribute. | ||
*/ | ||
name?: boolean | { | ||
fromAttr: string; | ||
}; | ||
}; | ||
export declare type Rule<T extends RuleConfigValue, O = void> = RuleConfig<T, O> | T | boolean; | ||
@@ -32,0 +95,0 @@ export declare type AnyRule = Rule<RuleConfigValue, unknown>; |
{ | ||
"name": "@markuplint/ml-config", | ||
"version": "3.0.0-alpha.0", | ||
"version": "3.0.0-alpha.1", | ||
"description": "JSON Schema and TypeScript types of markuplint configure JSON", | ||
@@ -19,6 +19,7 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"devDependencies": { | ||
"@types/mustache": "^4.1.2" | ||
"@markuplint/ml-ast": "3.0.0-alpha.1", | ||
"@types/mustache": "^4.2.1" | ||
}, | ||
"dependencies": { | ||
"@markuplint/selector": "3.0.0-alpha.0", | ||
"@markuplint/selector": "3.0.0-alpha.1", | ||
"deepmerge": "^4.2.2", | ||
@@ -28,3 +29,3 @@ "is-plain-object": "^5.0.0", | ||
}, | ||
"gitHead": "d32c522e016888e20bcbb5f09352c006b964f193" | ||
"gitHead": "56de89456146a06777eb5b6d4e8ba456147dd18b" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72600
454
2
+ Added@markuplint/selector@3.0.0-alpha.1(transitive)
- Removed@markuplint/selector@3.0.0-alpha.0(transitive)