@angular-eslint/eslint-plugin-template 22.1.1-alpha.4 → 22.1.1-alpha.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valid-aria.d.ts","sourceRoot":"","sources":["../../src/rules/valid-aria.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GACpB,WAAW,GAAG,gBAAgB,GAAG,0BAA0B,CAAC;AAC9D,eAAO,MAAM,SAAS,eAAe,CAAC;;;;AAEtC,wBA8EG;
|
|
1
|
+
{"version":3,"file":"valid-aria.d.ts","sourceRoot":"","sources":["../../src/rules/valid-aria.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GACpB,WAAW,GAAG,gBAAgB,GAAG,0BAA0B,CAAC;AAC9D,eAAO,MAAM,SAAS,eAAe,CAAC;;;;AAEtC,wBA8EG;AA+FH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
package/dist/rules/valid-aria.js
CHANGED
|
@@ -125,13 +125,19 @@ function isValidAriaPropertyValue({ allowundefined, type, values }, attributeVal
|
|
|
125
125
|
return isNumeric(attributeValue);
|
|
126
126
|
case 'string':
|
|
127
127
|
return isString(attributeValue);
|
|
128
|
-
case 'token':
|
|
129
|
-
case 'tokenlist': {
|
|
128
|
+
case 'token': {
|
|
130
129
|
const parsedAttributeValue = isBooleanLike(attributeValue)
|
|
131
130
|
? JSON.parse(attributeValue)
|
|
132
131
|
: attributeValue;
|
|
133
132
|
return Boolean(values?.includes(parsedAttributeValue));
|
|
134
133
|
}
|
|
134
|
+
case 'tokenlist': {
|
|
135
|
+
// A token list is whitespace-separated, so each token is looked up on its own.
|
|
136
|
+
if (!isString(attributeValue))
|
|
137
|
+
return false;
|
|
138
|
+
const tokens = attributeValue.trim().split(/\s+/);
|
|
139
|
+
return tokens.every((token) => Boolean(values?.includes(token)));
|
|
140
|
+
}
|
|
135
141
|
}
|
|
136
142
|
}
|
|
137
143
|
exports.RULE_DOCS_EXTENSION = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "22.1.1-alpha.
|
|
3
|
+
"version": "22.1.1-alpha.5",
|
|
4
4
|
"description": "ESLint plugin for Angular Templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"aria-query": "5.3.2",
|
|
23
23
|
"axobject-query": "4.1.0",
|
|
24
|
-
"@angular-eslint/bundled-angular-compiler": "22.1.1-alpha.
|
|
25
|
-
"@angular-eslint/utils": "22.1.1-alpha.
|
|
24
|
+
"@angular-eslint/bundled-angular-compiler": "22.1.1-alpha.5",
|
|
25
|
+
"@angular-eslint/utils": "22.1.1-alpha.5"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/aria-query": "5.0.4",
|
|
29
|
-
"@angular-eslint/test-utils": "22.1.1-alpha.
|
|
29
|
+
"@angular-eslint/test-utils": "22.1.1-alpha.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@typescript-eslint/types": "^8.0.0",
|
|
33
33
|
"@typescript-eslint/utils": "^8.0.0",
|
|
34
34
|
"eslint": "^9.0.0 || ^10.0.0",
|
|
35
35
|
"typescript": "*",
|
|
36
|
-
"@angular-eslint/template-parser": "22.1.1-alpha.
|
|
36
|
+
"@angular-eslint/template-parser": "22.1.1-alpha.5"
|
|
37
37
|
},
|
|
38
38
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
|
|
39
39
|
}
|