@angular-eslint/eslint-plugin-template 17.5.1 → 18.0.0-alpha.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/dist/rules/attributes-order.js +1 -1
- package/dist/rules/banana-in-box.js +1 -1
- package/dist/rules/conditional-complexity.js +1 -1
- package/dist/rules/eqeqeq.js +1 -1
- package/dist/rules/no-any.js +1 -1
- package/dist/rules/no-call-expression.js +1 -1
- package/dist/rules/no-interpolation-in-attributes.js +1 -1
- package/dist/rules/no-negated-async.js +1 -1
- package/package.json +4 -4
|
@@ -109,7 +109,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
109
109
|
}
|
|
110
110
|
if (errorRange) {
|
|
111
111
|
const [startIndex, endIndex] = errorRange;
|
|
112
|
-
const sourceCode = context.
|
|
112
|
+
const sourceCode = context.sourceCode;
|
|
113
113
|
const { start } = getLocation(sortedAttributes[startIndex]);
|
|
114
114
|
const { end } = getLocation(sortedAttributes[endIndex]);
|
|
115
115
|
const loc = { start, end };
|
|
@@ -24,7 +24,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
24
24
|
defaultOptions: [],
|
|
25
25
|
create(context) {
|
|
26
26
|
const parserServices = (0, utils_1.getTemplateParserServices)(context);
|
|
27
|
-
const sourceCode = context.
|
|
27
|
+
const sourceCode = context.sourceCode;
|
|
28
28
|
return {
|
|
29
29
|
BoundEvent({ name, sourceSpan }) {
|
|
30
30
|
const matches = name.match(INVALID_PATTERN);
|
|
@@ -32,7 +32,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
32
32
|
defaultOptions: [{ maxComplexity: DEFAULT_MAX_COMPLEXITY }],
|
|
33
33
|
create(context, [{ maxComplexity }]) {
|
|
34
34
|
(0, utils_1.ensureTemplateParser)(context);
|
|
35
|
-
const sourceCode = context.
|
|
35
|
+
const sourceCode = context.sourceCode;
|
|
36
36
|
return {
|
|
37
37
|
BoundAttribute(node) {
|
|
38
38
|
if (!node.value.source || node.value.ast instanceof bundled_angular_compiler_1.Interpolation) {
|
package/dist/rules/eqeqeq.js
CHANGED
|
@@ -37,7 +37,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
37
37
|
defaultOptions: [DEFAULT_OPTIONS],
|
|
38
38
|
create(context, [{ allowNullOrUndefined }]) {
|
|
39
39
|
(0, utils_1.ensureTemplateParser)(context);
|
|
40
|
-
const sourceCode = context.
|
|
40
|
+
const sourceCode = context.sourceCode;
|
|
41
41
|
return {
|
|
42
42
|
'Binary[operation=/^(==|!=)$/]'(node) {
|
|
43
43
|
const { left, operation, right, sourceSpan: { start, end }, } = node;
|
package/dist/rules/no-any.js
CHANGED
|
@@ -23,7 +23,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
23
23
|
defaultOptions: [],
|
|
24
24
|
create(context) {
|
|
25
25
|
(0, utils_1.ensureTemplateParser)(context);
|
|
26
|
-
const sourceCode = context.
|
|
26
|
+
const sourceCode = context.sourceCode;
|
|
27
27
|
return {
|
|
28
28
|
[`Call[receiver.name="${ANY_TYPE_CAST_FUNCTION_NAME}"]`]({ receiver, sourceSpan: { end, start }, }) {
|
|
29
29
|
if (!(receiver instanceof bundled_angular_compiler_1.PropertyRead)) {
|
|
@@ -33,7 +33,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
33
33
|
defaultOptions: [{ allowList: [] }],
|
|
34
34
|
create(context, [{ allowList }]) {
|
|
35
35
|
(0, utils_1.ensureTemplateParser)(context);
|
|
36
|
-
const sourceCode = context.
|
|
36
|
+
const sourceCode = context.sourceCode;
|
|
37
37
|
return {
|
|
38
38
|
'Call[receiver.name!="$any"]'(node) {
|
|
39
39
|
const isChildOfBoundEvent = Boolean((0, get_nearest_node_from_1.getNearestNodeFrom)(node, isBoundEvent));
|
|
@@ -18,7 +18,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
18
18
|
},
|
|
19
19
|
defaultOptions: [],
|
|
20
20
|
create(context) {
|
|
21
|
-
const sourceCode = context.
|
|
21
|
+
const sourceCode = context.sourceCode;
|
|
22
22
|
return {
|
|
23
23
|
['BoundAttribute Interpolation$1'](interpolation) {
|
|
24
24
|
const { sourceSpan: { start, end }, } = interpolation;
|
|
@@ -27,7 +27,7 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
27
27
|
defaultOptions: [],
|
|
28
28
|
create(context) {
|
|
29
29
|
(0, utils_1.ensureTemplateParser)(context);
|
|
30
|
-
const sourceCode = context.
|
|
30
|
+
const sourceCode = context.sourceCode;
|
|
31
31
|
return {
|
|
32
32
|
'BindingPipe[name="async"]'(bindingPipe) {
|
|
33
33
|
if (bindingPipe.exp instanceof bundled_angular_compiler_1.PrefixNot) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0-alpha.0",
|
|
4
4
|
"description": "ESLint plugin for Angular Templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-eslint/bundled-angular-compiler": "
|
|
22
|
-
"@angular-eslint/utils": "
|
|
21
|
+
"@angular-eslint/bundled-angular-compiler": "18.0.0-alpha.0",
|
|
22
|
+
"@angular-eslint/utils": "18.0.0-alpha.0",
|
|
23
23
|
"@typescript-eslint/type-utils": "7.10.0",
|
|
24
24
|
"@typescript-eslint/utils": "7.10.0",
|
|
25
25
|
"aria-query": "5.3.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/aria-query": "5.0.4"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"eslint": "^
|
|
32
|
+
"eslint": "^8.57.0|| ^9.0.0",
|
|
33
33
|
"typescript": "*"
|
|
34
34
|
},
|
|
35
35
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
|