@angular-eslint/utils 17.1.2-alpha.6 → 17.1.2-alpha.8

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.
@@ -7,6 +7,8 @@ export declare const MODULE_CLASS_DECORATOR = "ClassDeclaration > Decorator[expr
7
7
  export declare const INPUT_DECORATOR = "Decorator[expression.callee.name=\"Input\"]";
8
8
  export declare const OUTPUT_DECORATOR = "Decorator[expression.callee.name=\"Output\"]";
9
9
  export declare const LITERAL_OR_TEMPLATE_ELEMENT = ":matches(Literal, TemplateElement)";
10
+ export declare function decoratorDefinition(decoratorName: RegExp): string;
11
+ export declare function decoratorDefinition<TDecoratorName extends string>(decoratorName: TDecoratorName): `ClassDeclaration:has(Decorator[expression.callee.name=${TDecoratorName}])`;
10
12
  export declare function metadataProperty(key: RegExp): string;
11
13
  export declare function metadataProperty<TKey extends string>(key: TKey): `Property:matches([key.name=${TKey}][computed=false], [key.value=${TKey}], [key.quasis.0.value.raw=${TKey}])`;
12
14
  export declare function methodDefinition(key: RegExp): string;
@@ -1,6 +1,6 @@
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.methodDefinition = exports.metadataProperty = 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;
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.methodDefinition = exports.metadataProperty = exports.decoratorDefinition = 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
4
  exports.COMPONENT_OR_DIRECTIVE_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name=/^(Component|Directive)$/]';
5
5
  exports.COMPONENT_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name="Component"]';
6
6
  exports.DIRECTIVE_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee.name="Directive"]';
@@ -10,6 +10,10 @@ exports.MODULE_CLASS_DECORATOR = 'ClassDeclaration > Decorator[expression.callee
10
10
  exports.INPUT_DECORATOR = 'Decorator[expression.callee.name="Input"]';
11
11
  exports.OUTPUT_DECORATOR = 'Decorator[expression.callee.name="Output"]';
12
12
  exports.LITERAL_OR_TEMPLATE_ELEMENT = ':matches(Literal, TemplateElement)';
13
+ function decoratorDefinition(decoratorName) {
14
+ return `ClassDeclaration:has(Decorator[expression.callee.name=${decoratorName}])`;
15
+ }
16
+ exports.decoratorDefinition = decoratorDefinition;
13
17
  function metadataProperty(key) {
14
18
  return `Property:matches([key.name=${key}][computed=false], [key.value=${key}], [key.quasis.0.value.raw=${key}])`;
15
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/utils",
3
- "version": "17.1.2-alpha.6",
3
+ "version": "17.1.2-alpha.8",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "typescript": "*"
21
21
  },
22
22
  "dependencies": {
23
- "@angular-eslint/bundled-angular-compiler": "17.1.2-alpha.6",
23
+ "@angular-eslint/bundled-angular-compiler": "17.1.2-alpha.8",
24
24
  "@typescript-eslint/utils": "6.18.0"
25
25
  },
26
26
  "gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"