@alexlit/lint-kit 166.1.0 → 167.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (603) hide show
  1. package/package.json +1 -1
  2. package/packages/config-commitlint/package.json +3 -3
  3. package/packages/config-eslint/package.json +3 -3
  4. package/packages/config-prettier/README.md +4 -0
  5. package/packages/config-eslint/node_modules/@eslint/js/LICENSE +0 -19
  6. package/packages/config-eslint/node_modules/@eslint/js/README.md +0 -103
  7. package/packages/config-eslint/node_modules/@eslint/js/package.json +0 -36
  8. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-all.js +0 -217
  9. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-recommended.js +0 -79
  10. package/packages/config-eslint/node_modules/@eslint/js/src/index.js +0 -23
  11. package/packages/config-eslint/node_modules/@eslint/js/types/index.d.ts +0 -14
  12. package/packages/config-eslint/node_modules/ajv/.tonic_example.js +0 -20
  13. package/packages/config-eslint/node_modules/ajv/LICENSE +0 -22
  14. package/packages/config-eslint/node_modules/ajv/README.md +0 -1497
  15. package/packages/config-eslint/node_modules/ajv/dist/ajv.bundle.js +0 -7189
  16. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js +0 -3
  17. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js.map +0 -1
  18. package/packages/config-eslint/node_modules/ajv/lib/ajv.d.ts +0 -397
  19. package/packages/config-eslint/node_modules/ajv/lib/ajv.js +0 -506
  20. package/packages/config-eslint/node_modules/ajv/lib/cache.js +0 -26
  21. package/packages/config-eslint/node_modules/ajv/lib/compile/async.js +0 -90
  22. package/packages/config-eslint/node_modules/ajv/lib/compile/equal.js +0 -5
  23. package/packages/config-eslint/node_modules/ajv/lib/compile/error_classes.js +0 -34
  24. package/packages/config-eslint/node_modules/ajv/lib/compile/formats.js +0 -142
  25. package/packages/config-eslint/node_modules/ajv/lib/compile/index.js +0 -387
  26. package/packages/config-eslint/node_modules/ajv/lib/compile/resolve.js +0 -270
  27. package/packages/config-eslint/node_modules/ajv/lib/compile/rules.js +0 -66
  28. package/packages/config-eslint/node_modules/ajv/lib/compile/schema_obj.js +0 -9
  29. package/packages/config-eslint/node_modules/ajv/lib/compile/ucs2length.js +0 -20
  30. package/packages/config-eslint/node_modules/ajv/lib/compile/util.js +0 -239
  31. package/packages/config-eslint/node_modules/ajv/lib/data.js +0 -49
  32. package/packages/config-eslint/node_modules/ajv/lib/definition_schema.js +0 -37
  33. package/packages/config-eslint/node_modules/ajv/lib/dot/_limit.jst +0 -113
  34. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitItems.jst +0 -12
  35. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitLength.jst +0 -12
  36. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitProperties.jst +0 -12
  37. package/packages/config-eslint/node_modules/ajv/lib/dot/allOf.jst +0 -32
  38. package/packages/config-eslint/node_modules/ajv/lib/dot/anyOf.jst +0 -46
  39. package/packages/config-eslint/node_modules/ajv/lib/dot/coerce.def +0 -51
  40. package/packages/config-eslint/node_modules/ajv/lib/dot/comment.jst +0 -9
  41. package/packages/config-eslint/node_modules/ajv/lib/dot/const.jst +0 -11
  42. package/packages/config-eslint/node_modules/ajv/lib/dot/contains.jst +0 -55
  43. package/packages/config-eslint/node_modules/ajv/lib/dot/custom.jst +0 -191
  44. package/packages/config-eslint/node_modules/ajv/lib/dot/defaults.def +0 -47
  45. package/packages/config-eslint/node_modules/ajv/lib/dot/definitions.def +0 -203
  46. package/packages/config-eslint/node_modules/ajv/lib/dot/dependencies.jst +0 -79
  47. package/packages/config-eslint/node_modules/ajv/lib/dot/enum.jst +0 -30
  48. package/packages/config-eslint/node_modules/ajv/lib/dot/errors.def +0 -194
  49. package/packages/config-eslint/node_modules/ajv/lib/dot/format.jst +0 -106
  50. package/packages/config-eslint/node_modules/ajv/lib/dot/if.jst +0 -73
  51. package/packages/config-eslint/node_modules/ajv/lib/dot/items.jst +0 -98
  52. package/packages/config-eslint/node_modules/ajv/lib/dot/missing.def +0 -39
  53. package/packages/config-eslint/node_modules/ajv/lib/dot/multipleOf.jst +0 -22
  54. package/packages/config-eslint/node_modules/ajv/lib/dot/not.jst +0 -43
  55. package/packages/config-eslint/node_modules/ajv/lib/dot/oneOf.jst +0 -54
  56. package/packages/config-eslint/node_modules/ajv/lib/dot/pattern.jst +0 -14
  57. package/packages/config-eslint/node_modules/ajv/lib/dot/properties.jst +0 -245
  58. package/packages/config-eslint/node_modules/ajv/lib/dot/propertyNames.jst +0 -52
  59. package/packages/config-eslint/node_modules/ajv/lib/dot/ref.jst +0 -85
  60. package/packages/config-eslint/node_modules/ajv/lib/dot/required.jst +0 -108
  61. package/packages/config-eslint/node_modules/ajv/lib/dot/uniqueItems.jst +0 -62
  62. package/packages/config-eslint/node_modules/ajv/lib/dot/validate.jst +0 -276
  63. package/packages/config-eslint/node_modules/ajv/lib/dotjs/README.md +0 -3
  64. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limit.js +0 -163
  65. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitItems.js +0 -80
  66. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitLength.js +0 -85
  67. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitProperties.js +0 -80
  68. package/packages/config-eslint/node_modules/ajv/lib/dotjs/allOf.js +0 -42
  69. package/packages/config-eslint/node_modules/ajv/lib/dotjs/anyOf.js +0 -73
  70. package/packages/config-eslint/node_modules/ajv/lib/dotjs/comment.js +0 -14
  71. package/packages/config-eslint/node_modules/ajv/lib/dotjs/const.js +0 -56
  72. package/packages/config-eslint/node_modules/ajv/lib/dotjs/contains.js +0 -81
  73. package/packages/config-eslint/node_modules/ajv/lib/dotjs/custom.js +0 -228
  74. package/packages/config-eslint/node_modules/ajv/lib/dotjs/dependencies.js +0 -168
  75. package/packages/config-eslint/node_modules/ajv/lib/dotjs/enum.js +0 -66
  76. package/packages/config-eslint/node_modules/ajv/lib/dotjs/format.js +0 -150
  77. package/packages/config-eslint/node_modules/ajv/lib/dotjs/if.js +0 -103
  78. package/packages/config-eslint/node_modules/ajv/lib/dotjs/index.js +0 -33
  79. package/packages/config-eslint/node_modules/ajv/lib/dotjs/items.js +0 -140
  80. package/packages/config-eslint/node_modules/ajv/lib/dotjs/multipleOf.js +0 -80
  81. package/packages/config-eslint/node_modules/ajv/lib/dotjs/not.js +0 -84
  82. package/packages/config-eslint/node_modules/ajv/lib/dotjs/oneOf.js +0 -73
  83. package/packages/config-eslint/node_modules/ajv/lib/dotjs/pattern.js +0 -75
  84. package/packages/config-eslint/node_modules/ajv/lib/dotjs/properties.js +0 -335
  85. package/packages/config-eslint/node_modules/ajv/lib/dotjs/propertyNames.js +0 -81
  86. package/packages/config-eslint/node_modules/ajv/lib/dotjs/ref.js +0 -124
  87. package/packages/config-eslint/node_modules/ajv/lib/dotjs/required.js +0 -270
  88. package/packages/config-eslint/node_modules/ajv/lib/dotjs/uniqueItems.js +0 -86
  89. package/packages/config-eslint/node_modules/ajv/lib/dotjs/validate.js +0 -482
  90. package/packages/config-eslint/node_modules/ajv/lib/keyword.js +0 -146
  91. package/packages/config-eslint/node_modules/ajv/lib/refs/data.json +0 -17
  92. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json +0 -149
  93. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -154
  94. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -168
  95. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-secure.json +0 -94
  96. package/packages/config-eslint/node_modules/ajv/package.json +0 -106
  97. package/packages/config-eslint/node_modules/ajv/scripts/.eslintrc.yml +0 -3
  98. package/packages/config-eslint/node_modules/ajv/scripts/bundle.js +0 -61
  99. package/packages/config-eslint/node_modules/ajv/scripts/compile-dots.js +0 -73
  100. package/packages/config-eslint/node_modules/ajv/scripts/info +0 -10
  101. package/packages/config-eslint/node_modules/ajv/scripts/prepare-tests +0 -12
  102. package/packages/config-eslint/node_modules/ajv/scripts/publish-built-version +0 -32
  103. package/packages/config-eslint/node_modules/ajv/scripts/travis-gh-pages +0 -23
  104. package/packages/config-eslint/node_modules/ansi-styles/index.d.ts +0 -345
  105. package/packages/config-eslint/node_modules/ansi-styles/index.js +0 -163
  106. package/packages/config-eslint/node_modules/ansi-styles/license +0 -9
  107. package/packages/config-eslint/node_modules/ansi-styles/package.json +0 -56
  108. package/packages/config-eslint/node_modules/ansi-styles/readme.md +0 -152
  109. package/packages/config-eslint/node_modules/chalk/index.d.ts +0 -415
  110. package/packages/config-eslint/node_modules/chalk/license +0 -9
  111. package/packages/config-eslint/node_modules/chalk/package.json +0 -68
  112. package/packages/config-eslint/node_modules/chalk/readme.md +0 -341
  113. package/packages/config-eslint/node_modules/chalk/source/index.js +0 -229
  114. package/packages/config-eslint/node_modules/chalk/source/templates.js +0 -134
  115. package/packages/config-eslint/node_modules/chalk/source/util.js +0 -39
  116. package/packages/config-eslint/node_modules/color-convert/CHANGELOG.md +0 -54
  117. package/packages/config-eslint/node_modules/color-convert/LICENSE +0 -21
  118. package/packages/config-eslint/node_modules/color-convert/README.md +0 -68
  119. package/packages/config-eslint/node_modules/color-convert/conversions.js +0 -839
  120. package/packages/config-eslint/node_modules/color-convert/index.js +0 -81
  121. package/packages/config-eslint/node_modules/color-convert/package.json +0 -48
  122. package/packages/config-eslint/node_modules/color-convert/route.js +0 -97
  123. package/packages/config-eslint/node_modules/color-name/LICENSE +0 -8
  124. package/packages/config-eslint/node_modules/color-name/README.md +0 -11
  125. package/packages/config-eslint/node_modules/color-name/index.js +0 -152
  126. package/packages/config-eslint/node_modules/color-name/package.json +0 -28
  127. package/packages/config-eslint/node_modules/eslint/LICENSE +0 -19
  128. package/packages/config-eslint/node_modules/eslint/README.md +0 -354
  129. package/packages/config-eslint/node_modules/eslint/bin/eslint.js +0 -196
  130. package/packages/config-eslint/node_modules/eslint/conf/default-cli-options.js +0 -32
  131. package/packages/config-eslint/node_modules/eslint/conf/ecma-version.js +0 -16
  132. package/packages/config-eslint/node_modules/eslint/conf/globals.js +0 -169
  133. package/packages/config-eslint/node_modules/eslint/conf/replacements.json +0 -26
  134. package/packages/config-eslint/node_modules/eslint/conf/rule-type-list.json +0 -91
  135. package/packages/config-eslint/node_modules/eslint/lib/api.js +0 -50
  136. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/cli-engine.js +0 -1109
  137. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/file-enumerator.js +0 -541
  138. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +0 -18
  139. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/html.js +0 -359
  140. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js +0 -16
  141. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json.js +0 -13
  142. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/stylish.js +0 -122
  143. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/hash.js +0 -35
  144. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/index.js +0 -7
  145. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/lint-result-cache.js +0 -220
  146. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/load-rules.js +0 -46
  147. package/packages/config-eslint/node_modules/eslint/lib/cli.js +0 -553
  148. package/packages/config-eslint/node_modules/eslint/lib/config/config-loader.js +0 -816
  149. package/packages/config-eslint/node_modules/eslint/lib/config/config.js +0 -674
  150. package/packages/config-eslint/node_modules/eslint/lib/config/default-config.js +0 -78
  151. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-array.js +0 -217
  152. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-schema.js +0 -598
  153. package/packages/config-eslint/node_modules/eslint/lib/config-api.js +0 -12
  154. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint-helpers.js +0 -1465
  155. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint.js +0 -1362
  156. package/packages/config-eslint/node_modules/eslint/lib/eslint/index.js +0 -9
  157. package/packages/config-eslint/node_modules/eslint/lib/eslint/legacy-eslint.js +0 -786
  158. package/packages/config-eslint/node_modules/eslint/lib/eslint/worker.js +0 -173
  159. package/packages/config-eslint/node_modules/eslint/lib/languages/js/index.js +0 -336
  160. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/index.js +0 -7
  161. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/source-code.js +0 -1364
  162. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-comment-cursor.js +0 -61
  163. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-cursor.js +0 -57
  164. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursor.js +0 -76
  165. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursors.js +0 -120
  166. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/decorative-cursor.js +0 -38
  167. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/filter-cursor.js +0 -42
  168. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-comment-cursor.js +0 -65
  169. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-cursor.js +0 -62
  170. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/index.js +0 -721
  171. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/limit-cursor.js +0 -39
  172. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/padded-token-cursor.js +0 -45
  173. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/skip-cursor.js +0 -41
  174. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/utils.js +0 -110
  175. package/packages/config-eslint/node_modules/eslint/lib/languages/js/validate-language-options.js +0 -196
  176. package/packages/config-eslint/node_modules/eslint/lib/linter/apply-disable-directives.js +0 -584
  177. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -828
  178. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +0 -262
  179. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js +0 -2370
  180. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +0 -332
  181. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +0 -223
  182. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +0 -374
  183. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js +0 -44
  184. package/packages/config-eslint/node_modules/eslint/lib/linter/esquery.js +0 -332
  185. package/packages/config-eslint/node_modules/eslint/lib/linter/file-context.js +0 -144
  186. package/packages/config-eslint/node_modules/eslint/lib/linter/file-report.js +0 -608
  187. package/packages/config-eslint/node_modules/eslint/lib/linter/index.js +0 -11
  188. package/packages/config-eslint/node_modules/eslint/lib/linter/interpolate.js +0 -50
  189. package/packages/config-eslint/node_modules/eslint/lib/linter/linter.js +0 -2676
  190. package/packages/config-eslint/node_modules/eslint/lib/linter/rule-fixer.js +0 -169
  191. package/packages/config-eslint/node_modules/eslint/lib/linter/rules.js +0 -71
  192. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-fixer.js +0 -154
  193. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-traverser.js +0 -333
  194. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-visitor.js +0 -81
  195. package/packages/config-eslint/node_modules/eslint/lib/linter/timing.js +0 -209
  196. package/packages/config-eslint/node_modules/eslint/lib/linter/vfile.js +0 -115
  197. package/packages/config-eslint/node_modules/eslint/lib/options.js +0 -536
  198. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/index.js +0 -7
  199. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/rule-tester.js +0 -1579
  200. package/packages/config-eslint/node_modules/eslint/lib/rules/accessor-pairs.js +0 -420
  201. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-newline.js +0 -291
  202. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-spacing.js +0 -301
  203. package/packages/config-eslint/node_modules/eslint/lib/rules/array-callback-return.js +0 -493
  204. package/packages/config-eslint/node_modules/eslint/lib/rules/array-element-newline.js +0 -374
  205. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-body-style.js +0 -418
  206. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-parens.js +0 -237
  207. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-spacing.js +0 -188
  208. package/packages/config-eslint/node_modules/eslint/lib/rules/block-scoped-var.js +0 -137
  209. package/packages/config-eslint/node_modules/eslint/lib/rules/block-spacing.js +0 -202
  210. package/packages/config-eslint/node_modules/eslint/lib/rules/brace-style.js +0 -278
  211. package/packages/config-eslint/node_modules/eslint/lib/rules/callback-return.js +0 -216
  212. package/packages/config-eslint/node_modules/eslint/lib/rules/camelcase.js +0 -422
  213. package/packages/config-eslint/node_modules/eslint/lib/rules/capitalized-comments.js +0 -325
  214. package/packages/config-eslint/node_modules/eslint/lib/rules/class-methods-use-this.js +0 -250
  215. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-dangle.js +0 -424
  216. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-spacing.js +0 -208
  217. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-style.js +0 -391
  218. package/packages/config-eslint/node_modules/eslint/lib/rules/complexity.js +0 -201
  219. package/packages/config-eslint/node_modules/eslint/lib/rules/computed-property-spacing.js +0 -251
  220. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-return.js +0 -221
  221. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-this.js +0 -179
  222. package/packages/config-eslint/node_modules/eslint/lib/rules/constructor-super.js +0 -453
  223. package/packages/config-eslint/node_modules/eslint/lib/rules/curly.js +0 -425
  224. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case-last.js +0 -51
  225. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case.js +0 -103
  226. package/packages/config-eslint/node_modules/eslint/lib/rules/default-param-last.js +0 -78
  227. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-location.js +0 -138
  228. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-notation.js +0 -216
  229. package/packages/config-eslint/node_modules/eslint/lib/rules/eol-last.js +0 -135
  230. package/packages/config-eslint/node_modules/eslint/lib/rules/eqeqeq.js +0 -210
  231. package/packages/config-eslint/node_modules/eslint/lib/rules/for-direction.js +0 -168
  232. package/packages/config-eslint/node_modules/eslint/lib/rules/func-call-spacing.js +0 -281
  233. package/packages/config-eslint/node_modules/eslint/lib/rules/func-name-matching.js +0 -338
  234. package/packages/config-eslint/node_modules/eslint/lib/rules/func-names.js +0 -192
  235. package/packages/config-eslint/node_modules/eslint/lib/rules/func-style.js +0 -221
  236. package/packages/config-eslint/node_modules/eslint/lib/rules/function-call-argument-newline.js +0 -166
  237. package/packages/config-eslint/node_modules/eslint/lib/rules/function-paren-newline.js +0 -368
  238. package/packages/config-eslint/node_modules/eslint/lib/rules/generator-star-spacing.js +0 -246
  239. package/packages/config-eslint/node_modules/eslint/lib/rules/getter-return.js +0 -242
  240. package/packages/config-eslint/node_modules/eslint/lib/rules/global-require.js +0 -117
  241. package/packages/config-eslint/node_modules/eslint/lib/rules/grouped-accessor-pairs.js +0 -268
  242. package/packages/config-eslint/node_modules/eslint/lib/rules/guard-for-in.js +0 -85
  243. package/packages/config-eslint/node_modules/eslint/lib/rules/handle-callback-err.js +0 -122
  244. package/packages/config-eslint/node_modules/eslint/lib/rules/id-blacklist.js +0 -241
  245. package/packages/config-eslint/node_modules/eslint/lib/rules/id-denylist.js +0 -223
  246. package/packages/config-eslint/node_modules/eslint/lib/rules/id-length.js +0 -217
  247. package/packages/config-eslint/node_modules/eslint/lib/rules/id-match.js +0 -363
  248. package/packages/config-eslint/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +0 -125
  249. package/packages/config-eslint/node_modules/eslint/lib/rules/indent-legacy.js +0 -1369
  250. package/packages/config-eslint/node_modules/eslint/lib/rules/indent.js +0 -2334
  251. package/packages/config-eslint/node_modules/eslint/lib/rules/index.js +0 -332
  252. package/packages/config-eslint/node_modules/eslint/lib/rules/init-declarations.js +0 -172
  253. package/packages/config-eslint/node_modules/eslint/lib/rules/jsx-quotes.js +0 -128
  254. package/packages/config-eslint/node_modules/eslint/lib/rules/key-spacing.js +0 -822
  255. package/packages/config-eslint/node_modules/eslint/lib/rules/keyword-spacing.js +0 -701
  256. package/packages/config-eslint/node_modules/eslint/lib/rules/line-comment-position.js +0 -157
  257. package/packages/config-eslint/node_modules/eslint/lib/rules/linebreak-style.js +0 -135
  258. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-comment.js +0 -581
  259. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-directive.js +0 -249
  260. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-between-class-members.js +0 -358
  261. package/packages/config-eslint/node_modules/eslint/lib/rules/logical-assignment-operators.js +0 -688
  262. package/packages/config-eslint/node_modules/eslint/lib/rules/max-classes-per-file.js +0 -90
  263. package/packages/config-eslint/node_modules/eslint/lib/rules/max-depth.js +0 -159
  264. package/packages/config-eslint/node_modules/eslint/lib/rules/max-len.js +0 -497
  265. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines-per-function.js +0 -238
  266. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines.js +0 -189
  267. package/packages/config-eslint/node_modules/eslint/lib/rules/max-nested-callbacks.js +0 -115
  268. package/packages/config-eslint/node_modules/eslint/lib/rules/max-params.js +0 -129
  269. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements-per-line.js +0 -224
  270. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements.js +0 -188
  271. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-comment-style.js +0 -652
  272. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-ternary.js +0 -257
  273. package/packages/config-eslint/node_modules/eslint/lib/rules/new-cap.js +0 -277
  274. package/packages/config-eslint/node_modules/eslint/lib/rules/new-parens.js +0 -120
  275. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-after-var.js +0 -307
  276. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-before-return.js +0 -242
  277. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-per-chained-call.js +0 -159
  278. package/packages/config-eslint/node_modules/eslint/lib/rules/no-alert.js +0 -149
  279. package/packages/config-eslint/node_modules/eslint/lib/rules/no-array-constructor.js +0 -195
  280. package/packages/config-eslint/node_modules/eslint/lib/rules/no-async-promise-executor.js +0 -45
  281. package/packages/config-eslint/node_modules/eslint/lib/rules/no-await-in-loop.js +0 -115
  282. package/packages/config-eslint/node_modules/eslint/lib/rules/no-bitwise.js +0 -145
  283. package/packages/config-eslint/node_modules/eslint/lib/rules/no-buffer-constructor.js +0 -74
  284. package/packages/config-eslint/node_modules/eslint/lib/rules/no-caller.js +0 -52
  285. package/packages/config-eslint/node_modules/eslint/lib/rules/no-case-declarations.js +0 -80
  286. package/packages/config-eslint/node_modules/eslint/lib/rules/no-catch-shadow.js +0 -96
  287. package/packages/config-eslint/node_modules/eslint/lib/rules/no-class-assign.js +0 -66
  288. package/packages/config-eslint/node_modules/eslint/lib/rules/no-compare-neg-zero.js +0 -74
  289. package/packages/config-eslint/node_modules/eslint/lib/rules/no-cond-assign.js +0 -175
  290. package/packages/config-eslint/node_modules/eslint/lib/rules/no-confusing-arrow.js +0 -127
  291. package/packages/config-eslint/node_modules/eslint/lib/rules/no-console.js +0 -221
  292. package/packages/config-eslint/node_modules/eslint/lib/rules/no-const-assign.js +0 -73
  293. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-binary-expression.js +0 -603
  294. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-condition.js +0 -177
  295. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constructor-return.js +0 -62
  296. package/packages/config-eslint/node_modules/eslint/lib/rules/no-continue.js +0 -38
  297. package/packages/config-eslint/node_modules/eslint/lib/rules/no-control-regex.js +0 -142
  298. package/packages/config-eslint/node_modules/eslint/lib/rules/no-debugger.js +0 -41
  299. package/packages/config-eslint/node_modules/eslint/lib/rules/no-delete-var.js +0 -42
  300. package/packages/config-eslint/node_modules/eslint/lib/rules/no-div-regex.js +0 -60
  301. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-args.js +0 -92
  302. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-class-members.js +0 -117
  303. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-else-if.js +0 -145
  304. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-keys.js +0 -165
  305. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-case.js +0 -78
  306. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-imports.js +0 -368
  307. package/packages/config-eslint/node_modules/eslint/lib/rules/no-else-return.js +0 -450
  308. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-character-class.js +0 -83
  309. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-function.js +0 -236
  310. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-pattern.js +0 -85
  311. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-static-block.js +0 -73
  312. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty.js +0 -153
  313. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eq-null.js +0 -51
  314. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eval.js +0 -295
  315. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ex-assign.js +0 -57
  316. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extend-native.js +0 -180
  317. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-bind.js +0 -224
  318. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +0 -420
  319. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-label.js +0 -169
  320. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-parens.js +0 -1669
  321. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-semi.js +0 -167
  322. package/packages/config-eslint/node_modules/eslint/lib/rules/no-fallthrough.js +0 -260
  323. package/packages/config-eslint/node_modules/eslint/lib/rules/no-floating-decimal.js +0 -99
  324. package/packages/config-eslint/node_modules/eslint/lib/rules/no-func-assign.js +0 -77
  325. package/packages/config-eslint/node_modules/eslint/lib/rules/no-global-assign.js +0 -101
  326. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-coercion.js +0 -468
  327. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-globals.js +0 -187
  328. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implied-eval.js +0 -170
  329. package/packages/config-eslint/node_modules/eslint/lib/rules/no-import-assign.js +0 -227
  330. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inline-comments.js +0 -115
  331. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inner-declarations.js +0 -147
  332. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-regexp.js +0 -243
  333. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-this.js +0 -178
  334. package/packages/config-eslint/node_modules/eslint/lib/rules/no-irregular-whitespace.js +0 -292
  335. package/packages/config-eslint/node_modules/eslint/lib/rules/no-iterator.js +0 -48
  336. package/packages/config-eslint/node_modules/eslint/lib/rules/no-label-var.js +0 -78
  337. package/packages/config-eslint/node_modules/eslint/lib/rules/no-labels.js +0 -156
  338. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lone-blocks.js +0 -140
  339. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lonely-if.js +0 -126
  340. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loop-func.js +0 -267
  341. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loss-of-precision.js +0 -249
  342. package/packages/config-eslint/node_modules/eslint/lib/rules/no-magic-numbers.js +0 -365
  343. package/packages/config-eslint/node_modules/eslint/lib/rules/no-misleading-character-class.js +0 -595
  344. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-operators.js +0 -253
  345. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-requires.js +0 -267
  346. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +0 -148
  347. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-assign.js +0 -66
  348. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-spaces.js +0 -179
  349. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-str.js +0 -67
  350. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +0 -210
  351. package/packages/config-eslint/node_modules/eslint/lib/rules/no-native-reassign.js +0 -114
  352. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-condition.js +0 -100
  353. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-in-lhs.js +0 -59
  354. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nested-ternary.js +0 -46
  355. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-func.js +0 -96
  356. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +0 -70
  357. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-object.js +0 -76
  358. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-require.js +0 -67
  359. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-symbol.js +0 -74
  360. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-wrappers.js +0 -62
  361. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new.js +0 -42
  362. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js +0 -176
  363. package/packages/config-eslint/node_modules/eslint/lib/rules/no-obj-calls.js +0 -99
  364. package/packages/config-eslint/node_modules/eslint/lib/rules/no-object-constructor.js +0 -124
  365. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal-escape.js +0 -53
  366. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal.js +0 -42
  367. package/packages/config-eslint/node_modules/eslint/lib/rules/no-param-reassign.js +0 -248
  368. package/packages/config-eslint/node_modules/eslint/lib/rules/no-path-concat.js +0 -79
  369. package/packages/config-eslint/node_modules/eslint/lib/rules/no-plusplus.js +0 -102
  370. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-env.js +0 -68
  371. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-exit.js +0 -67
  372. package/packages/config-eslint/node_modules/eslint/lib/rules/no-promise-executor-return.js +0 -264
  373. package/packages/config-eslint/node_modules/eslint/lib/rules/no-proto.js +0 -45
  374. package/packages/config-eslint/node_modules/eslint/lib/rules/no-prototype-builtins.js +0 -181
  375. package/packages/config-eslint/node_modules/eslint/lib/rules/no-redeclare.js +0 -173
  376. package/packages/config-eslint/node_modules/eslint/lib/rules/no-regex-spaces.js +0 -219
  377. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-exports.js +0 -227
  378. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-globals.js +0 -266
  379. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-imports.js +0 -850
  380. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-modules.js +0 -249
  381. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-properties.js +0 -233
  382. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-syntax.js +0 -74
  383. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-assign.js +0 -87
  384. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-await.js +0 -162
  385. package/packages/config-eslint/node_modules/eslint/lib/rules/no-script-url.js +0 -68
  386. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-assign.js +0 -186
  387. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-compare.js +0 -77
  388. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sequences.js +0 -158
  389. package/packages/config-eslint/node_modules/eslint/lib/rules/no-setter-return.js +0 -224
  390. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +0 -113
  391. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow.js +0 -624
  392. package/packages/config-eslint/node_modules/eslint/lib/rules/no-spaced-func.js +0 -105
  393. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sparse-arrays.js +0 -68
  394. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sync.js +0 -81
  395. package/packages/config-eslint/node_modules/eslint/lib/rules/no-tabs.js +0 -110
  396. package/packages/config-eslint/node_modules/eslint/lib/rules/no-template-curly-in-string.js +0 -45
  397. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ternary.js +0 -38
  398. package/packages/config-eslint/node_modules/eslint/lib/rules/no-this-before-super.js +0 -365
  399. package/packages/config-eslint/node_modules/eslint/lib/rules/no-throw-literal.js +0 -46
  400. package/packages/config-eslint/node_modules/eslint/lib/rules/no-trailing-spaces.js +0 -227
  401. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unassigned-vars.js +0 -80
  402. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef-init.js +0 -101
  403. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef.js +0 -84
  404. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undefined.js +0 -85
  405. package/packages/config-eslint/node_modules/eslint/lib/rules/no-underscore-dangle.js +0 -383
  406. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unexpected-multiline.js +0 -130
  407. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +0 -360
  408. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unneeded-ternary.js +0 -232
  409. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable-loop.js +0 -190
  410. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable.js +0 -300
  411. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-finally.js +0 -119
  412. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-negation.js +0 -152
  413. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +0 -221
  414. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-expressions.js +0 -227
  415. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-labels.js +0 -158
  416. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-private-class-members.js +0 -219
  417. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-vars.js +0 -1739
  418. package/packages/config-eslint/node_modules/eslint/lib/rules/no-use-before-define.js +0 -446
  419. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-assignment.js +0 -654
  420. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-backreference.js +0 -263
  421. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-call.js +0 -95
  422. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-catch.js +0 -57
  423. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-computed-key.js +0 -204
  424. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-concat.js +0 -121
  425. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-constructor.js +0 -252
  426. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-escape.js +0 -406
  427. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-rename.js +0 -202
  428. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-return.js +0 -401
  429. package/packages/config-eslint/node_modules/eslint/lib/rules/no-var.js +0 -367
  430. package/packages/config-eslint/node_modules/eslint/lib/rules/no-void.js +0 -69
  431. package/packages/config-eslint/node_modules/eslint/lib/rules/no-warning-comments.js +0 -209
  432. package/packages/config-eslint/node_modules/eslint/lib/rules/no-whitespace-before-property.js +0 -150
  433. package/packages/config-eslint/node_modules/eslint/lib/rules/no-with.js +0 -37
  434. package/packages/config-eslint/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +0 -164
  435. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-newline.js +0 -383
  436. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-spacing.js +0 -375
  437. package/packages/config-eslint/node_modules/eslint/lib/rules/object-property-newline.js +0 -151
  438. package/packages/config-eslint/node_modules/eslint/lib/rules/object-shorthand.js +0 -652
  439. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +0 -117
  440. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var.js +0 -717
  441. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-assignment.js +0 -270
  442. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-linebreak.js +0 -315
  443. package/packages/config-eslint/node_modules/eslint/lib/rules/padded-blocks.js +0 -366
  444. package/packages/config-eslint/node_modules/eslint/lib/rules/padding-line-between-statements.js +0 -612
  445. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-arrow-callback.js +0 -437
  446. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-const.js +0 -546
  447. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-destructuring.js +0 -332
  448. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +0 -235
  449. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-named-capture-group.js +0 -197
  450. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-numeric-literals.js +0 -157
  451. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-has-own.js +0 -148
  452. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-spread.js +0 -319
  453. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +0 -154
  454. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-reflect.js +0 -150
  455. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-regex-literals.js +0 -605
  456. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-rest-params.js +0 -117
  457. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-spread.js +0 -91
  458. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-template.js +0 -347
  459. package/packages/config-eslint/node_modules/eslint/lib/rules/preserve-caught-error.js +0 -535
  460. package/packages/config-eslint/node_modules/eslint/lib/rules/quote-props.js +0 -394
  461. package/packages/config-eslint/node_modules/eslint/lib/rules/quotes.js +0 -416
  462. package/packages/config-eslint/node_modules/eslint/lib/rules/radix.js +0 -216
  463. package/packages/config-eslint/node_modules/eslint/lib/rules/require-atomic-updates.js +0 -365
  464. package/packages/config-eslint/node_modules/eslint/lib/rules/require-await.js +0 -184
  465. package/packages/config-eslint/node_modules/eslint/lib/rules/require-unicode-regexp.js +0 -317
  466. package/packages/config-eslint/node_modules/eslint/lib/rules/require-yield.js +0 -76
  467. package/packages/config-eslint/node_modules/eslint/lib/rules/rest-spread-spacing.js +0 -153
  468. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-spacing.js +0 -297
  469. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-style.js +0 -218
  470. package/packages/config-eslint/node_modules/eslint/lib/rules/semi.js +0 -476
  471. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-imports.js +0 -319
  472. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-keys.js +0 -268
  473. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-vars.js +0 -140
  474. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-blocks.js +0 -232
  475. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-function-paren.js +0 -205
  476. package/packages/config-eslint/node_modules/eslint/lib/rules/space-in-parens.js +0 -374
  477. package/packages/config-eslint/node_modules/eslint/lib/rules/space-infix-ops.js +0 -252
  478. package/packages/config-eslint/node_modules/eslint/lib/rules/space-unary-ops.js +0 -400
  479. package/packages/config-eslint/node_modules/eslint/lib/rules/spaced-comment.js +0 -447
  480. package/packages/config-eslint/node_modules/eslint/lib/rules/strict.js +0 -314
  481. package/packages/config-eslint/node_modules/eslint/lib/rules/switch-colon-spacing.js +0 -158
  482. package/packages/config-eslint/node_modules/eslint/lib/rules/symbol-description.js +0 -70
  483. package/packages/config-eslint/node_modules/eslint/lib/rules/template-curly-spacing.js +0 -168
  484. package/packages/config-eslint/node_modules/eslint/lib/rules/template-tag-spacing.js +0 -121
  485. package/packages/config-eslint/node_modules/eslint/lib/rules/unicode-bom.js +0 -73
  486. package/packages/config-eslint/node_modules/eslint/lib/rules/use-isnan.js +0 -268
  487. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/ast-utils.js +0 -2733
  488. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/char-source.js +0 -247
  489. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/fix-tracker.js +0 -125
  490. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/keywords.js +0 -67
  491. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +0 -118
  492. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/regular-expressions.js +0 -58
  493. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/index.js +0 -16
  494. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js +0 -13
  495. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js +0 -13
  496. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js +0 -13
  497. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js +0 -14
  498. package/packages/config-eslint/node_modules/eslint/lib/rules/valid-typeof.js +0 -171
  499. package/packages/config-eslint/node_modules/eslint/lib/rules/vars-on-top.js +0 -165
  500. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-iife.js +0 -238
  501. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-regex.js +0 -91
  502. package/packages/config-eslint/node_modules/eslint/lib/rules/yield-star-spacing.js +0 -159
  503. package/packages/config-eslint/node_modules/eslint/lib/rules/yoda.js +0 -362
  504. package/packages/config-eslint/node_modules/eslint/lib/services/parser-service.js +0 -65
  505. package/packages/config-eslint/node_modules/eslint/lib/services/processor-service.js +0 -101
  506. package/packages/config-eslint/node_modules/eslint/lib/services/suppressions-service.js +0 -302
  507. package/packages/config-eslint/node_modules/eslint/lib/services/warning-service.js +0 -111
  508. package/packages/config-eslint/node_modules/eslint/lib/shared/ajv.js +0 -34
  509. package/packages/config-eslint/node_modules/eslint/lib/shared/assert.js +0 -21
  510. package/packages/config-eslint/node_modules/eslint/lib/shared/ast-utils.js +0 -30
  511. package/packages/config-eslint/node_modules/eslint/lib/shared/deep-merge-arrays.js +0 -62
  512. package/packages/config-eslint/node_modules/eslint/lib/shared/directives.js +0 -16
  513. package/packages/config-eslint/node_modules/eslint/lib/shared/flags.js +0 -108
  514. package/packages/config-eslint/node_modules/eslint/lib/shared/logging.js +0 -38
  515. package/packages/config-eslint/node_modules/eslint/lib/shared/naming.js +0 -109
  516. package/packages/config-eslint/node_modules/eslint/lib/shared/option-utils.js +0 -63
  517. package/packages/config-eslint/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -28
  518. package/packages/config-eslint/node_modules/eslint/lib/shared/runtime-info.js +0 -177
  519. package/packages/config-eslint/node_modules/eslint/lib/shared/serialization.js +0 -78
  520. package/packages/config-eslint/node_modules/eslint/lib/shared/severity.js +0 -49
  521. package/packages/config-eslint/node_modules/eslint/lib/shared/stats.js +0 -30
  522. package/packages/config-eslint/node_modules/eslint/lib/shared/string-utils.js +0 -58
  523. package/packages/config-eslint/node_modules/eslint/lib/shared/text-table.js +0 -68
  524. package/packages/config-eslint/node_modules/eslint/lib/shared/translate-cli-options.js +0 -281
  525. package/packages/config-eslint/node_modules/eslint/lib/shared/traverser.js +0 -202
  526. package/packages/config-eslint/node_modules/eslint/lib/types/config-api.d.ts +0 -12
  527. package/packages/config-eslint/node_modules/eslint/lib/types/index.d.ts +0 -1473
  528. package/packages/config-eslint/node_modules/eslint/lib/types/rules.d.ts +0 -5589
  529. package/packages/config-eslint/node_modules/eslint/lib/types/universal.d.ts +0 -6
  530. package/packages/config-eslint/node_modules/eslint/lib/types/use-at-your-own-risk.d.ts +0 -87
  531. package/packages/config-eslint/node_modules/eslint/lib/universal.js +0 -10
  532. package/packages/config-eslint/node_modules/eslint/lib/unsupported-api.js +0 -29
  533. package/packages/config-eslint/node_modules/eslint/messages/all-files-ignored.js +0 -16
  534. package/packages/config-eslint/node_modules/eslint/messages/all-matched-files-ignored.js +0 -21
  535. package/packages/config-eslint/node_modules/eslint/messages/config-file-missing.js +0 -16
  536. package/packages/config-eslint/node_modules/eslint/messages/config-plugin-missing.js +0 -14
  537. package/packages/config-eslint/node_modules/eslint/messages/config-serialize-function.js +0 -30
  538. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-incompat.js +0 -117
  539. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-plugins.js +0 -27
  540. package/packages/config-eslint/node_modules/eslint/messages/extend-config-missing.js +0 -13
  541. package/packages/config-eslint/node_modules/eslint/messages/failed-to-read-json.js +0 -11
  542. package/packages/config-eslint/node_modules/eslint/messages/file-not-found.js +0 -10
  543. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-options.js +0 -17
  544. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-severity.js +0 -13
  545. package/packages/config-eslint/node_modules/eslint/messages/no-config-found.js +0 -15
  546. package/packages/config-eslint/node_modules/eslint/messages/plugin-conflict.js +0 -22
  547. package/packages/config-eslint/node_modules/eslint/messages/plugin-invalid.js +0 -16
  548. package/packages/config-eslint/node_modules/eslint/messages/plugin-missing.js +0 -19
  549. package/packages/config-eslint/node_modules/eslint/messages/print-config-with-directory-path.js +0 -8
  550. package/packages/config-eslint/node_modules/eslint/messages/shared.js +0 -23
  551. package/packages/config-eslint/node_modules/eslint/messages/whitespace-found.js +0 -11
  552. package/packages/config-eslint/node_modules/eslint/package.json +0 -226
  553. package/packages/config-eslint/node_modules/find-up/index.d.ts +0 -138
  554. package/packages/config-eslint/node_modules/find-up/index.js +0 -89
  555. package/packages/config-eslint/node_modules/find-up/license +0 -9
  556. package/packages/config-eslint/node_modules/find-up/package.json +0 -54
  557. package/packages/config-eslint/node_modules/find-up/readme.md +0 -151
  558. package/packages/config-eslint/node_modules/globals/globals.json +0 -3970
  559. package/packages/config-eslint/node_modules/globals/index.d.ts +0 -4087
  560. package/packages/config-eslint/node_modules/globals/index.js +0 -2
  561. package/packages/config-eslint/node_modules/globals/license +0 -9
  562. package/packages/config-eslint/node_modules/globals/package.json +0 -122
  563. package/packages/config-eslint/node_modules/globals/readme.md +0 -42
  564. package/packages/config-eslint/node_modules/ignore/LICENSE-MIT +0 -21
  565. package/packages/config-eslint/node_modules/ignore/README.md +0 -412
  566. package/packages/config-eslint/node_modules/ignore/index.d.ts +0 -61
  567. package/packages/config-eslint/node_modules/ignore/index.js +0 -636
  568. package/packages/config-eslint/node_modules/ignore/legacy.js +0 -559
  569. package/packages/config-eslint/node_modules/ignore/package.json +0 -74
  570. package/packages/config-eslint/node_modules/json-schema-traverse/.eslintrc.yml +0 -27
  571. package/packages/config-eslint/node_modules/json-schema-traverse/.travis.yml +0 -8
  572. package/packages/config-eslint/node_modules/json-schema-traverse/LICENSE +0 -21
  573. package/packages/config-eslint/node_modules/json-schema-traverse/README.md +0 -83
  574. package/packages/config-eslint/node_modules/json-schema-traverse/index.js +0 -89
  575. package/packages/config-eslint/node_modules/json-schema-traverse/package.json +0 -43
  576. package/packages/config-eslint/node_modules/json-schema-traverse/spec/.eslintrc.yml +0 -6
  577. package/packages/config-eslint/node_modules/json-schema-traverse/spec/fixtures/schema.js +0 -125
  578. package/packages/config-eslint/node_modules/json-schema-traverse/spec/index.spec.js +0 -171
  579. package/packages/config-eslint/node_modules/locate-path/index.d.ts +0 -83
  580. package/packages/config-eslint/node_modules/locate-path/index.js +0 -68
  581. package/packages/config-eslint/node_modules/locate-path/license +0 -9
  582. package/packages/config-eslint/node_modules/locate-path/package.json +0 -46
  583. package/packages/config-eslint/node_modules/locate-path/readme.md +0 -125
  584. package/packages/config-eslint/node_modules/p-limit/index.d.ts +0 -42
  585. package/packages/config-eslint/node_modules/p-limit/index.js +0 -71
  586. package/packages/config-eslint/node_modules/p-limit/license +0 -9
  587. package/packages/config-eslint/node_modules/p-limit/package.json +0 -52
  588. package/packages/config-eslint/node_modules/p-limit/readme.md +0 -101
  589. package/packages/config-eslint/node_modules/p-locate/index.d.ts +0 -53
  590. package/packages/config-eslint/node_modules/p-locate/index.js +0 -50
  591. package/packages/config-eslint/node_modules/p-locate/license +0 -9
  592. package/packages/config-eslint/node_modules/p-locate/package.json +0 -54
  593. package/packages/config-eslint/node_modules/p-locate/readme.md +0 -93
  594. package/packages/config-eslint/node_modules/path-exists/index.d.ts +0 -28
  595. package/packages/config-eslint/node_modules/path-exists/index.js +0 -23
  596. package/packages/config-eslint/node_modules/path-exists/license +0 -9
  597. package/packages/config-eslint/node_modules/path-exists/package.json +0 -39
  598. package/packages/config-eslint/node_modules/path-exists/readme.md +0 -52
  599. package/packages/config-eslint/node_modules/yocto-queue/index.d.ts +0 -56
  600. package/packages/config-eslint/node_modules/yocto-queue/index.js +0 -68
  601. package/packages/config-eslint/node_modules/yocto-queue/license +0 -9
  602. package/packages/config-eslint/node_modules/yocto-queue/package.json +0 -43
  603. package/packages/config-eslint/node_modules/yocto-queue/readme.md +0 -64
@@ -1,816 +0,0 @@
1
- /**
2
- * @fileoverview Utility to load config files
3
- * @author Nicholas C. Zakas
4
- */
5
-
6
- "use strict";
7
-
8
- //------------------------------------------------------------------------------
9
- // Requirements
10
- //------------------------------------------------------------------------------
11
-
12
- const path = require("node:path");
13
- const fs = require("node:fs/promises");
14
- const findUp = require("find-up");
15
- const { pathToFileURL } = require("node:url");
16
- const debug = require("debug")("eslint:config-loader");
17
- const { FlatConfigArray } = require("./flat-config-array");
18
- const { WarningService } = require("../services/warning-service");
19
-
20
- //-----------------------------------------------------------------------------
21
- // Types
22
- //-----------------------------------------------------------------------------
23
-
24
- /** @typedef {import("../types").Linter.Config} Config */
25
-
26
- /**
27
- * @typedef {Object} ConfigLoaderOptions
28
- * @property {string|false|undefined} configFile The path to the config file to use.
29
- * @property {string} cwd The current working directory.
30
- * @property {boolean} ignoreEnabled Indicates if ignore patterns should be honored.
31
- * @property {Config|Array<Config>} [baseConfig] The base config to use.
32
- * @property {Array<Config>} [defaultConfigs] The default configs to use.
33
- * @property {Array<string>} [ignorePatterns] The ignore patterns to use.
34
- * @property {Config|Array<Config>} [overrideConfig] The override config to use.
35
- * @property {boolean} [hasUnstableNativeNodeJsTSConfigFlag] The flag to indicate whether the `unstable_native_nodejs_ts_config` flag is enabled.
36
- * @property {WarningService} [warningService] The warning service to use.
37
- */
38
-
39
- //------------------------------------------------------------------------------
40
- // Helpers
41
- //------------------------------------------------------------------------------
42
-
43
- const FLAT_CONFIG_FILENAMES = [
44
- "eslint.config.js",
45
- "eslint.config.mjs",
46
- "eslint.config.cjs",
47
- "eslint.config.ts",
48
- "eslint.config.mts",
49
- "eslint.config.cts",
50
- ];
51
-
52
- const importedConfigFileModificationTime = new Map();
53
-
54
- /**
55
- * Asserts that the given file path is valid.
56
- * @param {string} filePath The file path to check.
57
- * @returns {void}
58
- * @throws {Error} If `filePath` is not a non-empty string.
59
- */
60
- function assertValidFilePath(filePath) {
61
- if (!filePath || typeof filePath !== "string") {
62
- throw new Error("'filePath' must be a non-empty string");
63
- }
64
- }
65
-
66
- /**
67
- * Asserts that a configuration exists. A configuration exists if any
68
- * of the following are true:
69
- * - `configFilePath` is defined.
70
- * - `useConfigFile` is `false`.
71
- * @param {string|undefined} configFilePath The path to the config file.
72
- * @param {ConfigLoaderOptions} loaderOptions The options to use when loading configuration files.
73
- * @returns {void}
74
- * @throws {Error} If no configuration exists.
75
- */
76
- function assertConfigurationExists(configFilePath, loaderOptions) {
77
- const { configFile: useConfigFile } = loaderOptions;
78
-
79
- if (!configFilePath && useConfigFile !== false) {
80
- const error = new Error("Could not find config file.");
81
-
82
- error.messageTemplate = "config-file-missing";
83
- throw error;
84
- }
85
- }
86
-
87
- /**
88
- * Check if the file is a TypeScript file.
89
- * @param {string} filePath The file path to check.
90
- * @returns {boolean} `true` if the file is a TypeScript file, `false` if it's not.
91
- */
92
- function isFileTS(filePath) {
93
- const fileExtension = path.extname(filePath);
94
-
95
- return /^\.[mc]?ts$/u.test(fileExtension);
96
- }
97
-
98
- /**
99
- * Check if ESLint is running in Bun.
100
- * @returns {boolean} `true` if the ESLint is running Bun, `false` if it's not.
101
- */
102
- function isRunningInBun() {
103
- return !!globalThis.Bun;
104
- }
105
-
106
- /**
107
- * Check if ESLint is running in Deno.
108
- * @returns {boolean} `true` if the ESLint is running in Deno, `false` if it's not.
109
- */
110
- function isRunningInDeno() {
111
- return !!globalThis.Deno;
112
- }
113
-
114
- /**
115
- * Checks if native TypeScript support is
116
- * enabled in the current Node.js process.
117
- *
118
- * This function determines if the
119
- * {@linkcode NodeJS.ProcessFeatures.typescript | typescript}
120
- * feature is present in the
121
- * {@linkcode process.features} object
122
- * and if its value is either "strip" or "transform".
123
- * @returns {boolean} `true` if native TypeScript support is enabled, otherwise `false`.
124
- * @since 9.24.0
125
- */
126
- function isNativeTypeScriptSupportEnabled() {
127
- return (
128
- // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it's still an experimental feature.
129
- ["strip", "transform"].includes(process.features.typescript)
130
- );
131
- }
132
-
133
- /**
134
- * Load the TypeScript configuration file.
135
- * @param {string} filePath The absolute file path to load.
136
- * @param {URL} fileURL The file URL to load.
137
- * @param {number} mtime The last modified timestamp of the file.
138
- * @returns {Promise<any>} The configuration loaded from the file.
139
- * @since 9.24.0
140
- */
141
- async function loadTypeScriptConfigFileWithJiti(filePath, fileURL, mtime) {
142
- const { createJiti, version: jitiVersion } =
143
- // eslint-disable-next-line no-use-before-define -- `ConfigLoader.loadJiti` can be overwritten for testing
144
- await ConfigLoader.loadJiti().catch(() => {
145
- throw new Error(
146
- "The 'jiti' library is required for loading TypeScript configuration files. Make sure to install it.",
147
- );
148
- });
149
-
150
- // `createJiti` was added in jiti v2.
151
- if (typeof createJiti !== "function") {
152
- throw new Error(
153
- "You are using an outdated version of the 'jiti' library. Please update to the latest version of 'jiti' to ensure compatibility and access to the latest features.",
154
- );
155
- }
156
-
157
- /*
158
- * Disabling `moduleCache` allows us to reload a
159
- * config file when the last modified timestamp changes.
160
- */
161
- const jitiOptions = {
162
- moduleCache: false,
163
- };
164
-
165
- if (jitiVersion.startsWith("2.1.")) {
166
- jitiOptions.interopDefault = false;
167
- }
168
-
169
- const jiti = createJiti(__filename, jitiOptions);
170
- const config = await jiti.import(fileURL.href);
171
-
172
- importedConfigFileModificationTime.set(filePath, mtime);
173
-
174
- return config?.default ?? config;
175
- }
176
-
177
- /**
178
- * Dynamically imports a module from the given file path.
179
- * @param {string} filePath The absolute file path of the module to import.
180
- * @param {URL} fileURL The file URL to load.
181
- * @param {number} mtime The last modified timestamp of the file.
182
- * @returns {Promise<any>} - A {@linkcode Promise | promise} that resolves to the imported ESLint config.
183
- * @since 9.24.0
184
- */
185
- async function dynamicImportConfig(filePath, fileURL, mtime) {
186
- const module = await import(fileURL.href);
187
-
188
- importedConfigFileModificationTime.set(filePath, mtime);
189
-
190
- return module.default;
191
- }
192
-
193
- /**
194
- * Load the config array from the given filename.
195
- * @param {string} filePath The filename to load from.
196
- * @param {boolean} hasUnstableNativeNodeJsTSConfigFlag The flag to indicate whether the `unstable_native_nodejs_ts_config` flag is enabled.
197
- * @returns {Promise<any>} The config loaded from the config file.
198
- */
199
- async function loadConfigFile(filePath, hasUnstableNativeNodeJsTSConfigFlag) {
200
- debug(`Loading config from ${filePath}`);
201
-
202
- const fileURL = pathToFileURL(filePath);
203
-
204
- debug(`Config file URL is ${fileURL}`);
205
-
206
- const mtime = (await fs.stat(filePath)).mtime.getTime();
207
-
208
- /*
209
- * Append a query with the config file's modification time (`mtime`) in order
210
- * to import the current version of the config file. Without the query, `import()` would
211
- * cache the config file module by the pathname only, and then always return
212
- * the same version (the one that was actual when the module was imported for the first time).
213
- *
214
- * This ensures that the config file module is loaded and executed again
215
- * if it has been changed since the last time it was imported.
216
- * If it hasn't been changed, `import()` will just return the cached version.
217
- *
218
- * Note that we should not overuse queries (e.g., by appending the current time
219
- * to always reload the config file module) as that could cause memory leaks
220
- * because entries are never removed from the import cache.
221
- */
222
- fileURL.searchParams.append("mtime", mtime);
223
-
224
- /*
225
- * With queries, we can bypass the import cache. However, when import-ing a CJS module,
226
- * Node.js uses the require infrastructure under the hood. That includes the require cache,
227
- * which caches the config file module by its file path (queries have no effect).
228
- * Therefore, we also need to clear the require cache before importing the config file module.
229
- * In order to get the same behavior with ESM and CJS config files, in particular - to reload
230
- * the config file only if it has been changed, we track file modification times and clear
231
- * the require cache only if the file has been changed.
232
- */
233
- if (importedConfigFileModificationTime.get(filePath) !== mtime) {
234
- delete require.cache[filePath];
235
- }
236
-
237
- const isTS = isFileTS(filePath);
238
- const isBun = isRunningInBun();
239
- const isDeno = isRunningInDeno();
240
-
241
- /*
242
- * If we are dealing with a TypeScript file, then we need to use `jiti` to load it
243
- * in Node.js. Deno and Bun both allow native importing of TypeScript files.
244
- *
245
- * When Node.js supports native TypeScript imports, we can remove this check.
246
- */
247
-
248
- if (isTS) {
249
- if (hasUnstableNativeNodeJsTSConfigFlag) {
250
- if (isNativeTypeScriptSupportEnabled()) {
251
- return await dynamicImportConfig(filePath, fileURL, mtime);
252
- }
253
-
254
- if (!("typescript" in process.features)) {
255
- throw new Error(
256
- "The unstable_native_nodejs_ts_config flag is not supported in older versions of Node.js.",
257
- );
258
- }
259
-
260
- throw new Error(
261
- "The unstable_native_nodejs_ts_config flag is enabled, but native TypeScript support is not enabled in the current Node.js process. You need to either enable native TypeScript support by passing --experimental-strip-types or remove the unstable_native_nodejs_ts_config flag.",
262
- );
263
- }
264
-
265
- if (!isDeno && !isBun) {
266
- return await loadTypeScriptConfigFileWithJiti(
267
- filePath,
268
- fileURL,
269
- mtime,
270
- );
271
- }
272
- }
273
-
274
- // fallback to normal runtime behavior
275
-
276
- return await dynamicImportConfig(filePath, fileURL, mtime);
277
- }
278
-
279
- //-----------------------------------------------------------------------------
280
- // Exports
281
- //-----------------------------------------------------------------------------
282
-
283
- /**
284
- * Encapsulates the loading and caching of configuration files when looking up
285
- * from the file being linted.
286
- */
287
- class ConfigLoader {
288
- /**
289
- * Map of config file paths to the config arrays for those directories.
290
- * @type {Map<string, FlatConfigArray|Promise<FlatConfigArray>>}
291
- */
292
- #configArrays = new Map();
293
-
294
- /**
295
- * Map of absolute directory names to the config file paths for those directories.
296
- * @type {Map<string, {configFilePath:string,basePath:string}|Promise<{configFilePath:string,basePath:string}>>}
297
- */
298
- #configFilePaths = new Map();
299
-
300
- /**
301
- * The options to use when loading configuration files.
302
- * @type {ConfigLoaderOptions}
303
- */
304
- #options;
305
-
306
- /**
307
- * Creates a new instance.
308
- * @param {ConfigLoaderOptions} options The options to use when loading configuration files.
309
- */
310
- constructor(options) {
311
- this.#options = options.warningService
312
- ? options
313
- : { ...options, warningService: new WarningService() };
314
- }
315
-
316
- /**
317
- * Determines which config file to use. This is determined by seeing if an
318
- * override config file was specified, and if so, using it; otherwise, as long
319
- * as override config file is not explicitly set to `false`, it will search
320
- * upwards from `fromDirectory` for a file named `eslint.config.js`.
321
- * @param {string} fromDirectory The directory from which to start searching.
322
- * @returns {Promise<{configFilePath:string|undefined,basePath:string}>} Location information for
323
- * the config file.
324
- */
325
- async #locateConfigFileToUse(fromDirectory) {
326
- // check cache first
327
- if (this.#configFilePaths.has(fromDirectory)) {
328
- return this.#configFilePaths.get(fromDirectory);
329
- }
330
-
331
- const resultPromise = ConfigLoader.locateConfigFileToUse({
332
- useConfigFile: this.#options.configFile,
333
- cwd: this.#options.cwd,
334
- fromDirectory,
335
- });
336
-
337
- // ensure `ConfigLoader.locateConfigFileToUse` is called only once for `fromDirectory`
338
- this.#configFilePaths.set(fromDirectory, resultPromise);
339
-
340
- // Unwrap the promise. This is primarily for the sync `getCachedConfigArrayForPath` method.
341
- const result = await resultPromise;
342
-
343
- this.#configFilePaths.set(fromDirectory, result);
344
-
345
- return result;
346
- }
347
-
348
- /**
349
- * Calculates the config array for this run based on inputs.
350
- * @param {string} configFilePath The absolute path to the config file to use if not overridden.
351
- * @param {string} basePath The base path to use for relative paths in the config file.
352
- * @returns {Promise<FlatConfigArray>} The config array for `eslint`.
353
- */
354
- async #calculateConfigArray(configFilePath, basePath) {
355
- // check for cached version first
356
- if (this.#configArrays.has(configFilePath)) {
357
- return this.#configArrays.get(configFilePath);
358
- }
359
-
360
- const configsPromise = ConfigLoader.calculateConfigArray(
361
- configFilePath,
362
- basePath,
363
- this.#options,
364
- );
365
-
366
- // ensure `ConfigLoader.calculateConfigArray` is called only once for `configFilePath`
367
- this.#configArrays.set(configFilePath, configsPromise);
368
-
369
- // Unwrap the promise. This is primarily for the sync `getCachedConfigArrayForPath` method.
370
- const configs = await configsPromise;
371
-
372
- this.#configArrays.set(configFilePath, configs);
373
-
374
- return configs;
375
- }
376
-
377
- /**
378
- * Returns the config file path for the given directory or file. This will either use
379
- * the override config file that was specified in the constructor options or
380
- * search for a config file from the directory.
381
- * @param {string} fileOrDirPath The file or directory path to get the config file path for.
382
- * @returns {Promise<string|undefined>} The config file path or `undefined` if not found.
383
- * @throws {Error} If `fileOrDirPath` is not a non-empty string.
384
- * @throws {Error} If `fileOrDirPath` is not an absolute path.
385
- */
386
- async findConfigFileForPath(fileOrDirPath) {
387
- assertValidFilePath(fileOrDirPath);
388
-
389
- const absoluteDirPath = path.resolve(
390
- this.#options.cwd,
391
- path.dirname(fileOrDirPath),
392
- );
393
- const { configFilePath } =
394
- await this.#locateConfigFileToUse(absoluteDirPath);
395
-
396
- return configFilePath;
397
- }
398
-
399
- /**
400
- * Returns a configuration object for the given file based on the CLI options.
401
- * This is the same logic used by the ESLint CLI executable to determine
402
- * configuration for each file it processes.
403
- * @param {string} filePath The path of the file or directory to retrieve config for.
404
- * @returns {Promise<FlatConfigArray>} A configuration object for the file.
405
- * @throws {Error} If no configuration for `filePath` exists.
406
- */
407
- async loadConfigArrayForFile(filePath) {
408
- assertValidFilePath(filePath);
409
-
410
- debug(`Calculating config for file ${filePath}`);
411
-
412
- const configFilePath = await this.findConfigFileForPath(filePath);
413
-
414
- assertConfigurationExists(configFilePath, this.#options);
415
-
416
- return this.loadConfigArrayForDirectory(filePath);
417
- }
418
-
419
- /**
420
- * Returns a configuration object for the given directory based on the CLI options.
421
- * This is the same logic used by the ESLint CLI executable to determine
422
- * configuration for each file it processes.
423
- * @param {string} dirPath The path of the directory to retrieve config for.
424
- * @returns {Promise<FlatConfigArray>} A configuration object for the directory.
425
- */
426
- async loadConfigArrayForDirectory(dirPath) {
427
- assertValidFilePath(dirPath);
428
-
429
- debug(`Calculating config for directory ${dirPath}`);
430
-
431
- const absoluteDirPath = path.resolve(
432
- this.#options.cwd,
433
- path.dirname(dirPath),
434
- );
435
- const { configFilePath, basePath } =
436
- await this.#locateConfigFileToUse(absoluteDirPath);
437
-
438
- debug(`Using config file ${configFilePath} and base path ${basePath}`);
439
- return this.#calculateConfigArray(configFilePath, basePath);
440
- }
441
-
442
- /**
443
- * Returns a configuration array for the given file based on the CLI options.
444
- * This is a synchronous operation and does not read any files from disk. It's
445
- * intended to be used in locations where we know the config file has already
446
- * been loaded and we just need to get the configuration for a file.
447
- * @param {string} filePath The path of the file to retrieve a config object for.
448
- * @returns {FlatConfigArray} A configuration object for the file.
449
- * @throws {Error} If `filePath` is not a non-empty string.
450
- * @throws {Error} If `filePath` is not an absolute path.
451
- * @throws {Error} If the config file was not already loaded.
452
- */
453
- getCachedConfigArrayForFile(filePath) {
454
- assertValidFilePath(filePath);
455
-
456
- debug(`Looking up cached config for ${filePath}`);
457
-
458
- return this.getCachedConfigArrayForPath(path.dirname(filePath));
459
- }
460
-
461
- /**
462
- * Returns a configuration array for the given directory based on the CLI options.
463
- * This is a synchronous operation and does not read any files from disk. It's
464
- * intended to be used in locations where we know the config file has already
465
- * been loaded and we just need to get the configuration for a file.
466
- * @param {string} fileOrDirPath The path of the directory to retrieve a config object for.
467
- * @returns {FlatConfigArray} A configuration object for the directory.
468
- * @throws {Error} If `dirPath` is not a non-empty string.
469
- * @throws {Error} If `dirPath` is not an absolute path.
470
- * @throws {Error} If the config file was not already loaded.
471
- */
472
- getCachedConfigArrayForPath(fileOrDirPath) {
473
- assertValidFilePath(fileOrDirPath);
474
-
475
- debug(`Looking up cached config for ${fileOrDirPath}`);
476
-
477
- const absoluteDirPath = path.resolve(this.#options.cwd, fileOrDirPath);
478
-
479
- if (!this.#configFilePaths.has(absoluteDirPath)) {
480
- throw new Error(`Could not find config file for ${fileOrDirPath}`);
481
- }
482
-
483
- const configFilePathInfo = this.#configFilePaths.get(absoluteDirPath);
484
-
485
- if (typeof configFilePathInfo.then === "function") {
486
- throw new Error(
487
- `Config file path for ${fileOrDirPath} has not yet been calculated or an error occurred during the calculation`,
488
- );
489
- }
490
-
491
- const { configFilePath } = configFilePathInfo;
492
-
493
- const configArray = this.#configArrays.get(configFilePath);
494
-
495
- if (!configArray || typeof configArray.then === "function") {
496
- throw new Error(
497
- `Config array for ${fileOrDirPath} has not yet been calculated or an error occurred during the calculation`,
498
- );
499
- }
500
-
501
- return configArray;
502
- }
503
-
504
- /**
505
- * Used to import the jiti dependency. This method is exposed internally for testing purposes.
506
- * @returns {Promise<{createJiti: Function|undefined, version: string;}>} A promise that fulfills with an object containing the jiti module's createJiti function and version.
507
- */
508
- static async loadJiti() {
509
- const { createJiti } = await import("jiti");
510
- const version = require("jiti/package.json").version;
511
- return { createJiti, version };
512
- }
513
-
514
- /**
515
- * Determines which config file to use. This is determined by seeing if an
516
- * override config file was specified, and if so, using it; otherwise, as long
517
- * as override config file is not explicitly set to `false`, it will search
518
- * upwards from `fromDirectory` for a file named `eslint.config.js`.
519
- * This method is exposed internally for testing purposes.
520
- * @param {Object} [options] the options object
521
- * @param {string|false|undefined} options.useConfigFile The path to the config file to use.
522
- * @param {string} options.cwd Path to a directory that should be considered as the current working directory.
523
- * @param {string} [options.fromDirectory] The directory from which to start searching. Defaults to `cwd`.
524
- * @returns {Promise<{configFilePath:string|undefined,basePath:string}>} Location information for
525
- * the config file.
526
- */
527
- static async locateConfigFileToUse({
528
- useConfigFile,
529
- cwd,
530
- fromDirectory = cwd,
531
- }) {
532
- // determine where to load config file from
533
- let configFilePath;
534
- let basePath = cwd;
535
-
536
- if (typeof useConfigFile === "string") {
537
- debug(`Override config file path is ${useConfigFile}`);
538
- configFilePath = path.resolve(cwd, useConfigFile);
539
- basePath = cwd;
540
- } else if (useConfigFile !== false) {
541
- debug("Searching for eslint.config.js");
542
- configFilePath = await findUp(FLAT_CONFIG_FILENAMES, {
543
- cwd: fromDirectory,
544
- });
545
-
546
- if (configFilePath) {
547
- basePath = path.dirname(configFilePath);
548
- }
549
- }
550
-
551
- return {
552
- configFilePath,
553
- basePath,
554
- };
555
- }
556
-
557
- /**
558
- * Calculates the config array for this run based on inputs.
559
- * This method is exposed internally for testing purposes.
560
- * @param {string} configFilePath The absolute path to the config file to use if not overridden.
561
- * @param {string} basePath The base path to use for relative paths in the config file.
562
- * @param {ConfigLoaderOptions} options The options to use when loading configuration files.
563
- * @returns {Promise<FlatConfigArray>} The config array for `eslint`.
564
- */
565
- static async calculateConfigArray(configFilePath, basePath, options) {
566
- const {
567
- cwd,
568
- baseConfig,
569
- ignoreEnabled,
570
- ignorePatterns,
571
- overrideConfig,
572
- hasUnstableNativeNodeJsTSConfigFlag = false,
573
- defaultConfigs = [],
574
- warningService,
575
- } = options;
576
-
577
- debug(
578
- `Calculating config array from config file ${configFilePath} and base path ${basePath}`,
579
- );
580
-
581
- const configs = new FlatConfigArray(baseConfig || [], {
582
- basePath,
583
- shouldIgnore: ignoreEnabled,
584
- });
585
-
586
- // load config file
587
- if (configFilePath) {
588
- debug(`Loading config file ${configFilePath}`);
589
- const fileConfig = await loadConfigFile(
590
- configFilePath,
591
- hasUnstableNativeNodeJsTSConfigFlag,
592
- );
593
-
594
- /*
595
- * It's possible that a config file could be empty or else
596
- * have an empty object or array. In this case, we want to
597
- * warn the user that they have an empty config.
598
- *
599
- * An empty CommonJS file exports an empty object while
600
- * an empty ESM file exports undefined.
601
- */
602
-
603
- let emptyConfig = typeof fileConfig === "undefined";
604
-
605
- debug(
606
- `Config file ${configFilePath} is ${emptyConfig ? "empty" : "not empty"}`,
607
- );
608
-
609
- if (!emptyConfig) {
610
- if (Array.isArray(fileConfig)) {
611
- if (fileConfig.length === 0) {
612
- debug(
613
- `Config file ${configFilePath} is an empty array`,
614
- );
615
- emptyConfig = true;
616
- } else {
617
- configs.push(...fileConfig);
618
- }
619
- } else {
620
- if (
621
- typeof fileConfig === "object" &&
622
- fileConfig !== null &&
623
- Object.keys(fileConfig).length === 0
624
- ) {
625
- debug(
626
- `Config file ${configFilePath} is an empty object`,
627
- );
628
- emptyConfig = true;
629
- } else {
630
- configs.push(fileConfig);
631
- }
632
- }
633
- }
634
-
635
- if (emptyConfig) {
636
- warningService.emitEmptyConfigWarning(configFilePath);
637
- }
638
- }
639
-
640
- // add in any configured defaults
641
- configs.push(...defaultConfigs);
642
-
643
- // append command line ignore patterns
644
- if (ignorePatterns && ignorePatterns.length > 0) {
645
- /*
646
- * Ignore patterns are added to the end of the config array
647
- * so they can override default ignores.
648
- */
649
- configs.push({
650
- basePath: cwd,
651
- ignores: ignorePatterns,
652
- });
653
- }
654
-
655
- if (overrideConfig) {
656
- if (Array.isArray(overrideConfig)) {
657
- configs.push(...overrideConfig);
658
- } else {
659
- configs.push(overrideConfig);
660
- }
661
- }
662
-
663
- await configs.normalize();
664
-
665
- return configs;
666
- }
667
- }
668
-
669
- /**
670
- * Encapsulates the loading and caching of configuration files when looking up
671
- * from the current working directory.
672
- */
673
- class LegacyConfigLoader extends ConfigLoader {
674
- /**
675
- * The options to use when loading configuration files.
676
- * @type {ConfigLoaderOptions}
677
- */
678
- #options;
679
-
680
- /**
681
- * The cached config file path for this instance.
682
- * @type {Promise<{configFilePath:string,basePath:string}|undefined>}
683
- */
684
- #configFilePath;
685
-
686
- /**
687
- * The cached config array for this instance.
688
- * @type {FlatConfigArray|Promise<FlatConfigArray>}
689
- */
690
- #configArray;
691
-
692
- /**
693
- * Creates a new instance.
694
- * @param {ConfigLoaderOptions} options The options to use when loading configuration files.
695
- */
696
- constructor(options) {
697
- const normalizedOptions = options.warningService
698
- ? options
699
- : { ...options, warningService: new WarningService() };
700
- super(normalizedOptions);
701
- this.#options = normalizedOptions;
702
- }
703
-
704
- /**
705
- * Determines which config file to use. This is determined by seeing if an
706
- * override config file was specified, and if so, using it; otherwise, as long
707
- * as override config file is not explicitly set to `false`, it will search
708
- * upwards from the cwd for a file named `eslint.config.js`.
709
- * @returns {Promise<{configFilePath:string|undefined,basePath:string}>} Location information for
710
- * the config file.
711
- */
712
- #locateConfigFileToUse() {
713
- if (!this.#configFilePath) {
714
- this.#configFilePath = ConfigLoader.locateConfigFileToUse({
715
- useConfigFile: this.#options.configFile,
716
- cwd: this.#options.cwd,
717
- });
718
- }
719
-
720
- return this.#configFilePath;
721
- }
722
-
723
- /**
724
- * Calculates the config array for this run based on inputs.
725
- * @param {string} configFilePath The absolute path to the config file to use if not overridden.
726
- * @param {string} basePath The base path to use for relative paths in the config file.
727
- * @returns {Promise<FlatConfigArray>} The config array for `eslint`.
728
- */
729
- async #calculateConfigArray(configFilePath, basePath) {
730
- // check for cached version first
731
- if (this.#configArray) {
732
- return this.#configArray;
733
- }
734
-
735
- // ensure `ConfigLoader.calculateConfigArray` is called only once
736
- this.#configArray = ConfigLoader.calculateConfigArray(
737
- configFilePath,
738
- basePath,
739
- this.#options,
740
- );
741
-
742
- // Unwrap the promise. This is primarily for the sync `getCachedConfigArrayForPath` method.
743
- this.#configArray = await this.#configArray;
744
-
745
- return this.#configArray;
746
- }
747
-
748
- /**
749
- * Returns the config file path for the given directory. This will either use
750
- * the override config file that was specified in the constructor options or
751
- * search for a config file from the directory of the file being linted.
752
- * @param {string} dirPath The directory path to get the config file path for.
753
- * @returns {Promise<string|undefined>} The config file path or `undefined` if not found.
754
- * @throws {Error} If `fileOrDirPath` is not a non-empty string.
755
- * @throws {Error} If `fileOrDirPath` is not an absolute path.
756
- */
757
- async findConfigFileForPath(dirPath) {
758
- assertValidFilePath(dirPath);
759
-
760
- const { configFilePath } = await this.#locateConfigFileToUse();
761
-
762
- return configFilePath;
763
- }
764
-
765
- /**
766
- * Returns a configuration object for the given file based on the CLI options.
767
- * This is the same logic used by the ESLint CLI executable to determine
768
- * configuration for each file it processes.
769
- * @param {string} dirPath The path of the directory to retrieve config for.
770
- * @returns {Promise<FlatConfigArray>} A configuration object for the file.
771
- */
772
- async loadConfigArrayForDirectory(dirPath) {
773
- assertValidFilePath(dirPath);
774
-
775
- debug(`[Legacy]: Calculating config for ${dirPath}`);
776
-
777
- const { configFilePath, basePath } =
778
- await this.#locateConfigFileToUse();
779
-
780
- debug(
781
- `[Legacy]: Using config file ${configFilePath} and base path ${basePath}`,
782
- );
783
- return this.#calculateConfigArray(configFilePath, basePath);
784
- }
785
-
786
- /**
787
- * Returns a configuration array for the given directory based on the CLI options.
788
- * This is a synchronous operation and does not read any files from disk. It's
789
- * intended to be used in locations where we know the config file has already
790
- * been loaded and we just need to get the configuration for a file.
791
- * @param {string} dirPath The path of the directory to retrieve a config object for.
792
- * @returns {FlatConfigArray} A configuration object for the file.
793
- * @throws {Error} If `dirPath` is not a non-empty string.
794
- * @throws {Error} If `dirPath` is not an absolute path.
795
- * @throws {Error} If the config file was not already loaded.
796
- */
797
- getCachedConfigArrayForPath(dirPath) {
798
- assertValidFilePath(dirPath);
799
-
800
- debug(`[Legacy]: Looking up cached config for ${dirPath}`);
801
-
802
- if (!this.#configArray) {
803
- throw new Error(`Could not find config file for ${dirPath}`);
804
- }
805
-
806
- if (typeof this.#configArray.then === "function") {
807
- throw new Error(
808
- `Config array for ${dirPath} has not yet been calculated or an error occurred during the calculation`,
809
- );
810
- }
811
-
812
- return this.#configArray;
813
- }
814
- }
815
-
816
- module.exports = { ConfigLoader, LegacyConfigLoader };