@angular-eslint/eslint-plugin-template 16.1.1-alpha.0 → 16.1.1-alpha.1
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.
|
@@ -73,8 +73,11 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return {
|
|
76
|
-
Element$1(node) {
|
|
76
|
+
['Element$1, Template'](node) {
|
|
77
77
|
var _a;
|
|
78
|
+
if (isImplicitTemplate(node)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
78
81
|
const { attributes, inputs, outputs, references } = node;
|
|
79
82
|
const { extractedBananaBoxes, extractedInputs, extractedOutputs } = normalizeInputsOutputs(inputs.map(toInputBindingOrderType), outputs.map(toOutputBindingOrderType));
|
|
80
83
|
const allAttributes = [
|
|
@@ -178,8 +181,18 @@ function toTwoWayBindingOrderType(output) {
|
|
|
178
181
|
function toTemplateReferenceVariableOrderType(reference) {
|
|
179
182
|
return Object.assign(Object.assign({}, reference), { orderType: "TEMPLATE_REFERENCE" /* OrderType.TemplateReferenceVariable */ });
|
|
180
183
|
}
|
|
184
|
+
function isImplicitTemplate(node) {
|
|
185
|
+
return isTmplAstTemplate(node) && node.tagName !== 'ng-template';
|
|
186
|
+
}
|
|
181
187
|
function extractTemplateAttrs(node) {
|
|
182
|
-
if (
|
|
188
|
+
if (isTmplAstTemplate(node)) {
|
|
189
|
+
return node.templateAttrs.map(toStructuralDirectiveOrderType).concat(node.variables.map((x) => {
|
|
190
|
+
return Object.assign(Object.assign({}, toAttributeBindingOrderType(x)), {
|
|
191
|
+
// `let-` is excluded from the keySpan and name - add it back in
|
|
192
|
+
keySpan: new bundled_angular_compiler_1.ParseSourceSpan(x.keySpan.start.moveBy(-4), x.keySpan.end), name: 'let-' + x.name });
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
if (!isImplicitTemplate(node.parent)) {
|
|
183
196
|
return [];
|
|
184
197
|
}
|
|
185
198
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "16.1.1-alpha.
|
|
3
|
+
"version": "16.1.1-alpha.1+e3dc936",
|
|
4
4
|
"description": "ESLint plugin for Angular Templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"LICENSE"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@angular-eslint/bundled-angular-compiler": "16.1.1-alpha.
|
|
21
|
-
"@angular-eslint/utils": "16.1.1-alpha.
|
|
20
|
+
"@angular-eslint/bundled-angular-compiler": "16.1.1-alpha.1+e3dc936",
|
|
21
|
+
"@angular-eslint/utils": "16.1.1-alpha.1+e3dc936",
|
|
22
22
|
"@typescript-eslint/type-utils": "5.62.0",
|
|
23
23
|
"@typescript-eslint/utils": "5.62.0",
|
|
24
24
|
"aria-query": "5.3.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"eslint": "^7.20.0 || ^8.0.0",
|
|
32
32
|
"typescript": "*"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "e3dc9366a8f0c56c7637228e340d2b51c8297448"
|
|
35
35
|
}
|