@markuplint/rules 2.4.2 → 3.0.0-alpha.66
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/README.md +1 -5
- package/lib/attr-duplication/index.js +10 -7
- 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.js +21 -25
- package/lib/case-sensitive-attr-name/index.d.ts +1 -5
- package/lib/case-sensitive-attr-name/index.js +51 -81
- package/lib/case-sensitive-tag-name/index.js +38 -30
- package/lib/character-reference/index.d.ts +2 -1
- package/lib/character-reference/index.js +5 -7
- package/lib/class-naming/index.js +11 -11
- package/lib/deprecated-attr/index.js +17 -18
- package/lib/deprecated-element/index.js +5 -7
- package/lib/disallowed-element/index.js +8 -9
- package/lib/doctype/index.js +7 -7
- package/lib/end-tag/index.js +4 -1
- package/lib/helper/aria/get-aria.d.ts +7 -0
- package/lib/helper/aria/get-aria.js +53 -0
- package/lib/helper/aria/get-computed-role.d.ts +10 -0
- package/lib/helper/aria/get-computed-role.js +24 -0
- package/lib/helper/aria/get-implicit-role.d.ts +7 -0
- package/lib/helper/aria/get-implicit-role.js +12 -0
- package/lib/helper/aria/get-permitted-roles.d.ts +14 -0
- package/lib/helper/aria/get-permitted-roles.js +26 -0
- package/lib/helper/aria/resolve-version.d.ts +2 -0
- package/lib/helper/aria/resolve-version.js +21 -0
- package/lib/helper/spec/aria-spec.d.ts +5 -0
- package/lib/helper/spec/aria-spec.js +12 -0
- package/lib/helper/spec/get-role-spec.d.ts +11 -0
- package/lib/helper/spec/get-role-spec.js +39 -0
- package/lib/helper/spec/html-spec.d.ts +2 -0
- package/lib/helper/spec/html-spec.js +14 -0
- package/lib/helpers.d.ts +10 -28
- package/lib/helpers.js +29 -149
- package/lib/id-duplication/index.js +4 -6
- package/lib/indentation/index.d.ts +3 -3
- package/lib/index.d.ts +14 -19
- package/lib/index.js +0 -8
- package/lib/ineffective-attr/index.js +19 -27
- package/lib/invalid-attr/index.js +83 -83
- package/lib/landmark-roles/index.d.ts +2 -2
- package/lib/landmark-roles/index.js +9 -9
- package/lib/no-boolean-attr-value/index.js +33 -34
- package/lib/no-default-value/index.js +20 -24
- package/lib/no-hard-code-id/index.js +9 -13
- package/lib/no-refer-to-non-existent-id/index.d.ts +4 -1
- package/lib/no-refer-to-non-existent-id/index.js +77 -83
- package/lib/no-use-event-handler-attr/index.js +20 -22
- package/lib/permitted-contents/index.d.ts +5 -2
- package/lib/permitted-contents/index.js +67 -68
- package/lib/permitted-contents/permitted-content.spec-to-regexp.d.ts +5 -5
- package/lib/permitted-contents/permitted-content.spec-to-regexp.js +19 -14
- package/lib/permitted-contents/unfold-content-models-to-tags.d.ts +2 -2
- package/lib/require-accessible-name/index.d.ts +5 -1
- package/lib/require-accessible-name/index.js +6 -3
- package/lib/required-attr/index.js +16 -25
- package/lib/required-element/index.d.ts +1 -1
- package/lib/required-element/index.js +6 -6
- package/lib/required-h1/index.d.ts +2 -2
- package/lib/required-h1/index.js +3 -3
- package/lib/wai-aria/checkings/abstract-role.d.ts +3 -0
- package/lib/wai-aria/checkings/abstract-role.js +22 -0
- package/lib/wai-aria/checkings/checking-required-owned-elements.d.ts +11 -0
- package/lib/wai-aria/checkings/checking-required-owned-elements.js +63 -0
- package/lib/wai-aria/checkings/default-value.d.ts +6 -0
- package/lib/wai-aria/checkings/default-value.js +17 -0
- package/lib/wai-aria/checkings/deprecated-props.d.ts +7 -0
- package/lib/wai-aria/checkings/deprecated-props.js +18 -0
- package/lib/wai-aria/checkings/disallowed-prop.d.ts +7 -0
- package/lib/wai-aria/checkings/disallowed-prop.js +22 -0
- package/lib/wai-aria/checkings/implicit-props.d.ts +7 -0
- package/lib/wai-aria/checkings/implicit-props.js +50 -0
- package/lib/wai-aria/checkings/implicit-role.d.ts +3 -0
- package/lib/wai-aria/checkings/implicit-role.js +21 -0
- package/lib/wai-aria/checkings/no-global-prop.d.ts +6 -0
- package/lib/wai-aria/checkings/no-global-prop.js +14 -0
- package/lib/wai-aria/checkings/non-existant-role.d.ts +3 -0
- package/lib/wai-aria/checkings/non-existant-role.js +28 -0
- package/lib/wai-aria/checkings/permitted-roles.d.ts +3 -0
- package/lib/wai-aria/checkings/permitted-roles.js +28 -0
- package/lib/wai-aria/checkings/required-prop.d.ts +9 -0
- package/lib/wai-aria/checkings/required-prop.js +27 -0
- package/lib/wai-aria/checkings/value.d.ts +7 -0
- package/lib/wai-aria/checkings/value.js +21 -0
- package/lib/wai-aria/index.d.ts +1 -8
- package/lib/wai-aria/index.js +56 -207
- package/lib/wai-aria/types.d.ts +11 -0
- package/lib/wai-aria/types.js +2 -0
- package/package.json +5 -5
- package/schema.json +0 -12
- package/tsconfig.tsbuildinfo +1 -1
package/lib/wai-aria/index.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
checkingValue?: boolean;
|
|
3
|
-
checkingDeprecatedProps?: boolean;
|
|
4
|
-
permittedAriaRoles?: boolean;
|
|
5
|
-
disallowSetImplicitRole?: boolean;
|
|
6
|
-
disallowSetImplicitProps?: boolean;
|
|
7
|
-
disallowDefaultValue?: boolean;
|
|
8
|
-
};
|
|
1
|
+
import type { Options } from './types';
|
|
9
2
|
declare const _default: import("@markuplint/ml-core").RuleSeed<boolean, Options>;
|
|
10
3
|
export default _default;
|
package/lib/wai-aria/index.js
CHANGED
|
@@ -2,236 +2,85 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ml_core_1 = require("@markuplint/ml-core");
|
|
4
4
|
const helpers_1 = require("../helpers");
|
|
5
|
+
const abstract_role_1 = require("./checkings/abstract-role");
|
|
6
|
+
const checking_required_owned_elements_1 = require("./checkings/checking-required-owned-elements");
|
|
7
|
+
const default_value_1 = require("./checkings/default-value");
|
|
8
|
+
const deprecated_props_1 = require("./checkings/deprecated-props");
|
|
9
|
+
const disallowed_prop_1 = require("./checkings/disallowed-prop");
|
|
10
|
+
const implicit_props_1 = require("./checkings/implicit-props");
|
|
11
|
+
const implicit_role_1 = require("./checkings/implicit-role");
|
|
12
|
+
const no_global_prop_1 = require("./checkings/no-global-prop");
|
|
13
|
+
const non_existant_role_1 = require("./checkings/non-existant-role");
|
|
14
|
+
const permitted_roles_1 = require("./checkings/permitted-roles");
|
|
15
|
+
const required_prop_1 = require("./checkings/required-prop");
|
|
16
|
+
const value_1 = require("./checkings/value");
|
|
5
17
|
exports.default = (0, ml_core_1.createRule)({
|
|
6
18
|
defaultOptions: {
|
|
7
19
|
checkingValue: true,
|
|
8
20
|
checkingDeprecatedProps: true,
|
|
9
21
|
permittedAriaRoles: true,
|
|
22
|
+
checkingRequiredOwnedElements: true,
|
|
10
23
|
disallowSetImplicitRole: true,
|
|
11
24
|
disallowSetImplicitProps: true,
|
|
12
25
|
disallowDefaultValue: false,
|
|
26
|
+
version: '1.2',
|
|
13
27
|
},
|
|
14
28
|
async verify({ document, report, t }) {
|
|
15
|
-
await document.walkOn('Element',
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
29
|
+
await document.walkOn('Element', el => {
|
|
30
|
+
const roleAttr = el.getAttributeNode('role');
|
|
31
|
+
const propAttrs = el.attributes.filter(attr => /^aria-/i.test(attr.name));
|
|
32
|
+
const ariaAttrs = new helpers_1.Collection(roleAttr, ...propAttrs);
|
|
33
|
+
const elSpec = (0, ml_core_1.getSpec)(el, document.specs);
|
|
34
|
+
if (!elSpec) {
|
|
20
35
|
return;
|
|
21
36
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Roles in the spec
|
|
25
|
-
if (roleAttr) {
|
|
26
|
-
const value = roleAttr.getValue().potential.trim().toLowerCase();
|
|
27
|
-
const existedRole = roles.find(role => role.name === value);
|
|
28
|
-
if (!existedRole) {
|
|
29
|
-
// Not exist
|
|
37
|
+
if (!elSpec.globalAttrs['#ARIAAttrs']) {
|
|
38
|
+
for (const ariaAttr of ariaAttrs) {
|
|
30
39
|
report({
|
|
31
|
-
scope:
|
|
32
|
-
message:
|
|
33
|
-
line: roleAttr.startLine,
|
|
34
|
-
col: roleAttr.startCol,
|
|
35
|
-
raw: roleAttr.raw,
|
|
40
|
+
scope: ariaAttr,
|
|
41
|
+
message: 'ARIA attribute is disallowed',
|
|
36
42
|
});
|
|
37
43
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
raw: roleAttr.raw,
|
|
46
|
-
});
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const computed = (0, ml_core_1.getComputedRole)(document.specs, el, el.rule.option.version);
|
|
47
|
+
const { props: propSpecs } = (0, ml_core_1.ariaSpecs)(document.specs, el.rule.option.version);
|
|
48
|
+
if (roleAttr) {
|
|
49
|
+
if (report((0, non_existant_role_1.checkingNonExistantRole)({ attr: roleAttr }))) {
|
|
50
|
+
return;
|
|
47
51
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const implictRole = (0, helpers_1.getImplicitRole)(document.specs, node);
|
|
51
|
-
if (implictRole && implictRole === value) {
|
|
52
|
-
// the implicit role
|
|
53
|
-
report({
|
|
54
|
-
scope: node,
|
|
55
|
-
message: t('{0} is {1}', t('the "{0*}" {1}', value, 'role'), t('{0} of {1}', 'the implicit role', t('the "{0*}" {1}', node.nodeName, 'element'))),
|
|
56
|
-
line: roleAttr.startLine,
|
|
57
|
-
col: roleAttr.startCol,
|
|
58
|
-
raw: roleAttr.raw,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
52
|
+
if (report((0, abstract_role_1.checkingAbstractRole)({ attr: roleAttr }))) {
|
|
53
|
+
return;
|
|
61
54
|
}
|
|
62
|
-
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
if (permittedRoles === false) {
|
|
66
|
-
report({
|
|
67
|
-
scope: node,
|
|
68
|
-
message: t('{0} according to {1}', t('Cannot overwrite {0}', t('{0} of {1}', t('the {0}', 'role'), t('the "{0*}" {1}', node.nodeName, 'element'))), 'ARIA in HTML specification'),
|
|
69
|
-
line: roleAttr.startLine,
|
|
70
|
-
col: roleAttr.startCol,
|
|
71
|
-
raw: roleAttr.raw,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
else if (Array.isArray(permittedRoles) && !permittedRoles.includes(value)) {
|
|
75
|
-
report({
|
|
76
|
-
scope: node,
|
|
77
|
-
message: t('{0} according to {1}', t('Cannot overwrite {0} to {1}', t('the "{0*}" {1}', value, 'role'), t('the "{0*}" {1}', node.nodeName, 'element')), 'ARIA in HTML specification'),
|
|
78
|
-
line: roleAttr.startLine,
|
|
79
|
-
col: roleAttr.startCol,
|
|
80
|
-
raw: roleAttr.raw,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
55
|
+
report((0, required_prop_1.checkingRequiredProp)({ el, role: computed.role, propSpecs }));
|
|
56
|
+
if (el.rule.option.disallowSetImplicitRole) {
|
|
57
|
+
report((0, implicit_role_1.checkingImplicitRole)({ attr: roleAttr }));
|
|
83
58
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (computedRole) {
|
|
87
|
-
const role = (0, helpers_1.getRoleSpec)(document.specs, computedRole.name);
|
|
88
|
-
if (role) {
|
|
89
|
-
// Checking aria-* on the role
|
|
90
|
-
for (const attr of node.attributes) {
|
|
91
|
-
const attrName = attr.getName().potential.trim().toLowerCase();
|
|
92
|
-
if (/^aria-/i.test(attrName)) {
|
|
93
|
-
const statesAndProp = role.statesAndProps.find(s => s.name === attrName);
|
|
94
|
-
if (statesAndProp) {
|
|
95
|
-
if (node.rule.option.checkingDeprecatedProps && statesAndProp.deprecated) {
|
|
96
|
-
report({
|
|
97
|
-
scope: node,
|
|
98
|
-
message: t('{0:c} on {1}', t('{0} is {1:c}', t('the "{0*}" {1}', attrName, 'ARIA state/property'), 'deprecated'), t('the "{0*}" {1}', role.name, 'role')),
|
|
99
|
-
line: attr.startLine,
|
|
100
|
-
col: attr.startCol,
|
|
101
|
-
raw: attr.raw,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
report({
|
|
107
|
-
scope: node,
|
|
108
|
-
message: t('{0:c} on {1}', t('{0} is {1:c}', t('the "{0*}" {1}', attrName, 'ARIA state/property'), 'disallowed'), t('the "{0*}" {1}', role.name, 'role')),
|
|
109
|
-
line: attr.startLine,
|
|
110
|
-
col: attr.startCol,
|
|
111
|
-
raw: attr.raw,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
// Checing required props
|
|
117
|
-
if (!computedRole.isImplicit) {
|
|
118
|
-
const requiredProps = role.statesAndProps.filter(s => s.required).map(s => s.name);
|
|
119
|
-
for (const requiredProp of requiredProps) {
|
|
120
|
-
const has = node.attributes.some(attr => {
|
|
121
|
-
const attrName = attr.getName().potential.trim().toLowerCase();
|
|
122
|
-
return attrName === requiredProp;
|
|
123
|
-
});
|
|
124
|
-
if (!has) {
|
|
125
|
-
report({
|
|
126
|
-
scope: node,
|
|
127
|
-
message: t('{0:c} on {1}', t('Require {0}', t('the "{0*}" {1}', requiredProp, 'ARIA state/property')), t('the "{0*}" {1}', role.name, 'role')),
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
59
|
+
if (el.rule.option.permittedAriaRoles) {
|
|
60
|
+
report((0, permitted_roles_1.checkingPermittedRoles)({ attr: roleAttr }));
|
|
132
61
|
}
|
|
133
62
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const attrName = attr.getName().potential.trim().toLowerCase();
|
|
139
|
-
if (/^aria-/i.test(attrName)) {
|
|
140
|
-
const ariaAttr = ariaAttrs.find(attr => attr.name === attrName);
|
|
141
|
-
if (ariaAttr && !ariaAttr.isGlobal) {
|
|
142
|
-
report({
|
|
143
|
-
scope: node,
|
|
144
|
-
message: t('{0} is not {1}', t('the "{0*}" {1}', attrName, 'ARIA state/property'), 'global state/property'),
|
|
145
|
-
line: attr.startLine,
|
|
146
|
-
col: attr.startCol,
|
|
147
|
-
raw: attr.raw,
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
63
|
+
for (const attr of propAttrs) {
|
|
64
|
+
report((0, disallowed_prop_1.checkingDisallowedProp)({ attr, role: computed.role, propSpecs }));
|
|
65
|
+
if (el.rule.option.checkingDeprecatedProps) {
|
|
66
|
+
report((0, deprecated_props_1.checkingDeprecatedProps)({ attr, role: computed.role, propSpecs }));
|
|
151
67
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
68
|
+
if (el.rule.option.disallowSetImplicitProps) {
|
|
69
|
+
const attrSpecs = (0, ml_core_1.getAttrSpecs)(el, document.specs);
|
|
70
|
+
report((0, implicit_props_1.checkingImplicitProps)({ attr, propSpecs, attrSpecs }));
|
|
71
|
+
}
|
|
72
|
+
if (el.rule.option.checkingValue) {
|
|
73
|
+
report((0, value_1.checkingValue)({ attr, role: computed.role, propSpecs }));
|
|
156
74
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const value = attr.getValue().potential.trim().toLowerCase();
|
|
160
|
-
const propSpec = ariaAttrs.find(p => p.name === attrName);
|
|
161
|
-
// Checking ARIA Value
|
|
162
|
-
if (node.rule.option.checkingValue) {
|
|
163
|
-
const result = (0, helpers_1.checkAria)(document.specs, attrName, value, computedRole === null || computedRole === void 0 ? void 0 : computedRole.name);
|
|
164
|
-
if (!result.isValid) {
|
|
165
|
-
report({
|
|
166
|
-
scope: node,
|
|
167
|
-
message: t('{0:c} on {1}', t('{0} is {1:c}', t('the "{0}"', value), 'disallowed'), t('the "{0*}" {1}', attrName, 'ARIA state/property')) +
|
|
168
|
-
('enum' in result && result.enum.length
|
|
169
|
-
? t('. ') + t('Allowed values are: {0}', t(result.enum))
|
|
170
|
-
: ''),
|
|
171
|
-
line: attr.startLine,
|
|
172
|
-
col: attr.startCol,
|
|
173
|
-
raw: attr.raw,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
// Checking implicit props
|
|
178
|
-
if (node.rule.option.disallowSetImplicitProps) {
|
|
179
|
-
if (propSpec && propSpec.equivalentHtmlAttrs) {
|
|
180
|
-
for (const equivalentHtmlAttr of propSpec.equivalentHtmlAttrs) {
|
|
181
|
-
const htmlAttrSpec = attrSpecs.find(a => a.name === equivalentHtmlAttr.htmlAttrName);
|
|
182
|
-
const isValid = (0, helpers_1.isValidAttr)(t, equivalentHtmlAttr.htmlAttrName, equivalentHtmlAttr.value || '', false, node, attrSpecs);
|
|
183
|
-
if (isValid && isValid.invalidType === 'non-existent') {
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
if (node.hasAttribute(equivalentHtmlAttr.htmlAttrName)) {
|
|
187
|
-
const targetAttrValue = node.getAttribute(equivalentHtmlAttr.htmlAttrName);
|
|
188
|
-
if ((equivalentHtmlAttr.value == null && targetAttrValue === value) ||
|
|
189
|
-
equivalentHtmlAttr.value === value) {
|
|
190
|
-
report({
|
|
191
|
-
scope: node,
|
|
192
|
-
message: t('{0} has {1}', t('the "{0*}" {1}', attrName, 'ARIA state/property'), t('the same {0} as {1}', 'semantics', t('{0} or {1}', t('the current "{0}" {1}', equivalentHtmlAttr.htmlAttrName, 'attribute'), t('the implicit "{0}" {1}', equivalentHtmlAttr.htmlAttrName, 'attribute')))),
|
|
193
|
-
line: attr.startLine,
|
|
194
|
-
col: attr.startCol,
|
|
195
|
-
raw: attr.raw,
|
|
196
|
-
});
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
if ((htmlAttrSpec === null || htmlAttrSpec === void 0 ? void 0 : htmlAttrSpec.type) === 'Boolean' && value !== 'false') {
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
report({
|
|
203
|
-
scope: node,
|
|
204
|
-
message: t('{0} contradicts {1}', t('the "{0*}" {1}', attrName, 'ARIA state/property'), t('the current "{0}" {1}', equivalentHtmlAttr.htmlAttrName, 'attribute')),
|
|
205
|
-
line: attr.startLine,
|
|
206
|
-
col: attr.startCol,
|
|
207
|
-
raw: attr.raw,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
else if (value === 'true') {
|
|
211
|
-
if (!equivalentHtmlAttr.isNotStrictEquivalent && (htmlAttrSpec === null || htmlAttrSpec === void 0 ? void 0 : htmlAttrSpec.type) === 'Boolean') {
|
|
212
|
-
report({
|
|
213
|
-
scope: node,
|
|
214
|
-
message: t('{0} contradicts {1}', t('the "{0*}" {1}', attrName, 'ARIA state/property'), t('the implicit "{0}" {1}', equivalentHtmlAttr.htmlAttrName, 'attribute')),
|
|
215
|
-
line: attr.startLine,
|
|
216
|
-
col: attr.startCol,
|
|
217
|
-
raw: attr.raw,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
// Default value
|
|
225
|
-
if (node.rule.option.disallowDefaultValue && propSpec && propSpec.defaultValue === value) {
|
|
226
|
-
report({
|
|
227
|
-
scope: node,
|
|
228
|
-
message: t('It is {0}', 'default value'),
|
|
229
|
-
line: attr.startLine,
|
|
230
|
-
col: attr.startCol,
|
|
231
|
-
raw: attr.raw,
|
|
232
|
-
});
|
|
233
|
-
}
|
|
75
|
+
if (el.rule.option.disallowDefaultValue) {
|
|
76
|
+
report((0, default_value_1.checkingDefaultValue)({ attr, propSpecs }));
|
|
234
77
|
}
|
|
78
|
+
if (!computed.role) {
|
|
79
|
+
report((0, no_global_prop_1.checkingNoGlobalProp)({ attr, propSpecs }));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (el.rule.option.checkingRequiredOwnedElements) {
|
|
83
|
+
report((0, checking_required_owned_elements_1.checkingRequiredOwnedElements)({ el, role: computed.role }));
|
|
235
84
|
}
|
|
236
85
|
});
|
|
237
86
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ARIAVersion } from '@markuplint/ml-spec';
|
|
2
|
+
export declare type Options = {
|
|
3
|
+
checkingValue: boolean;
|
|
4
|
+
checkingDeprecatedProps: boolean;
|
|
5
|
+
permittedAriaRoles: boolean;
|
|
6
|
+
checkingRequiredOwnedElements: boolean;
|
|
7
|
+
disallowSetImplicitRole: boolean;
|
|
8
|
+
disallowSetImplicitProps: boolean;
|
|
9
|
+
disallowDefaultValue: boolean;
|
|
10
|
+
version: ARIAVersion;
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.66+6cde1134",
|
|
4
4
|
"description": "Rules for markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"clean": "tsc --build --clean"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@markuplint/html-spec": "
|
|
21
|
-
"@markuplint/ml-core": "
|
|
22
|
-
"@markuplint/ml-spec": "
|
|
20
|
+
"@markuplint/html-spec": "3.0.0-alpha.66+6cde1134",
|
|
21
|
+
"@markuplint/ml-core": "3.0.0-alpha.66+6cde1134",
|
|
22
|
+
"@markuplint/ml-spec": "3.0.0-alpha.82+6cde1134",
|
|
23
23
|
"@markuplint/types": "2.1.0",
|
|
24
24
|
"debug": "^4.3.4",
|
|
25
25
|
"html-entities": "^2.3.3",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/debug": "^4.1.7"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6cde113402758a8fdbd6a0fcf98e78efd2cdb778"
|
|
32
32
|
}
|
package/schema.json
CHANGED
|
@@ -9,15 +9,6 @@
|
|
|
9
9
|
"attr-duplication": {
|
|
10
10
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/attr-duplication/schema.json"
|
|
11
11
|
},
|
|
12
|
-
"attr-equal-space-after": {
|
|
13
|
-
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/attr-equal-space-after/schema.json"
|
|
14
|
-
},
|
|
15
|
-
"attr-equal-space-before": {
|
|
16
|
-
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/attr-equal-space-before/schema.json"
|
|
17
|
-
},
|
|
18
|
-
"attr-spacing": {
|
|
19
|
-
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/attr-spacing/schema.json"
|
|
20
|
-
},
|
|
21
12
|
"attr-value-quotes": {
|
|
22
13
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/attr-value-quotes/schema.json"
|
|
23
14
|
},
|
|
@@ -51,9 +42,6 @@
|
|
|
51
42
|
"end-tag": {
|
|
52
43
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/end-tag/schema.json"
|
|
53
44
|
},
|
|
54
|
-
"indentation": {
|
|
55
|
-
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/indentation/schema.json"
|
|
56
|
-
},
|
|
57
45
|
"ineffective-attr": {
|
|
58
46
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/ineffective-attr/schema.json"
|
|
59
47
|
},
|