lint-suite 2.0.2 → 2.1.1

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 (307) hide show
  1. package/CHANGELOG.md +542 -0
  2. package/README.md +228 -57
  3. package/eslint.d.ts +0 -1
  4. package/eslint.js +735 -7125
  5. package/lib/angular-template.d.ts +0 -1
  6. package/lib/angular.d.ts +0 -1
  7. package/lib/base-limits.d.ts +0 -1
  8. package/lib/base-practices.d.ts +0 -1
  9. package/lib/base-recommended.d.ts +0 -1
  10. package/lib/base.d.ts +0 -1
  11. package/lib/boundaries.d.ts +0 -1
  12. package/lib/javascript.d.ts +0 -1
  13. package/lib/json.d.ts +0 -1
  14. package/lib/line-length.const.d.ts +0 -1
  15. package/lib/playwright.d.ts +0 -1
  16. package/lib/prettier.d.ts +0 -1
  17. package/lib/rxjs.d.ts +0 -1
  18. package/lib/storybook.d.ts +0 -1
  19. package/lib/typescript-consistency.d.ts +0 -1
  20. package/lib/typescript-imports.d.ts +0 -1
  21. package/lib/typescript-local-plugin.d.ts +2 -2
  22. package/lib/typescript-overrides.d.ts +0 -1
  23. package/lib/typescript-recommended.d.ts +0 -1
  24. package/lib/typescript-safety.d.ts +0 -1
  25. package/lib/typescript.d.ts +0 -1
  26. package/lib/vitest.d.ts +0 -1
  27. package/package.json +30 -20
  28. package/prettier.d.ts +0 -1
  29. package/prettier.js +0 -1
  30. package/stylelint.d.ts +0 -1
  31. package/stylelint.js +11 -937
  32. package/eslint.cjs +0 -7376
  33. package/eslint.cjs.map +0 -7
  34. package/eslint.d.ts.map +0 -1
  35. package/eslint.js.map +0 -7
  36. package/lib/angular-template.d.ts.map +0 -1
  37. package/lib/angular.d.ts.map +0 -1
  38. package/lib/base-limits.d.ts.map +0 -1
  39. package/lib/base-practices.d.ts.map +0 -1
  40. package/lib/base-recommended.d.ts.map +0 -1
  41. package/lib/base.d.ts.map +0 -1
  42. package/lib/boundaries.d.ts.map +0 -1
  43. package/lib/javascript.d.ts.map +0 -1
  44. package/lib/json.d.ts.map +0 -1
  45. package/lib/line-length.const.d.ts.map +0 -1
  46. package/lib/playwright.d.ts.map +0 -1
  47. package/lib/prettier.d.ts.map +0 -1
  48. package/lib/rules/arrow-body-fits-line/arrow-body-fits-line.d.ts +0 -6
  49. package/lib/rules/arrow-body-fits-line/arrow-body-fits-line.d.ts.map +0 -1
  50. package/lib/rules/chain-fits-line/chain-fits-line.d.ts +0 -6
  51. package/lib/rules/chain-fits-line/chain-fits-line.d.ts.map +0 -1
  52. package/lib/rules/chain-receiver-is-name/chain-receiver-is-name.d.ts +0 -7
  53. package/lib/rules/chain-receiver-is-name/chain-receiver-is-name.d.ts.map +0 -1
  54. package/lib/rules/common/class-usage.type.d.ts +0 -26
  55. package/lib/rules/common/class-usage.type.d.ts.map +0 -1
  56. package/lib/rules/common/file-cache.type.d.ts +0 -11
  57. package/lib/rules/common/file-cache.type.d.ts.map +0 -1
  58. package/lib/rules/common/glob-matcher.type.d.ts +0 -2
  59. package/lib/rules/common/glob-matcher.type.d.ts.map +0 -1
  60. package/lib/rules/component-metadata.d.ts +0 -3
  61. package/lib/rules/component-metadata.d.ts.map +0 -1
  62. package/lib/rules/define-plugin.util.d.ts +0 -6
  63. package/lib/rules/define-plugin.util.d.ts.map +0 -1
  64. package/lib/rules/explicit-accessibility/common/explicit-accessibility.const.d.ts +0 -6
  65. package/lib/rules/explicit-accessibility/common/explicit-accessibility.const.d.ts.map +0 -1
  66. package/lib/rules/explicit-accessibility/common/explicit-accessibility.type.d.ts +0 -17
  67. package/lib/rules/explicit-accessibility/common/explicit-accessibility.type.d.ts.map +0 -1
  68. package/lib/rules/explicit-accessibility/explicit-accessibility.d.ts +0 -7
  69. package/lib/rules/explicit-accessibility/explicit-accessibility.d.ts.map +0 -1
  70. package/lib/rules/file-cache.d.ts +0 -14
  71. package/lib/rules/file-cache.d.ts.map +0 -1
  72. package/lib/rules/max-condition-operands/max-condition-operands.d.ts +0 -10
  73. package/lib/rules/max-condition-operands/max-condition-operands.d.ts.map +0 -1
  74. package/lib/rules/no-call-in-condition/common/no-call-in-condition.const.d.ts +0 -6
  75. package/lib/rules/no-call-in-condition/common/no-call-in-condition.const.d.ts.map +0 -1
  76. package/lib/rules/no-call-in-condition/common/no-call-in-condition.type.d.ts +0 -21
  77. package/lib/rules/no-call-in-condition/common/no-call-in-condition.type.d.ts.map +0 -1
  78. package/lib/rules/no-call-in-condition/no-call-in-condition.d.ts +0 -7
  79. package/lib/rules/no-call-in-condition/no-call-in-condition.d.ts.map +0 -1
  80. package/lib/rules/no-call-in-condition/utils/call-exemptions.util.d.ts +0 -4
  81. package/lib/rules/no-call-in-condition/utils/call-exemptions.util.d.ts.map +0 -1
  82. package/lib/rules/no-call-in-condition/utils/condition-calls.util.d.ts +0 -7
  83. package/lib/rules/no-call-in-condition/utils/condition-calls.util.d.ts.map +0 -1
  84. package/lib/rules/no-grouped-condition/no-grouped-condition.d.ts +0 -7
  85. package/lib/rules/no-grouped-condition/no-grouped-condition.d.ts.map +0 -1
  86. package/lib/rules/no-inline-object-types/no-inline-object-types.d.ts +0 -6
  87. package/lib/rules/no-inline-object-types/no-inline-object-types.d.ts.map +0 -1
  88. package/lib/rules/no-inline-return-object/no-inline-return-object.d.ts +0 -6
  89. package/lib/rules/no-inline-return-object/no-inline-return-object.d.ts.map +0 -1
  90. package/lib/rules/no-nested-object-value/common/no-nested-object-value.const.d.ts +0 -5
  91. package/lib/rules/no-nested-object-value/common/no-nested-object-value.const.d.ts.map +0 -1
  92. package/lib/rules/no-nested-object-value/common/no-nested-object-value.type.d.ts +0 -7
  93. package/lib/rules/no-nested-object-value/common/no-nested-object-value.type.d.ts.map +0 -1
  94. package/lib/rules/no-nested-object-value/no-nested-object-value.d.ts +0 -7
  95. package/lib/rules/no-nested-object-value/no-nested-object-value.d.ts.map +0 -1
  96. package/lib/rules/no-nested-object-value/utils/decorator-config.util.d.ts +0 -3
  97. package/lib/rules/no-nested-object-value/utils/decorator-config.util.d.ts.map +0 -1
  98. package/lib/rules/no-spread-expression/no-spread-expression.d.ts +0 -6
  99. package/lib/rules/no-spread-expression/no-spread-expression.d.ts.map +0 -1
  100. package/lib/rules/no-unstyled-classes/common/no-unstyled-classes.type.d.ts +0 -33
  101. package/lib/rules/no-unstyled-classes/common/no-unstyled-classes.type.d.ts.map +0 -1
  102. package/lib/rules/no-unstyled-classes/no-unstyled-classes.d.ts +0 -8
  103. package/lib/rules/no-unstyled-classes/no-unstyled-classes.d.ts.map +0 -1
  104. package/lib/rules/no-unstyled-classes/styles/component-stylesheets.d.ts +0 -4
  105. package/lib/rules/no-unstyled-classes/styles/component-stylesheets.d.ts.map +0 -1
  106. package/lib/rules/no-unstyled-classes/styles/linked-stylesheets.d.ts +0 -3
  107. package/lib/rules/no-unstyled-classes/styles/linked-stylesheets.d.ts.map +0 -1
  108. package/lib/rules/no-unstyled-classes/styles/stylesheet-classes.d.ts +0 -3
  109. package/lib/rules/no-unstyled-classes/styles/stylesheet-classes.d.ts.map +0 -1
  110. package/lib/rules/no-unstyled-classes/styles/stylesheet-collection.d.ts +0 -4
  111. package/lib/rules/no-unstyled-classes/styles/stylesheet-collection.d.ts.map +0 -1
  112. package/lib/rules/no-unstyled-classes/styles/stylesheet-imports.d.ts +0 -2
  113. package/lib/rules/no-unstyled-classes/styles/stylesheet-imports.d.ts.map +0 -1
  114. package/lib/rules/no-unstyled-classes/styles/template-stylesheets.d.ts +0 -3
  115. package/lib/rules/no-unstyled-classes/styles/template-stylesheets.d.ts.map +0 -1
  116. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-component-discovery.d.ts +0 -5
  117. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-component-discovery.d.ts.map +0 -1
  118. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-component-scope.d.ts +0 -9
  119. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-component-scope.d.ts.map +0 -1
  120. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-decorator-kind.d.ts +0 -10
  121. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-decorator-kind.d.ts.map +0 -1
  122. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-directive-index.d.ts +0 -9
  123. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-directive-index.d.ts.map +0 -1
  124. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-metadata-values.d.ts +0 -12
  125. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-metadata-values.d.ts.map +0 -1
  126. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-resolved-path.d.ts +0 -3
  127. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-resolved-path.d.ts.map +0 -1
  128. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-read-chains.d.ts +0 -17
  129. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-read-chains.d.ts.map +0 -1
  130. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-read-resolution.d.ts +0 -7
  131. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-read-resolution.d.ts.map +0 -1
  132. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-reads.d.ts +0 -6
  133. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-reads.d.ts.map +0 -1
  134. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-references.d.ts +0 -5
  135. package/lib/rules/no-unused-angular-instance-fields/project-usage/angular/angular-template-references.d.ts.map +0 -1
  136. package/lib/rules/no-unused-angular-instance-fields/project-usage/common/project-index.type.d.ts +0 -52
  137. package/lib/rules/no-unused-angular-instance-fields/project-usage/common/project-index.type.d.ts.map +0 -1
  138. package/lib/rules/no-unused-angular-instance-fields/project-usage/common/project-usage.type.d.ts +0 -105
  139. package/lib/rules/no-unused-angular-instance-fields/project-usage/common/project-usage.type.d.ts.map +0 -1
  140. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-file-entry.d.ts +0 -4
  141. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-file-entry.d.ts.map +0 -1
  142. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-index-classes.d.ts +0 -5
  143. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-index-classes.d.ts.map +0 -1
  144. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-index-reconciliation.d.ts +0 -4
  145. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-index-reconciliation.d.ts.map +0 -1
  146. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-index-staleness.d.ts +0 -14
  147. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-index-staleness.d.ts.map +0 -1
  148. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-usage.d.ts +0 -18
  149. package/lib/rules/no-unused-angular-instance-fields/project-usage/project-usage.d.ts.map +0 -1
  150. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-angular-interface-methods.d.ts +0 -8
  151. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-angular-interface-methods.d.ts.map +0 -1
  152. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-assignment-pattern-elements.d.ts +0 -5
  153. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-assignment-pattern-elements.d.ts.map +0 -1
  154. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-binding-pattern-elements.d.ts +0 -6
  155. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-binding-pattern-elements.d.ts.map +0 -1
  156. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-candidate-names.d.ts +0 -4
  157. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-candidate-names.d.ts.map +0 -1
  158. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-destructuring-reads.d.ts +0 -4
  159. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-destructuring-reads.d.ts.map +0 -1
  160. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-reads.d.ts +0 -4
  161. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-reads.d.ts.map +0 -1
  162. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-symbol-reads.d.ts +0 -8
  163. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-symbol-reads.d.ts.map +0 -1
  164. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-type-dependencies.d.ts +0 -3
  165. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-type-dependencies.d.ts.map +0 -1
  166. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-write-targets.d.ts +0 -7
  167. package/lib/rules/no-unused-angular-instance-fields/project-usage/typescript/typescript-write-targets.d.ts.map +0 -1
  168. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/class-members.util.d.ts +0 -10
  169. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/class-members.util.d.ts.map +0 -1
  170. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/read-chain-text.util.d.ts +0 -4
  171. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/read-chain-text.util.d.ts.map +0 -1
  172. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/spec-file.util.d.ts +0 -2
  173. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/spec-file.util.d.ts.map +0 -1
  174. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/type-property-symbols.util.d.ts +0 -4
  175. package/lib/rules/no-unused-angular-instance-fields/project-usage/utils/type-property-symbols.util.d.ts.map +0 -1
  176. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-class-fields.d.ts +0 -3
  177. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-class-fields.d.ts.map +0 -1
  178. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-expression-reads.d.ts +0 -6
  179. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-expression-reads.d.ts.map +0 -1
  180. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-imports.d.ts +0 -9
  181. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-imports.d.ts.map +0 -1
  182. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-managed-fields.d.ts +0 -5
  183. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-managed-fields.d.ts.map +0 -1
  184. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-member-candidates.d.ts +0 -6
  185. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-member-candidates.d.ts.map +0 -1
  186. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-metadata-literals.d.ts +0 -5
  187. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-metadata-literals.d.ts.map +0 -1
  188. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-metadata-reads.d.ts +0 -9
  189. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-metadata-reads.d.ts.map +0 -1
  190. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-template-parsing.d.ts +0 -4
  191. package/lib/rules/no-unused-angular-instance-fields/rule/angular/angular-template-parsing.d.ts.map +0 -1
  192. package/lib/rules/no-unused-angular-instance-fields/rule/common/no-unused-angular-instance-fields.type.d.ts +0 -55
  193. package/lib/rules/no-unused-angular-instance-fields/rule/common/no-unused-angular-instance-fields.type.d.ts.map +0 -1
  194. package/lib/rules/no-unused-angular-instance-fields/rule/no-unused-angular-instance-fields.d.ts +0 -8
  195. package/lib/rules/no-unused-angular-instance-fields/rule/no-unused-angular-instance-fields.d.ts.map +0 -1
  196. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-class-read-visitor.d.ts +0 -4
  197. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-class-read-visitor.d.ts.map +0 -1
  198. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-field-reads.d.ts +0 -8
  199. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-field-reads.d.ts.map +0 -1
  200. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-lexical-this.d.ts +0 -3
  201. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-lexical-this.d.ts.map +0 -1
  202. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-write-targets.d.ts +0 -3
  203. package/lib/rules/no-unused-angular-instance-fields/rule/typescript/typescript-write-targets.d.ts.map +0 -1
  204. package/lib/rules/no-unused-angular-instance-fields/utils/angular-read-target.util.d.ts +0 -4
  205. package/lib/rules/no-unused-angular-instance-fields/utils/angular-read-target.util.d.ts.map +0 -1
  206. package/lib/rules/no-unused-classes/common/no-unused-classes.type.d.ts +0 -24
  207. package/lib/rules/no-unused-classes/common/no-unused-classes.type.d.ts.map +0 -1
  208. package/lib/rules/no-unused-classes/no-unused-classes.d.ts +0 -8
  209. package/lib/rules/no-unused-classes/no-unused-classes.d.ts.map +0 -1
  210. package/lib/rules/no-unused-classes/styles/linked-templates.d.ts +0 -9
  211. package/lib/rules/no-unused-classes/styles/linked-templates.d.ts.map +0 -1
  212. package/lib/rules/no-unused-classes/styles/stylesheet-components.d.ts +0 -3
  213. package/lib/rules/no-unused-classes/styles/stylesheet-components.d.ts.map +0 -1
  214. package/lib/rules/no-unused-classes/template/template-usage.d.ts +0 -3
  215. package/lib/rules/no-unused-classes/template/template-usage.d.ts.map +0 -1
  216. package/lib/rules/no-unused-exports/common/no-unused-exports.const.d.ts +0 -7
  217. package/lib/rules/no-unused-exports/common/no-unused-exports.const.d.ts.map +0 -1
  218. package/lib/rules/no-unused-exports/common/no-unused-exports.type.d.ts +0 -70
  219. package/lib/rules/no-unused-exports/common/no-unused-exports.type.d.ts.map +0 -1
  220. package/lib/rules/no-unused-exports/export-index.d.ts +0 -6
  221. package/lib/rules/no-unused-exports/export-index.d.ts.map +0 -1
  222. package/lib/rules/no-unused-exports/no-unused-exports.d.ts +0 -7
  223. package/lib/rules/no-unused-exports/no-unused-exports.d.ts.map +0 -1
  224. package/lib/rules/no-unused-exports/report-unused-exports.d.ts +0 -12
  225. package/lib/rules/no-unused-exports/report-unused-exports.d.ts.map +0 -1
  226. package/lib/rules/no-unused-exports/utils/aggregate-update.util.d.ts +0 -4
  227. package/lib/rules/no-unused-exports/utils/aggregate-update.util.d.ts.map +0 -1
  228. package/lib/rules/no-unused-exports/utils/export-edges.util.d.ts +0 -5
  229. package/lib/rules/no-unused-exports/utils/export-edges.util.d.ts.map +0 -1
  230. package/lib/rules/no-unused-exports/utils/export-nodes.util.d.ts +0 -5
  231. package/lib/rules/no-unused-exports/utils/export-nodes.util.d.ts.map +0 -1
  232. package/lib/rules/no-unused-exports/utils/export-usage.util.d.ts +0 -4
  233. package/lib/rules/no-unused-exports/utils/export-usage.util.d.ts.map +0 -1
  234. package/lib/rules/no-unused-exports/utils/exported-names.util.d.ts +0 -3
  235. package/lib/rules/no-unused-exports/utils/exported-names.util.d.ts.map +0 -1
  236. package/lib/rules/no-unused-exports/utils/file-changes.util.d.ts +0 -4
  237. package/lib/rules/no-unused-exports/utils/file-changes.util.d.ts.map +0 -1
  238. package/lib/rules/no-unused-exports/utils/module-edges.util.d.ts +0 -4
  239. package/lib/rules/no-unused-exports/utils/module-edges.util.d.ts.map +0 -1
  240. package/lib/rules/no-unused-exports/utils/module-target.util.d.ts +0 -4
  241. package/lib/rules/no-unused-exports/utils/module-target.util.d.ts.map +0 -1
  242. package/lib/rules/no-unused-exports/utils/public-exports.util.d.ts +0 -3
  243. package/lib/rules/no-unused-exports/utils/public-exports.util.d.ts.map +0 -1
  244. package/lib/rules/one-line-guard/one-line-guard.d.ts +0 -10
  245. package/lib/rules/one-line-guard/one-line-guard.d.ts.map +0 -1
  246. package/lib/rules/readonly-type-properties/readonly-type-properties.d.ts +0 -7
  247. package/lib/rules/readonly-type-properties/readonly-type-properties.d.ts.map +0 -1
  248. package/lib/rules/selector-classes.d.ts +0 -7
  249. package/lib/rules/selector-classes.d.ts.map +0 -1
  250. package/lib/rules/ternary-branch-shape/ternary-branch-shape.d.ts +0 -6
  251. package/lib/rules/ternary-branch-shape/ternary-branch-shape.d.ts.map +0 -1
  252. package/lib/rules/test-file-shape/common/test-file-shape.const.d.ts +0 -14
  253. package/lib/rules/test-file-shape/common/test-file-shape.const.d.ts.map +0 -1
  254. package/lib/rules/test-file-shape/common/test-file-shape.type.d.ts +0 -7
  255. package/lib/rules/test-file-shape/common/test-file-shape.type.d.ts.map +0 -1
  256. package/lib/rules/test-file-shape/mock-exports.d.ts +0 -7
  257. package/lib/rules/test-file-shape/mock-exports.d.ts.map +0 -1
  258. package/lib/rules/test-file-shape/stub-exports.d.ts +0 -7
  259. package/lib/rules/test-file-shape/stub-exports.d.ts.map +0 -1
  260. package/lib/rules/test-file-shape/test-file-shape.d.ts +0 -7
  261. package/lib/rules/test-file-shape/test-file-shape.d.ts.map +0 -1
  262. package/lib/rules/type-placement/common/type-placement.const.d.ts +0 -5
  263. package/lib/rules/type-placement/common/type-placement.const.d.ts.map +0 -1
  264. package/lib/rules/type-placement/common/type-placement.type.d.ts +0 -7
  265. package/lib/rules/type-placement/common/type-placement.type.d.ts.map +0 -1
  266. package/lib/rules/type-placement/type-placement.d.ts +0 -7
  267. package/lib/rules/type-placement/type-placement.d.ts.map +0 -1
  268. package/lib/rules/util-purity/common/util-purity.const.d.ts +0 -10
  269. package/lib/rules/util-purity/common/util-purity.const.d.ts.map +0 -1
  270. package/lib/rules/util-purity/common/util-purity.type.d.ts +0 -7
  271. package/lib/rules/util-purity/common/util-purity.type.d.ts.map +0 -1
  272. package/lib/rules/util-purity/util-purity.d.ts +0 -7
  273. package/lib/rules/util-purity/util-purity.d.ts.map +0 -1
  274. package/lib/rules/utils/class-expression-literals.util.d.ts +0 -4
  275. package/lib/rules/utils/class-expression-literals.util.d.ts.map +0 -1
  276. package/lib/rules/utils/enclosing-statement.util.d.ts +0 -3
  277. package/lib/rules/utils/enclosing-statement.util.d.ts.map +0 -1
  278. package/lib/rules/utils/glob-matcher.util.d.ts +0 -3
  279. package/lib/rules/utils/glob-matcher.util.d.ts.map +0 -1
  280. package/lib/rules/utils/indent-of.util.d.ts +0 -3
  281. package/lib/rules/utils/indent-of.util.d.ts.map +0 -1
  282. package/lib/rules/utils/resolved-rules.util.d.ts +0 -5
  283. package/lib/rules/utils/resolved-rules.util.d.ts.map +0 -1
  284. package/lib/rules/utils/template-classes.util.d.ts +0 -5
  285. package/lib/rules/utils/template-classes.util.d.ts.map +0 -1
  286. package/lib/rules/utils/template-links.util.d.ts +0 -2
  287. package/lib/rules/utils/template-links.util.d.ts.map +0 -1
  288. package/lib/rules/utils/to-regexp.util.d.ts +0 -2
  289. package/lib/rules/utils/to-regexp.util.d.ts.map +0 -1
  290. package/lib/rxjs.d.ts.map +0 -1
  291. package/lib/storybook.d.ts.map +0 -1
  292. package/lib/typescript-consistency.d.ts.map +0 -1
  293. package/lib/typescript-imports.d.ts.map +0 -1
  294. package/lib/typescript-local-plugin.d.ts.map +0 -1
  295. package/lib/typescript-overrides.d.ts.map +0 -1
  296. package/lib/typescript-recommended.d.ts.map +0 -1
  297. package/lib/typescript-safety.d.ts.map +0 -1
  298. package/lib/typescript.d.ts.map +0 -1
  299. package/lib/vitest.d.ts.map +0 -1
  300. package/prettier.cjs +0 -50
  301. package/prettier.cjs.map +0 -7
  302. package/prettier.d.ts.map +0 -1
  303. package/prettier.js.map +0 -7
  304. package/stylelint.cjs +0 -968
  305. package/stylelint.cjs.map +0 -7
  306. package/stylelint.d.ts.map +0 -1
  307. package/stylelint.js.map +0 -7
package/README.md CHANGED
@@ -1,6 +1,17 @@
1
- # Lint Suite
1
+ # Lint Suite — ESLint, Stylelint, and Prettier configs for TypeScript and Angular
2
2
 
3
- A comprehensive collection of ESLint Flat configurations for modern web applications.
3
+ `lint-suite` provides composable ESLint flat configs for JavaScript, TypeScript, Angular, RxJS, Vitest, and Playwright, plus standalone Stylelint and Prettier presets. Use the framework-agnostic `recommended` config as a baseline, then add the framework and testing configs your project needs.
4
+
5
+ The suite includes custom rules for TypeScript code structure, unused exports, unused Angular instance fields, and mismatches between Angular template classes and CSS/SCSS selectors. Each custom rule is also available as an independent `@lint-suite` package when you do not need the full preset.
6
+
7
+ ## Quick navigation
8
+
9
+ - [Installation](#installation) and [ESLint flat config setup](#usage)
10
+ - [Available configurations](#available-configurations)
11
+ - [Valid and invalid TypeScript examples](#examples)
12
+ - [Standalone custom rule packages](#standalone-custom-rules)
13
+ - [Angular rule customization](#unused-angular-instance-fields)
14
+ - [Stylelint and Prettier presets](#stylelint-and-prettier-presets)
4
15
 
5
16
  ## Features
6
17
 
@@ -22,10 +33,45 @@ A comprehensive collection of ESLint Flat configurations for modern web applicat
22
33
  pnpm add -D lint-suite
23
34
  ```
24
35
 
36
+ ## Standalone custom rules
37
+
38
+ All 21 custom rules also have independently versioned scoped packages.
39
+ Installing one does not install this umbrella or its unrelated presets.
40
+ For example:
41
+
42
+ ```bash
43
+ pnpm add -D @lint-suite/eslint-plugin-arrow-body-fits-line eslint typescript typescript-eslint
44
+ ```
45
+
46
+ ```js
47
+ import arrow from '@lint-suite/eslint-plugin-arrow-body-fits-line';
48
+ import tseslint from 'typescript-eslint';
49
+
50
+ export default [
51
+ {
52
+ files: ['**/*.ts'],
53
+ languageOptions: { parser: tseslint.parser },
54
+ plugins: { arrow },
55
+ rules: { 'arrow/arrow-body-fits-line': 'error' }
56
+ }
57
+ ];
58
+ ```
59
+
60
+ The [package catalog](https://github.com/F0rty-Tw0/lint-suite#standalone-custom-rules)
61
+ lists every package and its rule key. The Angular instance-field package is
62
+ `@lint-suite/eslint-plugin-no-unused-angular-instance-fields`; its rule key
63
+ remains `no-unused-instance-fields`. The Stylelint package is
64
+ `@lint-suite/stylelint-no-unused-classes`, with rule ID
65
+ `lint-suite/no-unused-classes`.
66
+
67
+ No migration is needed for existing umbrella users: its three entrypoints,
68
+ presets, rule IDs, severities, and options are unchanged. Avoid enabling a
69
+ standalone rule alongside the corresponding umbrella rule.
70
+
25
71
  ## Dependencies
26
72
 
27
73
  ```bash
28
- pnpm add -D eslint typescript-eslint eslint-config-prettier
74
+ pnpm add -D eslint typescript typescript-eslint eslint-config-prettier
29
75
  ```
30
76
 
31
77
  If you use the Prettier preset (`lint-suite/prettier`), also install its peer dependency:
@@ -44,6 +90,9 @@ import { recommended } from 'lint-suite/eslint';
44
90
  export default [...recommended];
45
91
  ```
46
92
 
93
+ The packages ship as ESM. Use Node.js 24 with the current ESLint,
94
+ TypeScript, and Angular toolchain.
95
+
47
96
  Or selectively include configurations:
48
97
 
49
98
  ```js
@@ -83,40 +132,49 @@ export default [
83
132
 
84
133
  ## Available Configurations
85
134
 
86
- | Configuration | Description |
87
- | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
88
- | `base` | Core JavaScript rules, formatting, and complexity limits |
89
- | `javascript` | JavaScript-specific rules via `@nx/eslint-plugin` |
90
- | `typescript` | TypeScript strict typing, imports, and naming conventions |
91
- | `angular` | Angular component best practices with Signal support |
92
- | `angularTemplate` | HTML template rules with accessibility, performance, and `lint-suite-angular-template/no-unstyled-classes` |
93
- | `rxjs` | Observable patterns, operator safety, and subscriptions |
94
- | `vitest` | Vitest testing rules and matcher improvements |
95
- | `playwright` | Playwright e2e locator and matcher best practices |
96
- | `json` | JSON linting with comment support for tsconfig/vscode |
97
- | `storybook` | Storybook CSF enforcement |
98
- | `boundaries` | Module boundary rules (feature, data-access, ui, etc.) |
99
- | `prettier` | Disables rules that conflict with Prettier (use last) |
100
- | **`recommended`** | **Baseline only: `base` + `javascript` + `typescript` + `json` + `boundaries` + `prettier` — compose the rest on top** |
101
- | **Angular project analysis:** The `angular` preset enables `projectService: true` and project analysis for |
102
- | `lint-suite-angular/no-unused-instance-fields`. It counts exact reads in the configured TypeScript/Angular |
103
- | Program, including external parent templates/TypeScript, subclasses, and Angular interface implementations; |
104
- | code outside that Program is unknowable. Project mode also reports unused public/protected directive members. |
105
- | Direct rule usage remains local by default, and `allowEffectFields` is opt-in. After cross-file or template |
106
- | changes, do not use ESLint `--cache` for correctness gates; run a full non-cached lint (for example, |
107
- | `eslint --no-cache`). |
135
+ | Configuration | Description |
136
+ | ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
137
+ | `base` | Core JavaScript rules, formatting, and complexity limits |
138
+ | `javascript` | JavaScript-specific rules via `@nx/eslint-plugin` |
139
+ | `typescript` | TypeScript strict typing, imports, and naming conventions |
140
+ | `angular` | Angular component best practices with Signal support |
141
+ | `angularTemplate` | HTML template rules with accessibility, performance, and `lint-suite-angular-template/no-unstyled-classes` |
142
+ | `rxjs` | Observable patterns, operator safety, and subscriptions |
143
+ | `vitest` | Vitest testing rules and matcher improvements |
144
+ | `playwright` | Playwright e2e locator and matcher best practices |
145
+ | `json` | JSON linting with comment support for tsconfig/vscode |
146
+ | `storybook` | Storybook CSF enforcement |
147
+ | `boundaries` | Module boundary rules (feature, data-access, ui, etc.) |
148
+ | `prettier` | Disables rules that conflict with Prettier (use last) |
149
+ | **`recommended`** | **Baseline only: `base` + `javascript` + `typescript` + `json` + `boundaries` + `prettier` — compose the rest on top** |
150
+
151
+ **Angular project analysis:** The `angular` preset enables `projectService:
152
+ true` and project analysis for `lint-suite-angular/no-unused-instance-fields`.
153
+ It counts exact reads in the configured TypeScript/Angular Program, including
154
+ external parent templates/TypeScript, subclasses, and Angular interface
155
+ implementations; code outside that Program is unknowable. Project mode also
156
+ reports unused public/protected directive members.
157
+
158
+ Direct rule usage also defaults to project analysis; select `analysis:
159
+ 'local'` explicitly for local analysis. `allowEffectFields` is opt-in. After
160
+ cross-file or template changes, do not use ESLint `--cache` for correctness
161
+ gates; run a full non-cached lint such as `eslint --no-cache`.
108
162
 
109
163
  ## Disk cache
110
164
 
111
- `no-unstyled-classes`, `no-unused-classes`, and `no-unused-instance-fields`
112
- parse component metadata, stylesheets, and templates once per file and keep
113
- the result in memory for the life of the process, keyed by the file's mtime
114
- and size. The same entries are mirrored to
115
- `node_modules/.cache/lint-suite/*.json` under the current working directory
116
- at process exit, so the next ESLint or stylelint process (a CI run, or an
117
- editor's first lint) skips every parse of a file that did not change. Set
118
- `LINT_SUITE_CACHE_DIR` to move the directory, or `LINT_SUITE_CACHE=0` to
119
- keep everything in memory only.
165
+ `no-unstyled-classes` and `no-unused-classes` cache parsed component metadata,
166
+ stylesheets, and templates in memory and mirror those entries to
167
+ `node_modules/.cache/lint-suite/` under the current working directory at
168
+ process exit. Each cache is isolated by its owning scoped plugin's package
169
+ name, version, and cache format. Upgrading either plugin invalidates its own
170
+ entries without reusing or overwriting the other plugin's cache.
171
+
172
+ Entries are also invalidated by file mtime and size. Malformed disk entries
173
+ are discarded and rebuilt. Set `LINT_SUITE_CACHE_DIR` to choose a directory,
174
+ or `LINT_SUITE_CACHE=0` to keep caching in memory only.
175
+
176
+ The Angular instance-field rule maintains a separate in-memory project
177
+ usage index; it does not use this disk cache.
120
178
 
121
179
  ## Customization
122
180
 
@@ -139,9 +197,8 @@ export default [
139
197
  ### Unused Angular instance fields
140
198
 
141
199
  The `angular` config enables `lint-suite-angular/no-unused-instance-fields`.
142
- Local analysis recognizes reads from the class, component template, and host
143
- expressions. Use project analysis when other TypeScript files or Angular
144
- templates can read a component or directive member:
200
+ Project analysis is the default and recognizes reads from other TypeScript
201
+ files and Angular templates. It requires parser services with type information:
145
202
 
146
203
  ```js
147
204
  {
@@ -170,13 +227,22 @@ templates can read a component or directive member:
170
227
  folder, are re-read on every lint; edits to templates in other folders are
171
228
  picked up on a throttled schedule (at most every 100× the duration of the
172
229
  last check), so a cross-folder template edit can take a moment to show up
173
- in another file's diagnostics.
174
- - `analysis` defaults to `'local'`. Project mode excludes spec-file reads. A
230
+ in another file's diagnostics. A `templateUrl` file that does not exist
231
+ yet is remembered as missing and read on the same schedule once it does.
232
+ - `analysis` defaults to `'project'`. Set `analysis: 'local'` to check only
233
+ the class, component template, and host expressions without type information.
234
+ Project mode excludes spec-file reads. A
175
235
  file it cannot index exactly (a template that does not parse, metadata it
176
236
  cannot evaluate, a read it cannot type) falls back to name matching for
177
237
  that file only: every member whose name that file mentions counts as read.
178
238
  Set `LINT_SUITE_DEBUG=1` to print which files fell back and why, for
179
239
  example `LINT_SUITE_DEBUG=1 eslint --no-cache src/app/some.component.ts`.
240
+ - A file with an import that resolves to no module (its file does not exist
241
+ yet, or is still empty) reads through untyped values, so every candidate
242
+ member it mentions counts as read, and it is re-indexed on every Program
243
+ until the import resolves. The project service of typescript-eslint never
244
+ retries a resolution that failed, so in an editor this lasts until the
245
+ importing file is edited or ESLint restarts.
180
246
  - `allowEffectFields` defaults to `false`. When enabled, fields holding
181
247
  auto-cleaned Angular `effect()` calls are allowed; effects configured with
182
248
  `manualCleanup: true` must still be read.
@@ -442,18 +508,18 @@ them reads type information or the filesystem; each listens to one node
442
508
  type and reports in microseconds per file. Where a fix needs a name the rule
443
509
  offers an IDE suggestion with a placeholder name instead of an auto-fix.
444
510
 
445
- | Rule | Reports | Fix |
446
- |---|---|---|
447
- | `local/no-call-in-condition` | A function call inside an `if` condition, or inside a boolean `const` that an `if` tests. Zero-argument `this.x()` calls (Angular signal reads) and type-predicate calls are exempt; predicates are found through scope in the same file, or through the type checker when a program is available. Option `allowPredicates` (regex sources, default `['^(is\|has)[A-Z]']`) applies when there is no program. | Suggestion: hoist to a `const` |
448
- | `local/max-condition-operands` | An `if` condition with more than `max` (default 3) operands joined by `&&` / `\|\|`. | none |
449
- | `local/no-grouped-condition` | A parenthesised group with a different operator inside an `if` condition or a boolean `const` (`a && (b \|\| c)`). | Suggestion: hoist the group |
450
- | `local/ternary-branch-shape` | A ternary branch that is not a name, literal, template literal, or plain member access. | none |
451
- | `local/chain-receiver-is-name` | A member chain starting on an inline expression: `(a ?? b).x`, `{...}.x`, `[...].x`, `(await p).x`. | Suggestion: name the receiver |
452
- | `local/chain-fits-line` | A chain of two or more calls whose `.method(` parts sit on different lines. A multi-line callback argument does not count. | none |
453
- | `local/arrow-body-fits-line` | An expression-bodied arrow whose body wraps onto more lines. | Fix: block body with `return` |
454
- | `local/no-nested-object-value` | A property value that is a non-empty object literal, an array holding object literals, a ternary, or a call chain. Decorator arguments (`@Component({...})`) and files matching `configFiles` (default `**/*.config.*`, `**/eslint.config.*`, `**/*.schema.ts`) are exempt. | Suggestion: hoist to a `const` |
455
- | `local/no-spread-expression` | `...(expr)` where the argument is not a name or member access. | Suggestion: hoist to a `const` |
456
- | `local/no-inline-return-object` | `return {...}` and `=> ({...})`. | Suggestion: `const result = {...}; return result;` |
511
+ | Rule | Reports | Fix |
512
+ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
513
+ | `local/no-call-in-condition` | A function call inside an `if` condition, or inside a boolean `const` that an `if` tests. Zero-argument `this.x()` calls (Angular signal reads) and type-predicate calls are exempt; predicates are found through scope in the same file, or through the type checker when a program is available. Option `allowPredicates` (regex sources, default `['^(is\|has)[A-Z]']`) applies when there is no program. | Suggestion: hoist to a `const` |
514
+ | `local/max-condition-operands` | An `if` condition with more than `max` (default 3) operands joined by `&&` / `\|\|`. | none |
515
+ | `local/no-grouped-condition` | A parenthesised group with a different operator inside an `if` condition or a boolean `const` (`a && (b \|\| c)`). | Suggestion: hoist the group |
516
+ | `local/ternary-branch-shape` | A ternary branch that is not a name, literal, template literal, or plain member access. | none |
517
+ | `local/chain-receiver-is-name` | A member chain starting on an inline expression: `(a ?? b).x`, `{...}.x`, `[...].x`, `(await p).x`. | Suggestion: name the receiver |
518
+ | `local/chain-fits-line` | A chain of two or more calls whose `.method(` parts sit on different lines. A multi-line callback argument does not count. | none |
519
+ | `local/arrow-body-fits-line` | An expression-bodied arrow whose body wraps onto more lines. | Fix: block body with `return` |
520
+ | `local/no-nested-object-value` | A property value that is a non-empty object literal, an array holding object literals, a ternary, or a call chain. Decorator arguments (`@Component({...})`) and files matching `configFiles` (default `**/*.config.*`, `**/eslint.config.*`, `**/*.schema.ts`) are exempt. | Suggestion: hoist to a `const` |
521
+ | `local/no-spread-expression` | `...(expr)` where the argument is not a name or member access. | Suggestion: hoist to a `const` |
522
+ | `local/no-inline-return-object` | `return {...}` and `=> ({...})`. | Suggestion: `const result = {...}; return result;` |
457
523
 
458
524
  ### Project layout rules
459
525
 
@@ -461,11 +527,11 @@ Also in the `typescript` preset. These read only the file's own path and
461
527
  return no listeners for files they do not cover, so they cost one regex
462
528
  per file.
463
529
 
464
- | Rule | Reports | Options |
465
- |---|---|---|
466
- | `local/type-placement` | An exported `type` outside a `common/*.type.ts` or `test/common/*.type.ts` file; a value exported from a `*.type.ts` file; a non-`const` export from a `*.const.ts` file; an `import type` from a relative or internal path that is neither a `*.type.ts` / `*.schema.ts` file nor a `common` barrel (`../common`, `./common/index.ts`, `@shared/common`). `.spec.ts`, `.stub.ts`, `.schema.ts` (an inferred type lives beside its schema), `.d.ts`, `state.type.ts` (any prefix), and fixtures are exempt; a `.spec.util.ts` file is not, so an exported type in one is reported. Never resolves imports. | `internalPatterns`: regex sources for alias prefixes that must resolve to a `*.type.ts` file. Default empty: a workspace alias (`@shared/common`) resolves to a library entry point, and module boundaries forbid deep imports, so alias type imports pass. |
467
- | `local/util-purity` | Inside `utils/*.util.ts` (excluding paths under `test/` or `testing/`): imports of `node:fs`, `child_process`, `os`, `process`, `http`, `net`, `worker_threads`; a module-level `let`; a module-level `new Map/Set/WeakMap/WeakSet`; `process.*`, `globalThis`, `window`, `document`, `localStorage`, `console`; `Date.now`, `Math.random`, `performance.now`, `crypto.randomUUID`; `setTimeout`, `setInterval`, `fetch`, `inject`, `require`. | `bannedModules` |
468
- | `local/test-file-shape` | A file named `*.spec-support.ts`, `*.spec-helper.ts`, `*.test-utils.ts`, `*-fixture.ts`, or under `__mocks__/` / `helpers/` / `common/stubs/`; a `.stub.ts` outside `test/stubs/`, a `.mock.ts` outside `test/mocks/`, a `.spec.util.ts` outside `test/utils/`, or any `fixtures/` directory outside `test/fixtures/` (a dedicated `testing/` library is exempt from all of these); a `test/stubs/*.stub.ts` export not named `UPPER_SNAKE_STUB` or without a type annotation; a `test/mocks/*.mock.ts` export that is not a camelCase `...Mock` function with an explicit return type. | none |
530
+ | Rule | Reports | Options |
531
+ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
532
+ | `local/type-placement` | An exported `type` outside a `common/*.type.ts` or `test/common/*.type.ts` file; a value exported from a `*.type.ts` file; a non-`const` export from a `*.const.ts` file; an `import type` from a relative or internal path that is neither a `*.type.ts` / `*.schema.ts` file nor a `common` barrel (`../common`, `./common/index.ts`, `@shared/common`). `.spec.ts`, `.stub.ts`, `.schema.ts` (an inferred type lives beside its schema), `.d.ts`, `state.type.ts` (any prefix), and fixtures are exempt; a `.spec.util.ts` file is not, so an exported type in one is reported. Never resolves imports. | `internalPatterns`: regex sources for alias prefixes that must resolve to a `*.type.ts` file. Default empty: a workspace alias (`@shared/common`) resolves to a library entry point, and module boundaries forbid deep imports, so alias type imports pass. |
533
+ | `local/util-purity` | Inside `utils/*.util.ts` (excluding paths under `test/` or `testing/`): imports of `node:fs`, `child_process`, `os`, `process`, `http`, `net`, `worker_threads`; a module-level `let`; a module-level `new Map/Set/WeakMap/WeakSet`; `process.*`, `globalThis`, `window`, `document`, `localStorage`, `console`; `Date.now`, `Math.random`, `performance.now`, `crypto.randomUUID`; `setTimeout`, `setInterval`, `fetch`, `inject`, `require`. | `bannedModules` |
534
+ | `local/test-file-shape` | A file named `*.spec-support.ts`, `*.spec-helper.ts`, `*.test-utils.ts`, `*-fixture.ts`, or under `__mocks__/` / `helpers/` / `common/stubs/`; a `.stub.ts` outside `test/stubs/`, a `.mock.ts` outside `test/mocks/`, a `.spec.util.ts` outside `test/utils/`, or any `fixtures/` directory outside `test/fixtures/` (a dedicated `testing/` library is exempt from all of these); a `test/stubs/*.stub.ts` export not named `UPPER_SNAKE_STUB` or without a type annotation; a `test/mocks/*.mock.ts` export that is not a camelCase `...Mock` function with an explicit return type. | none |
469
535
 
470
536
  ### No unused exports
471
537
 
@@ -474,7 +540,10 @@ export (values and types) that no other file in the TypeScript program
474
540
  imports, and a module that exports names but is never imported at all.
475
541
 
476
542
  - Source of truth is the program typescript-eslint already built for the
477
- type-aware rules: no extra parse, no file enumeration, no filesystem.
543
+ type-aware rules: no extra parse, no file enumeration. The disk is only
544
+ asked about a specifier the checker cannot resolve, because the project
545
+ service of typescript-eslint never retries a failed resolution; such a file
546
+ is re-read on every Program until the specifier resolves.
478
547
  - Per file the rule walks top-level statements, plus every node of a file
479
548
  whose text contains `import(`, and caches the result
480
549
  on the `ts.SourceFile` object; the project-wide usage map is cached per
@@ -505,6 +574,108 @@ imports, and a module that exports names but is never imported at all.
505
574
  `tsconfig.lib.json`) reports as unused; that is the same boundary `tsc`
506
575
  draws.
507
576
 
577
+ ## Examples
578
+
579
+ These five valid and five invalid TypeScript examples illustrate individual custom rules enabled by the `typescript` preset. Each example is judged by the named rule only; it is not a complete file guaranteed to pass every rule in the suite. Values such as `items`, `name`, and `enabled` represent existing application variables.
580
+
581
+ ### Valid examples
582
+
583
+ #### 1. Name an object type before using it
584
+
585
+ `local/no-inline-object-types` allows a named type alias used in a parameter annotation.
586
+
587
+ ```ts
588
+ type User = { name: string };
589
+
590
+ function greet(user: User): string {
591
+ return user.name;
592
+ }
593
+ ```
594
+
595
+ #### 2. Name a returned object
596
+
597
+ `local/no-inline-return-object` allows returning an identifier instead of an inline object literal.
598
+
599
+ ```ts
600
+ function createUser() {
601
+ const user = { name: 'Ada' };
602
+ return user;
603
+ }
604
+ ```
605
+
606
+ #### 3. Extract a nested object value
607
+
608
+ `local/no-nested-object-value` allows an identifier as an object property value.
609
+
610
+ ```ts
611
+ const address = { city: 'London' };
612
+ const user = { name: 'Ada', address };
613
+ ```
614
+
615
+ #### 4. Name a spread operand
616
+
617
+ `local/no-spread-expression` allows spreading a named array.
618
+
619
+ ```ts
620
+ const copy = [...items];
621
+ ```
622
+
623
+ #### 5. Mark a primitive type property readonly
624
+
625
+ `local/readonly-type-properties` accepts readonly primitive properties in type aliases.
626
+
627
+ ```ts
628
+ type Settings = { readonly enabled: boolean };
629
+ ```
630
+
631
+ ### Invalid examples
632
+
633
+ #### 1. Put an object type directly in a parameter annotation
634
+
635
+ `local/no-inline-object-types` reports the inline type. Extract the `User` type shown above.
636
+
637
+ ```ts
638
+ function greet(user: { name: string }): string {
639
+ return user.name;
640
+ }
641
+ ```
642
+
643
+ #### 2. Return an object literal directly
644
+
645
+ `local/no-inline-return-object` reports the returned literal. Assign it to a named constant first.
646
+
647
+ ```ts
648
+ function createUser() {
649
+ return { name: 'Ada' };
650
+ }
651
+ ```
652
+
653
+ #### 3. Nest an object literal inside another object
654
+
655
+ `local/no-nested-object-value` reports the inline `address` value. Declare it separately.
656
+
657
+ ```ts
658
+ const user = { name: 'Ada', address: { city: 'London' } };
659
+ ```
660
+
661
+ #### 4. Spread the result of a call directly
662
+
663
+ `local/no-spread-expression` reports the inline call used as a spread operand. Assign the filtered array to a named constant before spreading it.
664
+
665
+ ```ts
666
+ const copy = [...items.filter(isVisible)];
667
+ ```
668
+
669
+ #### 5. Leave a primitive type property mutable
670
+
671
+ `local/readonly-type-properties` reports the missing `readonly` modifier.
672
+
673
+ ```ts
674
+ type Settings = { enabled: boolean };
675
+ ```
676
+
677
+ For more valid and invalid code examples, configuration options, and rule-specific exceptions, see the [standalone package catalog](https://github.com/F0rty-Tw0/lint-suite#standalone-custom-rules).
678
+
508
679
  ## Stylelint and Prettier presets
509
680
 
510
681
  These are standalone configs exported as subpaths — they are not part of the `recommended` ESLint array.
package/eslint.d.ts CHANGED
@@ -13,4 +13,3 @@ import { typescript } from './lib/typescript.ts';
13
13
  import { vitest } from './lib/vitest.ts';
14
14
  export declare const recommended: ConfigArray;
15
15
  export { base, javascript, typescript, angular, angularTemplate, rxjs, json, boundaries, storybook, vitest, playwright, prettier };
16
- //# sourceMappingURL=eslint.d.ts.map