@nr1e/commons 0.1.1-alpha.0 → 0.1.2

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 (438) hide show
  1. package/package.json +1 -1
  2. package/.editorconfig +0 -19
  3. package/.eslintignore +0 -3
  4. package/.eslintrc.json +0 -4
  5. package/.git/COMMIT_EDITMSG +0 -5
  6. package/.git/FETCH_HEAD +0 -1
  7. package/.git/HEAD +0 -1
  8. package/.git/config +0 -18
  9. package/.git/config.worktree +0 -5
  10. package/.git/description +0 -1
  11. package/.git/hooks/applypatch-msg.sample +0 -15
  12. package/.git/hooks/commit-msg.sample +0 -24
  13. package/.git/hooks/fsmonitor-watchman.sample +0 -174
  14. package/.git/hooks/post-update.sample +0 -8
  15. package/.git/hooks/pre-applypatch.sample +0 -14
  16. package/.git/hooks/pre-commit.sample +0 -49
  17. package/.git/hooks/pre-merge-commit.sample +0 -13
  18. package/.git/hooks/pre-push.sample +0 -53
  19. package/.git/hooks/pre-rebase.sample +0 -169
  20. package/.git/hooks/pre-receive.sample +0 -24
  21. package/.git/hooks/prepare-commit-msg.sample +0 -42
  22. package/.git/hooks/push-to-checkout.sample +0 -78
  23. package/.git/hooks/sendemail-validate.sample +0 -77
  24. package/.git/hooks/update.sample +0 -128
  25. package/.git/index +0 -0
  26. package/.git/info/exclude +0 -6
  27. package/.git/logs/HEAD +0 -2
  28. package/.git/logs/refs/heads/develop +0 -2
  29. package/.git/logs/refs/remotes/origin/develop +0 -2
  30. package/.git/objects/07/c0af7cd711cab6a55ad3dc349ac8c70775623c +0 -0
  31. package/.git/objects/09/8fb5a5ff070a1ee3ea11db1a3568af3fea6fa2 +0 -0
  32. package/.git/objects/0d/698432e2c44311c17b845cc63093a898972b95 +0 -0
  33. package/.git/objects/10/ba4a7d64968326293182d571a9c73f5e041fb6 +0 -3
  34. package/.git/objects/12/069a5aa45479564e00749f730582627a276a55 +0 -3
  35. package/.git/objects/14/5ab9cf82c40696a07ab42f117ba199acb2a50b +0 -4
  36. package/.git/objects/17/7b0dc4bf884f8ae0403b4aad053e76baafd632 +0 -2
  37. package/.git/objects/1d/a517ce3527df45a4f28e52ff2c0d9d1c8179f6 +0 -0
  38. package/.git/objects/26/d9a4912af870ce319f5cb5102651d49baac4ab +0 -1
  39. package/.git/objects/27/50076ed23b5211a52ef834f40f183ddecb917a +0 -0
  40. package/.git/objects/2a/96e4bb57fa4bd69c719dca224b17b569e94e82 +0 -2
  41. package/.git/objects/2b/38c26b4ec43b8f5574acb164d2ba64bca8e230 +0 -0
  42. package/.git/objects/2c/61d463bee185f04e7c2bd1d2a15ad1117c589e +0 -0
  43. package/.git/objects/2d/22dbc836cfd75c8d7640ebe5a4fe90bd2c23c6 +0 -0
  44. package/.git/objects/38/0be191ee415827a1217f46626fea4fefba48e5 +0 -0
  45. package/.git/objects/4c/bb28de66d7aaeb4d7737cc2be955adc0c886b5 +0 -0
  46. package/.git/objects/50/150b739272269be2ede552448013eba65323da +0 -0
  47. package/.git/objects/53/2b7b796ffd3223f913a5a5e1e17743ee3591fe +0 -0
  48. package/.git/objects/54/f13d9d62fbedd19b41134ba17153c4328de95b +0 -0
  49. package/.git/objects/5d/4aa0709f62f1bc1fa80251208b570cb3b89d9c +0 -0
  50. package/.git/objects/63/1c43e00d4c34ba914c510f4fe2e6df15b8b06e +0 -0
  51. package/.git/objects/63/9900d13c6182e452e33a3bd638e70a0146c785 +0 -2
  52. package/.git/objects/64/3fa02661c3a1b54205729a75d2fb5f013833af +0 -0
  53. package/.git/objects/6c/59086d862516d2fffa5da2035e5003100fb5c7 +0 -0
  54. package/.git/objects/6c/b74f90a0c799eea1c54a04d8d6a8a9e9691cca +0 -2
  55. package/.git/objects/6d/f39e776d6a89628ce4a005a011911298651635 +0 -0
  56. package/.git/objects/70/0e093acb1c1e55d523507411b7940a01a3bb65 +0 -0
  57. package/.git/objects/74/c82ffe8eb71efecbccfdf67b590949c944dd1a +0 -0
  58. package/.git/objects/76/1413a07839108abb46ef0e4490bd1c1444b4fc +0 -0
  59. package/.git/objects/77/96f8282f2c553ecdde72bc976478eb3a8a948e +0 -0
  60. package/.git/objects/79/ee123c2b23e069e35ed634d687e17f731cc702 +0 -0
  61. package/.git/objects/7d/80af9735f0527db35ecc79ae3c887e445cb3e0 +0 -0
  62. package/.git/objects/85/1d8d26c2a946ccfd5461a2573665c1fb7d71f7 +0 -0
  63. package/.git/objects/85/c5f24b8c55496f82a2680f94a7d3fa32887ea0 +0 -0
  64. package/.git/objects/87/00b3833597b600e6f0ffcfbaf622fd8cfaa9c3 +0 -1
  65. package/.git/objects/87/f31d3df8e7edbf96e45d80126f878b8e0c243f +0 -0
  66. package/.git/objects/8d/d819967bdc8457f04c1b5498bce89380d6552b +0 -7
  67. package/.git/objects/92/608c4e069a4301d466d8d18daecbe7abc9500e +0 -0
  68. package/.git/objects/94/a25f7f4cb416c083d265558da75d457237d671 +0 -0
  69. package/.git/objects/9c/69411050eac81b5dce09314516a30b38c41a20 +0 -3
  70. package/.git/objects/9f/54b5b21769da383f12fb9c7bd364bdb05e13a9 +0 -0
  71. package/.git/objects/a5/886c22eb68b152bb95ec5151504676d8e78ae1 +0 -0
  72. package/.git/objects/a6/582c9510e264f3b46fc3b20597a16923a03523 +0 -0
  73. package/.git/objects/a9/d7db9c0a81b2db47ca92e4e180b30090b27632 +0 -0
  74. package/.git/objects/aa/8ae6a0af7014d738cc551d1ffebeb4e19e6b73 +0 -0
  75. package/.git/objects/ad/c418f9105db9ec488de6831584b82e3929eaef +0 -0
  76. package/.git/objects/ae/14b04cdf65ade0f70577cdea2f85203f4c1bde +0 -0
  77. package/.git/objects/b0/c1c68fbbad6b190434cd2bb0e807796bd56fca +0 -0
  78. package/.git/objects/b1/0f0d0ef3bc5aaf3a91be0b991cb6fe0fcadc40 +0 -0
  79. package/.git/objects/b1/3c15806ef3856ecd8660b0bb36f39830daa3c2 +0 -0
  80. package/.git/objects/b6/3b642cfb4254fc0f7058903abc5b481895c4ef +0 -0
  81. package/.git/objects/b8/a2c461d7ffed9d4ba242c58a52341832b99e0a +0 -0
  82. package/.git/objects/bc/91e0079eb00d56dcde16714748f36a10dbd525 +0 -0
  83. package/.git/objects/c1/beeb895b71b709e48560460199db11b3fc18af +0 -0
  84. package/.git/objects/c5/166c2aeebaeb0a0f7654223c843c50cd4c8953 +0 -0
  85. package/.git/objects/d4/0a2096fc36c1fd9c7a9263c458d5e8a4a5bee7 +0 -0
  86. package/.git/objects/e8/019be9e978a8e2f094e748cbb6ce0c7163adee +0 -0
  87. package/.git/objects/eb/1d744c4e9b47bc902647298424320078e32980 +0 -0
  88. package/.git/objects/ee/15af38be7f3c3862229e59c6b5688f8e0f6099 +0 -0
  89. package/.git/objects/f1/9e0f429f231c34432784f9e33b92ac1d598c17 +0 -0
  90. package/.git/objects/f9/86f2fe82493e85651396b6d5886316d1c890dd +0 -0
  91. package/.git/refs/heads/develop +0 -1
  92. package/.git/refs/remotes/origin/develop +0 -1
  93. package/.git/shallow +0 -1
  94. package/.github/dependabot.yml +0 -10
  95. package/.github/workflows/ci.yml +0 -12
  96. package/.github/workflows/issues.yml +0 -13
  97. package/.github/workflows/publish.yml +0 -20
  98. package/.gitignore +0 -13
  99. package/.idea/.gitignore +0 -10
  100. package/.idea/aws.xml +0 -11
  101. package/.idea/codeStyles/Project.xml +0 -58
  102. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  103. package/.idea/commons-js.iml +0 -14
  104. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  105. package/.idea/misc.xml +0 -6
  106. package/.idea/modules.xml +0 -8
  107. package/.idea/prettier.xml +0 -6
  108. package/.idea/vcs.xml +0 -6
  109. package/.npmrc +0 -1
  110. package/.prettierignore +0 -7
  111. package/.prettierrc.cjs +0 -3
  112. package/LICENSE +0 -26
  113. package/README.md +0 -14
  114. package/coverage/base.css +0 -224
  115. package/coverage/bitsnbytes/b64.mts.html +0 -559
  116. package/coverage/bitsnbytes/index.html +0 -131
  117. package/coverage/bitsnbytes/index.mts.html +0 -88
  118. package/coverage/clover.xml +0 -1003
  119. package/coverage/coverage-final.json +0 -15
  120. package/coverage/errors/errors.mts.html +0 -898
  121. package/coverage/errors/index.html +0 -131
  122. package/coverage/errors/index.mts.html +0 -88
  123. package/coverage/favicon.png +0 -0
  124. package/coverage/http/http-method.mts.html +0 -112
  125. package/coverage/http/http-status-code.mts.html +0 -211
  126. package/coverage/http/index.html +0 -146
  127. package/coverage/http/index.mts.html +0 -91
  128. package/coverage/index.html +0 -191
  129. package/coverage/lang/index.html +0 -146
  130. package/coverage/lang/index.mts.html +0 -91
  131. package/coverage/lang/sleep.mts.html +0 -109
  132. package/coverage/lang/type-functions.mts.html +0 -124
  133. package/coverage/oauth/crypto-functions.mts.html +0 -217
  134. package/coverage/oauth/index.html +0 -131
  135. package/coverage/oauth/index.mts.html +0 -88
  136. package/coverage/prettify.css +0 -1
  137. package/coverage/sort-arrow-sprite.png +0 -0
  138. package/coverage/validator/index.html +0 -131
  139. package/coverage/validator/index.mts.html +0 -88
  140. package/coverage/validator/validators.mts.html +0 -1237
  141. package/dist/package.json +0 -72
  142. package/node_modules/@eslint/eslintrc/LICENSE +0 -19
  143. package/node_modules/@eslint/eslintrc/README.md +0 -115
  144. package/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +0 -1104
  145. package/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +0 -1
  146. package/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +0 -4344
  147. package/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +0 -1
  148. package/node_modules/@eslint/eslintrc/package.json +0 -82
  149. package/node_modules/@eslint/eslintrc/universal.js +0 -9
  150. package/node_modules/@eslint/js/LICENSE +0 -19
  151. package/node_modules/@eslint/js/README.md +0 -57
  152. package/node_modules/@eslint/js/package.json +0 -31
  153. package/node_modules/@eslint/js/src/index.js +0 -17
  154. package/node_modules/@eslint-community/eslint-utils/LICENSE +0 -21
  155. package/node_modules/@eslint-community/eslint-utils/README.md +0 -37
  156. package/node_modules/@eslint-community/eslint-utils/index.js +0 -2068
  157. package/node_modules/@eslint-community/eslint-utils/index.js.map +0 -1
  158. package/node_modules/@eslint-community/eslint-utils/index.mjs +0 -2027
  159. package/node_modules/@eslint-community/eslint-utils/index.mjs.map +0 -1
  160. package/node_modules/@eslint-community/eslint-utils/package.json +0 -73
  161. package/node_modules/@eslint-community/regexpp/LICENSE +0 -21
  162. package/node_modules/@eslint-community/regexpp/README.md +0 -177
  163. package/node_modules/@eslint-community/regexpp/index.d.ts +0 -1065
  164. package/node_modules/@eslint-community/regexpp/index.js +0 -2747
  165. package/node_modules/@eslint-community/regexpp/index.js.map +0 -1
  166. package/node_modules/@eslint-community/regexpp/index.mjs +0 -2737
  167. package/node_modules/@eslint-community/regexpp/index.mjs.map +0 -1
  168. package/node_modules/@eslint-community/regexpp/package.json +0 -93
  169. package/node_modules/@types/node/LICENSE +0 -21
  170. package/node_modules/@types/node/README.md +0 -15
  171. package/node_modules/@types/node/package.json +0 -217
  172. package/node_modules/@typescript-eslint/eslint-plugin/LICENSE +0 -21
  173. package/node_modules/@typescript-eslint/eslint-plugin/README.md +0 -10
  174. package/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0 -23
  175. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +0 -23
  176. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/TEMPLATE.md +0 -26
  177. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +0 -93
  178. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +0 -103
  179. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +0 -40
  180. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +0 -148
  181. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +0 -39
  182. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +0 -183
  183. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.md +0 -12
  184. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +0 -12
  185. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +0 -10
  186. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +0 -114
  187. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +0 -22
  188. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +0 -12
  189. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +0 -73
  190. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +0 -80
  191. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +0 -108
  192. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +0 -82
  193. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +0 -100
  194. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +0 -105
  195. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +0 -48
  196. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +0 -77
  197. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +0 -319
  198. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +0 -331
  199. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +0 -250
  200. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +0 -12
  201. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +0 -20
  202. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +0 -12
  203. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.md +0 -12
  204. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +0 -12
  205. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.md +0 -37
  206. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +0 -63
  207. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +0 -161
  208. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +0 -1360
  209. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +0 -110
  210. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +0 -706
  211. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +0 -35
  212. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +0 -88
  213. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +0 -56
  214. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +0 -116
  215. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +0 -12
  216. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +0 -50
  217. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +0 -12
  218. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.md +0 -61
  219. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +0 -53
  220. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +0 -88
  221. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +0 -70
  222. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +0 -174
  223. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +0 -52
  224. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +0 -12
  225. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +0 -12
  226. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +0 -294
  227. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +0 -106
  228. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +0 -56
  229. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +0 -73
  230. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +0 -101
  231. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.md +0 -75
  232. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +0 -103
  233. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +0 -12
  234. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +0 -113
  235. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +0 -12
  236. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +0 -12
  237. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +0 -131
  238. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +0 -47
  239. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +0 -46
  240. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +0 -245
  241. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.md +0 -88
  242. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +0 -129
  243. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +0 -49
  244. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +0 -35
  245. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +0 -42
  246. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +0 -406
  247. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +0 -73
  248. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +0 -78
  249. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +0 -37
  250. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +0 -63
  251. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +0 -101
  252. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +0 -38
  253. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +0 -111
  254. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +0 -602
  255. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +0 -133
  256. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +0 -103
  257. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +0 -51
  258. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +0 -73
  259. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +0 -77
  260. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +0 -55
  261. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +0 -83
  262. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +0 -86
  263. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +0 -58
  264. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md +0 -54
  265. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md +0 -75
  266. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +0 -64
  267. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +0 -103
  268. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +0 -12
  269. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +0 -12
  270. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +0 -97
  271. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +0 -21
  272. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +0 -43
  273. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +0 -37
  274. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +0 -41
  275. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +0 -12
  276. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +0 -35
  277. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +0 -485
  278. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +0 -44
  279. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +0 -62
  280. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +0 -46
  281. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +0 -92
  282. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +0 -77
  283. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +0 -101
  284. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +0 -47
  285. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +0 -164
  286. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +0 -71
  287. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +0 -268
  288. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +0 -87
  289. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +0 -58
  290. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +0 -46
  291. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +0 -87
  292. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +0 -57
  293. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +0 -69
  294. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +0 -59
  295. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +0 -12
  296. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +0 -78
  297. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +0 -24
  298. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +0 -208
  299. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +0 -117
  300. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +0 -216
  301. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +0 -16
  302. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-constituents.md +0 -101
  303. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +0 -106
  304. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +0 -42
  305. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +0 -12
  306. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +0 -16
  307. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +0 -183
  308. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +0 -106
  309. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +0 -61
  310. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +0 -303
  311. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +0 -320
  312. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +0 -103
  313. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +0 -70
  314. package/node_modules/@typescript-eslint/eslint-plugin/index.d.ts +0 -4
  315. package/node_modules/@typescript-eslint/eslint-plugin/package.json +0 -87
  316. package/node_modules/@typescript-eslint/parser/LICENSE +0 -22
  317. package/node_modules/@typescript-eslint/parser/README.md +0 -10
  318. package/node_modules/@typescript-eslint/parser/dist/index.js +0 -17
  319. package/node_modules/@typescript-eslint/parser/package.json +0 -75
  320. package/node_modules/@typescript-eslint/scope-manager/LICENSE +0 -21
  321. package/node_modules/@typescript-eslint/scope-manager/README.md +0 -8
  322. package/node_modules/@typescript-eslint/scope-manager/dist/index.js +0 -31
  323. package/node_modules/@typescript-eslint/scope-manager/package.json +0 -67
  324. package/node_modules/@typescript-eslint/type-utils/LICENSE +0 -21
  325. package/node_modules/@typescript-eslint/type-utils/README.md +0 -12
  326. package/node_modules/@typescript-eslint/type-utils/dist/index.js +0 -36
  327. package/node_modules/@typescript-eslint/type-utils/package.json +0 -71
  328. package/node_modules/@typescript-eslint/types/LICENSE +0 -21
  329. package/node_modules/@typescript-eslint/types/README.md +0 -12
  330. package/node_modules/@typescript-eslint/types/dist/index.js +0 -24
  331. package/node_modules/@typescript-eslint/types/package.json +0 -84
  332. package/node_modules/@typescript-eslint/typescript-estree/LICENSE +0 -26
  333. package/node_modules/@typescript-eslint/typescript-estree/README.md +0 -10
  334. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +0 -38
  335. package/node_modules/@typescript-eslint/typescript-estree/package.json +0 -85
  336. package/node_modules/@typescript-eslint/utils/LICENSE +0 -21
  337. package/node_modules/@typescript-eslint/utils/README.md +0 -10
  338. package/node_modules/@typescript-eslint/utils/dist/index.js +0 -41
  339. package/node_modules/@typescript-eslint/utils/package.json +0 -70
  340. package/node_modules/@typescript-eslint/visitor-keys/LICENSE +0 -21
  341. package/node_modules/@typescript-eslint/visitor-keys/README.md +0 -10
  342. package/node_modules/@typescript-eslint/visitor-keys/dist/index.js +0 -8
  343. package/node_modules/@typescript-eslint/visitor-keys/package.json +0 -60
  344. package/node_modules/@vitest/coverage-v8/LICENSE +0 -21
  345. package/node_modules/@vitest/coverage-v8/dist/index.js +0 -54
  346. package/node_modules/@vitest/coverage-v8/package.json +0 -72
  347. package/pnpm-lock.yaml +0 -3277
  348. package/src/bitsnbytes/b64.mts +0 -158
  349. package/src/bitsnbytes/b64.test.mts +0 -78
  350. package/src/bitsnbytes/index.mts +0 -1
  351. package/src/errors/errors.mts +0 -271
  352. package/src/errors/errors.test.mts +0 -74
  353. package/src/errors/index.mts +0 -1
  354. package/src/http/http-method.mts +0 -9
  355. package/src/http/http-status-code.mts +0 -42
  356. package/src/http/index.mts +0 -2
  357. package/src/lang/index.mts +0 -2
  358. package/src/lang/sleep.mts +0 -8
  359. package/src/lang/type-functions.mts +0 -13
  360. package/src/oauth/crypto-functions.mts +0 -44
  361. package/src/oauth/crypto-functions.test.mts +0 -48
  362. package/src/oauth/index.mts +0 -1
  363. package/src/validator/index.mts +0 -1
  364. package/src/validator/validators.mts +0 -384
  365. package/src/validator/validators.test.mts +0 -245
  366. package/tsconfig.json +0 -18
  367. /package/{dist/bitsnbytes → bitsnbytes}/b64.d.mts +0 -0
  368. /package/{dist/bitsnbytes → bitsnbytes}/b64.d.mts.map +0 -0
  369. /package/{dist/bitsnbytes → bitsnbytes}/b64.mjs +0 -0
  370. /package/{dist/bitsnbytes → bitsnbytes}/b64.mjs.map +0 -0
  371. /package/{dist/bitsnbytes → bitsnbytes}/b64.test.d.mts +0 -0
  372. /package/{dist/bitsnbytes → bitsnbytes}/b64.test.d.mts.map +0 -0
  373. /package/{dist/bitsnbytes → bitsnbytes}/b64.test.mjs +0 -0
  374. /package/{dist/bitsnbytes → bitsnbytes}/b64.test.mjs.map +0 -0
  375. /package/{dist/bitsnbytes → bitsnbytes}/index.d.mts +0 -0
  376. /package/{dist/bitsnbytes → bitsnbytes}/index.d.mts.map +0 -0
  377. /package/{dist/bitsnbytes → bitsnbytes}/index.mjs +0 -0
  378. /package/{dist/bitsnbytes → bitsnbytes}/index.mjs.map +0 -0
  379. /package/{dist/errors → errors}/errors.d.mts +0 -0
  380. /package/{dist/errors → errors}/errors.d.mts.map +0 -0
  381. /package/{dist/errors → errors}/errors.mjs +0 -0
  382. /package/{dist/errors → errors}/errors.mjs.map +0 -0
  383. /package/{dist/errors → errors}/errors.test.d.mts +0 -0
  384. /package/{dist/errors → errors}/errors.test.d.mts.map +0 -0
  385. /package/{dist/errors → errors}/errors.test.mjs +0 -0
  386. /package/{dist/errors → errors}/errors.test.mjs.map +0 -0
  387. /package/{dist/errors → errors}/index.d.mts +0 -0
  388. /package/{dist/errors → errors}/index.d.mts.map +0 -0
  389. /package/{dist/errors → errors}/index.mjs +0 -0
  390. /package/{dist/errors → errors}/index.mjs.map +0 -0
  391. /package/{dist/http → http}/http-method.d.mts +0 -0
  392. /package/{dist/http → http}/http-method.d.mts.map +0 -0
  393. /package/{dist/http → http}/http-method.mjs +0 -0
  394. /package/{dist/http → http}/http-method.mjs.map +0 -0
  395. /package/{dist/http → http}/http-status-code.d.mts +0 -0
  396. /package/{dist/http → http}/http-status-code.d.mts.map +0 -0
  397. /package/{dist/http → http}/http-status-code.mjs +0 -0
  398. /package/{dist/http → http}/http-status-code.mjs.map +0 -0
  399. /package/{dist/http → http}/index.d.mts +0 -0
  400. /package/{dist/http → http}/index.d.mts.map +0 -0
  401. /package/{dist/http → http}/index.mjs +0 -0
  402. /package/{dist/http → http}/index.mjs.map +0 -0
  403. /package/{dist/lang → lang}/index.d.mts +0 -0
  404. /package/{dist/lang → lang}/index.d.mts.map +0 -0
  405. /package/{dist/lang → lang}/index.mjs +0 -0
  406. /package/{dist/lang → lang}/index.mjs.map +0 -0
  407. /package/{dist/lang → lang}/sleep.d.mts +0 -0
  408. /package/{dist/lang → lang}/sleep.d.mts.map +0 -0
  409. /package/{dist/lang → lang}/sleep.mjs +0 -0
  410. /package/{dist/lang → lang}/sleep.mjs.map +0 -0
  411. /package/{dist/lang → lang}/type-functions.d.mts +0 -0
  412. /package/{dist/lang → lang}/type-functions.d.mts.map +0 -0
  413. /package/{dist/lang → lang}/type-functions.mjs +0 -0
  414. /package/{dist/lang → lang}/type-functions.mjs.map +0 -0
  415. /package/{dist/oauth → oauth}/crypto-functions.d.mts +0 -0
  416. /package/{dist/oauth → oauth}/crypto-functions.d.mts.map +0 -0
  417. /package/{dist/oauth → oauth}/crypto-functions.mjs +0 -0
  418. /package/{dist/oauth → oauth}/crypto-functions.mjs.map +0 -0
  419. /package/{dist/oauth → oauth}/crypto-functions.test.d.mts +0 -0
  420. /package/{dist/oauth → oauth}/crypto-functions.test.d.mts.map +0 -0
  421. /package/{dist/oauth → oauth}/crypto-functions.test.mjs +0 -0
  422. /package/{dist/oauth → oauth}/crypto-functions.test.mjs.map +0 -0
  423. /package/{dist/oauth → oauth}/index.d.mts +0 -0
  424. /package/{dist/oauth → oauth}/index.d.mts.map +0 -0
  425. /package/{dist/oauth → oauth}/index.mjs +0 -0
  426. /package/{dist/oauth → oauth}/index.mjs.map +0 -0
  427. /package/{dist/validator → validator}/index.d.mts +0 -0
  428. /package/{dist/validator → validator}/index.d.mts.map +0 -0
  429. /package/{dist/validator → validator}/index.mjs +0 -0
  430. /package/{dist/validator → validator}/index.mjs.map +0 -0
  431. /package/{dist/validator → validator}/validators.d.mts +0 -0
  432. /package/{dist/validator → validator}/validators.d.mts.map +0 -0
  433. /package/{dist/validator → validator}/validators.mjs +0 -0
  434. /package/{dist/validator → validator}/validators.mjs.map +0 -0
  435. /package/{dist/validator → validator}/validators.test.d.mts +0 -0
  436. /package/{dist/validator → validator}/validators.test.d.mts.map +0 -0
  437. /package/{dist/validator → validator}/validators.test.mjs +0 -0
  438. /package/{dist/validator → validator}/validators.test.mjs.map +0 -0
@@ -1,58 +0,0 @@
1
- ---
2
- description: 'Disallow calling a value with type `any`.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unsafe-call** for documentation.
8
-
9
- The `any` type in TypeScript is a dangerous "escape hatch" from the type system.
10
- Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code.
11
-
12
- Despite your best intentions, the `any` type can sometimes leak into your codebase.
13
- Calling an `any`-typed value as a function creates a potential type safety hole and source of bugs in your codebase.
14
-
15
- This rule disallows calling any value that is typed as `any`.
16
-
17
- ## Examples
18
-
19
- <!--tabs-->
20
-
21
- ### ❌ Incorrect
22
-
23
- ```ts
24
- declare const anyVar: any;
25
- declare const nestedAny: { prop: any };
26
-
27
- anyVar();
28
- anyVar.a.b();
29
-
30
- nestedAny.prop();
31
- nestedAny.prop['a']();
32
-
33
- new anyVar();
34
- new nestedAny.prop();
35
-
36
- anyVar`foo`;
37
- nestedAny.prop`foo`;
38
- ```
39
-
40
- ### ✅ Correct
41
-
42
- ```ts
43
- declare const typedVar: () => void;
44
- declare const typedNested: { prop: { a: () => void } };
45
-
46
- typedVar();
47
- typedNested.prop.a();
48
-
49
- (() => {})();
50
-
51
- new Map();
52
-
53
- String.raw`foo`;
54
- ```
55
-
56
- ## Related To
57
-
58
- - [`no-explicit-any`](./no-explicit-any.md)
@@ -1,54 +0,0 @@
1
- ---
2
- description: 'Disallow unsafe declaration merging.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unsafe-declaration-merging** for documentation.
8
-
9
- TypeScript's "declaration merging" supports merging separate declarations with the same name.
10
-
11
- Declaration merging between classes and interfaces is unsafe.
12
- The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
13
-
14
- ```ts
15
- interface Foo {
16
- nums: number[];
17
- }
18
-
19
- class Foo {}
20
-
21
- const foo = new Foo();
22
-
23
- foo.nums.push(1); // Runtime Error: Cannot read properties of undefined.
24
- ```
25
-
26
- ## Examples
27
-
28
- <!--tabs-->
29
-
30
- ### ❌ Incorrect
31
-
32
- ```ts
33
- interface Foo {}
34
-
35
- class Foo {}
36
- ```
37
-
38
- ### ✅ Correct
39
-
40
- ```ts
41
- interface Foo {}
42
- class Bar implements Foo {}
43
-
44
- namespace Baz {}
45
- namespace Baz {}
46
- enum Baz {}
47
-
48
- namespace Qux {}
49
- function Qux() {}
50
- ```
51
-
52
- ## Further Reading
53
-
54
- - [Declaration Merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html)
@@ -1,75 +0,0 @@
1
- ---
2
- description: 'Disallow comparing an enum value with a non-enum value.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unsafe-enum-comparison** for documentation.
8
-
9
- The TypeScript compiler can be surprisingly lenient when working with enums.
10
- For example, it will allow you to compare enum values against numbers even though they might not have any type overlap:
11
-
12
- ```ts
13
- enum Fruit {
14
- Apple,
15
- Banana,
16
- }
17
-
18
- declare let fruit: Fruit;
19
-
20
- fruit === 999; // No error
21
- ```
22
-
23
- This rule flags when an enum typed value is compared to a non-enum `number`.
24
-
25
- <!--tabs-->
26
-
27
- ### ❌ Incorrect
28
-
29
- ```ts
30
- enum Fruit {
31
- Apple,
32
- }
33
-
34
- declare let fruit: Fruit;
35
-
36
- fruit === 999;
37
- ```
38
-
39
- ```ts
40
- enum Vegetable {
41
- Asparagus = 'asparagus',
42
- }
43
-
44
- declare let vegetable: Vegetable;
45
-
46
- vegetable === 'asparagus';
47
- ```
48
-
49
- ### ✅ Correct
50
-
51
- ```ts
52
- enum Fruit {
53
- Apple,
54
- }
55
-
56
- declare let fruit: Fruit;
57
-
58
- fruit === Fruit.Banana;
59
- ```
60
-
61
- ```ts
62
- enum Vegetable {
63
- Asparagus = 'asparagus',
64
- }
65
-
66
- declare let vegetable: Vegetable;
67
-
68
- vegetable === Vegetable.Asparagus;
69
- ```
70
-
71
- <!--/tabs-->
72
-
73
- ## When Not to Use It
74
-
75
- If you don't mind number and/or literal string constants being compared against enums, you likely don't need this rule.
@@ -1,64 +0,0 @@
1
- ---
2
- description: 'Disallow member access on a value with type `any`.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unsafe-member-access** for documentation.
8
-
9
- The `any` type in TypeScript is a dangerous "escape hatch" from the type system.
10
- Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code.
11
-
12
- Despite your best intentions, the `any` type can sometimes leak into your codebase.
13
- Accessing a member of an `any`-typed value creates a potential type safety hole and source of bugs in your codebase.
14
-
15
- This rule disallows member access on any variable that is typed as `any`.
16
-
17
- ## Examples
18
-
19
- <!--tabs-->
20
-
21
- ### ❌ Incorrect
22
-
23
- ```ts
24
- declare const anyVar: any;
25
- declare const nestedAny: { prop: any };
26
-
27
- anyVar.a;
28
- anyVar.a.b;
29
- anyVar['a'];
30
- anyVar['a']['b'];
31
-
32
- nestedAny.prop.a;
33
- nestedAny.prop['a'];
34
-
35
- const key = 'a';
36
- nestedAny.prop[key];
37
-
38
- // Using an any to access a member is unsafe
39
- const arr = [1, 2, 3];
40
- arr[anyVar];
41
- nestedAny[anyVar];
42
- ```
43
-
44
- ### ✅ Correct
45
-
46
- ```ts
47
- declare const properlyTyped: { prop: { a: string } };
48
-
49
- properlyTyped.prop.a;
50
- properlyTyped.prop['a'];
51
-
52
- const key = 'a';
53
- properlyTyped.prop[key];
54
-
55
- const arr = [1, 2, 3];
56
- arr[1];
57
- const idx = 1;
58
- arr[idx];
59
- arr[idx++];
60
- ```
61
-
62
- ## Related To
63
-
64
- - [`no-explicit-any`](./no-explicit-any.md)
@@ -1,103 +0,0 @@
1
- ---
2
- description: 'Disallow returning a value with type `any` from a function.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unsafe-return** for documentation.
8
-
9
- The `any` type in TypeScript is a dangerous "escape hatch" from the type system.
10
- Using `any` disables many type checking rules and is generally best used only as a last resort or when prototyping code.
11
-
12
- Despite your best intentions, the `any` type can sometimes leak into your codebase.
13
- Returning an an `any`-typed value from a function creates a potential type safety hole and source of bugs in your codebase.
14
-
15
- This rule disallows returning `any` or `any[]` from a function.
16
-
17
- This rule also compares generic type argument types to ensure you don't return an unsafe `any` in a generic position to a function that's expecting a specific type.
18
- For example, it will error if you return `Set<any>` from a function declared as returning `Set<string>`.
19
-
20
- ## Examples
21
-
22
- <!--tabs-->
23
-
24
- ### ❌ Incorrect
25
-
26
- ```ts
27
- function foo1() {
28
- return 1 as any;
29
- }
30
- function foo2() {
31
- return Object.create(null);
32
- }
33
- const foo3 = () => {
34
- return 1 as any;
35
- };
36
- const foo4 = () => Object.create(null);
37
-
38
- function foo5() {
39
- return [] as any[];
40
- }
41
- function foo6() {
42
- return [] as Array<any>;
43
- }
44
- function foo7() {
45
- return [] as readonly any[];
46
- }
47
- function foo8() {
48
- return [] as Readonly<any[]>;
49
- }
50
- const foo9 = () => {
51
- return [] as any[];
52
- };
53
- const foo10 = () => [] as any[];
54
-
55
- const foo11 = (): string[] => [1, 2, 3] as any[];
56
-
57
- // generic position examples
58
- function assignability1(): Set<string> {
59
- return new Set<any>([1]);
60
- }
61
- type TAssign = () => Set<string>;
62
- const assignability2: TAssign = () => new Set<any>([true]);
63
- ```
64
-
65
- ### ✅ Correct
66
-
67
- ```ts
68
- function foo1() {
69
- return 1;
70
- }
71
- function foo2() {
72
- return Object.create(null) as Record<string, unknown>;
73
- }
74
-
75
- const foo3 = () => [];
76
- const foo4 = () => ['a'];
77
-
78
- function assignability1(): Set<string> {
79
- return new Set<string>(['foo']);
80
- }
81
- type TAssign = () => Set<string>;
82
- const assignability2: TAssign = () => new Set(['foo']);
83
- ```
84
-
85
- <!--/tabs-->
86
-
87
- There are cases where the rule allows to return `any` to `unknown`.
88
-
89
- Examples of `any` to `unknown` return that are allowed:
90
-
91
- ```ts
92
- function foo1(): unknown {
93
- return JSON.parse(singleObjString); // Return type for JSON.parse is any.
94
- }
95
-
96
- function foo2(): unknown[] {
97
- return [] as any[];
98
- }
99
- ```
100
-
101
- ## Related To
102
-
103
- - [`no-explicit-any`](./no-explicit-any.md)
@@ -1,12 +0,0 @@
1
- ---
2
- description: 'Disallow unused expressions.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unused-expressions** for documentation.
8
-
9
- ## Examples
10
-
11
- This rule extends the base [`eslint/no-unused-expressions`](https://eslint.org/docs/rules/no-unused-expressions) rule.
12
- It adds support for optional call expressions `x?.()`, and directive in module declarations.
@@ -1,12 +0,0 @@
1
- ---
2
- description: 'Disallow unused variables.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-unused-vars** for documentation.
8
-
9
- ## Examples
10
-
11
- This rule extends the base [`eslint/no-unused-vars`](https://eslint.org/docs/rules/no-unused-vars) rule.
12
- It adds support for TypeScript features, such as types.
@@ -1,97 +0,0 @@
1
- ---
2
- description: 'Disallow the use of variables before they are defined.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-use-before-define** for documentation.
8
-
9
- ## Examples
10
-
11
- This rule extends the base [`eslint/no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) rule.
12
- It adds support for `type`, `interface` and `enum` declarations.
13
-
14
- ## Options
15
-
16
- This rule adds the following options:
17
-
18
- ```ts
19
- interface Options extends BaseNoUseBeforeDefineOptions {
20
- enums?: boolean;
21
- typedefs?: boolean;
22
- ignoreTypeReferences?: boolean;
23
- }
24
-
25
- const defaultOptions: Options = {
26
- ...baseNoUseBeforeDefineDefaultOptions,
27
- enums: true,
28
- typedefs: true,
29
- ignoreTypeReferences: true,
30
- };
31
- ```
32
-
33
- ### `enums`
34
-
35
- If this is `true`, this rule warns every reference to a enum before the enum declaration.
36
- If this is `false`, this rule will ignore references to enums, when the reference is in a child scope.
37
-
38
- Examples of code for the `{ "enums": true }` option:
39
-
40
- <!--tabs-->
41
-
42
- #### ❌ Incorrect
43
-
44
- ```ts
45
- /*eslint no-use-before-define: ["error", { "enums": true }]*/
46
-
47
- const x = Foo.FOO;
48
-
49
- enum Foo {
50
- FOO,
51
- }
52
- ```
53
-
54
- #### ✅ Correct
55
-
56
- ```ts
57
- /*eslint no-use-before-define: ["error", { "enums": false }]*/
58
-
59
- function foo() {
60
- return Foo.FOO;
61
- }
62
-
63
- enum Foo {
64
- FOO,
65
- }
66
- ```
67
-
68
- ### `typedefs`
69
-
70
- If this is `true`, this rule warns every reference to a type before the type declaration.
71
- If this is `false`, this rule will ignore references to types.
72
-
73
- Examples of **correct** code for the `{ "typedefs": false }` option:
74
-
75
- ```ts
76
- /*eslint no-use-before-define: ["error", { "typedefs": false }]*/
77
-
78
- let myVar: StringOrNumber;
79
- type StringOrNumber = string | number;
80
- ```
81
-
82
- ### `ignoreTypeReferences`
83
-
84
- If this is `true`, this rule ignores all type references, such as in type annotations and assertions.
85
- If this is `false`, this will will check all type references.
86
-
87
- Examples of **correct** code for the `{ "ignoreTypeReferences": true }` option:
88
-
89
- ```ts
90
- /*eslint no-use-before-define: ["error", { "ignoreTypeReferences": true }]*/
91
-
92
- let var1: StringOrNumber;
93
- type StringOrNumber = string | number;
94
-
95
- let var2: Enum;
96
- enum Enum {}
97
- ```
@@ -1,21 +0,0 @@
1
- ---
2
- description: 'Disallow unnecessary constructors.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-useless-constructor** for documentation.
8
-
9
- ## Examples
10
-
11
- This rule extends the base [`eslint/no-useless-constructor`](https://eslint.org/docs/rules/no-useless-constructor) rule.
12
- It adds support for:
13
-
14
- - constructors marked as `protected` / `private` (i.e. marking a constructor as non-public),
15
- - `public` constructors when there is no superclass,
16
- - constructors with only parameter properties.
17
-
18
- ### Caveat
19
-
20
- This lint rule will report on constructors whose sole purpose is to change visibility of a parent constructor.
21
- See [discussion on this rule's lack of type information](https://github.com/typescript-eslint/typescript-eslint/issues/3820#issuecomment-917821240) for context.
@@ -1,43 +0,0 @@
1
- ---
2
- description: "Disallow empty exports that don't change anything in a module file."
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-useless-empty-export** for documentation.
8
-
9
- An empty `export {}` statement is sometimes useful in TypeScript code to turn a file that would otherwise be a script file into a module file.
10
- Per the [TypeScript Handbook Modules page](https://www.typescriptlang.org/docs/handbook/modules.html):
11
-
12
- > In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module.
13
- > Conversely, a file without any top-level import or export declarations is treated as a script whose contents are available in the global scope (and therefore to modules as well).
14
-
15
- However, an `export {}` statement does nothing if there are any other top-level import or export statements in a file.
16
-
17
- This rule reports an `export {}` that doesn't do anything in a file already using ES modules.
18
-
19
- ## Examples
20
-
21
- <!--tabs-->
22
-
23
- ### ❌ Incorrect
24
-
25
- ```ts
26
- export const value = 'Hello, world!';
27
- export {};
28
- ```
29
-
30
- ```ts
31
- import 'some-other-module';
32
- export {};
33
- ```
34
-
35
- ### ✅ Correct
36
-
37
- ```ts
38
- export const value = 'Hello, world!';
39
- ```
40
-
41
- ```ts
42
- import 'some-other-module';
43
- ```
@@ -1,37 +0,0 @@
1
- ---
2
- description: 'Disallow `require` statements except in import statements.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/no-var-requires** for documentation.
8
-
9
- In other words, the use of forms such as `var foo = require("foo")` are banned. Instead use ES6 style imports or `import foo = require("foo")` imports.
10
-
11
- ## Examples
12
-
13
- <!--tabs-->
14
-
15
- ### ❌ Incorrect
16
-
17
- ```ts
18
- var foo = require('foo');
19
- const foo = require('foo');
20
- let foo = require('foo');
21
- ```
22
-
23
- ### ✅ Correct
24
-
25
- ```ts
26
- import foo = require('foo');
27
- require('foo');
28
- import foo from 'foo';
29
- ```
30
-
31
- ## When Not To Use It
32
-
33
- If you don't care about using newer module syntax, then you will not need this rule.
34
-
35
- ## Related To
36
-
37
- - [`no-require-imports`](./no-require-imports.md)
@@ -1,41 +0,0 @@
1
- ---
2
- description: 'Enforce non-null assertions over explicit type casts.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/non-nullable-type-assertion-style** for documentation.
8
-
9
- There are two common ways to assert to TypeScript that a value is its type without `null` or `undefined`:
10
-
11
- - `!`: Non-null assertion
12
- - `as`: Traditional type assertion with a coincidentally equivalent type
13
-
14
- `!` non-null assertions are generally preferred for requiring less code and being harder to fall out of sync as types change.
15
- This rule reports when an `as` cast is doing the same job as a `!` would, and suggests fixing the code to be an `!`.
16
-
17
- ## Examples
18
-
19
- <!--tabs-->
20
-
21
- ### ❌ Incorrect
22
-
23
- ```ts
24
- const maybe = Math.random() > 0.5 ? '' : undefined;
25
-
26
- const definitely = maybe as string;
27
- const alsoDefinitely = <string>maybe;
28
- ```
29
-
30
- ### ✅ Correct
31
-
32
- ```ts
33
- const maybe = Math.random() > 0.5 ? '' : undefined;
34
-
35
- const definitely = maybe!;
36
- const alsoDefinitely = maybe!;
37
- ```
38
-
39
- ## When Not To Use It
40
-
41
- If you don't mind having unnecessarily verbose type casts, you can avoid this rule.
@@ -1,12 +0,0 @@
1
- ---
2
- description: 'Enforce consistent spacing inside braces.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/object-curly-spacing** for documentation.
8
-
9
- ## Examples
10
-
11
- This rule extends the base [`eslint/object-curly-spacing`](https://eslint.org/docs/rules/object-curly-spacing) rule.
12
- It adds support for TypeScript's object types.
@@ -1,35 +0,0 @@
1
- ---
2
- description: 'Require or disallow padding lines between statements.'
3
- ---
4
-
5
- > 🛑 This file is source code, not the primary documentation location! 🛑
6
- >
7
- > See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation.
8
-
9
- ## Examples
10
-
11
- This rule extends the base [`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) rule.
12
- It adds support for TypeScript constructs such as `interface` and `type`.
13
-
14
- ## Options
15
-
16
- In addition to options provided by ESLint, `interface` and `type` can be used as statement types.
17
-
18
- For example, to add blank lines before interfaces and type definitions:
19
-
20
- ```jsonc
21
- {
22
- // Example - Add blank lines before interface and type definitions.
23
- "padding-line-between-statements": "off",
24
- "@typescript-eslint/padding-line-between-statements": [
25
- "error",
26
- {
27
- "blankLine": "always",
28
- "prev": "*",
29
- "next": ["interface", "type"]
30
- }
31
- ]
32
- }
33
- ```
34
-
35
- **Note:** ESLint `cjs-export` and `cjs-import` statement types are renamed to `exports` and `require` respectively.