@markuplint/rules 2.0.0 → 2.2.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-check.d.ts +8 -19
- package/lib/attr-duplication/index.d.ts +1 -1
- package/lib/attr-equal-space-after/index.d.ts +1 -1
- package/lib/attr-equal-space-before/index.d.ts +1 -1
- package/lib/attr-spacing/index.d.ts +3 -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 -1
- package/lib/deprecated-element/index.d.ts +1 -1
- 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 +42 -74
- package/lib/helpers.js +1 -0
- package/lib/id-duplication/index.d.ts +1 -1
- package/lib/indentation/index.d.ts +3 -3
- package/lib/index.d.ts +62 -147
- package/lib/index.js +2 -0
- package/lib/ineffective-attr/index.d.ts +1 -1
- package/lib/invalid-attr/index.d.ts +12 -16
- package/lib/landmark-roles/index.d.ts +3 -3
- package/lib/no-boolean-attr-value/index.d.ts +1 -1
- package/lib/no-boolean-attr-value/index.js +1 -1
- package/lib/no-default-value/index.d.ts +1 -1
- package/lib/no-default-value/index.js +3 -3
- package/lib/no-hard-code-id/index.d.ts +1 -1
- package/lib/no-hard-code-id/index.js +3 -4
- package/lib/no-refer-to-non-existent-id/index.d.ts +1 -1
- package/lib/no-refer-to-non-existent-id/index.js +12 -12
- package/lib/no-use-event-handler-attr/index.d.ts +2 -2
- package/lib/permitted-contents/index.d.ts +2 -2
- package/lib/permitted-contents/index.js +1 -0
- package/lib/permitted-contents/permitted-content.spec-to-regexp.d.ts +8 -8
- package/lib/require-accessible-name/index.d.ts +2 -0
- package/lib/require-accessible-name/index.js +22 -0
- package/lib/required-attr/index.d.ts +3 -3
- package/lib/required-attr/index.js +1 -1
- package/lib/required-element/index.d.ts +2 -2
- package/lib/required-h1/index.d.ts +3 -3
- package/lib/wai-aria/index.d.ts +7 -7
- package/package.json +4 -4
- package/schema.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
package/lib/attr-check.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Translator } from '@markuplint/i18n';
|
|
2
2
|
import type { Attribute as AttrSpec, AttributeType } from '@markuplint/ml-spec';
|
|
3
3
|
declare type Invalid = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
invalidType: 'non-existent' | 'invalid-value';
|
|
5
|
+
message: string;
|
|
6
|
+
loc?: Loc;
|
|
7
7
|
};
|
|
8
8
|
declare type Loc = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
raw: string;
|
|
10
|
+
line: number;
|
|
11
|
+
col: number;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Use in rules `invalid-attr` and `wai-aria`
|
|
@@ -18,17 +18,6 @@ declare type Loc = {
|
|
|
18
18
|
* @param isCustomRule
|
|
19
19
|
* @param spec
|
|
20
20
|
*/
|
|
21
|
-
export declare function attrCheck(
|
|
22
|
-
|
|
23
|
-
name: string,
|
|
24
|
-
value: string,
|
|
25
|
-
isCustomRule: boolean,
|
|
26
|
-
spec?: AttrSpec,
|
|
27
|
-
): Invalid | false;
|
|
28
|
-
export declare function valueCheck(
|
|
29
|
-
t: Translator,
|
|
30
|
-
name: string,
|
|
31
|
-
value: string,
|
|
32
|
-
type: AttributeType,
|
|
33
|
-
): string | [string, Loc] | false;
|
|
21
|
+
export declare function attrCheck(t: Translator, name: string, value: string, isCustomRule: boolean, spec?: AttrSpec): Invalid | false;
|
|
22
|
+
export declare function valueCheck(t: Translator, name: string, value: string, type: AttributeType): string | [string, Loc] | false;
|
|
34
23
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface AttrSpasingOptions {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
lineBreak?: 'either' | 'always' | 'never';
|
|
3
|
+
width?: number | false;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import(
|
|
5
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, AttrSpasingOptions>;
|
|
6
6
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare type Type = 'double' | 'single';
|
|
2
2
|
export declare type Quote = '"' | "'";
|
|
3
3
|
export declare type QuoteMap = {
|
|
4
|
-
|
|
4
|
+
[P in Type]: Quote;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: import(
|
|
6
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<Type, null>;
|
|
7
7
|
export default _default;
|
|
@@ -3,5 +3,5 @@ export declare type Value = 'lower' | 'upper';
|
|
|
3
3
|
* @deprecated
|
|
4
4
|
*/
|
|
5
5
|
export declare type Value_v1 = 'no-upper' | 'no-lower';
|
|
6
|
-
declare const _default: import(
|
|
6
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<Value | Value_v1, null>;
|
|
7
7
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
package/lib/create-message.d.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import type { Translator } from '@markuplint/i18n';
|
|
2
2
|
import type { AttributeType } from '@markuplint/ml-spec';
|
|
3
3
|
import type { UnmatchedResult } from '@markuplint/types';
|
|
4
|
-
export declare function createMessageValueExpected(
|
|
5
|
-
|
|
6
|
-
baseTarget: string,
|
|
7
|
-
type: AttributeType,
|
|
8
|
-
matches: UnmatchedResult,
|
|
9
|
-
): string;
|
|
10
|
-
export declare function __createMessageValueExpected(
|
|
11
|
-
t: Translator,
|
|
12
|
-
baseTarget: string,
|
|
13
|
-
expected: string | null,
|
|
14
|
-
matches: Pick<UnmatchedResult, 'partName' | 'reason' | 'raw' | 'candicate' | 'ref' | 'extra'>,
|
|
15
|
-
): string;
|
|
4
|
+
export declare function createMessageValueExpected(t: Translator, baseTarget: string, type: AttributeType, matches: UnmatchedResult): string;
|
|
5
|
+
export declare function __createMessageValueExpected(t: Translator, baseTarget: string, expected: string | null, matches: Pick<UnmatchedResult, 'partName' | 'reason' | 'raw' | 'candicate' | 'ref' | 'extra'>): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<string[], null>;
|
|
2
2
|
export default _default;
|
package/lib/doctype/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type Option = {
|
|
2
|
-
|
|
2
|
+
denyObsolateType: boolean;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import(
|
|
4
|
+
declare const _default: 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: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, null>;
|
|
2
2
|
export default _default;
|
package/lib/helpers.d.ts
CHANGED
|
@@ -2,10 +2,7 @@ import type { Log } from './debug';
|
|
|
2
2
|
import type { Translator } from '@markuplint/i18n';
|
|
3
3
|
import type { Element, RuleConfigValue } from '@markuplint/ml-core';
|
|
4
4
|
import type { ARIRRoleAttribute, Attribute, MLMLSpec, PermittedRoles } from '@markuplint/ml-spec';
|
|
5
|
-
export declare function attrMatches<T extends RuleConfigValue, R>(
|
|
6
|
-
node: Element<T, R>,
|
|
7
|
-
condition: Attribute['condition'],
|
|
8
|
-
): boolean;
|
|
5
|
+
export declare function attrMatches<T extends RuleConfigValue, R>(node: Element<T, R>, condition: Attribute['condition']): boolean;
|
|
9
6
|
export declare function match(needle: string, pattern: string): boolean;
|
|
10
7
|
/**
|
|
11
8
|
* PotentialCustomElementName
|
|
@@ -23,44 +20,27 @@ export declare function match(needle: string, pattern: string): boolean;
|
|
|
23
20
|
* 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.
|
|
24
21
|
*/
|
|
25
22
|
export declare const rePCENChar: string;
|
|
26
|
-
export declare function htmlSpec(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
attrSpecs: Attribute[],
|
|
37
|
-
log?: Log,
|
|
38
|
-
):
|
|
39
|
-
| false
|
|
40
|
-
| {
|
|
41
|
-
invalidType: 'non-existent' | 'invalid-value';
|
|
42
|
-
message: string;
|
|
43
|
-
loc?:
|
|
44
|
-
| {
|
|
45
|
-
raw: string;
|
|
46
|
-
line: number;
|
|
47
|
-
col: number;
|
|
48
|
-
}
|
|
49
|
-
| undefined;
|
|
50
|
-
};
|
|
23
|
+
export declare function htmlSpec(specs: Readonly<MLMLSpec>, nameWithNS: string): import("@markuplint/ml-spec").ElementSpec | null;
|
|
24
|
+
export declare function isValidAttr(t: Translator, name: string, value: string, isDynamicValue: boolean, node: Element<any, any>, attrSpecs: Attribute[], log?: Log): false | {
|
|
25
|
+
invalidType: "non-existent" | "invalid-value";
|
|
26
|
+
message: string;
|
|
27
|
+
loc?: {
|
|
28
|
+
raw: string;
|
|
29
|
+
line: number;
|
|
30
|
+
col: number;
|
|
31
|
+
} | undefined;
|
|
32
|
+
};
|
|
51
33
|
export declare function toNormalizedValue(value: string, spec: Attribute): string;
|
|
52
34
|
export declare function ariaSpec(specs: Readonly<MLMLSpec>): {
|
|
53
|
-
|
|
54
|
-
|
|
35
|
+
roles: ARIRRoleAttribute[];
|
|
36
|
+
ariaAttrs: import("@markuplint/ml-spec").ARIAAttribute[];
|
|
55
37
|
};
|
|
56
|
-
export declare function getRoleSpec(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
statesAndProps: import('@markuplint/ml-spec').ARIARoleOwnedPropOrState[];
|
|
63
|
-
superClassRoles: ARIRRoleAttribute[];
|
|
38
|
+
export declare function getRoleSpec(specs: Readonly<MLMLSpec>, roleName: string): {
|
|
39
|
+
name: string;
|
|
40
|
+
isAbstract: boolean;
|
|
41
|
+
accessibleNameRequired: boolean;
|
|
42
|
+
statesAndProps: import("@markuplint/ml-spec").ARIARoleOwnedPropOrState[];
|
|
43
|
+
superClassRoles: ARIRRoleAttribute[];
|
|
64
44
|
} | null;
|
|
65
45
|
/**
|
|
66
46
|
* Getting permitted ARIA roles.
|
|
@@ -71,12 +51,9 @@ export declare function getRoleSpec(
|
|
|
71
51
|
*/
|
|
72
52
|
export declare function getPermittedRoles(specs: Readonly<MLMLSpec>, el: Element<any, any>): PermittedRoles;
|
|
73
53
|
export declare function getImplicitRole(specs: Readonly<MLMLSpec>, el: Element<any, any>): string | false;
|
|
74
|
-
export declare function getComputedRole(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
): {
|
|
78
|
-
name: string;
|
|
79
|
-
isImplicit: boolean;
|
|
54
|
+
export declare function getComputedRole(specs: Readonly<MLMLSpec>, el: Element<any, any>): {
|
|
55
|
+
name: string;
|
|
56
|
+
isImplicit: boolean;
|
|
80
57
|
} | null;
|
|
81
58
|
/**
|
|
82
59
|
*
|
|
@@ -87,32 +64,23 @@ export declare function getComputedRole(
|
|
|
87
64
|
* @param tokenEnum
|
|
88
65
|
*/
|
|
89
66
|
export declare function checkAriaValue(type: string, value: string, tokenEnum: string[]): boolean;
|
|
90
|
-
export declare function checkAria(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
role: string[];
|
|
111
|
-
value: import('@markuplint/ml-spec').ARIAAttributeValue;
|
|
112
|
-
}[]
|
|
113
|
-
| undefined;
|
|
114
|
-
enum: string[];
|
|
115
|
-
defaultValue?: string | undefined;
|
|
116
|
-
equivalentHtmlAttrs?: import('@markuplint/ml-spec').EquivalentHtmlAttr[] | undefined;
|
|
117
|
-
valueDescriptions?: Record<string, string> | undefined;
|
|
118
|
-
};
|
|
67
|
+
export declare function checkAria(specs: Readonly<MLMLSpec>, attrName: string, currentValue: string, role?: string): {
|
|
68
|
+
currentValue: string;
|
|
69
|
+
isValid: boolean;
|
|
70
|
+
} | {
|
|
71
|
+
currentValue: string;
|
|
72
|
+
isValid: boolean;
|
|
73
|
+
name: string;
|
|
74
|
+
type: "property" | "state";
|
|
75
|
+
deprecated?: true | undefined;
|
|
76
|
+
isGlobal?: true | undefined;
|
|
77
|
+
value: import("@markuplint/ml-spec").ARIAAttributeValue;
|
|
78
|
+
conditionalValue?: {
|
|
79
|
+
role: string[];
|
|
80
|
+
value: import("@markuplint/ml-spec").ARIAAttributeValue;
|
|
81
|
+
}[] | undefined;
|
|
82
|
+
enum: string[];
|
|
83
|
+
defaultValue?: string | undefined;
|
|
84
|
+
equivalentHtmlAttrs?: import("@markuplint/ml-spec").EquivalentHtmlAttr[] | undefined;
|
|
85
|
+
valueDescriptions?: Record<string, string> | undefined;
|
|
86
|
+
};
|
package/lib/helpers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare type Value = 'tab' | number;
|
|
2
2
|
export interface IndentationOptions {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
alignment?: boolean;
|
|
4
|
+
'indent-nested-nodes'?: boolean | 'always' | 'never';
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import(
|
|
6
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<Value, IndentationOptions>;
|
|
7
7
|
export default _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,150 +1,65 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
| Record<
|
|
65
|
-
string,
|
|
66
|
-
| {
|
|
67
|
-
enum: [string, ...string[]];
|
|
68
|
-
}
|
|
69
|
-
| {
|
|
70
|
-
pattern: string;
|
|
71
|
-
}
|
|
72
|
-
| {
|
|
73
|
-
type: import('packages/@markuplint/ml-spec/lib').AttributeType;
|
|
74
|
-
}
|
|
75
|
-
| {
|
|
76
|
-
disallowed: true;
|
|
77
|
-
}
|
|
78
|
-
>
|
|
79
|
-
| undefined;
|
|
80
|
-
ignoreAttrNamePrefix?: string | string[] | undefined;
|
|
81
|
-
}
|
|
82
|
-
>;
|
|
83
|
-
'landmark-roles': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
84
|
-
boolean,
|
|
85
|
-
{
|
|
86
|
-
ignoreRoles?:
|
|
87
|
-
| (('banner' | 'main' | 'complementary' | 'contentinfo') | 'form' | 'navigation' | 'region')[]
|
|
88
|
-
| undefined;
|
|
89
|
-
labelEachArea?: boolean | undefined;
|
|
90
|
-
}
|
|
91
|
-
>;
|
|
92
|
-
'no-boolean-attr-value': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
93
|
-
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
94
|
-
null
|
|
95
|
-
>;
|
|
96
|
-
'no-default-value': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
97
|
-
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
98
|
-
null
|
|
99
|
-
>;
|
|
100
|
-
'no-hard-code-id': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
101
|
-
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
102
|
-
null
|
|
103
|
-
>;
|
|
104
|
-
'no-refer-to-non-existent-id': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
105
|
-
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
106
|
-
null
|
|
107
|
-
>;
|
|
108
|
-
'no-use-event-handler-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
109
|
-
boolean,
|
|
110
|
-
{
|
|
111
|
-
ignore?: string | string[] | undefined;
|
|
112
|
-
}
|
|
113
|
-
>;
|
|
114
|
-
'permitted-contents': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
115
|
-
import('packages/@markuplint/ml-spec/lib').PermittedStructuresSchema[],
|
|
116
|
-
{
|
|
117
|
-
ignoreHasMutableChildren: boolean;
|
|
118
|
-
}
|
|
119
|
-
>;
|
|
120
|
-
'required-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
121
|
-
| string
|
|
122
|
-
| (
|
|
123
|
-
| string
|
|
124
|
-
| {
|
|
125
|
-
name: string;
|
|
126
|
-
value: string | string[];
|
|
127
|
-
}
|
|
128
|
-
)[],
|
|
129
|
-
null
|
|
130
|
-
>;
|
|
131
|
-
'required-element': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
132
|
-
string[],
|
|
133
|
-
{
|
|
134
|
-
ignoreHasMutableContents?: boolean | undefined;
|
|
135
|
-
}
|
|
136
|
-
>;
|
|
137
|
-
'required-h1': import('packages/@markuplint/ml-core/lib').RuleSeed<boolean, import('./required-h1').Options>;
|
|
138
|
-
'wai-aria': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
139
|
-
boolean,
|
|
140
|
-
{
|
|
141
|
-
checkingValue?: boolean | undefined;
|
|
142
|
-
checkingDeprecatedProps?: boolean | undefined;
|
|
143
|
-
permittedAriaRoles?: boolean | undefined;
|
|
144
|
-
disallowSetImplicitRole?: boolean | undefined;
|
|
145
|
-
disallowSetImplicitProps?: boolean | undefined;
|
|
146
|
-
disallowDefaultValue?: boolean | undefined;
|
|
147
|
-
}
|
|
148
|
-
>;
|
|
2
|
+
'attr-duplication': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
3
|
+
'attr-equal-space-after': import("packages/@markuplint/ml-core/lib").RuleSeed<"always" | "never" | "always-single-line" | "never-single-line", null>;
|
|
4
|
+
'attr-equal-space-before': import("packages/@markuplint/ml-core/lib").RuleSeed<"always" | "never" | "always-single-line" | "never-single-line", null>;
|
|
5
|
+
'attr-spacing': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, import("./attr-spacing").AttrSpasingOptions>;
|
|
6
|
+
'attr-value-quotes': import("packages/@markuplint/ml-core/lib").RuleSeed<import("./attr-value-quotes").Type, null>;
|
|
7
|
+
'case-sensitive-attr-name': import("packages/@markuplint/ml-core/lib").RuleSeed<import("./case-sensitive-attr-name").Value | import("./case-sensitive-attr-name").Value_v1, null>;
|
|
8
|
+
'case-sensitive-tag-name': import("packages/@markuplint/ml-core/lib").RuleSeed<import("./case-sensitive-tag-name").Value, null>;
|
|
9
|
+
'character-reference': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
10
|
+
'class-naming': import("packages/@markuplint/ml-core/lib").RuleSeed<import("./class-naming").Value, null>;
|
|
11
|
+
'deprecated-attr': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
12
|
+
'deprecated-element': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
13
|
+
'disallowed-element': import("packages/@markuplint/ml-core/lib").RuleSeed<string[], null>;
|
|
14
|
+
doctype: import("packages/@markuplint/ml-core/lib").RuleSeed<"always", {
|
|
15
|
+
denyObsolateType: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
'end-tag': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, null>;
|
|
18
|
+
'id-duplication': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
19
|
+
indentation: import("packages/@markuplint/ml-core/lib").RuleSeed<import("./indentation").Value, import("./indentation").IndentationOptions>;
|
|
20
|
+
'ineffective-attr': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
21
|
+
'invalid-attr': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, {
|
|
22
|
+
attrs?: Record<string, {
|
|
23
|
+
enum: [string, ...string[]];
|
|
24
|
+
} | {
|
|
25
|
+
pattern: string;
|
|
26
|
+
} | {
|
|
27
|
+
type: import("packages/@markuplint/ml-spec/lib").AttributeType;
|
|
28
|
+
} | {
|
|
29
|
+
disallowed: true;
|
|
30
|
+
}> | undefined;
|
|
31
|
+
ignoreAttrNamePrefix?: string | string[] | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
'landmark-roles': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, {
|
|
34
|
+
ignoreRoles?: (("banner" | "main" | "complementary" | "contentinfo") | "form" | "navigation" | "region")[] | undefined;
|
|
35
|
+
labelEachArea?: boolean | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
'no-boolean-attr-value': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
38
|
+
'no-default-value': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
39
|
+
'no-hard-code-id': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
40
|
+
'no-refer-to-non-existent-id': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-config/src").RuleConfigValue, null>;
|
|
41
|
+
'no-use-event-handler-attr': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, {
|
|
42
|
+
ignore?: string | string[] | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
'permitted-contents': import("packages/@markuplint/ml-core/lib").RuleSeed<import("packages/@markuplint/ml-spec/lib").PermittedStructuresSchema[], {
|
|
45
|
+
ignoreHasMutableChildren: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
'require-accessible-name': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, null>;
|
|
48
|
+
'required-attr': import("packages/@markuplint/ml-core/lib").RuleSeed<string | (string | {
|
|
49
|
+
name: string;
|
|
50
|
+
value: string | string[];
|
|
51
|
+
})[], null>;
|
|
52
|
+
'required-element': import("packages/@markuplint/ml-core/lib").RuleSeed<string[], {
|
|
53
|
+
ignoreHasMutableContents?: boolean | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
'required-h1': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, import("./required-h1").Options>;
|
|
56
|
+
'wai-aria': import("packages/@markuplint/ml-core/lib").RuleSeed<boolean, {
|
|
57
|
+
checkingValue?: boolean | undefined;
|
|
58
|
+
checkingDeprecatedProps?: boolean | undefined;
|
|
59
|
+
permittedAriaRoles?: boolean | undefined;
|
|
60
|
+
disallowSetImplicitRole?: boolean | undefined;
|
|
61
|
+
disallowSetImplicitProps?: boolean | undefined;
|
|
62
|
+
disallowDefaultValue?: boolean | undefined;
|
|
63
|
+
}>;
|
|
149
64
|
};
|
|
150
65
|
export default _default;
|
package/lib/index.js
CHANGED
|
@@ -26,6 +26,7 @@ const no_hard_code_id_1 = (0, tslib_1.__importDefault)(require("./no-hard-code-i
|
|
|
26
26
|
const no_refer_to_non_existent_id_1 = (0, tslib_1.__importDefault)(require("./no-refer-to-non-existent-id"));
|
|
27
27
|
const no_use_event_handler_attr_1 = (0, tslib_1.__importDefault)(require("./no-use-event-handler-attr"));
|
|
28
28
|
const permitted_contents_1 = (0, tslib_1.__importDefault)(require("./permitted-contents"));
|
|
29
|
+
const require_accessible_name_1 = (0, tslib_1.__importDefault)(require("./require-accessible-name"));
|
|
29
30
|
const required_attr_1 = (0, tslib_1.__importDefault)(require("./required-attr"));
|
|
30
31
|
const required_element_1 = (0, tslib_1.__importDefault)(require("./required-element"));
|
|
31
32
|
const required_h1_1 = (0, tslib_1.__importDefault)(require("./required-h1"));
|
|
@@ -56,6 +57,7 @@ exports.default = {
|
|
|
56
57
|
'no-refer-to-non-existent-id': no_refer_to_non_existent_id_1.default,
|
|
57
58
|
'no-use-event-handler-attr': no_use_event_handler_attr_1.default,
|
|
58
59
|
'permitted-contents': permitted_contents_1.default,
|
|
60
|
+
'require-accessible-name': require_accessible_name_1.default,
|
|
59
61
|
'required-attr': required_attr_1.default,
|
|
60
62
|
'required-element': required_element_1.default,
|
|
61
63
|
'required-h1': required_h1_1.default,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import type { AttributeType } from '@markuplint/ml-spec';
|
|
2
2
|
declare type Option = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
attrs?: Record<string, Rule>;
|
|
4
|
+
ignoreAttrNamePrefix?: string | string[];
|
|
5
5
|
};
|
|
6
|
-
declare type Rule =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
| {
|
|
17
|
-
disallowed: true;
|
|
18
|
-
};
|
|
19
|
-
declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Option>;
|
|
6
|
+
declare type Rule = {
|
|
7
|
+
enum: [string, ...string[]];
|
|
8
|
+
} | {
|
|
9
|
+
pattern: string;
|
|
10
|
+
} | {
|
|
11
|
+
type: AttributeType;
|
|
12
|
+
} | {
|
|
13
|
+
disallowed: true;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, Option>;
|
|
20
16
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ignoreRoles?: Roles[];
|
|
3
|
+
labelEachArea?: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare type TopLevelRoles = 'banner' | 'main' | 'complementary' | 'contentinfo';
|
|
6
6
|
declare type Roles = TopLevelRoles | 'form' | 'navigation' | 'region';
|
|
7
|
-
declare const _default: import(
|
|
7
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, Options>;
|
|
8
8
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|