@taiga-ui/eslint-plugin-experience-next 0.506.0 → 0.508.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/eslint-plugin-experience-next",
3
- "version": "0.506.0",
3
+ "version": "0.508.0",
4
4
  "description": "An ESLint plugin to enforce a consistent code styles across taiga-ui projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,5 @@
1
- import { type Rule } from 'eslint';
2
- export declare const rule: Rule.RuleModule & {
1
+ type Options = [Record<string, readonly string[]>];
2
+ export declare const rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"incorrectOrder", Options, unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
3
3
  name: string;
4
4
  };
5
5
  export default rule;
@@ -0,0 +1,5 @@
1
+ import { type TSESLint } from '@typescript-eslint/utils';
2
+ export declare const rule: TSESLint.RuleModule<"noEmptyStyleMetadata", [], unknown, TSESLint.RuleListener> & {
3
+ name: string;
4
+ };
5
+ export default rule;
@@ -0,0 +1,5 @@
1
+ import { type TSESLint } from '@typescript-eslint/utils';
2
+ export declare const rule: TSESLint.RuleModule<"preferConditionalReturn", [], unknown, TSESLint.RuleListener> & {
3
+ name: string;
4
+ };
5
+ export default rule;
@@ -1,4 +1,9 @@
1
1
  import { type TSESTree } from '@typescript-eslint/utils';
2
+ export interface DecoratorMetadataWithName {
3
+ readonly expression: TSESTree.CallExpression;
4
+ readonly metadata: TSESTree.ObjectExpression;
5
+ readonly name: string;
6
+ }
2
7
  /**
3
8
  * Extracts the metadata object from a class decorator such as
4
9
  * `@Component()`, `@Directive()`, `@NgModule()`, or `@Pipe()`.
@@ -15,7 +20,7 @@ import { type TSESTree } from '@typescript-eslint/utils';
15
20
  * class MyCmp {}
16
21
  *
17
22
  * // In the AST for @Component(...)
18
- * getDecoratorMetadata(decorator, allowed)
23
+ * getDecoratorMetadata(decorator, allowed) returns
19
24
  * ObjectExpression({ selector: ..., imports: ... })
20
25
  *
21
26
  * @param decorator - The decorator node attached to a class declaration.
@@ -25,4 +30,5 @@ import { type TSESTree } from '@typescript-eslint/utils';
25
30
  * @returns The metadata `ObjectExpression` if present and valid,
26
31
  * otherwise `null`.
27
32
  */
28
- export declare function getDecoratorMetadata(decorator: TSESTree.Decorator, allowedNames: Set<string>): TSESTree.ObjectExpression | null;
33
+ export declare function getDecoratorMetadata(decorator: TSESTree.Decorator, allowedNames: ReadonlySet<string>): TSESTree.ObjectExpression | null;
34
+ export declare function getDecoratorMetadataWithName(decorator: TSESTree.Decorator, allowedNames: ReadonlySet<string>): DecoratorMetadataWithName | null;
@@ -1,4 +1,4 @@
1
1
  import { type TSESTree } from '@typescript-eslint/utils';
2
- export declare function isImportsArrayProperty(property?: TSESTree.Property): property is TSESTree.Property & {
2
+ export declare function isImportsArrayProperty(property?: TSESTree.ObjectExpression['properties'][number]): property is TSESTree.Property & {
3
3
  value: TSESTree.ArrayExpression;
4
4
  };
@@ -1,9 +1,9 @@
1
1
  import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
2
2
  /**
3
- * Sorts Angular standalone import elements into a deterministic, alphabetical order.
3
+ * Sorts Angular standalone import elements into a deterministic, natural order.
4
4
  *
5
5
  * The sorting rules:
6
- * 1. Regular elements (Identifiers, MemberExpressions, etc.) are sorted alphabetically.
6
+ * 1. Regular elements (Identifiers, MemberExpressions, etc.) are sorted naturally.
7
7
  * 2. Spread elements (e.g. `...A`) are sorted separately and placed after regular ones.
8
8
  * 3. Sorting is based on the string value returned by `nameOf()`.
9
9
  *