@angular-eslint/eslint-plugin-template 19.1.1-alpha.1 → 19.1.1-alpha.3
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":"prefer-static-string-properties.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-static-string-properties.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,8BAA8B,CAAC;AACxD,eAAO,MAAM,SAAS,oCAAoC,CAAC;;AAE3D,
|
|
1
|
+
{"version":3,"file":"prefer-static-string-properties.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-static-string-properties.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,8BAA8B,CAAC;AACxD,eAAO,MAAM,SAAS,oCAAoC,CAAC;;AAE3D,wBA0DG"}
|
|
@@ -22,8 +22,14 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
22
22
|
create(context) {
|
|
23
23
|
const parserServices = (0, utils_1.getTemplateParserServices)(context);
|
|
24
24
|
return {
|
|
25
|
-
['BoundAttribute.inputs']({ name, sourceSpan, value, }) {
|
|
26
|
-
|
|
25
|
+
['BoundAttribute.inputs']({ name, sourceSpan, keySpan, value, }) {
|
|
26
|
+
// Exclude @xxx (Animation) and xx.color
|
|
27
|
+
// When attribute start with "*", keySpan details is null so *ngSwitchCase is excluded
|
|
28
|
+
const isBindingProperty = keySpan?.details &&
|
|
29
|
+
!keySpan.details.includes('@') &&
|
|
30
|
+
!keySpan.details.includes('.');
|
|
31
|
+
if (isBindingProperty &&
|
|
32
|
+
value instanceof bundled_angular_compiler_1.ASTWithSource &&
|
|
27
33
|
value.ast instanceof bundled_angular_compiler_1.LiteralPrimitive &&
|
|
28
34
|
typeof value.ast.value === 'string') {
|
|
29
35
|
// If the string literal is quoted with a double quote,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "19.1.1-alpha.
|
|
3
|
+
"version": "19.1.1-alpha.3",
|
|
4
4
|
"description": "ESLint plugin for Angular Templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"aria-query": "5.3.2",
|
|
22
22
|
"axobject-query": "4.1.0",
|
|
23
|
-
"@angular-eslint/bundled-angular-compiler": "19.1.1-alpha.
|
|
24
|
-
"@angular-eslint/utils": "19.1.1-alpha.
|
|
23
|
+
"@angular-eslint/bundled-angular-compiler": "19.1.1-alpha.3",
|
|
24
|
+
"@angular-eslint/utils": "19.1.1-alpha.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/aria-query": "5.0.4",
|
|
28
|
-
"@angular-eslint/template-parser": "19.1.1-alpha.
|
|
29
|
-
"@angular-eslint/test-utils": "19.1.1-alpha.
|
|
28
|
+
"@angular-eslint/template-parser": "19.1.1-alpha.3",
|
|
29
|
+
"@angular-eslint/test-utils": "19.1.1-alpha.3"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@typescript-eslint/types": "^7.11.0 || ^8.0.0",
|