@angular-eslint/utils 18.1.1-alpha.1 → 18.1.1-alpha.3
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/eslint-plugin/ast-utils.d.ts +4 -4
- package/dist/eslint-plugin/ast-utils.d.ts.map +1 -1
- package/dist/eslint-plugin/ast-utils.js +33 -34
- package/dist/eslint-plugin/get-aria-attribute-keys.js +1 -2
- package/dist/eslint-plugin/get-native-event-names.js +1 -2
- package/dist/eslint-plugin/rule-fixes.js +6 -7
- package/dist/eslint-plugin/selector-utils.d.ts.map +1 -1
- package/dist/eslint-plugin/selectors.js +4 -4
- package/dist/eslint-plugin-template/parser-services.js +2 -3
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +5 -5
- package/package.json +2 -2
|
@@ -105,9 +105,9 @@ export declare const getDecoratorArgument: ({ expression, }: TSESTree.Decorator)
|
|
|
105
105
|
export declare const getDecoratorName: ({ expression, }: TSESTree.Decorator) => string | undefined;
|
|
106
106
|
export declare const ANGULAR_LIFECYCLE_INTERFACES: ReadonlySet<AngularLifecycleInterfaceKeys>;
|
|
107
107
|
export declare const ANGULAR_LIFECYCLE_METHODS: ReadonlySet<AngularLifecycleMethodKeys>;
|
|
108
|
-
export declare const isAngularLifecycleInterface: (value: string) => value is
|
|
109
|
-
export declare const isAngularLifecycleMethod: (value: string) => value is
|
|
110
|
-
export declare const isAngularClassDecorator: (value: string) => value is
|
|
108
|
+
export declare const isAngularLifecycleInterface: (value: string) => value is AngularLifecycleInterfaceKeys;
|
|
109
|
+
export declare const isAngularLifecycleMethod: (value: string) => value is AngularLifecycleMethodKeys;
|
|
110
|
+
export declare const isAngularClassDecorator: (value: string) => value is AngularClassDecoratorKeys;
|
|
111
111
|
export declare const isAngularInnerClassDecorator: (value: string) => value is AngularInnerClassDecoratorKeys;
|
|
112
112
|
/**
|
|
113
113
|
* `PropertyDefinition` nodes can have different types of `key`s
|
|
@@ -122,7 +122,7 @@ export declare const isAngularInnerClassDecorator: (value: string) => value is A
|
|
|
122
122
|
*/
|
|
123
123
|
export declare function getPropertyDefinitionName({ computed, key, }: TSESTree.PropertyDefinition): string;
|
|
124
124
|
export declare const getDecoratorProperty: (decorator: TSESTree.Decorator, name: string) => TSESTree.Property | undefined;
|
|
125
|
-
export declare const getDecoratorPropertyValue: (decorator: TSESTree.Decorator, name: string) => TSESTree.Property[
|
|
125
|
+
export declare const getDecoratorPropertyValue: (decorator: TSESTree.Decorator, name: string) => TSESTree.Property["value"] | undefined;
|
|
126
126
|
export declare const getDeclaredMethods: ({ body: { body }, }: TSESTree.ClassDeclaration) => readonly TSESTree.MethodDefinition[];
|
|
127
127
|
export declare const getMethodName: ({ computed, key, }: TSESTree.MethodDefinition) => string | undefined;
|
|
128
128
|
export declare const getLifecycleInterfaceByMethodName: (methodName: AngularLifecycleMethodKeys) => AngularLifecycleInterfaceKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-utils.d.ts","sourceRoot":"","sources":["../../src/eslint-plugin/ast-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQzD,oBAAY,sBAAsB;IAChC,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED,aAAK,qCAAqC;IACxC,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,aAAK,uBAAuB;IAC1B,YAAY,iBAAiB;CAC9B;AAED,aAAK,iCAAiC;IACpC,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,YAAY,iBAAiB;CAC9B;AAED,eAAO,MAAM,2BAA2B;;;;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CAAC,KAAK,GACpB,KAAK,IAAI,QAAQ,CAAC,YAAY,GAAG;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,CAE1D"}
|
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.getLifecycleInterfaceByMethodName = exports.getMethodName = exports.getDeclaredMethods = exports.getDecoratorPropertyValue = exports.getDecoratorProperty = exports.isAngularInnerClassDecorator = exports.isAngularClassDecorator = exports.isAngularLifecycleMethod = exports.isAngularLifecycleInterface = exports.ANGULAR_LIFECYCLE_METHODS = exports.ANGULAR_LIFECYCLE_INTERFACES = exports.getDecoratorName = exports.getDecoratorArgument = exports.getAngularClassDecorator = exports.getDecorator = exports.getClassName = exports.getDeclaredAngularLifecycleMethods = exports.getDeclaredAngularLifecycleInterfaces = exports.getPipeDecorator = exports.ANGULAR_CLASS_DECORATOR_MAPPER = exports.ANGULAR_CLASS_DECORATORS = exports.ANGULAR_INNER_CLASS_DECORATORS = exports.ANGULAR_CLASS_DECORATOR_LIFECYCLE_METHOD_MAPPER = exports.angularLifecycleMethodsOrdered = exports.angularLifecycleMethodKeys = exports.angularLifecycleInterfaceKeys = exports.angularInnerClassDecoratorKeys = exports.angularClassDecoratorKeys = exports.OPTION_STYLE_KEBAB_CASE = exports.OPTION_STYLE_CAMEL_CASE = exports.AngularLifecycleMethods = exports.AngularLifecycleInterfaces = exports.AngularInnerClassDecorators = exports.AngularClassDecorators = void 0;
|
|
4
|
+
exports.getCorrespondentImportClause = getCorrespondentImportClause;
|
|
5
|
+
exports.getImportDeclarations = getImportDeclarations;
|
|
6
|
+
exports.getImportDeclarationSpecifier = getImportDeclarationSpecifier;
|
|
7
|
+
exports.getInterface = getInterface;
|
|
8
|
+
exports.getInterfaceName = getInterfaceName;
|
|
9
|
+
exports.getInterfaces = getInterfaces;
|
|
10
|
+
exports.getDeclaredInterfaceNames = getDeclaredInterfaceNames;
|
|
11
|
+
exports.getNearestNodeFrom = getNearestNodeFrom;
|
|
12
|
+
exports.getPropertyDefinitionName = getPropertyDefinitionName;
|
|
13
|
+
exports.isImportedFrom = isImportedFrom;
|
|
14
|
+
exports.getRawText = getRawText;
|
|
15
|
+
exports.getReplacementText = getReplacementText;
|
|
16
|
+
exports.isCallExpression = isCallExpression;
|
|
17
|
+
exports.isMemberExpression = isMemberExpression;
|
|
18
|
+
exports.isIdentifierOrMemberExpression = isIdentifierOrMemberExpression;
|
|
19
|
+
exports.isClassDeclaration = isClassDeclaration;
|
|
20
|
+
exports.isPropertyDefinition = isPropertyDefinition;
|
|
21
|
+
exports.isPropertyOrMethodDefinition = isPropertyOrMethodDefinition;
|
|
22
|
+
exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
|
|
23
|
+
exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
|
|
24
|
+
exports.isObjectExpression = isObjectExpression;
|
|
25
|
+
exports.isArrayExpression = isArrayExpression;
|
|
26
|
+
exports.isProperty = isProperty;
|
|
27
|
+
exports.isLiteral = isLiteral;
|
|
28
|
+
exports.isTemplateElement = isTemplateElement;
|
|
29
|
+
exports.isTemplateLiteral = isTemplateLiteral;
|
|
30
|
+
exports.isImportDeclaration = isImportDeclaration;
|
|
31
|
+
exports.isImportSpecifier = isImportSpecifier;
|
|
32
|
+
exports.isStringLiteral = isStringLiteral;
|
|
33
|
+
exports.isMethodDefinition = isMethodDefinition;
|
|
34
|
+
exports.isSuper = isSuper;
|
|
35
|
+
exports.isImplementsToken = isImplementsToken;
|
|
5
36
|
const utils_1 = require("@typescript-eslint/utils");
|
|
6
37
|
const utils_2 = require("../utils");
|
|
7
38
|
var AngularClassDecorators;
|
|
@@ -174,7 +205,6 @@ function getCorrespondentImportClause(importDeclarations, compatibleWithTypeOnly
|
|
|
174
205
|
}
|
|
175
206
|
return importClause;
|
|
176
207
|
}
|
|
177
|
-
exports.getCorrespondentImportClause = getCorrespondentImportClause;
|
|
178
208
|
function getImportDeclarations(node, moduleName) {
|
|
179
209
|
let parentNode = node;
|
|
180
210
|
while ((parentNode = parentNode.parent)) {
|
|
@@ -184,7 +214,6 @@ function getImportDeclarations(node, moduleName) {
|
|
|
184
214
|
}
|
|
185
215
|
return parentNode;
|
|
186
216
|
}
|
|
187
|
-
exports.getImportDeclarations = getImportDeclarations;
|
|
188
217
|
function getImportDeclarationSpecifier(importDeclarations, importName) {
|
|
189
218
|
for (const importDeclaration of importDeclarations) {
|
|
190
219
|
const importSpecifier = importDeclaration.specifiers.find((importClause) => {
|
|
@@ -197,11 +226,9 @@ function getImportDeclarationSpecifier(importDeclarations, importName) {
|
|
|
197
226
|
}
|
|
198
227
|
return undefined;
|
|
199
228
|
}
|
|
200
|
-
exports.getImportDeclarationSpecifier = getImportDeclarationSpecifier;
|
|
201
229
|
function getInterface(node, interfaceName) {
|
|
202
230
|
return getInterfaces(node).find((interfaceMember) => getInterfaceName(interfaceMember) === interfaceName);
|
|
203
231
|
}
|
|
204
|
-
exports.getInterface = getInterface;
|
|
205
232
|
function getInterfaceName(interfaceMember) {
|
|
206
233
|
if (utils_1.ASTUtils.isIdentifier(interfaceMember)) {
|
|
207
234
|
return interfaceMember.name;
|
|
@@ -210,7 +237,6 @@ function getInterfaceName(interfaceMember) {
|
|
|
210
237
|
? interfaceMember.property.name
|
|
211
238
|
: undefined;
|
|
212
239
|
}
|
|
213
|
-
exports.getInterfaceName = getInterfaceName;
|
|
214
240
|
const getPipeDecorator = (node) => (0, exports.getDecorator)(node, 'Pipe');
|
|
215
241
|
exports.getPipeDecorator = getPipeDecorator;
|
|
216
242
|
function getInterfaces(node) {
|
|
@@ -218,11 +244,9 @@ function getInterfaces(node) {
|
|
|
218
244
|
.map(({ expression }) => expression)
|
|
219
245
|
.filter(isIdentifierOrMemberExpression);
|
|
220
246
|
}
|
|
221
|
-
exports.getInterfaces = getInterfaces;
|
|
222
247
|
function getDeclaredInterfaceNames(node) {
|
|
223
248
|
return getInterfaces(node).map(getInterfaceName).filter(utils_2.isNotNullOrUndefined);
|
|
224
249
|
}
|
|
225
|
-
exports.getDeclaredInterfaceNames = getDeclaredInterfaceNames;
|
|
226
250
|
const getDeclaredAngularLifecycleInterfaces = (node) => getDeclaredInterfaceNames(node).filter(exports.isAngularLifecycleInterface);
|
|
227
251
|
exports.getDeclaredAngularLifecycleInterfaces = getDeclaredAngularLifecycleInterfaces;
|
|
228
252
|
const getDeclaredAngularLifecycleMethods = (node) => (0, exports.getDeclaredMethods)(node)
|
|
@@ -239,7 +263,6 @@ function getNearestNodeFrom({ parent }, predicate) {
|
|
|
239
263
|
}
|
|
240
264
|
return null;
|
|
241
265
|
}
|
|
242
|
-
exports.getNearestNodeFrom = getNearestNodeFrom;
|
|
243
266
|
const getClassName = (node) => {
|
|
244
267
|
if (isClassDeclaration(node)) {
|
|
245
268
|
return node.id?.name;
|
|
@@ -308,7 +331,6 @@ function getPropertyDefinitionName({ computed, key, }) {
|
|
|
308
331
|
}
|
|
309
332
|
throw new Error(`Unexpected "PropertyDefinition.key.type" provided: ${key.type}`);
|
|
310
333
|
}
|
|
311
|
-
exports.getPropertyDefinitionName = getPropertyDefinitionName;
|
|
312
334
|
const getDecoratorProperty = (decorator, name) => {
|
|
313
335
|
return (0, exports.getDecoratorArgument)(decorator)
|
|
314
336
|
?.properties.filter(isProperty)
|
|
@@ -338,7 +360,6 @@ function isImportedFrom(identifier, moduleName) {
|
|
|
338
360
|
specifier.imported.name === identifier.name &&
|
|
339
361
|
specifier.local.name === identifier.name)));
|
|
340
362
|
}
|
|
341
|
-
exports.isImportedFrom = isImportedFrom;
|
|
342
363
|
function getRawText(node) {
|
|
343
364
|
if (utils_1.ASTUtils.isIdentifier(node)) {
|
|
344
365
|
return node.name;
|
|
@@ -359,80 +380,62 @@ function getRawText(node) {
|
|
|
359
380
|
}
|
|
360
381
|
throw Error(`Unexpected \`node.type\` provided: ${node.type}`);
|
|
361
382
|
}
|
|
362
|
-
exports.getRawText = getRawText;
|
|
363
383
|
function getReplacementText(node, text) {
|
|
364
384
|
return isLiteral(node) ? `'${text}'` : `\`${text}\``;
|
|
365
385
|
}
|
|
366
|
-
exports.getReplacementText = getReplacementText;
|
|
367
386
|
// SECTION START:
|
|
368
387
|
// Equivalents of utils exported by TypeScript itself for its own AST
|
|
369
388
|
function isCallExpression(node) {
|
|
370
389
|
return node.type === utils_1.AST_NODE_TYPES.CallExpression;
|
|
371
390
|
}
|
|
372
|
-
exports.isCallExpression = isCallExpression;
|
|
373
391
|
function isMemberExpression(node) {
|
|
374
392
|
return node.type === utils_1.AST_NODE_TYPES.MemberExpression;
|
|
375
393
|
}
|
|
376
|
-
exports.isMemberExpression = isMemberExpression;
|
|
377
394
|
function isIdentifierOrMemberExpression(node) {
|
|
378
395
|
return utils_1.ASTUtils.isIdentifier(node) || isMemberExpression(node);
|
|
379
396
|
}
|
|
380
|
-
exports.isIdentifierOrMemberExpression = isIdentifierOrMemberExpression;
|
|
381
397
|
function isClassDeclaration(node) {
|
|
382
398
|
return node.type === utils_1.AST_NODE_TYPES.ClassDeclaration;
|
|
383
399
|
}
|
|
384
|
-
exports.isClassDeclaration = isClassDeclaration;
|
|
385
400
|
function isPropertyDefinition(node) {
|
|
386
401
|
return node.type === utils_1.AST_NODE_TYPES.PropertyDefinition;
|
|
387
402
|
}
|
|
388
|
-
exports.isPropertyDefinition = isPropertyDefinition;
|
|
389
403
|
function isPropertyOrMethodDefinition(node) {
|
|
390
404
|
return isPropertyDefinition(node) || isMethodDefinition(node);
|
|
391
405
|
}
|
|
392
|
-
exports.isPropertyOrMethodDefinition = isPropertyOrMethodDefinition;
|
|
393
406
|
function isImportDefaultSpecifier(node) {
|
|
394
407
|
return node.type === utils_1.AST_NODE_TYPES.ImportDefaultSpecifier;
|
|
395
408
|
}
|
|
396
|
-
exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
|
|
397
409
|
function isImportNamespaceSpecifier(node) {
|
|
398
410
|
return node.type === utils_1.AST_NODE_TYPES.ImportNamespaceSpecifier;
|
|
399
411
|
}
|
|
400
|
-
exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
|
|
401
412
|
function isObjectExpression(node) {
|
|
402
413
|
return node.type === utils_1.AST_NODE_TYPES.ObjectExpression;
|
|
403
414
|
}
|
|
404
|
-
exports.isObjectExpression = isObjectExpression;
|
|
405
415
|
function isArrayExpression(node) {
|
|
406
416
|
return node.type === utils_1.AST_NODE_TYPES.ArrayExpression;
|
|
407
417
|
}
|
|
408
|
-
exports.isArrayExpression = isArrayExpression;
|
|
409
418
|
function isProperty(node) {
|
|
410
419
|
return node.type === utils_1.AST_NODE_TYPES.Property;
|
|
411
420
|
}
|
|
412
|
-
exports.isProperty = isProperty;
|
|
413
421
|
function isProgram(node) {
|
|
414
422
|
return node.type === utils_1.AST_NODE_TYPES.Program;
|
|
415
423
|
}
|
|
416
424
|
function isLiteral(node) {
|
|
417
425
|
return node.type === utils_1.AST_NODE_TYPES.Literal;
|
|
418
426
|
}
|
|
419
|
-
exports.isLiteral = isLiteral;
|
|
420
427
|
function isTemplateElement(node) {
|
|
421
428
|
return node.type === utils_1.AST_NODE_TYPES.TemplateElement;
|
|
422
429
|
}
|
|
423
|
-
exports.isTemplateElement = isTemplateElement;
|
|
424
430
|
function isTemplateLiteral(node) {
|
|
425
431
|
return node.type === utils_1.AST_NODE_TYPES.TemplateLiteral;
|
|
426
432
|
}
|
|
427
|
-
exports.isTemplateLiteral = isTemplateLiteral;
|
|
428
433
|
function isImportDeclaration(node) {
|
|
429
434
|
return node.type === utils_1.AST_NODE_TYPES.ImportDeclaration;
|
|
430
435
|
}
|
|
431
|
-
exports.isImportDeclaration = isImportDeclaration;
|
|
432
436
|
function isImportSpecifier(node) {
|
|
433
437
|
return node.type === utils_1.AST_NODE_TYPES.ImportSpecifier;
|
|
434
438
|
}
|
|
435
|
-
exports.isImportSpecifier = isImportSpecifier;
|
|
436
439
|
/**
|
|
437
440
|
* `ESTree` does not differentiate between different types of `Literals` at the `AST` level,
|
|
438
441
|
* but it is a common thing to need to do, so this utility are here to
|
|
@@ -441,18 +444,14 @@ exports.isImportSpecifier = isImportSpecifier;
|
|
|
441
444
|
function isStringLiteral(node) {
|
|
442
445
|
return isLiteral(node) && typeof node.value === 'string';
|
|
443
446
|
}
|
|
444
|
-
exports.isStringLiteral = isStringLiteral;
|
|
445
447
|
function isMethodDefinition(node) {
|
|
446
448
|
return node.type === utils_1.AST_NODE_TYPES.MethodDefinition;
|
|
447
449
|
}
|
|
448
|
-
exports.isMethodDefinition = isMethodDefinition;
|
|
449
450
|
function isSuper(node) {
|
|
450
451
|
return node.type === utils_1.AST_NODE_TYPES.Super;
|
|
451
452
|
}
|
|
452
|
-
exports.isSuper = isSuper;
|
|
453
453
|
function isImplementsToken(token) {
|
|
454
454
|
return token.type === utils_1.AST_TOKEN_TYPES.Keyword && token.value === 'implements';
|
|
455
455
|
}
|
|
456
|
-
exports.isImplementsToken = isImplementsToken;
|
|
457
456
|
// SECTION END:
|
|
458
457
|
// Equivalents of utils exported by TypeScript itself for its own AST
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAriaAttributeKeys =
|
|
3
|
+
exports.getAriaAttributeKeys = getAriaAttributeKeys;
|
|
4
4
|
let ariaAttributeKeys = null;
|
|
5
5
|
function getAriaAttributeKeys() {
|
|
6
6
|
return (ariaAttributeKeys ??
|
|
@@ -54,4 +54,3 @@ function getAriaAttributeKeys() {
|
|
|
54
54
|
'aria-valuetext',
|
|
55
55
|
])));
|
|
56
56
|
}
|
|
57
|
-
exports.getAriaAttributeKeys = getAriaAttributeKeys;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNativeEventNames =
|
|
3
|
+
exports.getNativeEventNames = getNativeEventNames;
|
|
4
4
|
let nativeEventNames = null;
|
|
5
5
|
function getNativeEventNames() {
|
|
6
6
|
return (nativeEventNames ??
|
|
@@ -179,4 +179,3 @@ function getNativeEventNames() {
|
|
|
179
179
|
'wheel',
|
|
180
180
|
])));
|
|
181
181
|
}
|
|
182
|
-
exports.getNativeEventNames = getNativeEventNames;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getImportAddFix = getImportAddFix;
|
|
4
|
+
exports.getImportRemoveFix = getImportRemoveFix;
|
|
5
|
+
exports.getImplementsSchemaFixer = getImplementsSchemaFixer;
|
|
6
|
+
exports.getDecoratorPropertyAddFix = getDecoratorPropertyAddFix;
|
|
7
|
+
exports.getImplementsRemoveFix = getImplementsRemoveFix;
|
|
8
|
+
exports.getNodeToCommaRemoveFix = getNodeToCommaRemoveFix;
|
|
4
9
|
const utils_1 = require("@typescript-eslint/utils");
|
|
5
10
|
const ast_utils_1 = require("./ast-utils");
|
|
6
11
|
const utils_2 = require("../utils");
|
|
@@ -23,7 +28,6 @@ function getImportAddFix({ compatibleWithTypeOnlyImport = false, fixer, importNa
|
|
|
23
28
|
: `, ${importName}`;
|
|
24
29
|
return fixer.insertTextAfter(importClause, replacementText);
|
|
25
30
|
}
|
|
26
|
-
exports.getImportAddFix = getImportAddFix;
|
|
27
31
|
function getImportRemoveFix(sourceCode, importDeclarations, importName, fixer) {
|
|
28
32
|
const { importDeclaration, importSpecifier } = (0, ast_utils_1.getImportDeclarationSpecifier)(importDeclarations, importName) ?? {};
|
|
29
33
|
if (!importDeclaration || !importSpecifier)
|
|
@@ -49,14 +53,12 @@ function getImportRemoveFix(sourceCode, importDeclarations, importName, fixer) {
|
|
|
49
53
|
importSpecifier.range[1],
|
|
50
54
|
]);
|
|
51
55
|
}
|
|
52
|
-
exports.getImportRemoveFix = getImportRemoveFix;
|
|
53
56
|
function getImplementsSchemaFixer({ id, implements: classImplements }, interfaceName) {
|
|
54
57
|
const [implementsNodeReplace, implementsTextReplace] = Array.isArray(classImplements) && classImplements.length > 0
|
|
55
58
|
? [(0, utils_2.getLast)(classImplements), `, ${interfaceName}`]
|
|
56
59
|
: [id, ` implements ${interfaceName}`];
|
|
57
60
|
return { implementsNodeReplace, implementsTextReplace };
|
|
58
61
|
}
|
|
59
|
-
exports.getImplementsSchemaFixer = getImplementsSchemaFixer;
|
|
60
62
|
function getDecoratorPropertyAddFix({ expression }, fixer, text) {
|
|
61
63
|
if (!(0, ast_utils_1.isCallExpression)(expression)) {
|
|
62
64
|
return undefined;
|
|
@@ -76,7 +78,6 @@ function getDecoratorPropertyAddFix({ expression }, fixer, text) {
|
|
|
76
78
|
// `@Component({...})` => `@Component({changeDetection: ChangeDetectionStrategy.OnPush, ...})`
|
|
77
79
|
return fixer.insertTextBefore(properties[0], `${text},`);
|
|
78
80
|
}
|
|
79
|
-
exports.getDecoratorPropertyAddFix = getDecoratorPropertyAddFix;
|
|
80
81
|
function getImplementsRemoveFix(sourceCode, classDeclaration, interfaceName, fixer) {
|
|
81
82
|
const { implements: classImplements } = classDeclaration;
|
|
82
83
|
if (!classImplements)
|
|
@@ -106,11 +107,9 @@ function getImplementsRemoveFix(sourceCode, classDeclaration, interfaceName, fix
|
|
|
106
107
|
? undefined
|
|
107
108
|
: fixer.removeRange([tokenBeforeInterface.range[0], identifier.range[1]]);
|
|
108
109
|
}
|
|
109
|
-
exports.getImplementsRemoveFix = getImplementsRemoveFix;
|
|
110
110
|
function getNodeToCommaRemoveFix(sourceCode, node, fixer) {
|
|
111
111
|
const tokenAfterNode = sourceCode.getTokenAfter(node);
|
|
112
112
|
return tokenAfterNode && utils_1.ASTUtils.isCommaToken(tokenAfterNode)
|
|
113
113
|
? fixer.removeRange([node.range[0], tokenAfterNode.range[1]])
|
|
114
114
|
: fixer.remove(node);
|
|
115
115
|
}
|
|
116
|
-
exports.getNodeToCommaRemoveFix = getNodeToCommaRemoveFix;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector-utils.d.ts","sourceRoot":"","sources":["../../src/eslint-plugin/selector-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,eAAO,MAAM,qBAAqB,cAAc,CAAC;AACjD,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAC1B,OAAO,qBAAqB,GAC5B,OAAO,mBAAmB,GAC1B,MAAM,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC5B,OAAO,iBAAiB,GACxB,OAAO,mBAAmB,CAAC;AAO/B,MAAM,MAAM,OAAO,GAAG;IACpB;QACE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,SAAS,kBAAkB,EAAE,CAAC;QAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;QAC5C,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;KACpC;CACF,CAAC;AAEF,eAAO,MAAM,iBAAiB;wBACR,MAAM,GAAG,OAAO;wBAIhB,MAAM,GAAG,OAAO;sBAIlB,MAAM,GAAG,OAAO;wBAId,MAAM,GAAG,OAAO;mBAIrB,MAAM,iBAAiB,MAAM,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO;CAmB7E,CAAC;AAmBF,eAAO,MAAM,iBAAiB,SACtB,
|
|
1
|
+
{"version":3,"file":"selector-utils.d.ts","sourceRoot":"","sources":["../../src/eslint-plugin/selector-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC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AC9B,QAAQ,CAAC,IAAI,SACZ,mBAAmB,UAClB,MAAM,GAAG,SAAS,MAAM,EAAE,WACzB,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC,KAClE,IASF,CAAC;AAEF,eAAO,MAAM,eAAe,SACpB,QAAQ,CAAC,IAAI,QACb,kBAAkB,GAAG,SAAS,kBAAkB,EAAE,WAC/C,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC,KAClE,IAQF,CAAC;AAEF,eAAO,MAAM,iBAAiB,SACtB,kBAAkB,GAAG,SAAS,kBAAkB,EAAE,UAChD,MAAM,GAAG,SAAS,MAAM,EAAE,SAC3B,mBAAmB,KACzB,OAqBF,CAAC;AAEF,eAAO,MAAM,aAAa,SAClB,QAAQ,CAAC,IAAI,cACP,kBAAkB,GAAG,SAAS,kBAAkB,EAAE,gBAChD,SAAS,MAAM,EAAE,eAClB,aAAa,KACzB;IACD,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC,GAAG,IA8CH,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OUTPUT_PROPERTY_OR_GETTER = exports.OUTPUT_ALIAS = exports.OUTPUTS_METADATA_PROPERTY_LITERAL = exports.INPUT_PROPERTY_OR_SETTER = exports.INPUT_ALIAS = exports.INPUTS_METADATA_PROPERTY_LITERAL = exports.COMPONENT_OR_DIRECTIVE_SELECTOR_LITERAL = exports.DIRECTIVE_SELECTOR_LITERAL = exports.COMPONENT_SELECTOR_LITERAL = exports.
|
|
3
|
+
exports.OUTPUT_PROPERTY_OR_GETTER = exports.OUTPUT_ALIAS = exports.OUTPUTS_METADATA_PROPERTY_LITERAL = exports.INPUT_PROPERTY_OR_SETTER = exports.INPUT_ALIAS = exports.INPUTS_METADATA_PROPERTY_LITERAL = exports.COMPONENT_OR_DIRECTIVE_SELECTOR_LITERAL = exports.DIRECTIVE_SELECTOR_LITERAL = exports.COMPONENT_SELECTOR_LITERAL = exports.LITERAL_OR_TEMPLATE_ELEMENT = exports.OUTPUT_DECORATOR = exports.INPUT_DECORATOR = exports.MODULE_CLASS_DECORATOR = exports.INJECTABLE_CLASS_DECORATOR = exports.PIPE_CLASS_DECORATOR = exports.DIRECTIVE_CLASS_DECORATOR = exports.COMPONENT_CLASS_DECORATOR = exports.COMPONENT_OR_DIRECTIVE_CLASS_DECORATOR = void 0;
|
|
4
|
+
exports.decoratorDefinition = decoratorDefinition;
|
|
5
|
+
exports.metadataProperty = metadataProperty;
|
|
6
|
+
exports.methodDefinition = methodDefinition;
|
|
4
7
|
exports.COMPONENT_OR_DIRECTIVE_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name=/^(Component|Directive)$/]';
|
|
5
8
|
exports.COMPONENT_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name="Component"]';
|
|
6
9
|
exports.DIRECTIVE_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name="Directive"]';
|
|
@@ -13,15 +16,12 @@ exports.LITERAL_OR_TEMPLATE_ELEMENT = ':matches(Literal, TemplateElement)';
|
|
|
13
16
|
function decoratorDefinition(decoratorName) {
|
|
14
17
|
return `ClassDeclaration:has(Decorator[expression.callee.name=${decoratorName}])`;
|
|
15
18
|
}
|
|
16
|
-
exports.decoratorDefinition = decoratorDefinition;
|
|
17
19
|
function metadataProperty(key) {
|
|
18
20
|
return `Property:matches([key.name=${key}][computed=false], [key.value=${key}], [key.quasis.0.value.raw=${key}])`;
|
|
19
21
|
}
|
|
20
|
-
exports.metadataProperty = metadataProperty;
|
|
21
22
|
function methodDefinition(key) {
|
|
22
23
|
return `MethodDefinition:matches([key.name=${key}][computed=false], [key.value=${key}], [key.quasis.0.value.raw=${key}])`;
|
|
23
24
|
}
|
|
24
|
-
exports.methodDefinition = methodDefinition;
|
|
25
25
|
exports.COMPONENT_SELECTOR_LITERAL = `${exports.COMPONENT_CLASS_DECORATOR} ${metadataProperty('selector')} ${exports.LITERAL_OR_TEMPLATE_ELEMENT}`;
|
|
26
26
|
exports.DIRECTIVE_SELECTOR_LITERAL = `${exports.DIRECTIVE_CLASS_DECORATOR} ${metadataProperty('selector')} ${exports.LITERAL_OR_TEMPLATE_ELEMENT}`;
|
|
27
27
|
exports.COMPONENT_OR_DIRECTIVE_SELECTOR_LITERAL = `:matches(${exports.COMPONENT_SELECTOR_LITERAL}, ${exports.DIRECTIVE_SELECTOR_LITERAL})`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getTemplateParserServices = getTemplateParserServices;
|
|
4
|
+
exports.ensureTemplateParser = ensureTemplateParser;
|
|
4
5
|
function getTemplateParserServices(context) {
|
|
5
6
|
ensureTemplateParser(context);
|
|
6
7
|
return context.sourceCode.parserServices;
|
|
7
8
|
}
|
|
8
|
-
exports.getTemplateParserServices = getTemplateParserServices;
|
|
9
9
|
/**
|
|
10
10
|
* Utility for rule authors to ensure that their rule is correctly being used with @angular-eslint/template-parser
|
|
11
11
|
* If @angular-eslint/template-parser is not the configured parser when the function is invoked it will throw
|
|
@@ -22,4 +22,3 @@ function ensureTemplateParser(context) {
|
|
|
22
22
|
throw new Error("You have used a rule which requires '@angular-eslint/template-parser' to be used as the 'parser' in your ESLint config.");
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
exports.ensureTemplateParser = ensureTemplateParser;
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAEzE;AAED,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAEzE;AAED,eAAO,MAAM,UAAU,EAAkB,CAAC,CAAC,EACzC,CAAC,EAAE,CAAC,KACD,SAAS,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;AAEzC;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,CAKjE;AAID,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAC7B,IAAI,GAAG,SAAS,GAAG,CAAC,KAC1B,KAAK,IAAI,CAA0C,CAAC;AAEvD,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MAG9C,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,mBAAmB,UAAW,SAAS,MAAM,EAAE,KAAG,MAW9D,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,OAAO,EAAE,KAAG,MACpB,CAAC;AAEnC,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAEnE;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE"}
|
package/dist/utils.js
CHANGED
|
@@ -8,14 +8,17 @@
|
|
|
8
8
|
* ===============================================================================
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.
|
|
11
|
+
exports.toPattern = exports.toHumanReadableText = exports.kebabToCamelCase = exports.isNotNullOrUndefined = exports.objectKeys = void 0;
|
|
12
|
+
exports.getLast = getLast;
|
|
13
|
+
exports.arrayify = arrayify;
|
|
14
|
+
exports.capitalize = capitalize;
|
|
15
|
+
exports.withoutBracketsAndWhitespaces = withoutBracketsAndWhitespaces;
|
|
12
16
|
/**
|
|
13
17
|
* Return the last item of the given array.
|
|
14
18
|
*/
|
|
15
19
|
function getLast(items) {
|
|
16
20
|
return items.slice(-1)[0];
|
|
17
21
|
}
|
|
18
|
-
exports.getLast = getLast;
|
|
19
22
|
exports.objectKeys = Object.keys;
|
|
20
23
|
/**
|
|
21
24
|
* Enforces the invariant that the input is an array.
|
|
@@ -26,7 +29,6 @@ function arrayify(value) {
|
|
|
26
29
|
}
|
|
27
30
|
return (value ? [value] : []);
|
|
28
31
|
}
|
|
29
|
-
exports.arrayify = arrayify;
|
|
30
32
|
// Needed because in the current Typescript version (TS 3.3.3333), Boolean() cannot be used to perform a null check.
|
|
31
33
|
// For more, see: https://github.com/Microsoft/TypeScript/issues/16655
|
|
32
34
|
const isNotNullOrUndefined = (input) => input !== null && input !== undefined;
|
|
@@ -52,8 +54,6 @@ exports.toPattern = toPattern;
|
|
|
52
54
|
function capitalize(text) {
|
|
53
55
|
return `${text[0].toUpperCase()}${text.slice(1)}`;
|
|
54
56
|
}
|
|
55
|
-
exports.capitalize = capitalize;
|
|
56
57
|
function withoutBracketsAndWhitespaces(text) {
|
|
57
58
|
return text.replace(/[[\]\s]/g, '');
|
|
58
59
|
}
|
|
59
|
-
exports.withoutBracketsAndWhitespaces = withoutBracketsAndWhitespaces;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/utils",
|
|
3
|
-
"version": "18.1.1-alpha.
|
|
3
|
+
"version": "18.1.1-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typescript": "*"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-eslint/bundled-angular-compiler": "18.1.1-alpha.
|
|
25
|
+
"@angular-eslint/bundled-angular-compiler": "18.1.1-alpha.3"
|
|
26
26
|
},
|
|
27
27
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
|
|
28
28
|
}
|