@angular-eslint/eslint-plugin 20.0.1-alpha.5 → 20.0.1-alpha.7

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/README.md CHANGED
@@ -24,6 +24,8 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
24
24
  | [`contextual-lifecycle`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md) | Ensures that lifecycle methods are used in a correct context | :white_check_mark: | | |
25
25
  | [`no-async-lifecycle-method`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-async-lifecycle-method.md) | Angular Lifecycle methods should not be async. Angular does not wait for async lifecycle but the code incorrectly suggests it does. | | | |
26
26
  | [`no-attribute-decorator`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md) | The @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use-case than getting a stream of values (using @Input), so often the @Attribute decorator is mistakenly used when @Input was what was intended. This rule disallows usage of @Attribute decorator altogether in order to prevent these mistakes. | | | |
27
+ | [`no-developer-preview`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-developer-preview.md) | Disallow using code which is marked as developer preview | | | |
28
+ | [`no-experimental`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-experimental.md) | Disallow using code which is marked as experimental | | | |
27
29
  | [`require-lifecycle-on-prototype`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/require-lifecycle-on-prototype.md) | Ensures that lifecycle methods are defined on the object's prototype instead of on an instance. | | | |
28
30
  | [`sort-lifecycle-methods`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-lifecycle-methods.md) | Ensures that lifecycle methods are declared in order of execution | | | |
29
31
  <!-- prettier-ignore-end -->
@@ -13,8 +13,10 @@
13
13
  "@angular-eslint/no-async-lifecycle-method": "error",
14
14
  "@angular-eslint/no-attribute-decorator": "error",
15
15
  "@angular-eslint/no-conflicting-lifecycle": "error",
16
+ "@angular-eslint/no-developer-preview": "error",
16
17
  "@angular-eslint/no-duplicates-in-metadata-arrays": "error",
17
18
  "@angular-eslint/no-empty-lifecycle-method": "error",
19
+ "@angular-eslint/no-experimental": "error",
18
20
  "@angular-eslint/no-forward-ref": "error",
19
21
  "@angular-eslint/no-input-prefix": "error",
20
22
  "@angular-eslint/no-input-rename": "error",
package/dist/index.d.ts CHANGED
@@ -15,8 +15,10 @@ declare const _default: {
15
15
  "@angular-eslint/no-async-lifecycle-method": string;
16
16
  "@angular-eslint/no-attribute-decorator": string;
17
17
  "@angular-eslint/no-conflicting-lifecycle": string;
18
+ "@angular-eslint/no-developer-preview": string;
18
19
  "@angular-eslint/no-duplicates-in-metadata-arrays": string;
19
20
  "@angular-eslint/no-empty-lifecycle-method": string;
21
+ "@angular-eslint/no-experimental": string;
20
22
  "@angular-eslint/no-forward-ref": string;
21
23
  "@angular-eslint/no-input-prefix": string;
22
24
  "@angular-eslint/no-input-rename": string;
@@ -118,6 +120,8 @@ declare const _default: {
118
120
  "use-injectable-provided-in": import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/use-injectable-provided-in").MessageIds, import("./rules/use-injectable-provided-in").Options, import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
119
121
  "use-lifecycle-interface": import("@typescript-eslint/utils/ts-eslint").RuleModule<"useLifecycleInterface", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
120
122
  "use-pipe-transform-interface": import("@typescript-eslint/utils/ts-eslint").RuleModule<"usePipeTransformInterface", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
123
+ "no-experimental": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noExperimental", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
124
+ "no-developer-preview": import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDeveloperPreview", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
121
125
  };
122
126
  };
123
127
  export = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqIA,kBAmDE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,kBAqDE"}
package/dist/index.js CHANGED
@@ -80,6 +80,8 @@ const use_component_view_encapsulation_1 = __importStar(require("./rules/use-com
80
80
  const use_injectable_provided_in_1 = __importStar(require("./rules/use-injectable-provided-in"));
81
81
  const use_lifecycle_interface_1 = __importStar(require("./rules/use-lifecycle-interface"));
82
82
  const use_pipe_transform_interface_1 = __importStar(require("./rules/use-pipe-transform-interface"));
83
+ const no_experimental_1 = __importStar(require("./rules/no-experimental"));
84
+ const no_developer_preview_1 = __importStar(require("./rules/no-developer-preview"));
83
85
  module.exports = {
84
86
  configs: {
85
87
  all: all_json_1.default,
@@ -129,5 +131,7 @@ module.exports = {
129
131
  [use_injectable_provided_in_1.RULE_NAME]: use_injectable_provided_in_1.default,
130
132
  [use_lifecycle_interface_1.RULE_NAME]: use_lifecycle_interface_1.default,
131
133
  [use_pipe_transform_interface_1.RULE_NAME]: use_pipe_transform_interface_1.default,
134
+ [no_experimental_1.RULE_NAME]: no_experimental_1.default,
135
+ [no_developer_preview_1.RULE_NAME]: no_developer_preview_1.default,
132
136
  },
133
137
  };
@@ -0,0 +1,6 @@
1
+ export type Options = [];
2
+ export type MessageIds = 'noDeveloperPreview';
3
+ export declare const RULE_NAME = "no-developer-preview";
4
+ declare const _default: import("@typescript-eslint/utils/eslint-utils").RuleModule<"noDeveloperPreview", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/eslint-utils").RuleListener>;
5
+ export default _default;
6
+ //# sourceMappingURL=no-developer-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-developer-preview.d.ts","sourceRoot":"","sources":["../../src/rules/no-developer-preview.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAC9C,eAAO,MAAM,SAAS,yBAAyB,CAAC;;AAEhD,wBAsCG"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RULE_NAME = void 0;
4
+ const create_eslint_rule_1 = require("../utils/create-eslint-rule");
5
+ const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils");
6
+ const jsdoc_1 = require("../utils/jsdoc");
7
+ exports.RULE_NAME = 'no-developer-preview';
8
+ exports.default = (0, create_eslint_rule_1.createESLintRule)({
9
+ name: exports.RULE_NAME,
10
+ meta: {
11
+ type: 'problem',
12
+ docs: {
13
+ description: `Disallow using code which is marked as developer preview`,
14
+ },
15
+ schema: [],
16
+ messages: {
17
+ noDeveloperPreview: '`{{name}}` is in developer preview',
18
+ },
19
+ },
20
+ defaultOptions: [],
21
+ create(context) {
22
+ const services = (0, eslint_utils_1.getParserServices)(context);
23
+ const checker = services.program.getTypeChecker();
24
+ return {
25
+ Identifier: (node) => {
26
+ if ((0, jsdoc_1.isDeclaration)(node) || (0, jsdoc_1.isInsideExportOrImport)(node)) {
27
+ return;
28
+ }
29
+ const symbols = (0, jsdoc_1.getSymbols)(node, services, checker);
30
+ if (!(0, jsdoc_1.hasJsDocTag)(symbols, 'developerPreview')) {
31
+ return;
32
+ }
33
+ const { name } = node;
34
+ context.report({
35
+ node,
36
+ messageId: 'noDeveloperPreview',
37
+ data: { name },
38
+ });
39
+ },
40
+ };
41
+ },
42
+ });
@@ -0,0 +1,6 @@
1
+ export type Options = [];
2
+ export type MessageIds = 'noExperimental';
3
+ export declare const RULE_NAME = "no-experimental";
4
+ declare const _default: import("@typescript-eslint/utils/eslint-utils").RuleModule<"noExperimental", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/eslint-utils").RuleListener>;
5
+ export default _default;
6
+ //# sourceMappingURL=no-experimental.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-experimental.d.ts","sourceRoot":"","sources":["../../src/rules/no-experimental.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAC;AACzB,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,eAAO,MAAM,SAAS,oBAAoB,CAAC;;AAE3C,wBAsCG"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RULE_NAME = void 0;
4
+ const create_eslint_rule_1 = require("../utils/create-eslint-rule");
5
+ const eslint_utils_1 = require("@typescript-eslint/utils/eslint-utils");
6
+ const jsdoc_1 = require("../utils/jsdoc");
7
+ exports.RULE_NAME = 'no-experimental';
8
+ exports.default = (0, create_eslint_rule_1.createESLintRule)({
9
+ name: exports.RULE_NAME,
10
+ meta: {
11
+ type: 'problem',
12
+ docs: {
13
+ description: `Disallow using code which is marked as experimental`,
14
+ },
15
+ schema: [],
16
+ messages: {
17
+ noExperimental: '`{{name}}` is experimental',
18
+ },
19
+ },
20
+ defaultOptions: [],
21
+ create(context) {
22
+ const services = (0, eslint_utils_1.getParserServices)(context);
23
+ const checker = services.program.getTypeChecker();
24
+ return {
25
+ Identifier: (node) => {
26
+ if ((0, jsdoc_1.isDeclaration)(node) || (0, jsdoc_1.isInsideExportOrImport)(node)) {
27
+ return;
28
+ }
29
+ const symbols = (0, jsdoc_1.getSymbols)(node, services, checker);
30
+ if (!(0, jsdoc_1.hasJsDocTag)(symbols, 'experimental')) {
31
+ return;
32
+ }
33
+ const { name } = node;
34
+ context.report({
35
+ node,
36
+ messageId: 'noExperimental',
37
+ data: { name },
38
+ });
39
+ },
40
+ };
41
+ },
42
+ });
@@ -0,0 +1,11 @@
1
+ import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils';
2
+ import ts from 'typescript';
3
+ export type CallLikeNode = TSESTree.CallExpression | TSESTree.NewExpression | TSESTree.TaggedTemplateExpression;
4
+ export declare function getCallLikeNode(node: TSESTree.Node): CallLikeNode | undefined;
5
+ export declare function getSymbols(node: TSESTree.Identifier, services: ParserServicesWithTypeInformation, checker: ts.TypeChecker): (ts.Symbol | undefined)[];
6
+ export declare function isNodeCalleeOfParent(node: TSESTree.Node): node is CallLikeNode;
7
+ export declare function hasJsDocTag(symbols: (ts.Symbol | undefined)[], tagName: string): boolean;
8
+ export declare function getCallLikeNodeSymbol(node: CallLikeNode, services: ParserServicesWithTypeInformation, checker: ts.TypeChecker): ts.Symbol | undefined;
9
+ export declare function isDeclaration(node: TSESTree.Identifier): boolean;
10
+ export declare function isInsideExportOrImport(node: TSESTree.Node): boolean;
11
+ //# sourceMappingURL=jsdoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../src/utils/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,MAAM,MAAM,YAAY,GACpB,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,aAAa,GACtB,QAAQ,CAAC,wBAAwB,CAAC;AAEtC,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,YAAY,GAAG,SAAS,CAW7E;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,QAAQ,EAAE,iCAAiC,EAC3C,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,CAAC,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAqB3B;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAClB,IAAI,IAAI,YAAY,CAYtB;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,CAAC,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,EAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAIT;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,iCAAiC,EAC3C,OAAO,EAAE,EAAE,CAAC,WAAW,GACtB,EAAE,CAAC,MAAM,GAAG,SAAS,CAMvB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,OAAO,CA2ChE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,OAAO,CAuBnE"}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getCallLikeNode = getCallLikeNode;
40
+ exports.getSymbols = getSymbols;
41
+ exports.isNodeCalleeOfParent = isNodeCalleeOfParent;
42
+ exports.hasJsDocTag = hasJsDocTag;
43
+ exports.getCallLikeNodeSymbol = getCallLikeNodeSymbol;
44
+ exports.isDeclaration = isDeclaration;
45
+ exports.isInsideExportOrImport = isInsideExportOrImport;
46
+ const utils_1 = require("@typescript-eslint/utils");
47
+ const typescript_1 = __importDefault(require("typescript"));
48
+ const tsutils = __importStar(require("ts-api-utils"));
49
+ function getCallLikeNode(node) {
50
+ let callee = node;
51
+ while (callee.parent?.type === utils_1.AST_NODE_TYPES.MemberExpression &&
52
+ callee.parent.property === callee) {
53
+ callee = callee.parent;
54
+ }
55
+ return isNodeCalleeOfParent(callee) ? callee : undefined;
56
+ }
57
+ function getSymbols(node, services, checker) {
58
+ const callLikeNode = getCallLikeNode(node);
59
+ if (callLikeNode) {
60
+ return [getCallLikeNodeSymbol(callLikeNode, services, checker)];
61
+ }
62
+ else if (node.parent.type === utils_1.AST_NODE_TYPES.Property) {
63
+ const property = services
64
+ .getTypeAtLocation(node.parent.parent)
65
+ .getProperty(node.name);
66
+ const propertySymbol = services.getSymbolAtLocation(node);
67
+ const valueSymbol = checker.getShorthandAssignmentValueSymbol(propertySymbol?.valueDeclaration);
68
+ return [
69
+ ...getSymbolsInAliasesChain(propertySymbol, checker),
70
+ property,
71
+ propertySymbol,
72
+ valueSymbol,
73
+ ];
74
+ }
75
+ return getSymbolsInAliasesChain(services.getSymbolAtLocation(node), checker);
76
+ }
77
+ function isNodeCalleeOfParent(node) {
78
+ switch (node.parent?.type) {
79
+ case utils_1.AST_NODE_TYPES.NewExpression:
80
+ case utils_1.AST_NODE_TYPES.CallExpression:
81
+ return node.parent.callee === node;
82
+ case utils_1.AST_NODE_TYPES.TaggedTemplateExpression:
83
+ return node.parent.tag === node;
84
+ default:
85
+ return false;
86
+ }
87
+ }
88
+ function hasJsDocTag(symbols, tagName) {
89
+ return symbols.some((symbol) => symbol?.getJsDocTags().some((tag) => tag.name === tagName));
90
+ }
91
+ function getCallLikeNodeSymbol(node, services, checker) {
92
+ const symbol = services.getSymbolAtLocation(node);
93
+ return symbol !== undefined &&
94
+ tsutils.isSymbolFlagSet(symbol, typescript_1.default.SymbolFlags.Alias)
95
+ ? checker.getAliasedSymbol(symbol)
96
+ : symbol;
97
+ }
98
+ function isDeclaration(node) {
99
+ const { parent } = node;
100
+ switch (parent.type) {
101
+ case utils_1.AST_NODE_TYPES.ClassDeclaration:
102
+ case utils_1.AST_NODE_TYPES.VariableDeclarator:
103
+ case utils_1.AST_NODE_TYPES.TSEnumMember:
104
+ return parent.id === node;
105
+ case utils_1.AST_NODE_TYPES.MethodDefinition:
106
+ case utils_1.AST_NODE_TYPES.PropertyDefinition:
107
+ case utils_1.AST_NODE_TYPES.AccessorProperty:
108
+ return parent.key === node;
109
+ case utils_1.AST_NODE_TYPES.Property:
110
+ if (parent.shorthand && parent.value === node) {
111
+ return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectPattern;
112
+ }
113
+ if (parent.value === node) {
114
+ return false;
115
+ }
116
+ return parent.parent.type === utils_1.AST_NODE_TYPES.ObjectExpression;
117
+ case utils_1.AST_NODE_TYPES.AssignmentPattern:
118
+ return parent.left === node;
119
+ case utils_1.AST_NODE_TYPES.FunctionDeclaration:
120
+ case utils_1.AST_NODE_TYPES.FunctionExpression:
121
+ case utils_1.AST_NODE_TYPES.TSDeclareFunction:
122
+ case utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression:
123
+ case utils_1.AST_NODE_TYPES.TSEnumDeclaration:
124
+ case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration:
125
+ case utils_1.AST_NODE_TYPES.TSMethodSignature:
126
+ case utils_1.AST_NODE_TYPES.TSModuleDeclaration:
127
+ case utils_1.AST_NODE_TYPES.TSParameterProperty:
128
+ case utils_1.AST_NODE_TYPES.TSPropertySignature:
129
+ case utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration:
130
+ case utils_1.AST_NODE_TYPES.TSTypeParameter:
131
+ return true;
132
+ default:
133
+ return false;
134
+ }
135
+ }
136
+ function isInsideExportOrImport(node) {
137
+ let current = node;
138
+ while (true) {
139
+ switch (current.type) {
140
+ case utils_1.AST_NODE_TYPES.ExportNamedDeclaration:
141
+ case utils_1.AST_NODE_TYPES.ImportDeclaration:
142
+ return true;
143
+ case utils_1.AST_NODE_TYPES.BlockStatement:
144
+ case utils_1.AST_NODE_TYPES.ClassDeclaration:
145
+ case utils_1.AST_NODE_TYPES.TSInterfaceDeclaration:
146
+ case utils_1.AST_NODE_TYPES.FunctionDeclaration:
147
+ case utils_1.AST_NODE_TYPES.FunctionExpression:
148
+ case utils_1.AST_NODE_TYPES.Program:
149
+ case utils_1.AST_NODE_TYPES.TSUnionType:
150
+ case utils_1.AST_NODE_TYPES.VariableDeclarator:
151
+ return false;
152
+ default:
153
+ current = current.parent;
154
+ }
155
+ }
156
+ }
157
+ function getSymbolsInAliasesChain(symbol, checker) {
158
+ const symbols = [symbol];
159
+ if (!symbol || !tsutils.isSymbolFlagSet(symbol, typescript_1.default.SymbolFlags.Alias)) {
160
+ return symbols;
161
+ }
162
+ const targetSymbol = checker.getAliasedSymbol(symbol);
163
+ while (tsutils.isSymbolFlagSet(symbol, typescript_1.default.SymbolFlags.Alias)) {
164
+ const immediateAliasedSymbol = symbol.getDeclarations() && checker.getImmediateAliasedSymbol(symbol);
165
+ if (!immediateAliasedSymbol) {
166
+ break;
167
+ }
168
+ symbol = immediateAliasedSymbol;
169
+ if (symbol === targetSymbol) {
170
+ symbols.push(symbol);
171
+ }
172
+ }
173
+ return symbols;
174
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/eslint-plugin",
3
- "version": "20.0.1-alpha.5",
3
+ "version": "20.0.1-alpha.7",
4
4
  "description": "ESLint plugin for Angular applications, following https://angular.dev/style-guide",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -18,11 +18,12 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "dependencies": {
21
- "@angular-eslint/bundled-angular-compiler": "20.0.1-alpha.5",
22
- "@angular-eslint/utils": "20.0.1-alpha.5"
21
+ "ts-api-utils": "^2.1.0",
22
+ "@angular-eslint/bundled-angular-compiler": "20.0.1-alpha.7",
23
+ "@angular-eslint/utils": "20.0.1-alpha.7"
23
24
  },
24
25
  "devDependencies": {
25
- "@angular-eslint/test-utils": "20.0.1-alpha.5"
26
+ "@angular-eslint/test-utils": "20.0.1-alpha.7"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "@typescript-eslint/utils": "^7.11.0 || ^8.0.0",