@angular-eslint/eslint-plugin-template 22.1.1-alpha.8 → 22.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-static-string-properties.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-static-string-properties.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACrC;CACF,CAAC;AACF,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":"AAiBA,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACrC;CACF,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,8BAA8B,CAAC;AACxD,eAAO,MAAM,SAAS,oCAAoC,CAAC;;;;AAE3D,wBAoFG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -65,7 +65,10 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
65
65
|
// to quote the value, and we should keep using single
|
|
66
66
|
// quotes when we convert it to a property assignment.
|
|
67
67
|
const quote = value.source?.trimStart().at(0) === '"' ? "'" : '"';
|
|
68
|
-
|
|
68
|
+
// `&` is escaped first, or it would escape the entities added after it.
|
|
69
|
+
const literal = value.ast.value
|
|
70
|
+
.replaceAll('&', '&')
|
|
71
|
+
.replaceAll(quote, quote === '"' ? '"' : ''');
|
|
69
72
|
context.report({
|
|
70
73
|
loc: parserServices.convertNodeSourceSpanToLoc(sourceSpan),
|
|
71
74
|
messageId: 'preferStaticStringProperties',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.2.0",
|
|
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/
|
|
25
|
-
"@angular-eslint/
|
|
24
|
+
"@angular-eslint/bundled-angular-compiler": "22.2.0",
|
|
25
|
+
"@angular-eslint/utils": "22.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/aria-query": "5.0.4",
|
|
29
|
-
"@angular-eslint/test-utils": "22.
|
|
29
|
+
"@angular-eslint/test-utils": "22.2.0"
|
|
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.
|
|
36
|
+
"@angular-eslint/template-parser": "22.2.0"
|
|
37
37
|
},
|
|
38
38
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
|
|
39
39
|
}
|