@markuplint/rules 3.9.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.
Files changed (57) hide show
  1. package/lib/attr-duplication/index.d.ts +1 -3
  2. package/lib/attr-value-quotes/index.d.ts +2 -2
  3. package/lib/case-sensitive-attr-name/index.d.ts +1 -1
  4. package/lib/case-sensitive-tag-name/index.d.ts +1 -1
  5. package/lib/character-reference/index.d.ts +1 -1
  6. package/lib/class-naming/index.d.ts +1 -1
  7. package/lib/create-message.d.ts +2 -12
  8. package/lib/deprecated-attr/index.d.ts +1 -3
  9. package/lib/deprecated-element/index.d.ts +1 -3
  10. package/lib/disallowed-element/index.d.ts +1 -1
  11. package/lib/doctype/index.d.ts +2 -2
  12. package/lib/end-tag/index.d.ts +1 -1
  13. package/lib/helpers.d.ts +16 -34
  14. package/lib/id-duplication/index.d.ts +1 -3
  15. package/lib/index.d.ts +99 -240
  16. package/lib/ineffective-attr/index.d.ts +1 -3
  17. package/lib/invalid-attr/index.d.ts +31 -38
  18. package/lib/label-has-control/index.d.ts +1 -3
  19. package/lib/landmark-roles/index.d.ts +3 -3
  20. package/lib/no-boolean-attr-value/index.d.ts +1 -3
  21. package/lib/no-default-value/index.d.ts +1 -3
  22. package/lib/no-empty-palpable-content/index.d.ts +3 -3
  23. package/lib/no-hard-code-id/index.d.ts +1 -3
  24. package/lib/no-refer-to-non-existent-id/index.d.ts +4 -9
  25. package/lib/no-use-event-handler-attr/index.d.ts +2 -2
  26. package/lib/permitted-contents/choice.d.ts +1 -7
  27. package/lib/permitted-contents/complex-branch.d.ts +1 -7
  28. package/lib/permitted-contents/count-pattern.d.ts +2 -17
  29. package/lib/permitted-contents/debug.browser.d.ts +15 -15
  30. package/lib/permitted-contents/debug.d.ts +1 -1
  31. package/lib/permitted-contents/index.d.ts +1 -1
  32. package/lib/permitted-contents/matches-selector.d.ts +1 -6
  33. package/lib/permitted-contents/order.d.ts +1 -7
  34. package/lib/permitted-contents/recursive-branch.d.ts +1 -7
  35. package/lib/permitted-contents/represent-transparent-nodes.d.ts +3 -7
  36. package/lib/permitted-contents/start.d.ts +1 -6
  37. package/lib/permitted-contents/types.d.ts +29 -29
  38. package/lib/permitted-contents/utils.d.ts +41 -90
  39. package/lib/placeholder-label-option/index.d.ts +1 -1
  40. package/lib/require-accessible-name/index.d.ts +2 -2
  41. package/lib/require-datetime/index.d.ts +2 -2
  42. package/lib/require-datetime/types.d.ts +2 -2
  43. package/lib/required-attr/index.d.ts +3 -3
  44. package/lib/required-element/index.d.ts +2 -2
  45. package/lib/required-h1/index.d.ts +3 -3
  46. package/lib/use-list/index.d.ts +2 -2
  47. package/lib/wai-aria/checkings/default-value.d.ts +3 -7
  48. package/lib/wai-aria/checkings/deprecated-props.d.ts +4 -8
  49. package/lib/wai-aria/checkings/disallowed-prop.d.ts +4 -8
  50. package/lib/wai-aria/checkings/implicit-props.d.ts +4 -8
  51. package/lib/wai-aria/checkings/no-global-prop.d.ts +3 -7
  52. package/lib/wai-aria/checkings/required-owned-elements.d.ts +3 -7
  53. package/lib/wai-aria/checkings/required-prop.d.ts +6 -12
  54. package/lib/wai-aria/checkings/value.d.ts +6 -15
  55. package/lib/wai-aria/index.d.ts +1 -1
  56. package/lib/wai-aria/types.d.ts +10 -10
  57. package/package.json +11 -11
@@ -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
- [P in Type]: Quote;
4
+ [P in Type]: Quote;
5
5
  };
6
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<Type, undefined>>;
6
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<Type, undefined>>;
7
7
  export default _default;
@@ -1,3 +1,3 @@
1
1
  export type Value = 'lower' | 'upper';
2
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<Value, undefined>>;
2
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<Value, undefined>>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
1
  export type Value = 'lower' | 'upper';
2
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<Value, undefined>>;
2
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<Value, undefined>>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import type { RuleConfigValue } from '@markuplint/ml-config';
2
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<RuleConfigValue, undefined>>;
2
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<RuleConfigValue, undefined>>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
1
  export type Value = string | string[] | null;
2
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<Value, undefined>>;
2
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<Value, undefined>>;
3
3
  export default _default;
@@ -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
- t: Translator,
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('@markuplint/ml-core').RuleSeed<string[], undefined>>;
1
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<string[], undefined>>;
2
2
  export default _default;
@@ -1,5 +1,5 @@
1
1
  type Option = {
2
- denyObsoleteType: boolean;
2
+ denyObsoleteType: boolean;
3
3
  };
4
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<'always', Option>>;
4
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<"always", Option>>;
5
5
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: Readonly<import('@markuplint/ml-core').RuleSeed<boolean, undefined>>;
1
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
2
2
  export default _default;
package/lib/helpers.d.ts CHANGED
@@ -4,10 +4,7 @@ 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
6
  import type { WritableDeep } from 'type-fest';
7
- export declare function attrMatches<T extends RuleConfigValue, O extends PlainData>(
8
- node: Element<T, O>,
9
- condition: Attribute['condition'],
10
- ): boolean;
7
+ export declare function attrMatches<T extends RuleConfigValue, O extends PlainData>(node: Element<T, O>, condition: Attribute['condition']): boolean;
11
8
  export declare function match(needle: string, pattern: string): boolean;
12
9
  /**
13
10
  * PotentialCustomElementName
@@ -25,38 +22,23 @@ export declare function match(needle: string, pattern: string): boolean;
25
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.
26
23
  */
27
24
  export declare const rePCENChar: string;
28
- export declare function isValidAttr(
29
- t: Translator,
30
- name: string,
31
- value: string,
32
- isDynamicValue: boolean,
33
- node: Element<any, any>,
34
- attrSpecs: readonly Attribute[],
35
- log?: Log,
36
- ):
37
- | false
38
- | {
39
- invalidType: 'non-existent' | 'invalid-value' | 'disallowed-attr';
40
- message: string;
41
- loc?:
42
- | {
43
- raw: string;
44
- line: number;
45
- col: number;
46
- }
47
- | undefined;
48
- };
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
+ };
49
34
  export declare function toNormalizedValue(value: string, spec: Attribute): string;
50
35
  export declare function accnameMayBeMutable(el: Element<any, any>, document: Document<any, any>): boolean;
51
- export declare function getOwnedLabel<V extends RuleConfigValue, O extends PlainData>(
52
- el: Element<V, O>,
53
- document: Document<V, O>,
54
- ): 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;
55
37
  export declare class Collection<T> {
56
- #private;
57
- constructor(...items: readonly (T | null | undefined)[]);
58
- [Symbol.iterator](): Iterator<T>;
59
- add(...items: readonly (T | null | undefined)[]): void;
60
- toArray(): readonly T[];
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[];
61
43
  }
62
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
@@ -1,243 +1,102 @@
1
1
  declare const rules: {
2
- readonly 'attr-duplication': Readonly<
3
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
4
- >;
5
- readonly 'attr-value-quotes': Readonly<
6
- import('@markuplint/ml-core').RuleSeed<import('./attr-value-quotes').Type, undefined>
7
- >;
8
- readonly 'case-sensitive-attr-name': Readonly<
9
- import('@markuplint/ml-core').RuleSeed<import('./case-sensitive-attr-name').Value, undefined>
10
- >;
11
- readonly 'case-sensitive-tag-name': Readonly<
12
- import('@markuplint/ml-core').RuleSeed<import('./case-sensitive-tag-name').Value, undefined>
13
- >;
14
- readonly 'character-reference': Readonly<
15
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
16
- >;
17
- readonly 'class-naming': Readonly<
18
- import('@markuplint/ml-core').RuleSeed<import('./class-naming').Value, undefined>
19
- >;
20
- readonly 'deprecated-attr': Readonly<
21
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
22
- >;
23
- readonly 'deprecated-element': Readonly<
24
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
25
- >;
26
- readonly 'disallowed-element': Readonly<import('@markuplint/ml-core').RuleSeed<string[], undefined>>;
27
- readonly doctype: Readonly<
28
- import('@markuplint/ml-core').RuleSeed<
29
- 'always',
30
- {
31
- denyObsoleteType: boolean;
32
- }
33
- >
34
- >;
35
- readonly 'end-tag': Readonly<import('@markuplint/ml-core').RuleSeed<boolean, undefined>>;
36
- readonly 'id-duplication': Readonly<
37
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
38
- >;
39
- readonly 'ineffective-attr': Readonly<
40
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
41
- >;
42
- readonly 'invalid-attr': Readonly<
43
- import('@markuplint/ml-core').RuleSeed<
44
- boolean,
45
- {
46
- allowAttrs?:
47
- | Record<
48
- string,
49
- | {
50
- enum: [string, ...string[]];
51
- }
52
- | {
53
- pattern: string;
54
- }
55
- | {
56
- type: import('packages/@markuplint/ml-spec/lib').AttributeType;
57
- }
58
- >
59
- | (
60
- | string
61
- | {
62
- name: string;
63
- value:
64
- | import('packages/@markuplint/ml-spec/lib').AttributeType
65
- | (
66
- | {
67
- enum: [string, ...string[]];
68
- }
69
- | {
70
- pattern: string;
71
- }
72
- | {
73
- type: import('packages/@markuplint/ml-spec/lib').AttributeType;
74
- }
75
- );
76
- }
77
- )[]
78
- | undefined;
79
- disallowAttrs?:
80
- | Record<
81
- string,
82
- | {
83
- enum: [string, ...string[]];
84
- }
85
- | {
86
- pattern: string;
87
- }
88
- | {
89
- type: import('packages/@markuplint/ml-spec/lib').AttributeType;
90
- }
91
- >
92
- | (
93
- | string
94
- | {
95
- name: string;
96
- value:
97
- | import('packages/@markuplint/ml-spec/lib').AttributeType
98
- | (
99
- | {
100
- enum: [string, ...string[]];
101
- }
102
- | {
103
- pattern: string;
104
- }
105
- | {
106
- type: import('packages/@markuplint/ml-spec/lib').AttributeType;
107
- }
108
- );
109
- }
110
- )[]
111
- | undefined;
112
- ignoreAttrNamePrefix?: string | string[] | undefined;
113
- allowToAddPropertiesForPretender?: boolean | undefined;
114
- attrs?:
115
- | Record<
116
- string,
117
- | (
118
- | {
119
- enum: [string, ...string[]];
120
- }
121
- | {
122
- pattern: string;
123
- }
124
- | {
125
- type: import('packages/@markuplint/ml-spec/lib').AttributeType;
126
- }
127
- )
128
- | {
129
- disallowed: true;
130
- }
131
- >
132
- | undefined;
133
- }
134
- >
135
- >;
136
- readonly 'label-has-control': Readonly<
137
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
138
- >;
139
- readonly 'landmark-roles': Readonly<
140
- import('@markuplint/ml-core').RuleSeed<
141
- boolean,
142
- {
143
- ignoreRoles: (
144
- | ('banner' | 'main' | 'complementary' | 'contentinfo')
145
- | 'form'
146
- | 'navigation'
147
- | 'region'
148
- )[];
149
- labelEachArea: boolean;
150
- }
151
- >
152
- >;
153
- readonly 'no-boolean-attr-value': Readonly<
154
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
155
- >;
156
- readonly 'no-default-value': Readonly<
157
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
158
- >;
159
- readonly 'no-empty-palpable-content': Readonly<
160
- import('@markuplint/ml-core').RuleSeed<
161
- boolean,
162
- {
163
- extendsExposableElements?: boolean | undefined;
164
- ignoreIfAriaBusy?: boolean | undefined;
165
- }
166
- >
167
- >;
168
- readonly 'no-hard-code-id': Readonly<
169
- import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
170
- >;
171
- readonly 'no-refer-to-non-existent-id': Readonly<
172
- import('@markuplint/ml-core').RuleSeed<
173
- import('@markuplint/ml-core').RuleConfigValue,
174
- {
175
- ariaVersion: '1.1' | '1.2' | '1.3';
176
- fragmentRefersNameAttr: boolean;
177
- }
178
- >
179
- >;
180
- readonly 'no-use-event-handler-attr': Readonly<
181
- import('@markuplint/ml-core').RuleSeed<
182
- boolean,
183
- {
184
- ignore?: string | string[] | undefined;
185
- }
186
- >
187
- >;
188
- readonly 'permitted-contents': Readonly<
189
- import('@markuplint/ml-core').RuleSeed<
190
- import('./permitted-contents/types').TagRule[],
191
- import('./permitted-contents/types').Options
192
- >
193
- >;
194
- readonly 'placeholder-label-option': Readonly<import('@markuplint/ml-core').RuleSeed<boolean, undefined>>;
195
- readonly 'require-accessible-name': Readonly<
196
- import('@markuplint/ml-core').RuleSeed<
197
- boolean,
198
- {
199
- ariaVersion: '1.1' | '1.2' | '1.3';
200
- }
201
- >
202
- >;
203
- readonly 'require-datetime': Readonly<
204
- import('@markuplint/ml-core').RuleSeed<
205
- boolean,
206
- {
207
- langs?: import('./require-datetime/types').Lang[] | undefined;
208
- }
209
- >
210
- >;
211
- readonly 'required-attr': Readonly<
212
- import('@markuplint/ml-core').RuleSeed<
213
- | string
214
- | (
215
- | string
216
- | {
217
- name: string;
218
- value?: string | string[] | undefined;
219
- }
220
- )[],
221
- undefined
222
- >
223
- >;
224
- readonly 'required-element': Readonly<
225
- import('@markuplint/ml-core').RuleSeed<
226
- string[],
227
- {
228
- ignoreHasMutableContents: boolean;
229
- }
230
- >
231
- >;
232
- readonly 'required-h1': Readonly<import('@markuplint/ml-core').RuleSeed<boolean, import('./required-h1').Options>>;
233
- readonly 'use-list': Readonly<
234
- import('@markuplint/ml-core').RuleSeed<
235
- readonly string[],
236
- {
237
- spaceNeededBullets?: string[] | undefined;
238
- }
239
- >
240
- >;
241
- readonly 'wai-aria': Readonly<import('@markuplint/ml-core').RuleSeed<boolean, import('./wai-aria/types').Options>>;
2
+ readonly 'attr-duplication': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
3
+ readonly 'attr-value-quotes': Readonly<import("@markuplint/ml-core").RuleSeed<import("./attr-value-quotes").Type, undefined>>;
4
+ readonly 'case-sensitive-attr-name': Readonly<import("@markuplint/ml-core").RuleSeed<import("./case-sensitive-attr-name").Value, undefined>>;
5
+ readonly 'case-sensitive-tag-name': Readonly<import("@markuplint/ml-core").RuleSeed<import("./case-sensitive-tag-name").Value, undefined>>;
6
+ readonly 'character-reference': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
7
+ readonly 'class-naming': Readonly<import("@markuplint/ml-core").RuleSeed<import("./class-naming").Value, undefined>>;
8
+ readonly 'deprecated-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
9
+ readonly 'deprecated-element': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
10
+ readonly 'disallowed-element': Readonly<import("@markuplint/ml-core").RuleSeed<string[], undefined>>;
11
+ readonly doctype: Readonly<import("@markuplint/ml-core").RuleSeed<"always", {
12
+ denyObsoleteType: boolean;
13
+ }>>;
14
+ readonly 'end-tag': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
15
+ readonly 'id-duplication': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
16
+ readonly 'ineffective-attr': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
17
+ readonly 'invalid-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
18
+ allowAttrs?: Record<string, {
19
+ enum: [string, ...string[]];
20
+ } | {
21
+ pattern: string;
22
+ } | {
23
+ type: import("packages/@markuplint/ml-spec/lib").AttributeType;
24
+ }> | (string | {
25
+ name: string;
26
+ value: import("packages/@markuplint/ml-spec/lib").AttributeType | ({
27
+ enum: [string, ...string[]];
28
+ } | {
29
+ pattern: string;
30
+ } | {
31
+ type: import("packages/@markuplint/ml-spec/lib").AttributeType;
32
+ });
33
+ })[] | undefined;
34
+ disallowAttrs?: Record<string, {
35
+ enum: [string, ...string[]];
36
+ } | {
37
+ pattern: string;
38
+ } | {
39
+ type: import("packages/@markuplint/ml-spec/lib").AttributeType;
40
+ }> | (string | {
41
+ name: string;
42
+ value: import("packages/@markuplint/ml-spec/lib").AttributeType | ({
43
+ enum: [string, ...string[]];
44
+ } | {
45
+ pattern: string;
46
+ } | {
47
+ type: import("packages/@markuplint/ml-spec/lib").AttributeType;
48
+ });
49
+ })[] | undefined;
50
+ ignoreAttrNamePrefix?: string | string[] | undefined;
51
+ allowToAddPropertiesForPretender?: boolean | undefined;
52
+ attrs?: Record<string, ({
53
+ enum: [string, ...string[]];
54
+ } | {
55
+ pattern: string;
56
+ } | {
57
+ type: import("packages/@markuplint/ml-spec/lib").AttributeType;
58
+ }) | {
59
+ disallowed: true;
60
+ }> | undefined;
61
+ }>>;
62
+ readonly 'label-has-control': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
63
+ readonly 'landmark-roles': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
64
+ ignoreRoles: (("banner" | "main" | "complementary" | "contentinfo") | "form" | "navigation" | "region")[];
65
+ labelEachArea: boolean;
66
+ }>>;
67
+ readonly 'no-boolean-attr-value': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
68
+ readonly 'no-default-value': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
69
+ readonly 'no-empty-palpable-content': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
70
+ extendsExposableElements?: boolean | undefined;
71
+ ignoreIfAriaBusy?: boolean | undefined;
72
+ }>>;
73
+ readonly 'no-hard-code-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
74
+ readonly 'no-refer-to-non-existent-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
75
+ ariaVersion: "1.1" | "1.2" | "1.3";
76
+ fragmentRefersNameAttr: boolean;
77
+ }>>;
78
+ readonly 'no-use-event-handler-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
79
+ ignore?: string | string[] | undefined;
80
+ }>>;
81
+ readonly 'permitted-contents': Readonly<import("@markuplint/ml-core").RuleSeed<import("./permitted-contents/types").TagRule[], import("./permitted-contents/types").Options>>;
82
+ readonly 'placeholder-label-option': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
83
+ readonly 'require-accessible-name': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
84
+ ariaVersion: "1.1" | "1.2" | "1.3";
85
+ }>>;
86
+ readonly 'require-datetime': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
87
+ langs?: import("./require-datetime/types").Lang[] | undefined;
88
+ }>>;
89
+ readonly 'required-attr': Readonly<import("@markuplint/ml-core").RuleSeed<string | (string | {
90
+ name: string;
91
+ value?: string | string[] | undefined;
92
+ })[], undefined>>;
93
+ readonly 'required-element': Readonly<import("@markuplint/ml-core").RuleSeed<string[], {
94
+ ignoreHasMutableContents: boolean;
95
+ }>>;
96
+ readonly 'required-h1': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./required-h1").Options>>;
97
+ readonly 'use-list': Readonly<import("@markuplint/ml-core").RuleSeed<readonly string[], {
98
+ spaceNeededBullets?: string[] | undefined;
99
+ }>>;
100
+ readonly 'wai-aria': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types").Options>>;
242
101
  };
243
102
  export default rules;
@@ -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
- * @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<
22
- string,
23
- | ValueRule
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
- name: string;
31
- value: AttributeType | ValueRule;
26
+ name: string;
27
+ value: AttributeType | ValueRule;
32
28
  };
33
- type ValueRule =
34
- | {
35
- enum: [string, ...string[]];
36
- }
37
- | {
38
- pattern: string;
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
- ignoreRoles: Roles[];
3
- labelEachArea: boolean;
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('@markuplint/ml-core').RuleSeed<boolean, Options>>;
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;