@taiga-ui/eslint-plugin-experience-next 0.474.0 → 0.475.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.
Files changed (49) hide show
  1. package/README.md +43 -0
  2. package/index.d.ts +3 -0
  3. package/index.esm.js +485 -507
  4. package/package.json +1 -1
  5. package/rules/no-fully-untracked-effect.d.ts +1 -2
  6. package/rules/no-infinite-loop.d.ts +6 -0
  7. package/rules/no-signal-reads-after-await-in-reactive-context.d.ts +1 -2
  8. package/rules/no-untracked-outside-reactive-context.d.ts +1 -2
  9. package/rules/no-useless-untracked.d.ts +1 -2
  10. package/rules/prefer-untracked-incidental-signal-reads.d.ts +1 -27
  11. package/rules/prefer-untracked-signal-getter.d.ts +1 -2
  12. package/rules/utils/{angular-signals.d.ts → angular/angular-signals.d.ts} +9 -5
  13. package/rules/utils/angular/pipes.d.ts +2 -0
  14. package/rules/utils/angular/providers.d.ts +3 -0
  15. package/rules/utils/ast/ancestors.d.ts +12 -0
  16. package/rules/utils/{ast-walk.d.ts → ast/ast-walk.d.ts} +1 -0
  17. package/rules/utils/ast/call-expressions.d.ts +2 -0
  18. package/rules/utils/ast/mutation-targets.d.ts +4 -0
  19. package/rules/utils/ast/parenthesized.d.ts +3 -0
  20. package/rules/utils/ast/property-names.d.ts +5 -0
  21. package/rules/utils/ast/returned-expression.d.ts +2 -0
  22. package/rules/utils/ast/string-literals.d.ts +10 -0
  23. package/rules/utils/text/dedent.d.ts +5 -0
  24. package/rules/utils/typescript/decorators.d.ts +2 -0
  25. package/rules/utils/typescript/function-usage.d.ts +5 -0
  26. package/rules/utils/typescript/node-map.d.ts +6 -0
  27. package/rules/utils/typescript/symbols.d.ts +4 -0
  28. package/rules/utils/typescript/type-aware-context.d.ts +14 -0
  29. /package/rules/utils/{angular-imports.d.ts → angular/angular-imports.d.ts} +0 -0
  30. /package/rules/utils/{get-decorator-metadata.d.ts → angular/get-decorator-metadata.d.ts} +0 -0
  31. /package/rules/utils/{get-imports-array.d.ts → angular/get-imports-array.d.ts} +0 -0
  32. /package/rules/utils/{import-fix-helpers.d.ts → angular/import-fix-helpers.d.ts} +0 -0
  33. /package/rules/utils/{is-imports-array-property.d.ts → angular/is-imports-array-property.d.ts} +0 -0
  34. /package/rules/utils/{untracked-docs.d.ts → angular/untracked-docs.d.ts} +0 -0
  35. /package/rules/utils/{ast-expressions.d.ts → ast/ast-expressions.d.ts} +0 -0
  36. /package/rules/utils/{get-const-array.d.ts → ast/get-const-array.d.ts} +0 -0
  37. /package/rules/utils/{is-array.d.ts → ast/is-array.d.ts} +0 -0
  38. /package/rules/utils/{is-object.d.ts → ast/is-object.d.ts} +0 -0
  39. /package/rules/utils/{is-spread.d.ts → ast/is-spread.d.ts} +0 -0
  40. /package/rules/utils/{name-of.d.ts → ast/name-of.d.ts} +0 -0
  41. /package/rules/utils/{intersect.d.ts → collections/intersect.d.ts} +0 -0
  42. /package/rules/utils/{same-order.d.ts → collections/same-order.d.ts} +0 -0
  43. /package/rules/utils/{get-imported-name.d.ts → imports/get-imported-name.d.ts} +0 -0
  44. /package/rules/utils/{npmrc-parser.d.ts → parsers/npmrc-parser.d.ts} +0 -0
  45. /package/rules/utils/{get-sorted-names.d.ts → sorting/get-sorted-names.d.ts} +0 -0
  46. /package/rules/utils/{get-field-types.d.ts → typescript/get-field-types.d.ts} +0 -0
  47. /package/rules/utils/{get-type-name.d.ts → typescript/get-type-name.d.ts} +0 -0
  48. /package/rules/utils/{is-class-type.d.ts → typescript/is-class-type.d.ts} +0 -0
  49. /package/rules/utils/{is-external-tuple.d.ts → typescript/is-external-tuple.d.ts} +0 -0
package/README.md CHANGED
@@ -50,6 +50,7 @@ export default [
50
50
  | no-fully-untracked-effect | Disallow reactive callbacks where all signal reads are hidden inside `untracked()` | ✅ | | |
51
51
  | no-href-with-router-link | Do not use href and routerLink attributes together on the same element | ✅ | 🔧 | |
52
52
  | no-implicit-public | Require explicit `public` modifier for class members and parameter properties | ✅ | 🔧 | |
53
+ | no-infinite-loop | Disallow `while (true)` and `for` loops without an explicit condition | ✅ | | |
53
54
  | no-legacy-peer-deps | Disallow `legacy-peer-deps=true` in `.npmrc` | ✅ | | |
54
55
  | no-playwright-empty-fill | Enforce `clear()` over `fill('')` in Playwright tests | ✅ | 🔧 | |
55
56
  | no-project-as-in-ng-template | `ngProjectAs` has no effect inside `<ng-template>` or dynamic outlets | ✅ | | |
@@ -441,6 +442,48 @@ class MyService {
441
442
 
442
443
  ---
443
444
 
445
+ ## no-infinite-loop
446
+
447
+ <sup>`✅ Recommended`</sup>
448
+
449
+ Disallows the two loop forms banned by this project: `while (true)` and `for` loops without a condition, including the
450
+ canonical `for (;;)` form. These loops hide the real exit condition inside the body, which makes control flow harder to
451
+ scan and review.
452
+
453
+ ```ts
454
+ // ❌ error
455
+ while (true) {
456
+ if (isDone) {
457
+ break;
458
+ }
459
+
460
+ process();
461
+ }
462
+
463
+ // ✅ ok
464
+ while (!isDone) {
465
+ process();
466
+ }
467
+ ```
468
+
469
+ ```ts
470
+ // ❌ error
471
+ for (;;) {
472
+ if (queue.length === 0) {
473
+ break;
474
+ }
475
+
476
+ flush(queue.shift());
477
+ }
478
+
479
+ // ✅ ok
480
+ for (; queue.length > 0; ) {
481
+ flush(queue.shift());
482
+ }
483
+ ```
484
+
485
+ ---
486
+
444
487
  ## no-legacy-peer-deps
445
488
 
446
489
  <sup>`✅ Recommended`</sup>
package/index.d.ts CHANGED
@@ -49,6 +49,9 @@ declare const plugin: {
49
49
  'no-implicit-public': import("@typescript-eslint/utils/ts-eslint").RuleModule<"implicitPublic", readonly unknown[], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
50
50
  name: string;
51
51
  };
52
+ 'no-infinite-loop': import("@typescript-eslint/utils/ts-eslint").RuleModule<"forLoop" | "whileLoop", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
53
+ name: string;
54
+ };
52
55
  'no-legacy-peer-deps': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noLegacyPeerDeps", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
53
56
  name: string;
54
57
  };