@markuplint/ml-config
Advanced tools
Comparing version 3.0.0-alpha.5 to 3.0.0-alpha.6
@@ -5,74 +5,76 @@ import type { ParserOptions } from '@markuplint/ml-ast'; | ||
export interface Config { | ||
$schema?: string; | ||
extends?: string | string[]; | ||
plugins?: (PluginConfig | string)[]; | ||
parser?: ParserConfig; | ||
parserOptions?: ParserOptions; | ||
specs?: SpecConfig; | ||
excludeFiles?: string[]; | ||
pretenders?: Pretender[]; | ||
rules?: Rules; | ||
nodeRules?: NodeRule[]; | ||
childNodeRules?: ChildNodeRule[]; | ||
overrides?: Record<string, Omit<Config, '$schema' | 'extends' | 'overrides'>>; | ||
$schema?: string; | ||
extends?: string | string[]; | ||
plugins?: (PluginConfig | string)[]; | ||
parser?: ParserConfig; | ||
parserOptions?: ParserOptions; | ||
specs?: SpecConfig; | ||
excludeFiles?: string[]; | ||
pretenders?: Pretender[]; | ||
rules?: Rules; | ||
nodeRules?: NodeRule[]; | ||
childNodeRules?: ChildNodeRule[]; | ||
overrides?: Record<string, Omit<Config, '$schema' | 'extends' | 'overrides'>>; | ||
} | ||
export declare type PluginConfig = { | ||
name: string; | ||
settings: Record<string, any>; | ||
export type PluginConfig = { | ||
name: string; | ||
settings: Record<string, any>; | ||
}; | ||
export interface ParserConfig { | ||
[extensionPattern: string]: string; | ||
[extensionPattern: string]: string; | ||
} | ||
export declare type SpecConfig = { | ||
[extensionPattern: string]: string; | ||
export 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 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; | ||
export 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; | ||
}; | ||
@@ -82,77 +84,79 @@ /** | ||
*/ | ||
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 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; | ||
export declare type AnyRule = Rule<RuleConfigValue, unknown>; | ||
export type Rule<T extends RuleConfigValue, O = void> = RuleConfig<T, O> | T | boolean; | ||
export type AnyRule = Rule<RuleConfigValue, unknown>; | ||
export interface Rules { | ||
[ruleName: string]: AnyRule; | ||
[ruleName: string]: AnyRule; | ||
} | ||
export declare type RuleConfig<T extends RuleConfigValue, O = void> = { | ||
severity?: Severity; | ||
value?: T; | ||
option?: O; | ||
reason?: string; | ||
export type RuleConfig<T extends RuleConfigValue, O = void> = { | ||
severity?: Severity; | ||
value?: T; | ||
option?: O; | ||
reason?: string; | ||
}; | ||
export declare type Severity = 'error' | 'warning' | 'info'; | ||
export declare type RuleConfigValue = string | number | boolean | any[] | null; | ||
export type Severity = 'error' | 'warning' | 'info'; | ||
export type RuleConfigValue = string | number | boolean | any[] | null; | ||
export interface NodeRule { | ||
selector?: string; | ||
regexSelector?: RegexSelector; | ||
categories?: string[]; | ||
roles?: string[]; | ||
obsolete?: boolean; | ||
rules?: Rules; | ||
selector?: string; | ||
regexSelector?: RegexSelector; | ||
categories?: string[]; | ||
roles?: string[]; | ||
obsolete?: boolean; | ||
rules?: Rules; | ||
} | ||
export interface ChildNodeRule { | ||
selector?: string; | ||
regexSelector?: RegexSelector; | ||
inheritance?: boolean; | ||
rules?: Rules; | ||
selector?: string; | ||
regexSelector?: RegexSelector; | ||
inheritance?: boolean; | ||
rules?: Rules; | ||
} | ||
export declare type Report<T extends RuleConfigValue, O = null> = Report1<T, O> | Report2 | (Report1<T, O> & Report2); | ||
export declare type Report1<T extends RuleConfigValue, O = null> = { | ||
message: string; | ||
scope: Scope<T, O>; | ||
export type Report<T extends RuleConfigValue, O = null> = Report1<T, O> | Report2 | (Report1<T, O> & Report2); | ||
export type Report1<T extends RuleConfigValue, O = null> = { | ||
message: string; | ||
scope: Scope<T, O>; | ||
}; | ||
export declare type Report2 = { | ||
message: string; | ||
line: number; | ||
col: number; | ||
raw: string; | ||
export type Report2 = { | ||
message: string; | ||
line: number; | ||
col: number; | ||
raw: string; | ||
}; | ||
export declare type Scope<T extends RuleConfigValue, O = null> = { | ||
rule: RuleInfo<T, O>; | ||
startLine: number; | ||
startCol: number; | ||
raw: string; | ||
export type Scope<T extends RuleConfigValue, O = null> = { | ||
rule: RuleInfo<T, O>; | ||
startLine: number; | ||
startCol: number; | ||
raw: string; | ||
}; | ||
export interface Violation { | ||
ruleId: string; | ||
severity: Severity; | ||
message: string; | ||
reason?: string; | ||
line: number; | ||
col: number; | ||
raw: string; | ||
ruleId: string; | ||
severity: Severity; | ||
message: string; | ||
reason?: string; | ||
line: number; | ||
col: number; | ||
raw: string; | ||
} | ||
export interface RuleInfo<T extends RuleConfigValue, O = null> { | ||
disabled: boolean; | ||
severity: Severity; | ||
value: T; | ||
option: O; | ||
reason?: string; | ||
disabled: boolean; | ||
severity: Severity; | ||
value: T; | ||
option: O; | ||
reason?: string; | ||
} | ||
export declare type GlobalRuleInfo<T extends RuleConfigValue, O = null> = RuleInfo<T, O> & { | ||
nodeRules: RuleInfo<T, O>[]; | ||
childNodeRules: RuleInfo<T, O>[]; | ||
export type GlobalRuleInfo<T extends RuleConfigValue, O = null> = RuleInfo<T, O> & { | ||
nodeRules: RuleInfo<T, O>[]; | ||
childNodeRules: RuleInfo<T, O>[]; | ||
}; | ||
export declare type Nullable<T> = T | null | undefined; | ||
export type Nullable<T> = T | null | undefined; |
{ | ||
"name": "@markuplint/ml-config", | ||
"version": "3.0.0-alpha.5", | ||
"version": "3.0.0-alpha.6", | ||
"description": "JSON Schema and TypeScript types of markuplint configure JSON", | ||
@@ -19,7 +19,7 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"devDependencies": { | ||
"@markuplint/ml-ast": "3.0.0-alpha.5", | ||
"@markuplint/ml-ast": "3.0.0-alpha.6", | ||
"@types/mustache": "^4.2.1" | ||
}, | ||
"dependencies": { | ||
"@markuplint/selector": "3.0.0-alpha.5", | ||
"@markuplint/selector": "3.0.0-alpha.6", | ||
"deepmerge": "^4.2.2", | ||
@@ -29,3 +29,3 @@ "is-plain-object": "^5.0.0", | ||
}, | ||
"gitHead": "d2ee395d917cb69b91dedb0262b1c12ddc81fb58" | ||
"gitHead": "b185a06d4ea09a1bf32458f7be4abe510eb57b89" | ||
} |
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
79311
458
+ Added@markuplint/selector@3.0.0-alpha.6(transitive)
- Removed@markuplint/selector@3.0.0-alpha.5(transitive)