@angular-eslint/eslint-plugin 21.2.1-alpha.8 → 21.3.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":"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,wBA2EG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
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,wBAqFG;AAEH,eAAO,MAAM,mBAAmB;;CAG/B,CAAC"}
@@ -45,8 +45,17 @@ exports.default = (0, create_eslint_rule_1.createESLintRule)({
45
45
  node = node.argument;
46
46
  }
47
47
  const type = services.getTypeAtLocation(node);
48
- const identifierType = type.getSymbol()?.name;
49
- if (identifierType && signals_1.KNOWN_SIGNAL_TYPES.has(identifierType)) {
48
+ const symbol = type.getSymbol();
49
+ let isSignal = symbol && signals_1.KNOWN_SIGNAL_TYPES.has(symbol.name);
50
+ // If the type is not a known signal type, but it has an alias
51
+ // symbol, then check if that alias symbol is a known signal type.
52
+ // The `Signal` type will fall under this category, because it is
53
+ // defined as a type alias. Other signal types like `InputSignal`
54
+ // won't match here, because they are defined as interfaces.
55
+ if (!isSignal && type.aliasSymbol) {
56
+ isSignal = signals_1.KNOWN_SIGNAL_TYPES.has(type.aliasSymbol.name);
57
+ }
58
+ if (isSignal) {
50
59
  context.report({
51
60
  node,
52
61
  messageId: 'noUncalledSignals',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/eslint-plugin",
3
- "version": "21.2.1-alpha.8",
3
+ "version": "21.3.0",
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/utils": "21.2.1-alpha.8",
23
- "@angular-eslint/bundled-angular-compiler": "21.2.1-alpha.8"
22
+ "@angular-eslint/bundled-angular-compiler": "21.3.0",
23
+ "@angular-eslint/utils": "21.3.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@angular-eslint/test-utils": "21.2.1-alpha.8"
26
+ "@angular-eslint/test-utils": "21.3.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@typescript-eslint/utils": "^7.11.0 || ^8.0.0",