@markuplint/rules 4.1.1 → 4.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/index.d.ts +2 -2
- package/lib/no-refer-to-non-existent-id/index.d.ts +1 -1
- package/lib/wai-aria/checkings/deprecated-role.d.ts +6 -0
- package/lib/wai-aria/checkings/deprecated-role.js +11 -0
- package/lib/wai-aria/index.js +5 -0
- package/lib/wai-aria/types.d.ts +1 -0
- package/package.json +6 -6
package/lib/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ declare const rules: {
|
|
|
76
76
|
}>>;
|
|
77
77
|
readonly 'no-hard-code-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
78
78
|
readonly 'no-refer-to-non-existent-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
79
|
-
ariaVersion: "1.
|
|
79
|
+
ariaVersion: "1.1" | "1.2" | "1.3";
|
|
80
80
|
fragmentRefersNameAttr: boolean;
|
|
81
81
|
}>>;
|
|
82
82
|
readonly 'no-use-event-handler-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
@@ -85,7 +85,7 @@ declare const rules: {
|
|
|
85
85
|
readonly 'permitted-contents': Readonly<import("@markuplint/ml-core").RuleSeed<import("./permitted-contents/types.js").TagRule[], import("./permitted-contents/types.js").Options>>;
|
|
86
86
|
readonly 'placeholder-label-option': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
87
87
|
readonly 'require-accessible-name': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
88
|
-
ariaVersion: "1.
|
|
88
|
+
ariaVersion: "1.1" | "1.2" | "1.3";
|
|
89
89
|
}>>;
|
|
90
90
|
readonly 'require-datetime': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
91
91
|
langs?: import("./require-datetime/types.js").Lang[] | undefined;
|
package/lib/wai-aria/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { Collection } from '../helpers.js';
|
|
|
4
4
|
import { checkingAbstractRole } from './checkings/abstract-role.js';
|
|
5
5
|
import { checkingDefaultValue } from './checkings/default-value.js';
|
|
6
6
|
import { checkingDeprecatedProps } from './checkings/deprecated-props.js';
|
|
7
|
+
import { checkingDeprecatedRole } from './checkings/deprecated-role.js';
|
|
7
8
|
import { checkingDisallowedProp } from './checkings/disallowed-prop.js';
|
|
8
9
|
import { checkingImplicitProps } from './checkings/implicit-props.js';
|
|
9
10
|
import { checkingImplicitRole } from './checkings/implicit-role.js';
|
|
@@ -21,6 +22,7 @@ export default createRule({
|
|
|
21
22
|
},
|
|
22
23
|
defaultOptions: {
|
|
23
24
|
checkingValue: true,
|
|
25
|
+
checkingDeprecatedRole: true,
|
|
24
26
|
checkingDeprecatedProps: true,
|
|
25
27
|
permittedAriaRoles: true,
|
|
26
28
|
checkingRequiredOwnedElements: true,
|
|
@@ -59,6 +61,9 @@ export default createRule({
|
|
|
59
61
|
return;
|
|
60
62
|
}
|
|
61
63
|
report(checkingRequiredProp({ el, role: computed.role, propSpecs }));
|
|
64
|
+
if (el.rule.options.checkingDeprecatedRole) {
|
|
65
|
+
report(checkingDeprecatedRole({ attr: roleAttr, role: computed.role }));
|
|
66
|
+
}
|
|
62
67
|
if (el.rule.options.disallowSetImplicitRole) {
|
|
63
68
|
report(checkingImplicitRole({ attr: roleAttr }));
|
|
64
69
|
}
|
package/lib/wai-aria/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ARIAVersion } from '@markuplint/ml-spec';
|
|
|
2
2
|
export type Options = {
|
|
3
3
|
checkingValue: boolean;
|
|
4
4
|
checkingDeprecatedProps: boolean;
|
|
5
|
+
checkingDeprecatedRole: boolean;
|
|
5
6
|
permittedAriaRoles: boolean;
|
|
6
7
|
checkingRequiredOwnedElements: boolean;
|
|
7
8
|
checkingPresentationalChildren: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Built-in rules of markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@markuplint/html-spec": "4.
|
|
29
|
-
"@markuplint/ml-core": "4.
|
|
30
|
-
"@markuplint/ml-spec": "4.0
|
|
31
|
-
"@markuplint/selector": "4.
|
|
28
|
+
"@markuplint/html-spec": "4.2.0",
|
|
29
|
+
"@markuplint/ml-core": "4.2.0",
|
|
30
|
+
"@markuplint/ml-spec": "4.1.0",
|
|
31
|
+
"@markuplint/selector": "4.2.0",
|
|
32
32
|
"@markuplint/shared": "4.0.1",
|
|
33
33
|
"@markuplint/types": "4.0.2",
|
|
34
34
|
"@types/debug": "^4.1.12",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"debug": "^4.3.4",
|
|
39
39
|
"type-fest": "^4.10.2"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "d5d99c5d84b676f8b2bb84684533ed74cf2f1da6"
|
|
42
42
|
}
|