eslint-plugin-runtime-cleanup 1.2.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.
Files changed (217) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +117 -0
  4. package/dist/_internal/ast-node.d.ts +19 -0
  5. package/dist/_internal/ast-node.d.ts.map +1 -0
  6. package/dist/_internal/ast-node.js +42 -0
  7. package/dist/_internal/ast-node.js.map +1 -0
  8. package/dist/_internal/bounded-cache.d.ts +37 -0
  9. package/dist/_internal/bounded-cache.d.ts.map +1 -0
  10. package/dist/_internal/bounded-cache.js +63 -0
  11. package/dist/_internal/bounded-cache.js.map +1 -0
  12. package/dist/_internal/cycle-safe-linked-search.d.ts +48 -0
  13. package/dist/_internal/cycle-safe-linked-search.d.ts.map +1 -0
  14. package/dist/_internal/cycle-safe-linked-search.js +70 -0
  15. package/dist/_internal/cycle-safe-linked-search.js.map +1 -0
  16. package/dist/_internal/expression-boolean-memoizer.d.ts +17 -0
  17. package/dist/_internal/expression-boolean-memoizer.d.ts.map +1 -0
  18. package/dist/_internal/expression-boolean-memoizer.js +22 -0
  19. package/dist/_internal/expression-boolean-memoizer.js.map +1 -0
  20. package/dist/_internal/filter-callback.d.ts +52 -0
  21. package/dist/_internal/filter-callback.d.ts.map +1 -0
  22. package/dist/_internal/filter-callback.js +108 -0
  23. package/dist/_internal/filter-callback.js.map +1 -0
  24. package/dist/_internal/floating-resource.d.ts +29 -0
  25. package/dist/_internal/floating-resource.d.ts.map +1 -0
  26. package/dist/_internal/floating-resource.js +114 -0
  27. package/dist/_internal/floating-resource.js.map +1 -0
  28. package/dist/_internal/member-call.d.ts +53 -0
  29. package/dist/_internal/member-call.d.ts.map +1 -0
  30. package/dist/_internal/member-call.js +61 -0
  31. package/dist/_internal/member-call.js.map +1 -0
  32. package/dist/_internal/normalize-expression-text.d.ts +21 -0
  33. package/dist/_internal/normalize-expression-text.d.ts.map +1 -0
  34. package/dist/_internal/normalize-expression-text.js +186 -0
  35. package/dist/_internal/normalize-expression-text.js.map +1 -0
  36. package/dist/_internal/nullish-comparison.d.ts +44 -0
  37. package/dist/_internal/nullish-comparison.d.ts.map +1 -0
  38. package/dist/_internal/nullish-comparison.js +162 -0
  39. package/dist/_internal/nullish-comparison.js.map +1 -0
  40. package/dist/_internal/plugin-settings.d.ts +30 -0
  41. package/dist/_internal/plugin-settings.d.ts.map +1 -0
  42. package/dist/_internal/plugin-settings.js +90 -0
  43. package/dist/_internal/plugin-settings.js.map +1 -0
  44. package/dist/_internal/report-adapter.d.ts +24 -0
  45. package/dist/_internal/report-adapter.d.ts.map +1 -0
  46. package/dist/_internal/report-adapter.js +35 -0
  47. package/dist/_internal/report-adapter.js.map +1 -0
  48. package/dist/_internal/rule-catalog.d.ts +47 -0
  49. package/dist/_internal/rule-catalog.d.ts.map +1 -0
  50. package/dist/_internal/rule-catalog.js +97 -0
  51. package/dist/_internal/rule-catalog.js.map +1 -0
  52. package/dist/_internal/rule-docs-metadata.d.ts +35 -0
  53. package/dist/_internal/rule-docs-metadata.d.ts.map +1 -0
  54. package/dist/_internal/rule-docs-metadata.js +172 -0
  55. package/dist/_internal/rule-docs-metadata.js.map +1 -0
  56. package/dist/_internal/rule-docs-url.d.ts +15 -0
  57. package/dist/_internal/rule-docs-url.d.ts.map +1 -0
  58. package/dist/_internal/rule-docs-url.js +15 -0
  59. package/dist/_internal/rule-docs-url.js.map +1 -0
  60. package/dist/_internal/rules-registry.d.ts +11 -0
  61. package/dist/_internal/rules-registry.d.ts.map +1 -0
  62. package/dist/_internal/rules-registry.js +53 -0
  63. package/dist/_internal/rules-registry.js.map +1 -0
  64. package/dist/_internal/runtime-cleanup-config-references.d.ts +38 -0
  65. package/dist/_internal/runtime-cleanup-config-references.d.ts.map +1 -0
  66. package/dist/_internal/runtime-cleanup-config-references.js +78 -0
  67. package/dist/_internal/runtime-cleanup-config-references.js.map +1 -0
  68. package/dist/_internal/safe-type-operation.d.ts +89 -0
  69. package/dist/_internal/safe-type-operation.d.ts.map +1 -0
  70. package/dist/_internal/safe-type-operation.js +147 -0
  71. package/dist/_internal/safe-type-operation.js.map +1 -0
  72. package/dist/_internal/scope-variable.d.ts +17 -0
  73. package/dist/_internal/scope-variable.d.ts.map +1 -0
  74. package/dist/_internal/scope-variable.js +30 -0
  75. package/dist/_internal/scope-variable.js.map +1 -0
  76. package/dist/_internal/type-checker.d.ts +11 -0
  77. package/dist/_internal/type-checker.d.ts.map +1 -0
  78. package/dist/_internal/type-checker.js +25 -0
  79. package/dist/_internal/type-checker.js.map +1 -0
  80. package/dist/_internal/type-predicate-autofix-safety.d.ts +16 -0
  81. package/dist/_internal/type-predicate-autofix-safety.d.ts.map +1 -0
  82. package/dist/_internal/type-predicate-autofix-safety.js +54 -0
  83. package/dist/_internal/type-predicate-autofix-safety.js.map +1 -0
  84. package/dist/_internal/type-reference-node.d.ts +23 -0
  85. package/dist/_internal/type-reference-node.d.ts.map +1 -0
  86. package/dist/_internal/type-reference-node.js +41 -0
  87. package/dist/_internal/type-reference-node.js.map +1 -0
  88. package/dist/_internal/typed-rule.d.ts +91 -0
  89. package/dist/_internal/typed-rule.d.ts.map +1 -0
  90. package/dist/_internal/typed-rule.js +121 -0
  91. package/dist/_internal/typed-rule.js.map +1 -0
  92. package/dist/_internal/value-rewrite-autofix-safety.d.ts +29 -0
  93. package/dist/_internal/value-rewrite-autofix-safety.d.ts.map +1 -0
  94. package/dist/_internal/value-rewrite-autofix-safety.js +108 -0
  95. package/dist/_internal/value-rewrite-autofix-safety.js.map +1 -0
  96. package/dist/plugin.cjs +3693 -0
  97. package/dist/plugin.cjs.map +7 -0
  98. package/dist/plugin.d.cts +75 -0
  99. package/dist/plugin.d.ts +75 -0
  100. package/dist/plugin.d.ts.map +1 -0
  101. package/dist/plugin.js +223 -0
  102. package/dist/plugin.js.map +1 -0
  103. package/dist/rules/no-floating-abort-controllers.d.ts +9 -0
  104. package/dist/rules/no-floating-abort-controllers.d.ts.map +1 -0
  105. package/dist/rules/no-floating-abort-controllers.js +144 -0
  106. package/dist/rules/no-floating-abort-controllers.js.map +1 -0
  107. package/dist/rules/no-floating-audio-contexts.d.ts +9 -0
  108. package/dist/rules/no-floating-audio-contexts.d.ts.map +1 -0
  109. package/dist/rules/no-floating-audio-contexts.js +95 -0
  110. package/dist/rules/no-floating-audio-contexts.js.map +1 -0
  111. package/dist/rules/no-floating-broadcast-channels.d.ts +9 -0
  112. package/dist/rules/no-floating-broadcast-channels.d.ts.map +1 -0
  113. package/dist/rules/no-floating-broadcast-channels.js +151 -0
  114. package/dist/rules/no-floating-broadcast-channels.js.map +1 -0
  115. package/dist/rules/no-floating-child-processes.d.ts +9 -0
  116. package/dist/rules/no-floating-child-processes.d.ts.map +1 -0
  117. package/dist/rules/no-floating-child-processes.js +259 -0
  118. package/dist/rules/no-floating-child-processes.js.map +1 -0
  119. package/dist/rules/no-floating-disposable-stacks.d.ts +9 -0
  120. package/dist/rules/no-floating-disposable-stacks.d.ts.map +1 -0
  121. package/dist/rules/no-floating-disposable-stacks.js +177 -0
  122. package/dist/rules/no-floating-disposable-stacks.js.map +1 -0
  123. package/dist/rules/no-floating-file-watchers.d.ts +9 -0
  124. package/dist/rules/no-floating-file-watchers.d.ts.map +1 -0
  125. package/dist/rules/no-floating-file-watchers.js +241 -0
  126. package/dist/rules/no-floating-file-watchers.js.map +1 -0
  127. package/dist/rules/no-floating-geolocation-watches.d.ts +9 -0
  128. package/dist/rules/no-floating-geolocation-watches.d.ts.map +1 -0
  129. package/dist/rules/no-floating-geolocation-watches.js +156 -0
  130. package/dist/rules/no-floating-geolocation-watches.js.map +1 -0
  131. package/dist/rules/no-floating-infinite-animations.d.ts +9 -0
  132. package/dist/rules/no-floating-infinite-animations.d.ts.map +1 -0
  133. package/dist/rules/no-floating-infinite-animations.js +131 -0
  134. package/dist/rules/no-floating-infinite-animations.js.map +1 -0
  135. package/dist/rules/no-floating-media-streams.d.ts +9 -0
  136. package/dist/rules/no-floating-media-streams.d.ts.map +1 -0
  137. package/dist/rules/no-floating-media-streams.js +175 -0
  138. package/dist/rules/no-floating-media-streams.js.map +1 -0
  139. package/dist/rules/no-floating-message-channels.d.ts +9 -0
  140. package/dist/rules/no-floating-message-channels.d.ts.map +1 -0
  141. package/dist/rules/no-floating-message-channels.js +150 -0
  142. package/dist/rules/no-floating-message-channels.js.map +1 -0
  143. package/dist/rules/no-floating-network-connections.d.ts +9 -0
  144. package/dist/rules/no-floating-network-connections.d.ts.map +1 -0
  145. package/dist/rules/no-floating-network-connections.js +170 -0
  146. package/dist/rules/no-floating-network-connections.js.map +1 -0
  147. package/dist/rules/no-floating-object-urls.d.ts +9 -0
  148. package/dist/rules/no-floating-object-urls.d.ts.map +1 -0
  149. package/dist/rules/no-floating-object-urls.js +83 -0
  150. package/dist/rules/no-floating-object-urls.js.map +1 -0
  151. package/dist/rules/no-floating-observers.d.ts +9 -0
  152. package/dist/rules/no-floating-observers.d.ts.map +1 -0
  153. package/dist/rules/no-floating-observers.js +160 -0
  154. package/dist/rules/no-floating-observers.js.map +1 -0
  155. package/dist/rules/no-floating-servers.d.ts +9 -0
  156. package/dist/rules/no-floating-servers.d.ts.map +1 -0
  157. package/dist/rules/no-floating-servers.js +282 -0
  158. package/dist/rules/no-floating-servers.js.map +1 -0
  159. package/dist/rules/no-floating-streams.d.ts +9 -0
  160. package/dist/rules/no-floating-streams.d.ts.map +1 -0
  161. package/dist/rules/no-floating-streams.js +222 -0
  162. package/dist/rules/no-floating-streams.js.map +1 -0
  163. package/dist/rules/no-floating-timers.d.ts +9 -0
  164. package/dist/rules/no-floating-timers.d.ts.map +1 -0
  165. package/dist/rules/no-floating-timers.js +145 -0
  166. package/dist/rules/no-floating-timers.js.map +1 -0
  167. package/dist/rules/no-floating-wake-locks.d.ts +9 -0
  168. package/dist/rules/no-floating-wake-locks.d.ts.map +1 -0
  169. package/dist/rules/no-floating-wake-locks.js +159 -0
  170. package/dist/rules/no-floating-wake-locks.js.map +1 -0
  171. package/dist/rules/no-floating-web-stream-locks.d.ts +9 -0
  172. package/dist/rules/no-floating-web-stream-locks.d.ts.map +1 -0
  173. package/dist/rules/no-floating-web-stream-locks.js +87 -0
  174. package/dist/rules/no-floating-web-stream-locks.js.map +1 -0
  175. package/dist/rules/no-floating-workers.d.ts +9 -0
  176. package/dist/rules/no-floating-workers.d.ts.map +1 -0
  177. package/dist/rules/no-floating-workers.js +185 -0
  178. package/dist/rules/no-floating-workers.js.map +1 -0
  179. package/dist/rules/no-unmanaged-event-listeners.d.ts +9 -0
  180. package/dist/rules/no-unmanaged-event-listeners.d.ts.map +1 -0
  181. package/dist/rules/no-unmanaged-event-listeners.js +210 -0
  182. package/dist/rules/no-unmanaged-event-listeners.js.map +1 -0
  183. package/docs/rules/getting-started.md +29 -0
  184. package/docs/rules/guides/adoption-checklist.md +31 -0
  185. package/docs/rules/guides/preset-selection-strategy.md +24 -0
  186. package/docs/rules/guides/rollout-and-fix-safety.md +42 -0
  187. package/docs/rules/guides/snapshot-testing.md +20 -0
  188. package/docs/rules/guides/type-aware-linting-readiness.md +20 -0
  189. package/docs/rules/no-floating-abort-controllers.md +126 -0
  190. package/docs/rules/no-floating-audio-contexts.md +104 -0
  191. package/docs/rules/no-floating-broadcast-channels.md +105 -0
  192. package/docs/rules/no-floating-child-processes.md +123 -0
  193. package/docs/rules/no-floating-disposable-stacks.md +118 -0
  194. package/docs/rules/no-floating-file-watchers.md +111 -0
  195. package/docs/rules/no-floating-geolocation-watches.md +95 -0
  196. package/docs/rules/no-floating-infinite-animations.md +110 -0
  197. package/docs/rules/no-floating-media-streams.md +113 -0
  198. package/docs/rules/no-floating-message-channels.md +114 -0
  199. package/docs/rules/no-floating-network-connections.md +116 -0
  200. package/docs/rules/no-floating-object-urls.md +102 -0
  201. package/docs/rules/no-floating-observers.md +108 -0
  202. package/docs/rules/no-floating-servers.md +127 -0
  203. package/docs/rules/no-floating-streams.md +120 -0
  204. package/docs/rules/no-floating-timers.md +120 -0
  205. package/docs/rules/no-floating-wake-locks.md +109 -0
  206. package/docs/rules/no-floating-web-stream-locks.md +105 -0
  207. package/docs/rules/no-floating-workers.md +123 -0
  208. package/docs/rules/no-unmanaged-event-listeners.md +143 -0
  209. package/docs/rules/overview.md +44 -0
  210. package/docs/rules/presets/all.md +35 -0
  211. package/docs/rules/presets/experimental.md +44 -0
  212. package/docs/rules/presets/index.md +54 -0
  213. package/docs/rules/presets/minimal.md +17 -0
  214. package/docs/rules/presets/recommended-type-checked.md +43 -0
  215. package/docs/rules/presets/recommended.md +34 -0
  216. package/docs/rules/presets/strict.md +36 -0
  217. package/package.json +323 -0
@@ -0,0 +1,34 @@
1
+ # recommended
2
+
3
+ `runtime-cleanup.configs.recommended` is reserved for broadly safe cleanup
4
+ rules that do not need TypeScript type information.
5
+
6
+ ## Rules in this preset
7
+
8
+ This preset enables the following rules.
9
+
10
+ - `Fix` legend:
11
+ - `fix` = autofixable
12
+ - `suggest` = suggestions available
13
+ - `-` = report only
14
+
15
+ | Rule | Fix |
16
+ | --- | :-: |
17
+ | [`no-floating-abort-controllers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-abort-controllers) | - |
18
+ | [`no-floating-audio-contexts`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-audio-contexts) | - |
19
+ | [`no-floating-broadcast-channels`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-broadcast-channels) | - |
20
+ | [`no-floating-child-processes`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-child-processes) | - |
21
+ | [`no-floating-disposable-stacks`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-disposable-stacks) | - |
22
+ | [`no-floating-file-watchers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-file-watchers) | - |
23
+ | [`no-floating-geolocation-watches`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-geolocation-watches) | - |
24
+ | [`no-floating-media-streams`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-media-streams) | - |
25
+ | [`no-floating-message-channels`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-message-channels) | - |
26
+ | [`no-floating-network-connections`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-network-connections) | - |
27
+ | [`no-floating-object-urls`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-object-urls) | - |
28
+ | [`no-floating-observers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-observers) | - |
29
+ | [`no-floating-servers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-servers) | - |
30
+ | [`no-floating-streams`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-streams) | - |
31
+ | [`no-floating-timers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-timers) | - |
32
+ | [`no-floating-wake-locks`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-wake-locks) | - |
33
+ | [`no-floating-workers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-workers) | - |
34
+ | [`no-unmanaged-event-listeners`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-unmanaged-event-listeners) | - |
@@ -0,0 +1,36 @@
1
+ # strict
2
+
3
+ `runtime-cleanup.configs.strict` is reserved for stronger cleanup enforcement
4
+ after low-noise rules have proven stable.
5
+
6
+ ## Rules in this preset
7
+
8
+ This preset enables the following rules.
9
+
10
+ - `Fix` legend:
11
+ - `fix` = autofixable
12
+ - `suggest` = suggestions available
13
+ - `-` = report only
14
+
15
+ | Rule | Fix |
16
+ | --- | :-: |
17
+ | [`no-floating-abort-controllers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-abort-controllers) | - |
18
+ | [`no-floating-audio-contexts`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-audio-contexts) | - |
19
+ | [`no-floating-broadcast-channels`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-broadcast-channels) | - |
20
+ | [`no-floating-child-processes`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-child-processes) | - |
21
+ | [`no-floating-disposable-stacks`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-disposable-stacks) | - |
22
+ | [`no-floating-file-watchers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-file-watchers) | - |
23
+ | [`no-floating-geolocation-watches`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-geolocation-watches) | - |
24
+ | [`no-floating-infinite-animations`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-infinite-animations) | - |
25
+ | [`no-floating-media-streams`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-media-streams) | - |
26
+ | [`no-floating-message-channels`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-message-channels) | - |
27
+ | [`no-floating-network-connections`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-network-connections) | - |
28
+ | [`no-floating-object-urls`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-object-urls) | - |
29
+ | [`no-floating-observers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-observers) | - |
30
+ | [`no-floating-servers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-servers) | - |
31
+ | [`no-floating-streams`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-streams) | - |
32
+ | [`no-floating-timers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-timers) | - |
33
+ | [`no-floating-wake-locks`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-wake-locks) | - |
34
+ | [`no-floating-web-stream-locks`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-web-stream-locks) | - |
35
+ | [`no-floating-workers`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-floating-workers) | - |
36
+ | [`no-unmanaged-event-listeners`](https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/docs/rules/no-unmanaged-event-listeners) | - |
package/package.json ADDED
@@ -0,0 +1,323 @@
1
+ {
2
+ "$schema": "https://www.schemastore.org/package.json",
3
+ "name": "eslint-plugin-runtime-cleanup",
4
+ "version": "1.2.8",
5
+ "private": false,
6
+ "description": "ESLint rules for requiring cleanup of runtime resources.",
7
+ "keywords": [
8
+ "eslint",
9
+ "eslint-plugin",
10
+ "eslintplugin",
11
+ "cleanup",
12
+ "resources",
13
+ "runtime",
14
+ "typescript"
15
+ ],
16
+ "homepage": "https://nick2bad4u.github.io/eslint-plugin-runtime-cleanup/",
17
+ "bugs": {
18
+ "url": "https://github.com/Nick2bad4u/eslint-plugin-runtime-cleanup/issues",
19
+ "email": "20943337+Nick2bad4u@users.noreply.github.com"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/Nick2bad4u/eslint-plugin-runtime-cleanup.git"
24
+ },
25
+ "license": "MIT",
26
+ "author": "Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com> (https://github.com/Nick2bad4u)",
27
+ "contributors": [
28
+ {
29
+ "name": "Nick2bad4u",
30
+ "email": "20943337+Nick2bad4u@users.noreply.github.com",
31
+ "url": "https://github.com/Nick2bad4u"
32
+ }
33
+ ],
34
+ "sideEffects": false,
35
+ "type": "module",
36
+ "exports": {
37
+ ".": {
38
+ "import": {
39
+ "types": "./dist/plugin.d.ts",
40
+ "default": "./dist/plugin.js"
41
+ },
42
+ "require": {
43
+ "types": "./dist/plugin.d.cts",
44
+ "default": "./dist/plugin.cjs"
45
+ },
46
+ "default": "./dist/plugin.js"
47
+ },
48
+ "./package.json": "./package.json"
49
+ },
50
+ "main": "./dist/plugin.cjs",
51
+ "types": "./dist/plugin.d.ts",
52
+ "files": [
53
+ "dist",
54
+ "docs/rules/**",
55
+ "CHANGELOG.md"
56
+ ],
57
+ "workspaces": [
58
+ "docs/docusaurus"
59
+ ],
60
+ "scripts": {
61
+ "prebench": "npm run build",
62
+ "bench": "node benchmarks/run-eslint-stats.mjs",
63
+ "prebench:compare": "npm run build",
64
+ "bench:compare": "node benchmarks/run-eslint-stats.mjs --iterations=6 --warmup=2 --compare=coverage/benchmarks/eslint-stats.json",
65
+ "prebench:eslint:stats": "npm run build",
66
+ "bench:eslint:stats": "node benchmarks/run-eslint-stats.mjs",
67
+ "prebench:eslint:timing": "npm run build",
68
+ "bench:eslint:timing": "cross-env TIMING=all eslint --config benchmarks/eslint-timing.config.mjs --stats \"test/fixtures/typed/*.invalid.ts\"",
69
+ "prebench:rule-benchmark": "npm run build",
70
+ "bench:rule-benchmark": "eslint-rule-benchmark run",
71
+ "prebench:ui": "npm run build",
72
+ "bench:ui": "vitest bench --ui",
73
+ "prebench:watch": "npm run build",
74
+ "bench:watch": "vitest bench",
75
+ "build": "tsc -b tsconfig.build.json --force && npm run build:types:cjs && npm run build:cjs",
76
+ "build:cjs": "esbuild dist/plugin.js --bundle --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/plugin.cjs --footer:js=\"module.exports = module.exports.default;\"",
77
+ "build:clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
78
+ "build:eslint-inspector": "npx -y @eslint/config-inspector@latest build --outDir \"docs/docusaurus/static/eslint-inspector\" --base \"/eslint-plugin-runtime-cleanup/eslint-inspector/\"",
79
+ "build:eslint-inspector:local": "npx @eslint/config-inspector",
80
+ "build:stylelint-inspector": "npx -y stylelint-config-inspector@latest build --outDir \"docs/docusaurus/static/stylelint-inspector\" --base \"/eslint-plugin-runtime-cleanup/stylelint-inspector/\"",
81
+ "build:stylelint-inspector:local": "npx stylelint-config-inspector@latest",
82
+ "build:types:cjs": "node -e \"require('node:fs').copyFileSync('dist/plugin.d.ts','dist/plugin.d.cts')\"",
83
+ "changelog": "git-cliff --config cliff.toml --current",
84
+ "changelog:generate": "git-cliff --config cliff.toml --output CHANGELOG.md",
85
+ "changelog:preview": "git-cliff --config cliff.toml --unreleased",
86
+ "changelog:release-notes": "git-cliff --config cliff.toml --latest --strip all",
87
+ "clean:cache": "del-cli dist coverage cache .cache .vite .turbo",
88
+ "clean:cache:coverage": "del-cli coverage .coverage",
89
+ "clean:cache:dist": "del-cli dist release",
90
+ "clean:cache:eslint": "del-cli .cache/.eslintcache",
91
+ "clean:cache:ncu": "del-cli .cache/.ncu-cache.json",
92
+ "clean:cache:prettier": "del-cli .cache/.prettier-cache .prettier-cache .prettiercache",
93
+ "clean:cache:stryker": "del-cli .stryker-tmp",
94
+ "clean:cache:stylelint": "del-cli .cache/stylelintcache stylelintcache .stylelintcache",
95
+ "clean:cache:temp": "del-cli \".temp/**\"",
96
+ "clean:cache:typescript": "del-cli .cache/**.tsbuildinfo .cache/builds",
97
+ "clean:cache:vite": "del-cli .cache/vite .cache/vitest .cache/vitest-zero-coverage .cache/vite-zero-coverage",
98
+ "clean:database": "del-cli %appdata%/uptime-watcher/uptime-watcher.sqlite",
99
+ "clean:docs": "del-cli docs/docusaurus/.docusaurus/** docs/docusaurus/build/** docs/docusaurus/site-docs/developer/api/**",
100
+ "clean:docusaurus": "npm run clean:docs && npm run --workspace docs/docusaurus clear",
101
+ "cognitive-complexity": "cognitive-complexity-ts --threshold 10",
102
+ "precommit": "npm run sync:rules:write",
103
+ "commit": "git-cz",
104
+ "contrib": "all-contributors",
105
+ "contrib:add": "all-contributors add",
106
+ "contrib:check": "all-contributors check",
107
+ "contrib:compare": "npm run contrib:check",
108
+ "contrib:generate": "all-contributors generate",
109
+ "coverage": "vitest run --coverage",
110
+ "docs:api": "npm run --workspace docs/docusaurus docs:api",
111
+ "docs:api:local": "npm run --workspace docs/docusaurus docs:api:local",
112
+ "docs:build": "npm run --workspace docs/docusaurus build",
113
+ "docs:build:local": "npm run --workspace docs/docusaurus build:local",
114
+ "docs:check-links": "npm run docs:api && node ./scripts/check-doc-links.mjs",
115
+ "docs:devtools:metadata": "node scripts/generate-devtools-workspace-metadata.mjs",
116
+ "docs:serve": "npm run --workspace docs/docusaurus serve",
117
+ "docs:start": "npm run --workspace docs/docusaurus start",
118
+ "docs:start:devtools": "npm run docs:devtools:metadata && npm run docs:api:local && npm run --workspace docs/docusaurus start:devtools",
119
+ "docs:toc": "remark docs --use remark-toc --output",
120
+ "docs:typecheck": "npm run --workspace docs/docusaurus typecheck",
121
+ "docs:typedoc": "npm run --workspace docs/docusaurus docs:api",
122
+ "docs:typedoc:local": "npm run --workspace docs/docusaurus docs:api:local",
123
+ "docs:validate-links": "remark docs --use remark-validate-links --frail",
124
+ "knip": "cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_NO_WARNINGS=1 npx knip -c knip.config.ts --cache --cache-location .cache/knip --tsConfig tsconfig.json",
125
+ "lint": "cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache",
126
+ "lint:action": "npm run lint:actions",
127
+ "lint:actions": "node scripts/lint-actionlint.mjs",
128
+ "lint:all": "npm run lint && npm run typecheck && npm run lint:css && npm run lint:prettier && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml && npm run lint:actions && npm run lint:circular && npm run sync:rules:check",
129
+ "lint:all:fix": "npm run lint:fix && npm run typecheck && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml:fix && npm run lint:actions && npm run lint:circular && npm run sync:rules:write",
130
+ "lint:all:fix:quiet": "npm run lint:fix:quiet && npm run typecheck && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml:fix && npm run lint:actions && npm run lint:circular && npm run sync:rules:write",
131
+ "lint:circular": "npm run madge:circular",
132
+ "lint:compat:eslint9": "node scripts/eslint9-compat-smoke.mjs",
133
+ "lint:config:build": "npm run build:eslint-inspector",
134
+ "lint:config:inspect": "npx eslint --inspect-config",
135
+ "lint:css": "stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache src/ docs/ --custom-formatter stylelint-formatter-pretty && echo \"Stylelint done!\"",
136
+ "lint:css:fix": "stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache src/ docs/ --custom-formatter stylelint-formatter-pretty --fix && echo \"Stylelint done!\"",
137
+ "lint:depcheck": "npm run knip -- --dependencies",
138
+ "lint:deps": "npm run knip -- --dependencies",
139
+ "lint:dupes": "jscpd src/ --config jscpd.json",
140
+ "lint:dupes:all": "jscpd src/ --config jscpd.json --min-lines 3",
141
+ "lint:dupes:skiplocal": "jscpd src/ --skipLocal --config jscpd.json",
142
+ "lint:dupes:skiplocal:all": "jscpd src/ --skipLocal --config jscpd.json --min-lines 3",
143
+ "lint:duplicates": "npm run lint:dupes",
144
+ "lint:exports": "ts-unused-exports tsconfig.json src/plugin.ts --excludePathsFromReport=plugin.ts",
145
+ "lint:fix": "cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache --fix",
146
+ "lint:fix:quiet": "cross-env ESLINT_PROGRESS=off NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache --fix && echo \"Eslint fix done!\"",
147
+ "lint:grype": "grype . -c .grype.yaml --name eslint-plugin-runtime-cleanup",
148
+ "lint:knip": "npm run knip",
149
+ "lint:knip:exports": "npm run knip -- --include exports,nsExports,classMembers,types,nsTypes,enumMembers,duplicates",
150
+ "lint:knip:unused:exports": "npm run knip -- --dependencies --exports",
151
+ "lint:leaves": "npm run madge:leaves",
152
+ "lint:metrics": "npm run sloc",
153
+ "lint:nocache": "cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint .",
154
+ "lint:node-version-files": "node scripts/sync-node-version-files.mjs --check",
155
+ "lint:orphans": "npm run madge:orphans",
156
+ "lint:package": "npm run lint:node-version-files && npm run lint:package-sort && npm run lint:packagelintrc && echo \"Package.json lint done!\"",
157
+ "lint:package:strict": "npm run lint:node-version-files && npm run lint:package-sort && npm run lint:package-check:strict && npm run lint:packagelintrc && echo \"Package.json lint done!\"",
158
+ "lint:package-check": "publint && attw --pack .",
159
+ "lint:package-check:strict": "publint && node scripts/check-package-types.mjs",
160
+ "lint:package-sort": "sort-package-json \"./package.json\" \"./docs/docusaurus/package.json\"",
161
+ "lint:package-sort-check": "sort-package-json --check \"./package.json\" \"./docs/docusaurus/package.json\"",
162
+ "lint:packagelintrc": "npmPkgJsonLint . --config .npmpackagejsonlintrc.json",
163
+ "lint:prettier": "prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --check",
164
+ "lint:prettier:fix": "prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --write",
165
+ "lint:publint": "publint",
166
+ "lint:quiet": "cross-env ESLINT_PROGRESS=nofile NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache && echo \"Eslint done!\"",
167
+ "lint:remark": "remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \"*.{md,mdx}\" \"docs/**/*.{md,mdx}\" --quiet",
168
+ "lint:remark:fix": "prettier --log-level warn --ignore-path prettierignore.remark --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --no-error-on-unmatched-pattern --write \"*.{md,mdx}\" \"docs/**/*.{md,mdx}\" && npm run remark:fix",
169
+ "lint:secretlint": "secretlint --secretlintrc .secretlintrc.cjs --secretlintignore .secretlintignore \"./*\" \".vscode/**\" \"assets/**\" \"src/**\" \"electron/**\" \"shared/**\" \"config/**\" \"scripts/**\" \"playwright/**\" \"storybook/**\" \".storybook\" \"tests/**\" \"benchmarks/**\" \".devin/**\" \"public/**\" \".github/**\" \"docs/Architecture/**\" \"docs/*\" \"docs/assets/**\" \"docs/Guides/**\" \"docs/Testing/**\" \"docs/TSDoc/**\" \"docs/docusaurus/src/**\" \"docs/docusaurus/static/**\" \"docs/docusaurus/blog/**\" \"docs/docusaurus/docs/**\" \"docs/docusaurus/docs/*\"",
170
+ "lint:secrets": "detect-secrets scan",
171
+ "lint:unused": "npm run knip -- --include unlisted,unresolved,duplicates",
172
+ "lint:unused-deps": "npm run knip -- --dependencies",
173
+ "lint:yaml": "cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache \"**/*.{yml,yaml}\" && echo \"YAML lint done!\"",
174
+ "lint:yaml:fix": "cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix \"**/*.{yml,yaml}\" && echo \"YAML lint (fix) done!\"",
175
+ "madge:circular": "madge --circular --json --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \"(^|[\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\/])|\\.css$\"",
176
+ "madge:leaves": "madge --leaves --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \"(^|[\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\/])|\\.css$\"",
177
+ "madge:orphans": "madge --orphans --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \"(^|[\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\/])|\\.css$\"",
178
+ "open:coverage": "open-cli coverage/index.html",
179
+ "prepublishOnly": "npm run release:check",
180
+ "release:check": "npm run release:verify",
181
+ "release:verify": "cross-env NODE_OPTIONS= npm run build && cross-env NODE_OPTIONS= npm run lint:nocache && cross-env NODE_OPTIONS= npm run typecheck && cross-env NODE_OPTIONS= VITEST_TYPECHECK=false npm run test && cross-env NODE_OPTIONS= npm run sync:rules:check && cross-env NODE_OPTIONS= npm run docs:check-links && cross-env NODE_OPTIONS= npm run lint:package:strict",
182
+ "remark:fix": "remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail --quiet --output -- \"*.{md,mdx}\" \"docs/**/*.{md,mdx}\"",
183
+ "remark:test-config": "remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \"README.md\"",
184
+ "size": "size-limit",
185
+ "sync:node-version-files": "node scripts/sync-node-version-files.mjs",
186
+ "sync:peer-eslint-range": "node scripts/sync-peer-eslint-range.mjs",
187
+ "sync:presets-rules-matrix": "node scripts/sync-presets-rules-matrix.mjs",
188
+ "sync:readme-rules-table": "node scripts/sync-readme-rules-table.mjs",
189
+ "sync:readme-rules-table:update": "npm run build && cross-env RUNTIME_CLEANUP_UPDATE_GENERATED_DOCS=1 vitest run test/readme-rules-table-sync.test.ts -u",
190
+ "sync:readme-rules-table:write": "node scripts/sync-readme-rules-table.mjs --write",
191
+ "sync:rules:check": "npm run sync:readme-rules-table && npm run sync:presets-rules-matrix",
192
+ "sync:rules:write": "npm run sync:readme-rules-table:write && node scripts/sync-presets-rules-matrix.mjs --write",
193
+ "pretest": "npm run build",
194
+ "test": "vitest run",
195
+ "test:autofix:fixtures": "node -e \"console.log('No autofix fixtures are defined yet.')\"",
196
+ "test:autofix:fixtures:typed": "node -e \"console.log('No typed autofix fixtures are defined yet.')\"",
197
+ "test:ci": "cross-env CI=true vitest run --reporter=default",
198
+ "test:coverage": "vitest run --coverage --reporter=default",
199
+ "test:coverage:detailed": "vitest run --coverage --reporter=verbose",
200
+ "test:coverage:minimal": "vitest run --coverage --reporter=dot",
201
+ "test:coverage:open": "npm run test:coverage && npm run open:coverage",
202
+ "test:coverage:quiet": "vitest run --coverage --reporter=default --silent",
203
+ "test:coverage:verbose": "vitest run --coverage --reporter=verbose",
204
+ "test:detailed": "vitest run --reporter=verbose",
205
+ "test:minimal": "vitest run --reporter=dot",
206
+ "test:open": "npm run test:coverage && npm run open:coverage",
207
+ "test:quiet": "vitest run --reporter=default --silent",
208
+ "test:serial": "cross-env MAX_THREADS=1 vitest run",
209
+ "test:stryker": "stryker run --ignoreStatic --concurrency 12 --incrementalFile .cache/stryker/incremental-fast.json",
210
+ "test:stryker:ci": "cross-env CI=true stryker run --ignoreStatic --concurrency 2 --incrementalFile .cache/stryker/incremental-fast-ci.json",
211
+ "test:stryker:full": "stryker run --concurrency 12 --incrementalFile .cache/stryker/incremental-full.json",
212
+ "test:stryker:full:ci": "cross-env CI=true stryker run --concurrency 2 --incrementalFile .cache/stryker/incremental-full-ci.json",
213
+ "test:verbose": "vitest run --reporter=verbose",
214
+ "test:watch": "vitest",
215
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.eslint.json --noEmit && tsc -p tsconfig.js.json --noEmit && npm run --workspace docs/docusaurus typecheck",
216
+ "typecheck:all": "npm run typecheck",
217
+ "types:update": "typesync",
218
+ "update-deps": "npx ncu -i --install never && npm update --workspaces --force && npm install --force && npm run sync:peer-eslint-range && npm run sync:node-version-files && npm run sync:rules:write",
219
+ "verify:readme-rules-table": "npm run build && npm run sync:rules:write"
220
+ },
221
+ "overrides": {
222
+ "jsonc-eslint-parser": "$jsonc-eslint-parser"
223
+ },
224
+ "dependencies": {
225
+ "@typescript-eslint/parser": "^8.59.3",
226
+ "@typescript-eslint/type-utils": "^8.59.3",
227
+ "@typescript-eslint/utils": "^8.59.3"
228
+ },
229
+ "devDependencies": {
230
+ "@arethetypeswrong/cli": "^0.18.2",
231
+ "@csstools/stylelint-formatter-github": "^2.0.0",
232
+ "@double-great/remark-lint-alt-text": "^1.1.1",
233
+ "@eslint/config-inspector": "^3.0.2",
234
+ "@microsoft/tsdoc-config": "^0.18.1",
235
+ "@size-limit/file": "^12.1.0",
236
+ "@stryker-ignorer/console-all": "^0.3.2",
237
+ "@stryker-mutator/core": "^9.6.1",
238
+ "@stryker-mutator/typescript-checker": "^9.6.1",
239
+ "@stryker-mutator/vitest-runner": "^9.6.1",
240
+ "@types/htmlhint": "^1.1.5",
241
+ "@types/madge": "^5.0.3",
242
+ "@types/node": "^25.8.0",
243
+ "@types/sloc": "^0.2.3",
244
+ "@typescript-eslint/rule-tester": "^8.59.3",
245
+ "@vitest/coverage-v8": "^4.1.6",
246
+ "@vitest/ui": "^4.1.6",
247
+ "actionlint": "^2.0.6",
248
+ "all-contributors-cli": "^6.26.1",
249
+ "cognitive-complexity-ts": "^0.8.1",
250
+ "commitlint": "^21.0.1",
251
+ "commitlint-config-gitmoji": "^2.3.1",
252
+ "cross-env": "^10.1.0",
253
+ "del-cli": "^7.0.0",
254
+ "detect-secrets": "^1.0.6",
255
+ "esbuild": "^0.28.0",
256
+ "eslint": "^10.4.0",
257
+ "eslint-config-nick2bad4u": "^1.0.16",
258
+ "eslint-formatter-unix": "^9.0.1",
259
+ "eslint-rule-benchmark": "^0.8.0",
260
+ "fast-check": "^4.8.0",
261
+ "git-cliff": "^2.13.1",
262
+ "gitleaks-secret-scanner": "^2.1.1",
263
+ "htmlhint": "^1.9.2",
264
+ "jscpd": "^4.2.2",
265
+ "knip": "^6.14.1",
266
+ "leasot": "^14.4.0",
267
+ "madge": "^8.0.0",
268
+ "markdown-link-check": "^3.14.2",
269
+ "npm-check-updates": "^22.2.0",
270
+ "npm-package-json-lint": "^10.4.0",
271
+ "picocolors": "^1.1.1",
272
+ "prettier": "^3.8.3",
273
+ "prettier-config-nick2bad4u": "^1.0.13",
274
+ "prettier-plugin-jsdoc-type": "^0.2.0",
275
+ "publint": "^0.3.21",
276
+ "rehype-katex": "^7.0.1",
277
+ "remark": "^15.0.1",
278
+ "remark-cli": "^12.0.1",
279
+ "remark-config-nick2bad4u": "^1.0.2",
280
+ "secretlint": "^13.0.2",
281
+ "secretlint-config-nick2bad4u": "^1.0.5",
282
+ "size-limit": "^12.1.0",
283
+ "sloc": "^0.3.2",
284
+ "sort-package-json": "^3.6.1",
285
+ "stylelint": "^17.11.1",
286
+ "stylelint-config-nick2bad4u": "^1.0.11",
287
+ "ts-unused-exports": "^11.0.1",
288
+ "typedoc": "^0.28.19",
289
+ "typescript": "^6.0.3",
290
+ "typescript-eslint": "^8.59.3",
291
+ "typesync": "^0.14.3",
292
+ "vfile": "^6.0.3",
293
+ "vite": "^8.0.13",
294
+ "vite-tsconfig-paths": "^6.1.1",
295
+ "vitest": "^4.1.6",
296
+ "yamllint-js": "^0.2.4"
297
+ },
298
+ "peerDependencies": {
299
+ "eslint": "^9.0.0 || ^10.4.0",
300
+ "typescript": "^5.0.0 || ^6.0.2"
301
+ },
302
+ "packageManager": "npm@11.14.1",
303
+ "engines": {
304
+ "node": ">=22.0.0"
305
+ },
306
+ "devEngines": {
307
+ "runtime": {
308
+ "name": "node",
309
+ "version": ">=22.0.0",
310
+ "onFail": "error"
311
+ },
312
+ "packageManager": {
313
+ "name": "npm",
314
+ "version": ">=11.0.0",
315
+ "onFail": "error"
316
+ }
317
+ },
318
+ "publishConfig": {
319
+ "provenance": true,
320
+ "registry": "https://registry.npmjs.org/"
321
+ },
322
+ "readme": "README.md"
323
+ }