@markuplint/rules 3.8.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/attr-duplication/index.d.ts +1 -3
- package/lib/attr-value-quotes/index.d.ts +2 -2
- package/lib/case-sensitive-attr-name/index.d.ts +1 -1
- package/lib/case-sensitive-tag-name/index.d.ts +1 -1
- package/lib/character-reference/index.d.ts +1 -1
- package/lib/class-naming/index.d.ts +1 -1
- package/lib/create-message.d.ts +2 -12
- package/lib/deprecated-attr/index.d.ts +1 -3
- package/lib/deprecated-element/index.d.ts +1 -3
- package/lib/disallowed-element/index.d.ts +1 -1
- package/lib/doctype/index.d.ts +2 -2
- package/lib/end-tag/index.d.ts +1 -1
- package/lib/helpers.d.ts +18 -39
- package/lib/id-duplication/index.d.ts +1 -3
- package/lib/index.d.ts +7 -7
- package/lib/ineffective-attr/index.d.ts +1 -3
- package/lib/invalid-attr/index.d.ts +31 -38
- package/lib/label-has-control/index.d.ts +1 -3
- package/lib/landmark-roles/index.d.ts +3 -3
- package/lib/no-boolean-attr-value/index.d.ts +1 -3
- package/lib/no-default-value/index.d.ts +1 -3
- package/lib/no-empty-palpable-content/index.d.ts +3 -3
- package/lib/no-hard-code-id/index.d.ts +1 -3
- package/lib/no-refer-to-non-existent-id/index.d.ts +4 -9
- package/lib/no-use-event-handler-attr/index.d.ts +2 -2
- package/lib/permitted-contents/choice.d.ts +1 -7
- package/lib/permitted-contents/complex-branch.d.ts +1 -7
- package/lib/permitted-contents/count-pattern.d.ts +2 -17
- package/lib/permitted-contents/debug.browser.d.ts +15 -15
- package/lib/permitted-contents/debug.d.ts +1 -1
- package/lib/permitted-contents/index.d.ts +1 -1
- package/lib/permitted-contents/matches-selector.d.ts +1 -6
- package/lib/permitted-contents/order.d.ts +1 -7
- package/lib/permitted-contents/recursive-branch.d.ts +1 -7
- package/lib/permitted-contents/represent-transparent-nodes.d.ts +3 -7
- package/lib/permitted-contents/start.d.ts +1 -6
- package/lib/permitted-contents/types.d.ts +29 -29
- package/lib/permitted-contents/utils.d.ts +1 -1
- package/lib/placeholder-label-option/index.d.ts +1 -1
- package/lib/require-accessible-name/index.d.ts +2 -2
- package/lib/require-datetime/index.d.ts +2 -2
- package/lib/require-datetime/types.d.ts +2 -2
- package/lib/required-attr/index.d.ts +3 -3
- package/lib/required-element/index.d.ts +2 -2
- package/lib/required-h1/index.d.ts +3 -3
- package/lib/use-list/index.d.ts +2 -2
- package/lib/wai-aria/checkings/_.d.ts +12 -6
- package/lib/wai-aria/checkings/default-value.d.ts +3 -7
- package/lib/wai-aria/checkings/deprecated-props.d.ts +4 -8
- package/lib/wai-aria/checkings/implicit-props.d.ts +4 -8
- package/lib/wai-aria/checkings/no-global-prop.d.ts +3 -7
- package/lib/wai-aria/checkings/required-owned-elements.d.ts +3 -7
- package/lib/wai-aria/checkings/required-prop copy.d.ts +12 -6
- package/lib/wai-aria/checkings/required-prop.d.ts +6 -12
- package/lib/wai-aria/checkings/unadopted-explicit-roles.d.ts +12 -6
- package/lib/wai-aria/checkings/value.d.ts +6 -15
- package/lib/wai-aria/index.d.ts +1 -1
- package/lib/wai-aria/types.d.ts +10 -10
- package/lib/xxx/index.d.ts +2 -0
- package/lib/xxx/index.js +32 -0
- package/package.json +13 -15
- package/test/attr-check.spec.js +77 -0
- package/test/attr-duplication/index.spec.js +159 -0
- package/test/attr-value-quotes/index.spec.js +133 -0
- package/test/case-sensitive-attr-name/index.spec.js +65 -0
- package/test/case-sensitive-tag-name/index.spec.js +80 -0
- package/test/character-reference/index.spec.js +57 -0
- package/test/class-naming/index.spec.js +470 -0
- package/test/create-message.spec.js +497 -0
- package/test/deprecated-attr/index.spec.js +48 -0
- package/test/deprecated-element/index.spec.js +48 -0
- package/test/disallowed-element/index.spec.js +90 -0
- package/test/doctype/index.spec.js +50 -0
- package/test/end-tag/index.spec.js +162 -0
- package/test/id-duplication/index.spec.js +47 -0
- package/test/ineffective-attr/index.spec.js +31 -0
- package/test/invalid-attr/index.spec.js +1632 -0
- package/test/label-has-control/index.spec.js +29 -0
- package/test/landmark-roles/index.spec.js +187 -0
- package/test/no-boolean-attr-value/index.spec.js +41 -0
- package/test/no-default-value/index.spec.js +74 -0
- package/test/no-empty-palpable-content/index.spec.js +115 -0
- package/test/no-hard-code-id/index.spec.js +100 -0
- package/test/no-refer-to-non-existent-id/index.spec.js +254 -0
- package/test/no-use-event-handler-attr/index.spec.js +57 -0
- package/test/permitted-contents/choice.spec.js +174 -0
- package/test/permitted-contents/count-pattern.spec.js +308 -0
- package/test/permitted-contents/index.spec.js +1371 -0
- package/test/permitted-contents/matches-selector.spec.js +59 -0
- package/test/permitted-contents/order.spec.js +351 -0
- package/test/permitted-contents/recursive-branch.spec.js +41 -0
- package/test/permitted-contents/represent-transparent-nodes.spec.js +24 -0
- package/test/permitted-contents/start.spec.js +67 -0
- package/test/placeholder-label-option/index.spec.js +113 -0
- package/test/require-accessible-name/index.spec.js +446 -0
- package/test/require-datetime/index.spec.js +54 -0
- package/test/require-datetime/utils.spec.js +52 -0
- package/test/required-attr/index.spec.js +414 -0
- package/test/required-element/index.spec.js +188 -0
- package/test/required-h1/index.spec.js +69 -0
- package/test/use-list/index.spec.js +109 -0
- package/test/wai-aria/checkings/value.spec.js +33 -0
- package/test/wai-aria/index.spec.js +1173 -0
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Type = 'double' | 'single';
|
|
2
2
|
export type Quote = '"' | "'";
|
|
3
3
|
export type QuoteMap = {
|
|
4
|
-
|
|
4
|
+
[P in Type]: Quote;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: Readonly<import(
|
|
6
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<Type, undefined>>;
|
|
7
7
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RuleConfigValue } from '@markuplint/ml-config';
|
|
2
|
-
declare const _default: Readonly<import(
|
|
2
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<RuleConfigValue, undefined>>;
|
|
3
3
|
export default _default;
|
package/lib/create-message.d.ts
CHANGED
|
@@ -2,15 +2,5 @@ import type { Translator } from '@markuplint/i18n';
|
|
|
2
2
|
import type { AttributeType } from '@markuplint/ml-spec';
|
|
3
3
|
import type { UnmatchedResult } from '@markuplint/types';
|
|
4
4
|
import type { ReadonlyDeep } from 'type-fest';
|
|
5
|
-
export declare function createMessageValueExpected(
|
|
6
|
-
|
|
7
|
-
baseTarget: string,
|
|
8
|
-
type: ReadonlyDeep<AttributeType>,
|
|
9
|
-
matches: UnmatchedResult,
|
|
10
|
-
): string;
|
|
11
|
-
export declare function __createMessageValueExpected(
|
|
12
|
-
t: Translator,
|
|
13
|
-
baseTarget: string,
|
|
14
|
-
expected: string | null,
|
|
15
|
-
matches: Pick<UnmatchedResult, 'partName' | 'reason' | 'raw' | 'candidate' | 'ref' | 'extra'>,
|
|
16
|
-
): string;
|
|
5
|
+
export declare function createMessageValueExpected(t: Translator, baseTarget: string, type: ReadonlyDeep<AttributeType>, matches: UnmatchedResult): string;
|
|
6
|
+
export declare function __createMessageValueExpected(t: Translator, baseTarget: string, expected: string | null, matches: Pick<UnmatchedResult, 'partName' | 'reason' | 'raw' | 'candidate' | 'ref' | 'extra'>): string;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<import(
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<string[], undefined>>;
|
|
2
2
|
export default _default;
|
package/lib/doctype/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Option = {
|
|
2
|
-
|
|
2
|
+
denyObsoleteType: boolean;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: Readonly<import(
|
|
4
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<"always", Option>>;
|
|
5
5
|
export default _default;
|
package/lib/end-tag/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<import(
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
2
2
|
export default _default;
|
package/lib/helpers.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ import type { Translator } from '@markuplint/i18n';
|
|
|
3
3
|
import type { PlainData } from '@markuplint/ml-config';
|
|
4
4
|
import type { Element, RuleConfigValue, Document } from '@markuplint/ml-core';
|
|
5
5
|
import type { Attribute } from '@markuplint/ml-spec';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
condition: Attribute['condition'],
|
|
9
|
-
): boolean;
|
|
6
|
+
import type { WritableDeep } from 'type-fest';
|
|
7
|
+
export declare function attrMatches<T extends RuleConfigValue, O extends PlainData>(node: Element<T, O>, condition: Attribute['condition']): boolean;
|
|
10
8
|
export declare function match(needle: string, pattern: string): boolean;
|
|
11
9
|
/**
|
|
12
10
|
* PotentialCustomElementName
|
|
@@ -24,42 +22,23 @@ export declare function match(needle: string, pattern: string): boolean;
|
|
|
24
22
|
* Originally, it is not possible to define a name including ASCII upper alphas in the custom element, but it is not treated as illegal by the HTML parser.
|
|
25
23
|
*/
|
|
26
24
|
export declare const rePCENChar: string;
|
|
27
|
-
export declare function isValidAttr(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| false
|
|
37
|
-
| {
|
|
38
|
-
invalidType: 'non-existent' | 'invalid-value' | 'disallowed-attr';
|
|
39
|
-
message: string;
|
|
40
|
-
loc?:
|
|
41
|
-
| {
|
|
42
|
-
raw: string;
|
|
43
|
-
line: number;
|
|
44
|
-
col: number;
|
|
45
|
-
}
|
|
46
|
-
| undefined;
|
|
47
|
-
};
|
|
25
|
+
export declare function isValidAttr(t: Translator, name: string, value: string, isDynamicValue: boolean, node: Element<any, any>, attrSpecs: readonly Attribute[], log?: Log): false | {
|
|
26
|
+
invalidType: "non-existent" | "invalid-value" | "disallowed-attr";
|
|
27
|
+
message: string;
|
|
28
|
+
loc?: {
|
|
29
|
+
raw: string;
|
|
30
|
+
line: number;
|
|
31
|
+
col: number;
|
|
32
|
+
} | undefined;
|
|
33
|
+
};
|
|
48
34
|
export declare function toNormalizedValue(value: string, spec: Attribute): string;
|
|
49
35
|
export declare function accnameMayBeMutable(el: Element<any, any>, document: Document<any, any>): boolean;
|
|
50
|
-
export declare function getOwnedLabel<V extends RuleConfigValue, O extends PlainData>(
|
|
51
|
-
el: Element<V, O>,
|
|
52
|
-
document: Document<V, O>,
|
|
53
|
-
): Element<V, O> | null;
|
|
36
|
+
export declare function getOwnedLabel<V extends RuleConfigValue, O extends PlainData>(el: Element<V, O>, document: Document<V, O>): Element<V, O> | null;
|
|
54
37
|
export declare class Collection<T> {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
#private;
|
|
39
|
+
constructor(...items: readonly (T | null | undefined)[]);
|
|
40
|
+
[Symbol.iterator](): Iterator<T>;
|
|
41
|
+
add(...items: readonly (T | null | undefined)[]): void;
|
|
42
|
+
toArray(): readonly T[];
|
|
60
43
|
}
|
|
61
|
-
|
|
62
|
-
-readonly [P in keyof T]: T[P];
|
|
63
|
-
};
|
|
64
|
-
export declare function deepCopy<T>(value: T): Writeable<T>;
|
|
65
|
-
export {};
|
|
44
|
+
export declare function deepCopy<T>(value: T): WritableDeep<T>;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -20,15 +20,15 @@ declare const rules: {
|
|
|
20
20
|
} | {
|
|
21
21
|
pattern: string;
|
|
22
22
|
} | {
|
|
23
|
-
type: import("packages/@markuplint/ml-spec/
|
|
23
|
+
type: import("packages/@markuplint/ml-spec/lib").AttributeType;
|
|
24
24
|
}> | (string | {
|
|
25
25
|
name: string;
|
|
26
|
-
value: import("packages/@markuplint/ml-spec/
|
|
26
|
+
value: import("packages/@markuplint/ml-spec/lib").AttributeType | ({
|
|
27
27
|
enum: [string, ...string[]];
|
|
28
28
|
} | {
|
|
29
29
|
pattern: string;
|
|
30
30
|
} | {
|
|
31
|
-
type: import("packages/@markuplint/ml-spec/
|
|
31
|
+
type: import("packages/@markuplint/ml-spec/lib").AttributeType;
|
|
32
32
|
});
|
|
33
33
|
})[] | undefined;
|
|
34
34
|
disallowAttrs?: Record<string, {
|
|
@@ -36,15 +36,15 @@ declare const rules: {
|
|
|
36
36
|
} | {
|
|
37
37
|
pattern: string;
|
|
38
38
|
} | {
|
|
39
|
-
type: import("packages/@markuplint/ml-spec/
|
|
39
|
+
type: import("packages/@markuplint/ml-spec/lib").AttributeType;
|
|
40
40
|
}> | (string | {
|
|
41
41
|
name: string;
|
|
42
|
-
value: import("packages/@markuplint/ml-spec/
|
|
42
|
+
value: import("packages/@markuplint/ml-spec/lib").AttributeType | ({
|
|
43
43
|
enum: [string, ...string[]];
|
|
44
44
|
} | {
|
|
45
45
|
pattern: string;
|
|
46
46
|
} | {
|
|
47
|
-
type: import("packages/@markuplint/ml-spec/
|
|
47
|
+
type: import("packages/@markuplint/ml-spec/lib").AttributeType;
|
|
48
48
|
});
|
|
49
49
|
})[] | undefined;
|
|
50
50
|
ignoreAttrNamePrefix?: string | string[] | undefined;
|
|
@@ -54,7 +54,7 @@ declare const rules: {
|
|
|
54
54
|
} | {
|
|
55
55
|
pattern: string;
|
|
56
56
|
} | {
|
|
57
|
-
type: import("packages/@markuplint/ml-spec/
|
|
57
|
+
type: import("packages/@markuplint/ml-spec/lib").AttributeType;
|
|
58
58
|
}) | {
|
|
59
59
|
disallowed: true;
|
|
60
60
|
}> | undefined;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,44 +1,37 @@
|
|
|
1
1
|
import type { AttributeType } from '@markuplint/ml-spec';
|
|
2
2
|
type Option = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| {
|
|
25
|
-
disallowed: true;
|
|
26
|
-
}
|
|
27
|
-
>;
|
|
3
|
+
/**
|
|
4
|
+
* @since 3.7.0
|
|
5
|
+
*/
|
|
6
|
+
allowAttrs?: (string | Attr)[] | Record<string, ValueRule>;
|
|
7
|
+
/**
|
|
8
|
+
* @since 3.7.0
|
|
9
|
+
*/
|
|
10
|
+
disallowAttrs?: (string | Attr)[] | Record<string, ValueRule>;
|
|
11
|
+
ignoreAttrNamePrefix?: string | string[];
|
|
12
|
+
allowToAddPropertiesForPretender?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Since version 3.7.0. Use `allowAttrs` or `disallowAttrs` instead.
|
|
15
|
+
* This option (`attr`) is now considered ambiguous and may lead to confusion.
|
|
16
|
+
* Please use the more explicit `allowAttrs` or `disallowAttrs` option
|
|
17
|
+
* to specify allowed attributes for the `invalid-attr` rule.
|
|
18
|
+
* @see {@link Option.allowAttrs}
|
|
19
|
+
* @see {@link Option.disallowAttrs}
|
|
20
|
+
*/
|
|
21
|
+
attrs?: Record<string, ValueRule | {
|
|
22
|
+
disallowed: true;
|
|
23
|
+
}>;
|
|
28
24
|
};
|
|
29
25
|
type Attr = {
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
name: string;
|
|
27
|
+
value: AttributeType | ValueRule;
|
|
32
28
|
};
|
|
33
|
-
type ValueRule =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
type: AttributeType;
|
|
42
|
-
};
|
|
43
|
-
declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<boolean, Option>>;
|
|
29
|
+
type ValueRule = {
|
|
30
|
+
enum: [string, ...string[]];
|
|
31
|
+
} | {
|
|
32
|
+
pattern: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: AttributeType;
|
|
35
|
+
};
|
|
36
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Option>>;
|
|
44
37
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ignoreRoles: Roles[];
|
|
3
|
+
labelEachArea: boolean;
|
|
4
4
|
};
|
|
5
5
|
type TopLevelRoles = 'banner' | 'main' | 'complementary' | 'contentinfo';
|
|
6
6
|
type Roles = TopLevelRoles | 'form' | 'navigation' | 'region';
|
|
7
|
-
declare const _default: Readonly<import(
|
|
7
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
8
8
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
extendsExposableElements?: boolean;
|
|
3
|
+
ignoreIfAriaBusy?: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: Readonly<import(
|
|
5
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ariaVersion: '1.1' | '1.2' | '1.3';
|
|
6
|
-
fragmentRefersNameAttr: boolean;
|
|
7
|
-
}
|
|
8
|
-
>
|
|
9
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
2
|
+
ariaVersion: "1.1" | "1.2" | "1.3";
|
|
3
|
+
fragmentRefersNameAttr: boolean;
|
|
4
|
+
}>>;
|
|
10
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
2
|
+
ignore?: string | string[];
|
|
3
3
|
};
|
|
4
|
-
declare const _default: Readonly<import(
|
|
4
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import type { ChildNode, Options, Result, Specs } from './types';
|
|
2
2
|
import type { PermittedContentChoice } from '@markuplint/ml-spec';
|
|
3
3
|
import type { ReadonlyDeep } from 'type-fest';
|
|
4
|
-
export declare function choice(
|
|
5
|
-
pattern: ReadonlyDeep<PermittedContentChoice>,
|
|
6
|
-
elements: readonly ChildNode[],
|
|
7
|
-
specs: Specs,
|
|
8
|
-
options: Options,
|
|
9
|
-
depth: number,
|
|
10
|
-
): Result;
|
|
4
|
+
export declare function choice(pattern: ReadonlyDeep<PermittedContentChoice>, elements: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -11,10 +11,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
11
11
|
* @param depth
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
export declare function complexBranch(
|
|
15
|
-
pattern: ReadonlyDeep<PermittedContentPattern>,
|
|
16
|
-
elements: readonly ChildNode[],
|
|
17
|
-
specs: Specs,
|
|
18
|
-
options: Options,
|
|
19
|
-
depth: number,
|
|
20
|
-
): Result;
|
|
14
|
+
export declare function complexBranch(pattern: ReadonlyDeep<PermittedContentPattern>, elements: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type { ChildNode, Options, Result, Specs } from './types';
|
|
2
|
-
import type {
|
|
3
|
-
PermittedContentOneOrMore,
|
|
4
|
-
PermittedContentOptional,
|
|
5
|
-
PermittedContentRequire,
|
|
6
|
-
PermittedContentZeroOrMore,
|
|
7
|
-
} from '@markuplint/ml-spec';
|
|
2
|
+
import type { PermittedContentOneOrMore, PermittedContentOptional, PermittedContentRequire, PermittedContentZeroOrMore } from '@markuplint/ml-spec';
|
|
8
3
|
import type { ReadonlyDeep } from 'type-fest';
|
|
9
4
|
/**
|
|
10
5
|
* Check count
|
|
@@ -16,14 +11,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
16
11
|
* @param depth
|
|
17
12
|
* @returns
|
|
18
13
|
*/
|
|
19
|
-
export declare function countPattern(
|
|
20
|
-
pattern:
|
|
21
|
-
| ReadonlyDeep<PermittedContentOneOrMore>
|
|
22
|
-
| ReadonlyDeep<PermittedContentOptional>
|
|
23
|
-
| ReadonlyDeep<PermittedContentRequire>
|
|
24
|
-
| ReadonlyDeep<PermittedContentZeroOrMore>,
|
|
25
|
-
elements: readonly ChildNode[],
|
|
26
|
-
specs: Specs,
|
|
27
|
-
options: Options,
|
|
28
|
-
depth: number,
|
|
29
|
-
): Result;
|
|
14
|
+
export declare function countPattern(pattern: ReadonlyDeep<PermittedContentOneOrMore> | ReadonlyDeep<PermittedContentOptional> | ReadonlyDeep<PermittedContentRequire> | ReadonlyDeep<PermittedContentZeroOrMore>, elements: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/// <reference types="debug" />
|
|
2
|
-
export declare const cmLog: import(
|
|
2
|
+
export declare const cmLog: import("debug").Debugger;
|
|
3
3
|
export declare const bgGreen: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
(): void;
|
|
5
|
+
bold(): void;
|
|
6
6
|
};
|
|
7
7
|
export declare const green: {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
(): void;
|
|
9
|
+
bold(): void;
|
|
10
10
|
};
|
|
11
11
|
export declare const bgRed: {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
(): void;
|
|
13
|
+
bold(): void;
|
|
14
14
|
};
|
|
15
15
|
export declare const bgBlue: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
(): void;
|
|
17
|
+
bold(): void;
|
|
18
18
|
};
|
|
19
19
|
export declare const blue: {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
(): void;
|
|
21
|
+
bold(): void;
|
|
22
22
|
};
|
|
23
23
|
export declare const bgMagenta: {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
(): void;
|
|
25
|
+
bold(): void;
|
|
26
26
|
};
|
|
27
27
|
export declare const cyan: {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
(): void;
|
|
29
|
+
bold(): void;
|
|
30
30
|
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import type { ChildNode, Result, Specs } from './types';
|
|
2
2
|
export type SelectorResult = Result<'UNMATCHED_SELECTOR_BUT_MAY_EMPTY' | 'MISSING_NODE' | 'UNMATCHED_SELECTORS'>;
|
|
3
|
-
export declare function matchesSelector(
|
|
4
|
-
query: string,
|
|
5
|
-
node: ChildNode | undefined,
|
|
6
|
-
specs: Specs,
|
|
7
|
-
depth: number,
|
|
8
|
-
): SelectorResult;
|
|
3
|
+
export declare function matchesSelector(query: string, node: ChildNode | undefined, specs: Specs, depth: number): SelectorResult;
|
|
@@ -11,10 +11,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
11
11
|
* @param depth
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
export declare function order(
|
|
15
|
-
contents: ReadonlyDeep<PermittedContentPattern[]>,
|
|
16
|
-
nodes: readonly ChildNode[],
|
|
17
|
-
specs: Specs,
|
|
18
|
-
options: Options,
|
|
19
|
-
depth: number,
|
|
20
|
-
): Result;
|
|
14
|
+
export declare function order(contents: ReadonlyDeep<PermittedContentPattern[]>, nodes: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -2,10 +2,4 @@ import type { SelectorResult } from './matches-selector';
|
|
|
2
2
|
import type { ChildNode, Options, Specs } from './types';
|
|
3
3
|
import type { PermittedContentPattern, Model } from '@markuplint/ml-spec';
|
|
4
4
|
import type { ReadonlyDeep } from 'type-fest';
|
|
5
|
-
export declare function recursiveBranch(
|
|
6
|
-
model: ReadonlyDeep<Model | PermittedContentPattern[]>,
|
|
7
|
-
nodes: readonly ChildNode[],
|
|
8
|
-
specs: Specs,
|
|
9
|
-
options: Options,
|
|
10
|
-
depth: number,
|
|
11
|
-
): SelectorResult;
|
|
5
|
+
export declare function recursiveBranch(model: ReadonlyDeep<Model | PermittedContentPattern[]>, nodes: readonly ChildNode[], specs: Specs, options: Options, depth: number): SelectorResult;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { ChildNode, Options, Result, Specs } from './types';
|
|
2
2
|
export declare const transparentMode: Map<ChildNode, true>;
|
|
3
|
-
export declare function representTransparentNodes(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
options: Options,
|
|
7
|
-
): {
|
|
8
|
-
nodes: ChildNode[];
|
|
9
|
-
errors: Result[];
|
|
3
|
+
export declare function representTransparentNodes(nodes: ChildNode[], specs: Specs, options: Options): {
|
|
4
|
+
nodes: ChildNode[];
|
|
5
|
+
errors: Result[];
|
|
10
6
|
};
|
|
@@ -10,9 +10,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
10
10
|
* @param options
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
|
-
export declare function start(
|
|
14
|
-
contents: ReadonlyDeep<ContentModel['contents']>,
|
|
15
|
-
el: Element,
|
|
16
|
-
specs: Specs,
|
|
17
|
-
options: Options,
|
|
18
|
-
): ContentModelResult[];
|
|
13
|
+
export declare function start(contents: ReadonlyDeep<ContentModel['contents']>, el: Element, specs: Specs, options: Options): ContentModelResult[];
|