@angular-eslint/eslint-plugin 21.3.1-alpha.8 → 21.3.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-uncalled-signals.d.ts","sourceRoot":"","sources":["../../src/rules/no-uncalled-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAIlC,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AACnE,eAAO,MAAM,SAAS,wBAAwB,CAAC;;;;AAmB/C,
|
|
1
|
+
{"version":3,"file":"no-uncalled-signals.d.ts","sourceRoot":"","sources":["../../src/rules/no-uncalled-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAIlC,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AACnE,eAAO,MAAM,SAAS,wBAAwB,CAAC;;;;AAmB/C,wBAiFG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
|
|
@@ -38,12 +38,6 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
38
38
|
create(context) {
|
|
39
39
|
const services = utils_1.ESLintUtils.getParserServices(context);
|
|
40
40
|
function checkForUncalledSignal(node) {
|
|
41
|
-
// Unwrap negated expressions so that
|
|
42
|
-
// we look at what was being negated.
|
|
43
|
-
if (node.type === utils_1.AST_NODE_TYPES.UnaryExpression &&
|
|
44
|
-
node.operator === '!') {
|
|
45
|
-
node = node.argument;
|
|
46
|
-
}
|
|
47
41
|
const type = services.getTypeAtLocation(node);
|
|
48
42
|
const symbol = type.getSymbol();
|
|
49
43
|
let isSignal = symbol && signals_1.KNOWN_SIGNAL_TYPES.has(symbol.name);
|
|
@@ -74,6 +68,11 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
|
|
|
74
68
|
checkForUncalledSignal(node.test);
|
|
75
69
|
}
|
|
76
70
|
},
|
|
71
|
+
UnaryExpression(node) {
|
|
72
|
+
if (node.operator !== 'delete') {
|
|
73
|
+
checkForUncalledSignal(node.argument);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
77
76
|
LogicalExpression(node) {
|
|
78
77
|
checkForUncalledSignal(node.left);
|
|
79
78
|
checkForUncalledSignal(node.right);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin",
|
|
3
|
-
"version": "21.3.1
|
|
3
|
+
"version": "21.3.1",
|
|
4
4
|
"description": "ESLint plugin for Angular applications, following https://angular.dev/style-guide",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"ts-api-utils": "^2.1.0",
|
|
22
|
-
"@angular-eslint/bundled-angular-compiler": "21.3.1
|
|
23
|
-
"@angular-eslint/utils": "21.3.1
|
|
22
|
+
"@angular-eslint/bundled-angular-compiler": "21.3.1",
|
|
23
|
+
"@angular-eslint/utils": "21.3.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@angular-eslint/test-utils": "21.3.1
|
|
26
|
+
"@angular-eslint/test-utils": "21.3.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0",
|