@alexlit/lint-kit 178.0.0 → 179.0.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 (780) hide show
  1. package/eslint.config.js +5 -0
  2. package/package.json +1 -1
  3. package/packages/config-eslint/package.json +2 -2
  4. package/packages/config-eslint/plugins/tailwindcss.js +2 -2
  5. package/packages/config-eslint/plugins/vitest.js +3 -3
  6. package/packages/config-eslint/presets/default.js +0 -4
  7. package/packages/config-eslint/node_modules/@eslint/config-array/LICENSE +0 -201
  8. package/packages/config-eslint/node_modules/@eslint/config-array/README.md +0 -368
  9. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/index.cjs +0 -1536
  10. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/index.d.cts +0 -144
  11. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs +0 -1336
  12. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs +0 -1678
  13. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/types.cts +0 -29
  14. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/index.d.ts +0 -144
  15. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/index.js +0 -1511
  16. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/std__path/posix.js +0 -1314
  17. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/std__path/windows.js +0 -1656
  18. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/types.d.ts +0 -23
  19. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/types.ts +0 -29
  20. package/packages/config-eslint/node_modules/@eslint/config-array/package.json +0 -65
  21. package/packages/config-eslint/node_modules/@eslint/config-helpers/LICENSE +0 -201
  22. package/packages/config-eslint/node_modules/@eslint/config-helpers/README.md +0 -97
  23. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/index.cjs +0 -588
  24. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts +0 -26
  25. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/types.cts +0 -29
  26. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/index.d.ts +0 -26
  27. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/index.js +0 -586
  28. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/types.d.ts +0 -23
  29. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/types.ts +0 -29
  30. package/packages/config-eslint/node_modules/@eslint/config-helpers/package.json +0 -60
  31. package/packages/config-eslint/node_modules/@eslint/js/LICENSE +0 -19
  32. package/packages/config-eslint/node_modules/@eslint/js/README.md +0 -103
  33. package/packages/config-eslint/node_modules/@eslint/js/package.json +0 -44
  34. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-all.js +0 -210
  35. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-recommended.js +0 -75
  36. package/packages/config-eslint/node_modules/@eslint/js/src/index.js +0 -23
  37. package/packages/config-eslint/node_modules/@eslint/js/types/index.d.ts +0 -14
  38. package/packages/config-eslint/node_modules/@eslint/object-schema/LICENSE +0 -201
  39. package/packages/config-eslint/node_modules/@eslint/object-schema/README.md +0 -243
  40. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/index.cjs +0 -459
  41. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/index.d.cts +0 -127
  42. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/types.cts +0 -57
  43. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/index.d.ts +0 -127
  44. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/index.js +0 -456
  45. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/types.d.ts +0 -40
  46. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/types.ts +0 -57
  47. package/packages/config-eslint/node_modules/@eslint/object-schema/package.json +0 -62
  48. package/packages/config-eslint/node_modules/@isaacs/cliui/LICENSE.md +0 -63
  49. package/packages/config-eslint/node_modules/@isaacs/cliui/README.md +0 -151
  50. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.d.ts +0 -4
  51. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.d.ts.map +0 -1
  52. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.js +0 -16
  53. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.js.map +0 -1
  54. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.d.ts +0 -34
  55. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.d.ts.map +0 -1
  56. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.js +0 -170
  57. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.js.map +0 -1
  58. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.d.ts +0 -6
  59. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.d.ts.map +0 -1
  60. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.js +0 -307
  61. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.js.map +0 -1
  62. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.d.ts +0 -2
  63. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.d.ts.map +0 -1
  64. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.js +0 -7
  65. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.js.map +0 -1
  66. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/index.d.ts +0 -41
  67. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/index.d.ts.map +0 -1
  68. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/index.js +0 -322
  69. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/index.js.map +0 -1
  70. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/index.min.js +0 -12
  71. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/index.min.js.map +0 -7
  72. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/package.json +0 -3
  73. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.d.ts +0 -5
  74. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.d.ts.map +0 -1
  75. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.js +0 -49
  76. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.js.map +0 -1
  77. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.d.ts +0 -2
  78. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.d.ts.map +0 -1
  79. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.js +0 -8
  80. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.js.map +0 -1
  81. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.d.ts +0 -7
  82. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.d.ts.map +0 -1
  83. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.js +0 -176
  84. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.js.map +0 -1
  85. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.d.ts +0 -4
  86. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.d.ts.map +0 -1
  87. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.js +0 -12
  88. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.js.map +0 -1
  89. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.d.ts +0 -34
  90. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.d.ts.map +0 -1
  91. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.js +0 -167
  92. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.js.map +0 -1
  93. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.d.ts +0 -6
  94. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.d.ts.map +0 -1
  95. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.js +0 -299
  96. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.js.map +0 -1
  97. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.d.ts +0 -2
  98. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.d.ts.map +0 -1
  99. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.js +0 -3
  100. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.js.map +0 -1
  101. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/index.d.ts +0 -41
  102. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/index.d.ts.map +0 -1
  103. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/index.js +0 -317
  104. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/index.js.map +0 -1
  105. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/index.min.js +0 -12
  106. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/index.min.js.map +0 -7
  107. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/package.json +0 -3
  108. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/string-width/index.d.ts +0 -5
  109. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/string-width/index.d.ts.map +0 -1
  110. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/string-width/index.js +0 -46
  111. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/string-width/index.js.map +0 -1
  112. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.d.ts +0 -2
  113. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.d.ts.map +0 -1
  114. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.js +0 -4
  115. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.js.map +0 -1
  116. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.d.ts +0 -7
  117. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.d.ts.map +0 -1
  118. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.js +0 -172
  119. package/packages/config-eslint/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.js.map +0 -1
  120. package/packages/config-eslint/node_modules/@isaacs/cliui/package.json +0 -163
  121. package/packages/config-eslint/node_modules/ajv/.tonic_example.js +0 -20
  122. package/packages/config-eslint/node_modules/ajv/LICENSE +0 -22
  123. package/packages/config-eslint/node_modules/ajv/README.md +0 -1497
  124. package/packages/config-eslint/node_modules/ajv/dist/ajv.bundle.js +0 -7189
  125. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js +0 -3
  126. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js.map +0 -1
  127. package/packages/config-eslint/node_modules/ajv/lib/ajv.d.ts +0 -397
  128. package/packages/config-eslint/node_modules/ajv/lib/ajv.js +0 -506
  129. package/packages/config-eslint/node_modules/ajv/lib/cache.js +0 -26
  130. package/packages/config-eslint/node_modules/ajv/lib/compile/async.js +0 -90
  131. package/packages/config-eslint/node_modules/ajv/lib/compile/equal.js +0 -5
  132. package/packages/config-eslint/node_modules/ajv/lib/compile/error_classes.js +0 -34
  133. package/packages/config-eslint/node_modules/ajv/lib/compile/formats.js +0 -142
  134. package/packages/config-eslint/node_modules/ajv/lib/compile/index.js +0 -387
  135. package/packages/config-eslint/node_modules/ajv/lib/compile/resolve.js +0 -270
  136. package/packages/config-eslint/node_modules/ajv/lib/compile/rules.js +0 -66
  137. package/packages/config-eslint/node_modules/ajv/lib/compile/schema_obj.js +0 -9
  138. package/packages/config-eslint/node_modules/ajv/lib/compile/ucs2length.js +0 -20
  139. package/packages/config-eslint/node_modules/ajv/lib/compile/util.js +0 -239
  140. package/packages/config-eslint/node_modules/ajv/lib/data.js +0 -49
  141. package/packages/config-eslint/node_modules/ajv/lib/definition_schema.js +0 -37
  142. package/packages/config-eslint/node_modules/ajv/lib/dot/_limit.jst +0 -113
  143. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitItems.jst +0 -12
  144. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitLength.jst +0 -12
  145. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitProperties.jst +0 -12
  146. package/packages/config-eslint/node_modules/ajv/lib/dot/allOf.jst +0 -32
  147. package/packages/config-eslint/node_modules/ajv/lib/dot/anyOf.jst +0 -46
  148. package/packages/config-eslint/node_modules/ajv/lib/dot/coerce.def +0 -51
  149. package/packages/config-eslint/node_modules/ajv/lib/dot/comment.jst +0 -9
  150. package/packages/config-eslint/node_modules/ajv/lib/dot/const.jst +0 -11
  151. package/packages/config-eslint/node_modules/ajv/lib/dot/contains.jst +0 -55
  152. package/packages/config-eslint/node_modules/ajv/lib/dot/custom.jst +0 -191
  153. package/packages/config-eslint/node_modules/ajv/lib/dot/defaults.def +0 -47
  154. package/packages/config-eslint/node_modules/ajv/lib/dot/definitions.def +0 -203
  155. package/packages/config-eslint/node_modules/ajv/lib/dot/dependencies.jst +0 -79
  156. package/packages/config-eslint/node_modules/ajv/lib/dot/enum.jst +0 -30
  157. package/packages/config-eslint/node_modules/ajv/lib/dot/errors.def +0 -194
  158. package/packages/config-eslint/node_modules/ajv/lib/dot/format.jst +0 -106
  159. package/packages/config-eslint/node_modules/ajv/lib/dot/if.jst +0 -73
  160. package/packages/config-eslint/node_modules/ajv/lib/dot/items.jst +0 -98
  161. package/packages/config-eslint/node_modules/ajv/lib/dot/missing.def +0 -39
  162. package/packages/config-eslint/node_modules/ajv/lib/dot/multipleOf.jst +0 -22
  163. package/packages/config-eslint/node_modules/ajv/lib/dot/not.jst +0 -43
  164. package/packages/config-eslint/node_modules/ajv/lib/dot/oneOf.jst +0 -54
  165. package/packages/config-eslint/node_modules/ajv/lib/dot/pattern.jst +0 -14
  166. package/packages/config-eslint/node_modules/ajv/lib/dot/properties.jst +0 -245
  167. package/packages/config-eslint/node_modules/ajv/lib/dot/propertyNames.jst +0 -52
  168. package/packages/config-eslint/node_modules/ajv/lib/dot/ref.jst +0 -85
  169. package/packages/config-eslint/node_modules/ajv/lib/dot/required.jst +0 -108
  170. package/packages/config-eslint/node_modules/ajv/lib/dot/uniqueItems.jst +0 -62
  171. package/packages/config-eslint/node_modules/ajv/lib/dot/validate.jst +0 -276
  172. package/packages/config-eslint/node_modules/ajv/lib/dotjs/README.md +0 -3
  173. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limit.js +0 -163
  174. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitItems.js +0 -80
  175. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitLength.js +0 -85
  176. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitProperties.js +0 -80
  177. package/packages/config-eslint/node_modules/ajv/lib/dotjs/allOf.js +0 -42
  178. package/packages/config-eslint/node_modules/ajv/lib/dotjs/anyOf.js +0 -73
  179. package/packages/config-eslint/node_modules/ajv/lib/dotjs/comment.js +0 -14
  180. package/packages/config-eslint/node_modules/ajv/lib/dotjs/const.js +0 -56
  181. package/packages/config-eslint/node_modules/ajv/lib/dotjs/contains.js +0 -81
  182. package/packages/config-eslint/node_modules/ajv/lib/dotjs/custom.js +0 -228
  183. package/packages/config-eslint/node_modules/ajv/lib/dotjs/dependencies.js +0 -168
  184. package/packages/config-eslint/node_modules/ajv/lib/dotjs/enum.js +0 -66
  185. package/packages/config-eslint/node_modules/ajv/lib/dotjs/format.js +0 -150
  186. package/packages/config-eslint/node_modules/ajv/lib/dotjs/if.js +0 -103
  187. package/packages/config-eslint/node_modules/ajv/lib/dotjs/index.js +0 -33
  188. package/packages/config-eslint/node_modules/ajv/lib/dotjs/items.js +0 -140
  189. package/packages/config-eslint/node_modules/ajv/lib/dotjs/multipleOf.js +0 -80
  190. package/packages/config-eslint/node_modules/ajv/lib/dotjs/not.js +0 -84
  191. package/packages/config-eslint/node_modules/ajv/lib/dotjs/oneOf.js +0 -73
  192. package/packages/config-eslint/node_modules/ajv/lib/dotjs/pattern.js +0 -75
  193. package/packages/config-eslint/node_modules/ajv/lib/dotjs/properties.js +0 -335
  194. package/packages/config-eslint/node_modules/ajv/lib/dotjs/propertyNames.js +0 -81
  195. package/packages/config-eslint/node_modules/ajv/lib/dotjs/ref.js +0 -124
  196. package/packages/config-eslint/node_modules/ajv/lib/dotjs/required.js +0 -270
  197. package/packages/config-eslint/node_modules/ajv/lib/dotjs/uniqueItems.js +0 -86
  198. package/packages/config-eslint/node_modules/ajv/lib/dotjs/validate.js +0 -482
  199. package/packages/config-eslint/node_modules/ajv/lib/keyword.js +0 -146
  200. package/packages/config-eslint/node_modules/ajv/lib/refs/data.json +0 -17
  201. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json +0 -149
  202. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -154
  203. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -168
  204. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-secure.json +0 -94
  205. package/packages/config-eslint/node_modules/ajv/package.json +0 -106
  206. package/packages/config-eslint/node_modules/ajv/scripts/.eslintrc.yml +0 -3
  207. package/packages/config-eslint/node_modules/ajv/scripts/bundle.js +0 -61
  208. package/packages/config-eslint/node_modules/ajv/scripts/compile-dots.js +0 -73
  209. package/packages/config-eslint/node_modules/ajv/scripts/info +0 -10
  210. package/packages/config-eslint/node_modules/ajv/scripts/prepare-tests +0 -12
  211. package/packages/config-eslint/node_modules/ajv/scripts/publish-built-version +0 -32
  212. package/packages/config-eslint/node_modules/ajv/scripts/travis-gh-pages +0 -23
  213. package/packages/config-eslint/node_modules/balanced-match/LICENSE.md +0 -23
  214. package/packages/config-eslint/node_modules/balanced-match/README.md +0 -57
  215. package/packages/config-eslint/node_modules/balanced-match/dist/commonjs/index.d.ts +0 -9
  216. package/packages/config-eslint/node_modules/balanced-match/dist/commonjs/index.d.ts.map +0 -1
  217. package/packages/config-eslint/node_modules/balanced-match/dist/commonjs/index.js +0 -59
  218. package/packages/config-eslint/node_modules/balanced-match/dist/commonjs/index.js.map +0 -1
  219. package/packages/config-eslint/node_modules/balanced-match/dist/commonjs/package.json +0 -3
  220. package/packages/config-eslint/node_modules/balanced-match/dist/esm/index.d.ts +0 -9
  221. package/packages/config-eslint/node_modules/balanced-match/dist/esm/index.d.ts.map +0 -1
  222. package/packages/config-eslint/node_modules/balanced-match/dist/esm/index.js +0 -54
  223. package/packages/config-eslint/node_modules/balanced-match/dist/esm/index.js.map +0 -1
  224. package/packages/config-eslint/node_modules/balanced-match/dist/esm/package.json +0 -3
  225. package/packages/config-eslint/node_modules/balanced-match/package.json +0 -71
  226. package/packages/config-eslint/node_modules/brace-expansion/LICENSE +0 -23
  227. package/packages/config-eslint/node_modules/brace-expansion/README.md +0 -94
  228. package/packages/config-eslint/node_modules/brace-expansion/dist/commonjs/index.d.ts +0 -6
  229. package/packages/config-eslint/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +0 -1
  230. package/packages/config-eslint/node_modules/brace-expansion/dist/commonjs/index.js +0 -199
  231. package/packages/config-eslint/node_modules/brace-expansion/dist/commonjs/index.js.map +0 -1
  232. package/packages/config-eslint/node_modules/brace-expansion/dist/commonjs/package.json +0 -3
  233. package/packages/config-eslint/node_modules/brace-expansion/dist/esm/index.d.ts +0 -6
  234. package/packages/config-eslint/node_modules/brace-expansion/dist/esm/index.d.ts.map +0 -1
  235. package/packages/config-eslint/node_modules/brace-expansion/dist/esm/index.js +0 -195
  236. package/packages/config-eslint/node_modules/brace-expansion/dist/esm/index.js.map +0 -1
  237. package/packages/config-eslint/node_modules/brace-expansion/dist/esm/package.json +0 -3
  238. package/packages/config-eslint/node_modules/brace-expansion/package.json +0 -64
  239. package/packages/config-eslint/node_modules/eslint/LICENSE +0 -19
  240. package/packages/config-eslint/node_modules/eslint/README.md +0 -363
  241. package/packages/config-eslint/node_modules/eslint/bin/eslint.js +0 -195
  242. package/packages/config-eslint/node_modules/eslint/conf/ecma-version.js +0 -16
  243. package/packages/config-eslint/node_modules/eslint/conf/globals.js +0 -169
  244. package/packages/config-eslint/node_modules/eslint/conf/replacements.json +0 -26
  245. package/packages/config-eslint/node_modules/eslint/conf/rule-type-list.json +0 -91
  246. package/packages/config-eslint/node_modules/eslint/lib/api.js +0 -39
  247. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +0 -18
  248. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/html.js +0 -359
  249. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js +0 -16
  250. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json.js +0 -13
  251. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/stylish.js +0 -153
  252. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/hash.js +0 -35
  253. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/lint-result-cache.js +0 -220
  254. package/packages/config-eslint/node_modules/eslint/lib/cli.js +0 -521
  255. package/packages/config-eslint/node_modules/eslint/lib/config/config-loader.js +0 -668
  256. package/packages/config-eslint/node_modules/eslint/lib/config/config.js +0 -674
  257. package/packages/config-eslint/node_modules/eslint/lib/config/default-config.js +0 -78
  258. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-array.js +0 -217
  259. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-schema.js +0 -598
  260. package/packages/config-eslint/node_modules/eslint/lib/config-api.js +0 -12
  261. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint-helpers.js +0 -1462
  262. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint.js +0 -1364
  263. package/packages/config-eslint/node_modules/eslint/lib/eslint/index.js +0 -7
  264. package/packages/config-eslint/node_modules/eslint/lib/eslint/worker.js +0 -173
  265. package/packages/config-eslint/node_modules/eslint/lib/languages/js/index.js +0 -336
  266. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/index.js +0 -7
  267. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/source-code.js +0 -1178
  268. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-comment-cursor.js +0 -61
  269. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-cursor.js +0 -57
  270. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursor.js +0 -76
  271. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursors.js +0 -120
  272. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/decorative-cursor.js +0 -38
  273. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/filter-cursor.js +0 -42
  274. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-comment-cursor.js +0 -65
  275. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-cursor.js +0 -62
  276. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/index.js +0 -695
  277. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/limit-cursor.js +0 -39
  278. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/padded-token-cursor.js +0 -45
  279. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/skip-cursor.js +0 -41
  280. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/utils.js +0 -131
  281. package/packages/config-eslint/node_modules/eslint/lib/languages/js/validate-language-options.js +0 -196
  282. package/packages/config-eslint/node_modules/eslint/lib/linter/apply-disable-directives.js +0 -583
  283. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -828
  284. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +0 -262
  285. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js +0 -2370
  286. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +0 -332
  287. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +0 -223
  288. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +0 -374
  289. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js +0 -44
  290. package/packages/config-eslint/node_modules/eslint/lib/linter/esquery.js +0 -332
  291. package/packages/config-eslint/node_modules/eslint/lib/linter/file-context.js +0 -88
  292. package/packages/config-eslint/node_modules/eslint/lib/linter/file-report.js +0 -604
  293. package/packages/config-eslint/node_modules/eslint/lib/linter/index.js +0 -11
  294. package/packages/config-eslint/node_modules/eslint/lib/linter/interpolate.js +0 -50
  295. package/packages/config-eslint/node_modules/eslint/lib/linter/linter.js +0 -1614
  296. package/packages/config-eslint/node_modules/eslint/lib/linter/rule-fixer.js +0 -199
  297. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-fixer.js +0 -154
  298. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-traverser.js +0 -333
  299. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-visitor.js +0 -81
  300. package/packages/config-eslint/node_modules/eslint/lib/linter/timing.js +0 -209
  301. package/packages/config-eslint/node_modules/eslint/lib/linter/vfile.js +0 -115
  302. package/packages/config-eslint/node_modules/eslint/lib/options.js +0 -416
  303. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/index.js +0 -7
  304. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/rule-tester.js +0 -1996
  305. package/packages/config-eslint/node_modules/eslint/lib/rules/accessor-pairs.js +0 -420
  306. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-newline.js +0 -291
  307. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-spacing.js +0 -301
  308. package/packages/config-eslint/node_modules/eslint/lib/rules/array-callback-return.js +0 -510
  309. package/packages/config-eslint/node_modules/eslint/lib/rules/array-element-newline.js +0 -374
  310. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-body-style.js +0 -418
  311. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-parens.js +0 -237
  312. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-spacing.js +0 -188
  313. package/packages/config-eslint/node_modules/eslint/lib/rules/block-scoped-var.js +0 -137
  314. package/packages/config-eslint/node_modules/eslint/lib/rules/block-spacing.js +0 -202
  315. package/packages/config-eslint/node_modules/eslint/lib/rules/brace-style.js +0 -278
  316. package/packages/config-eslint/node_modules/eslint/lib/rules/callback-return.js +0 -216
  317. package/packages/config-eslint/node_modules/eslint/lib/rules/camelcase.js +0 -422
  318. package/packages/config-eslint/node_modules/eslint/lib/rules/capitalized-comments.js +0 -325
  319. package/packages/config-eslint/node_modules/eslint/lib/rules/class-methods-use-this.js +0 -250
  320. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-dangle.js +0 -424
  321. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-spacing.js +0 -205
  322. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-style.js +0 -391
  323. package/packages/config-eslint/node_modules/eslint/lib/rules/complexity.js +0 -201
  324. package/packages/config-eslint/node_modules/eslint/lib/rules/computed-property-spacing.js +0 -251
  325. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-return.js +0 -221
  326. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-this.js +0 -179
  327. package/packages/config-eslint/node_modules/eslint/lib/rules/constructor-super.js +0 -453
  328. package/packages/config-eslint/node_modules/eslint/lib/rules/curly.js +0 -425
  329. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case-last.js +0 -51
  330. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case.js +0 -103
  331. package/packages/config-eslint/node_modules/eslint/lib/rules/default-param-last.js +0 -78
  332. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-location.js +0 -138
  333. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-notation.js +0 -216
  334. package/packages/config-eslint/node_modules/eslint/lib/rules/eol-last.js +0 -135
  335. package/packages/config-eslint/node_modules/eslint/lib/rules/eqeqeq.js +0 -210
  336. package/packages/config-eslint/node_modules/eslint/lib/rules/for-direction.js +0 -168
  337. package/packages/config-eslint/node_modules/eslint/lib/rules/func-call-spacing.js +0 -281
  338. package/packages/config-eslint/node_modules/eslint/lib/rules/func-name-matching.js +0 -338
  339. package/packages/config-eslint/node_modules/eslint/lib/rules/func-names.js +0 -194
  340. package/packages/config-eslint/node_modules/eslint/lib/rules/func-style.js +0 -221
  341. package/packages/config-eslint/node_modules/eslint/lib/rules/function-call-argument-newline.js +0 -166
  342. package/packages/config-eslint/node_modules/eslint/lib/rules/function-paren-newline.js +0 -368
  343. package/packages/config-eslint/node_modules/eslint/lib/rules/generator-star-spacing.js +0 -246
  344. package/packages/config-eslint/node_modules/eslint/lib/rules/getter-return.js +0 -242
  345. package/packages/config-eslint/node_modules/eslint/lib/rules/global-require.js +0 -117
  346. package/packages/config-eslint/node_modules/eslint/lib/rules/grouped-accessor-pairs.js +0 -268
  347. package/packages/config-eslint/node_modules/eslint/lib/rules/guard-for-in.js +0 -85
  348. package/packages/config-eslint/node_modules/eslint/lib/rules/handle-callback-err.js +0 -122
  349. package/packages/config-eslint/node_modules/eslint/lib/rules/id-blacklist.js +0 -241
  350. package/packages/config-eslint/node_modules/eslint/lib/rules/id-denylist.js +0 -223
  351. package/packages/config-eslint/node_modules/eslint/lib/rules/id-length.js +0 -217
  352. package/packages/config-eslint/node_modules/eslint/lib/rules/id-match.js +0 -363
  353. package/packages/config-eslint/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +0 -125
  354. package/packages/config-eslint/node_modules/eslint/lib/rules/indent-legacy.js +0 -1369
  355. package/packages/config-eslint/node_modules/eslint/lib/rules/indent.js +0 -2334
  356. package/packages/config-eslint/node_modules/eslint/lib/rules/index.js +0 -332
  357. package/packages/config-eslint/node_modules/eslint/lib/rules/init-declarations.js +0 -172
  358. package/packages/config-eslint/node_modules/eslint/lib/rules/jsx-quotes.js +0 -128
  359. package/packages/config-eslint/node_modules/eslint/lib/rules/key-spacing.js +0 -822
  360. package/packages/config-eslint/node_modules/eslint/lib/rules/keyword-spacing.js +0 -701
  361. package/packages/config-eslint/node_modules/eslint/lib/rules/line-comment-position.js +0 -157
  362. package/packages/config-eslint/node_modules/eslint/lib/rules/linebreak-style.js +0 -135
  363. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-comment.js +0 -581
  364. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-directive.js +0 -249
  365. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-between-class-members.js +0 -358
  366. package/packages/config-eslint/node_modules/eslint/lib/rules/logical-assignment-operators.js +0 -688
  367. package/packages/config-eslint/node_modules/eslint/lib/rules/max-classes-per-file.js +0 -90
  368. package/packages/config-eslint/node_modules/eslint/lib/rules/max-depth.js +0 -159
  369. package/packages/config-eslint/node_modules/eslint/lib/rules/max-len.js +0 -497
  370. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines-per-function.js +0 -238
  371. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines.js +0 -189
  372. package/packages/config-eslint/node_modules/eslint/lib/rules/max-nested-callbacks.js +0 -115
  373. package/packages/config-eslint/node_modules/eslint/lib/rules/max-params.js +0 -148
  374. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements-per-line.js +0 -224
  375. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements.js +0 -188
  376. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-comment-style.js +0 -652
  377. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-ternary.js +0 -257
  378. package/packages/config-eslint/node_modules/eslint/lib/rules/new-cap.js +0 -277
  379. package/packages/config-eslint/node_modules/eslint/lib/rules/new-parens.js +0 -120
  380. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-after-var.js +0 -307
  381. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-before-return.js +0 -242
  382. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-per-chained-call.js +0 -159
  383. package/packages/config-eslint/node_modules/eslint/lib/rules/no-alert.js +0 -149
  384. package/packages/config-eslint/node_modules/eslint/lib/rules/no-array-constructor.js +0 -195
  385. package/packages/config-eslint/node_modules/eslint/lib/rules/no-async-promise-executor.js +0 -45
  386. package/packages/config-eslint/node_modules/eslint/lib/rules/no-await-in-loop.js +0 -115
  387. package/packages/config-eslint/node_modules/eslint/lib/rules/no-bitwise.js +0 -145
  388. package/packages/config-eslint/node_modules/eslint/lib/rules/no-buffer-constructor.js +0 -74
  389. package/packages/config-eslint/node_modules/eslint/lib/rules/no-caller.js +0 -52
  390. package/packages/config-eslint/node_modules/eslint/lib/rules/no-case-declarations.js +0 -80
  391. package/packages/config-eslint/node_modules/eslint/lib/rules/no-catch-shadow.js +0 -96
  392. package/packages/config-eslint/node_modules/eslint/lib/rules/no-class-assign.js +0 -66
  393. package/packages/config-eslint/node_modules/eslint/lib/rules/no-compare-neg-zero.js +0 -74
  394. package/packages/config-eslint/node_modules/eslint/lib/rules/no-cond-assign.js +0 -175
  395. package/packages/config-eslint/node_modules/eslint/lib/rules/no-confusing-arrow.js +0 -127
  396. package/packages/config-eslint/node_modules/eslint/lib/rules/no-console.js +0 -221
  397. package/packages/config-eslint/node_modules/eslint/lib/rules/no-const-assign.js +0 -73
  398. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-binary-expression.js +0 -603
  399. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-condition.js +0 -177
  400. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constructor-return.js +0 -62
  401. package/packages/config-eslint/node_modules/eslint/lib/rules/no-continue.js +0 -38
  402. package/packages/config-eslint/node_modules/eslint/lib/rules/no-control-regex.js +0 -142
  403. package/packages/config-eslint/node_modules/eslint/lib/rules/no-debugger.js +0 -41
  404. package/packages/config-eslint/node_modules/eslint/lib/rules/no-delete-var.js +0 -42
  405. package/packages/config-eslint/node_modules/eslint/lib/rules/no-div-regex.js +0 -60
  406. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-args.js +0 -92
  407. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-class-members.js +0 -117
  408. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-else-if.js +0 -145
  409. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-keys.js +0 -165
  410. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-case.js +0 -78
  411. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-imports.js +0 -368
  412. package/packages/config-eslint/node_modules/eslint/lib/rules/no-else-return.js +0 -450
  413. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-character-class.js +0 -83
  414. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-function.js +0 -236
  415. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-pattern.js +0 -85
  416. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-static-block.js +0 -73
  417. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty.js +0 -153
  418. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eq-null.js +0 -51
  419. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eval.js +0 -295
  420. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ex-assign.js +0 -57
  421. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extend-native.js +0 -180
  422. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-bind.js +0 -224
  423. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +0 -420
  424. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-label.js +0 -169
  425. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-parens.js +0 -1669
  426. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-semi.js +0 -167
  427. package/packages/config-eslint/node_modules/eslint/lib/rules/no-fallthrough.js +0 -260
  428. package/packages/config-eslint/node_modules/eslint/lib/rules/no-floating-decimal.js +0 -99
  429. package/packages/config-eslint/node_modules/eslint/lib/rules/no-func-assign.js +0 -77
  430. package/packages/config-eslint/node_modules/eslint/lib/rules/no-global-assign.js +0 -101
  431. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-coercion.js +0 -468
  432. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-globals.js +0 -187
  433. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implied-eval.js +0 -171
  434. package/packages/config-eslint/node_modules/eslint/lib/rules/no-import-assign.js +0 -227
  435. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inline-comments.js +0 -115
  436. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inner-declarations.js +0 -147
  437. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-regexp.js +0 -244
  438. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-this.js +0 -178
  439. package/packages/config-eslint/node_modules/eslint/lib/rules/no-irregular-whitespace.js +0 -292
  440. package/packages/config-eslint/node_modules/eslint/lib/rules/no-iterator.js +0 -48
  441. package/packages/config-eslint/node_modules/eslint/lib/rules/no-label-var.js +0 -78
  442. package/packages/config-eslint/node_modules/eslint/lib/rules/no-labels.js +0 -156
  443. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lone-blocks.js +0 -140
  444. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lonely-if.js +0 -126
  445. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loop-func.js +0 -267
  446. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loss-of-precision.js +0 -249
  447. package/packages/config-eslint/node_modules/eslint/lib/rules/no-magic-numbers.js +0 -365
  448. package/packages/config-eslint/node_modules/eslint/lib/rules/no-misleading-character-class.js +0 -595
  449. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-operators.js +0 -253
  450. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-requires.js +0 -267
  451. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +0 -148
  452. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-assign.js +0 -66
  453. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-spaces.js +0 -179
  454. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-str.js +0 -67
  455. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +0 -210
  456. package/packages/config-eslint/node_modules/eslint/lib/rules/no-native-reassign.js +0 -114
  457. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-condition.js +0 -100
  458. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-in-lhs.js +0 -59
  459. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nested-ternary.js +0 -46
  460. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-func.js +0 -96
  461. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +0 -70
  462. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-object.js +0 -76
  463. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-require.js +0 -67
  464. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-symbol.js +0 -74
  465. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-wrappers.js +0 -62
  466. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new.js +0 -42
  467. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js +0 -176
  468. package/packages/config-eslint/node_modules/eslint/lib/rules/no-obj-calls.js +0 -99
  469. package/packages/config-eslint/node_modules/eslint/lib/rules/no-object-constructor.js +0 -124
  470. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal-escape.js +0 -53
  471. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal.js +0 -42
  472. package/packages/config-eslint/node_modules/eslint/lib/rules/no-param-reassign.js +0 -248
  473. package/packages/config-eslint/node_modules/eslint/lib/rules/no-path-concat.js +0 -79
  474. package/packages/config-eslint/node_modules/eslint/lib/rules/no-plusplus.js +0 -102
  475. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-env.js +0 -68
  476. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-exit.js +0 -67
  477. package/packages/config-eslint/node_modules/eslint/lib/rules/no-promise-executor-return.js +0 -264
  478. package/packages/config-eslint/node_modules/eslint/lib/rules/no-proto.js +0 -45
  479. package/packages/config-eslint/node_modules/eslint/lib/rules/no-prototype-builtins.js +0 -181
  480. package/packages/config-eslint/node_modules/eslint/lib/rules/no-redeclare.js +0 -173
  481. package/packages/config-eslint/node_modules/eslint/lib/rules/no-regex-spaces.js +0 -219
  482. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-exports.js +0 -227
  483. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-globals.js +0 -266
  484. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-imports.js +0 -892
  485. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-modules.js +0 -249
  486. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-properties.js +0 -233
  487. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-syntax.js +0 -74
  488. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-assign.js +0 -87
  489. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-await.js +0 -162
  490. package/packages/config-eslint/node_modules/eslint/lib/rules/no-script-url.js +0 -68
  491. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-assign.js +0 -186
  492. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-compare.js +0 -77
  493. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sequences.js +0 -158
  494. package/packages/config-eslint/node_modules/eslint/lib/rules/no-setter-return.js +0 -224
  495. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +0 -113
  496. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow.js +0 -689
  497. package/packages/config-eslint/node_modules/eslint/lib/rules/no-spaced-func.js +0 -105
  498. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sparse-arrays.js +0 -68
  499. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sync.js +0 -81
  500. package/packages/config-eslint/node_modules/eslint/lib/rules/no-tabs.js +0 -110
  501. package/packages/config-eslint/node_modules/eslint/lib/rules/no-template-curly-in-string.js +0 -45
  502. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ternary.js +0 -38
  503. package/packages/config-eslint/node_modules/eslint/lib/rules/no-this-before-super.js +0 -365
  504. package/packages/config-eslint/node_modules/eslint/lib/rules/no-throw-literal.js +0 -46
  505. package/packages/config-eslint/node_modules/eslint/lib/rules/no-trailing-spaces.js +0 -227
  506. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unassigned-vars.js +0 -80
  507. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef-init.js +0 -101
  508. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef.js +0 -84
  509. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undefined.js +0 -85
  510. package/packages/config-eslint/node_modules/eslint/lib/rules/no-underscore-dangle.js +0 -383
  511. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unexpected-multiline.js +0 -130
  512. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +0 -360
  513. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unneeded-ternary.js +0 -232
  514. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable-loop.js +0 -190
  515. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable.js +0 -300
  516. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-finally.js +0 -119
  517. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-negation.js +0 -152
  518. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +0 -221
  519. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-expressions.js +0 -227
  520. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-labels.js +0 -158
  521. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-private-class-members.js +0 -219
  522. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-vars.js +0 -1739
  523. package/packages/config-eslint/node_modules/eslint/lib/rules/no-use-before-define.js +0 -446
  524. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-assignment.js +0 -657
  525. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-backreference.js +0 -263
  526. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-call.js +0 -95
  527. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-catch.js +0 -57
  528. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-computed-key.js +0 -204
  529. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-concat.js +0 -121
  530. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-constructor.js +0 -262
  531. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-escape.js +0 -406
  532. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-rename.js +0 -202
  533. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-return.js +0 -401
  534. package/packages/config-eslint/node_modules/eslint/lib/rules/no-var.js +0 -367
  535. package/packages/config-eslint/node_modules/eslint/lib/rules/no-void.js +0 -69
  536. package/packages/config-eslint/node_modules/eslint/lib/rules/no-warning-comments.js +0 -209
  537. package/packages/config-eslint/node_modules/eslint/lib/rules/no-whitespace-before-property.js +0 -150
  538. package/packages/config-eslint/node_modules/eslint/lib/rules/no-with.js +0 -37
  539. package/packages/config-eslint/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +0 -164
  540. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-newline.js +0 -383
  541. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-spacing.js +0 -369
  542. package/packages/config-eslint/node_modules/eslint/lib/rules/object-property-newline.js +0 -151
  543. package/packages/config-eslint/node_modules/eslint/lib/rules/object-shorthand.js +0 -652
  544. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +0 -117
  545. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var.js +0 -717
  546. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-assignment.js +0 -270
  547. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-linebreak.js +0 -315
  548. package/packages/config-eslint/node_modules/eslint/lib/rules/padded-blocks.js +0 -366
  549. package/packages/config-eslint/node_modules/eslint/lib/rules/padding-line-between-statements.js +0 -612
  550. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-arrow-callback.js +0 -437
  551. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-const.js +0 -546
  552. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-destructuring.js +0 -332
  553. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +0 -235
  554. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-named-capture-group.js +0 -197
  555. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-numeric-literals.js +0 -157
  556. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-has-own.js +0 -148
  557. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-spread.js +0 -319
  558. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +0 -154
  559. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-reflect.js +0 -150
  560. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-regex-literals.js +0 -605
  561. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-rest-params.js +0 -117
  562. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-spread.js +0 -91
  563. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-template.js +0 -347
  564. package/packages/config-eslint/node_modules/eslint/lib/rules/preserve-caught-error.js +0 -535
  565. package/packages/config-eslint/node_modules/eslint/lib/rules/quote-props.js +0 -394
  566. package/packages/config-eslint/node_modules/eslint/lib/rules/quotes.js +0 -416
  567. package/packages/config-eslint/node_modules/eslint/lib/rules/radix.js +0 -193
  568. package/packages/config-eslint/node_modules/eslint/lib/rules/require-atomic-updates.js +0 -365
  569. package/packages/config-eslint/node_modules/eslint/lib/rules/require-await.js +0 -184
  570. package/packages/config-eslint/node_modules/eslint/lib/rules/require-unicode-regexp.js +0 -317
  571. package/packages/config-eslint/node_modules/eslint/lib/rules/require-yield.js +0 -86
  572. package/packages/config-eslint/node_modules/eslint/lib/rules/rest-spread-spacing.js +0 -150
  573. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-spacing.js +0 -297
  574. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-style.js +0 -218
  575. package/packages/config-eslint/node_modules/eslint/lib/rules/semi.js +0 -476
  576. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-imports.js +0 -319
  577. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-keys.js +0 -268
  578. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-vars.js +0 -140
  579. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-blocks.js +0 -232
  580. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-function-paren.js +0 -202
  581. package/packages/config-eslint/node_modules/eslint/lib/rules/space-in-parens.js +0 -374
  582. package/packages/config-eslint/node_modules/eslint/lib/rules/space-infix-ops.js +0 -249
  583. package/packages/config-eslint/node_modules/eslint/lib/rules/space-unary-ops.js +0 -400
  584. package/packages/config-eslint/node_modules/eslint/lib/rules/spaced-comment.js +0 -447
  585. package/packages/config-eslint/node_modules/eslint/lib/rules/strict.js +0 -324
  586. package/packages/config-eslint/node_modules/eslint/lib/rules/switch-colon-spacing.js +0 -158
  587. package/packages/config-eslint/node_modules/eslint/lib/rules/symbol-description.js +0 -70
  588. package/packages/config-eslint/node_modules/eslint/lib/rules/template-curly-spacing.js +0 -168
  589. package/packages/config-eslint/node_modules/eslint/lib/rules/template-tag-spacing.js +0 -121
  590. package/packages/config-eslint/node_modules/eslint/lib/rules/unicode-bom.js +0 -73
  591. package/packages/config-eslint/node_modules/eslint/lib/rules/use-isnan.js +0 -268
  592. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/ast-utils.js +0 -2841
  593. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/char-source.js +0 -247
  594. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/fix-tracker.js +0 -125
  595. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/keywords.js +0 -67
  596. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +0 -118
  597. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/regular-expressions.js +0 -58
  598. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/index.js +0 -16
  599. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js +0 -13
  600. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js +0 -13
  601. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js +0 -13
  602. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js +0 -14
  603. package/packages/config-eslint/node_modules/eslint/lib/rules/valid-typeof.js +0 -171
  604. package/packages/config-eslint/node_modules/eslint/lib/rules/vars-on-top.js +0 -165
  605. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-iife.js +0 -238
  606. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-regex.js +0 -91
  607. package/packages/config-eslint/node_modules/eslint/lib/rules/yield-star-spacing.js +0 -158
  608. package/packages/config-eslint/node_modules/eslint/lib/rules/yoda.js +0 -362
  609. package/packages/config-eslint/node_modules/eslint/lib/services/parser-service.js +0 -64
  610. package/packages/config-eslint/node_modules/eslint/lib/services/processor-service.js +0 -100
  611. package/packages/config-eslint/node_modules/eslint/lib/services/suppressions-service.js +0 -302
  612. package/packages/config-eslint/node_modules/eslint/lib/services/warning-service.js +0 -87
  613. package/packages/config-eslint/node_modules/eslint/lib/shared/ajv.js +0 -34
  614. package/packages/config-eslint/node_modules/eslint/lib/shared/assert.js +0 -21
  615. package/packages/config-eslint/node_modules/eslint/lib/shared/ast-utils.js +0 -30
  616. package/packages/config-eslint/node_modules/eslint/lib/shared/deep-merge-arrays.js +0 -62
  617. package/packages/config-eslint/node_modules/eslint/lib/shared/directives.js +0 -16
  618. package/packages/config-eslint/node_modules/eslint/lib/shared/flags.js +0 -89
  619. package/packages/config-eslint/node_modules/eslint/lib/shared/logging.js +0 -38
  620. package/packages/config-eslint/node_modules/eslint/lib/shared/naming.js +0 -109
  621. package/packages/config-eslint/node_modules/eslint/lib/shared/option-utils.js +0 -63
  622. package/packages/config-eslint/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -28
  623. package/packages/config-eslint/node_modules/eslint/lib/shared/runtime-info.js +0 -177
  624. package/packages/config-eslint/node_modules/eslint/lib/shared/serialization.js +0 -78
  625. package/packages/config-eslint/node_modules/eslint/lib/shared/severity.js +0 -49
  626. package/packages/config-eslint/node_modules/eslint/lib/shared/stats.js +0 -30
  627. package/packages/config-eslint/node_modules/eslint/lib/shared/string-utils.js +0 -58
  628. package/packages/config-eslint/node_modules/eslint/lib/shared/text-table.js +0 -68
  629. package/packages/config-eslint/node_modules/eslint/lib/shared/translate-cli-options.js +0 -223
  630. package/packages/config-eslint/node_modules/eslint/lib/shared/traverser.js +0 -202
  631. package/packages/config-eslint/node_modules/eslint/lib/types/config-api.d.ts +0 -12
  632. package/packages/config-eslint/node_modules/eslint/lib/types/index.d.ts +0 -1475
  633. package/packages/config-eslint/node_modules/eslint/lib/types/rules.d.ts +0 -5603
  634. package/packages/config-eslint/node_modules/eslint/lib/types/universal.d.ts +0 -6
  635. package/packages/config-eslint/node_modules/eslint/lib/types/use-at-your-own-risk.d.ts +0 -34
  636. package/packages/config-eslint/node_modules/eslint/lib/universal.js +0 -10
  637. package/packages/config-eslint/node_modules/eslint/lib/unsupported-api.js +0 -21
  638. package/packages/config-eslint/node_modules/eslint/messages/all-files-ignored.js +0 -16
  639. package/packages/config-eslint/node_modules/eslint/messages/all-matched-files-ignored.js +0 -21
  640. package/packages/config-eslint/node_modules/eslint/messages/config-file-missing.js +0 -16
  641. package/packages/config-eslint/node_modules/eslint/messages/config-plugin-missing.js +0 -14
  642. package/packages/config-eslint/node_modules/eslint/messages/config-serialize-function.js +0 -30
  643. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-incompat.js +0 -117
  644. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-plugins.js +0 -27
  645. package/packages/config-eslint/node_modules/eslint/messages/extend-config-missing.js +0 -13
  646. package/packages/config-eslint/node_modules/eslint/messages/failed-to-read-json.js +0 -11
  647. package/packages/config-eslint/node_modules/eslint/messages/file-not-found.js +0 -10
  648. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-options.js +0 -17
  649. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-severity.js +0 -13
  650. package/packages/config-eslint/node_modules/eslint/messages/no-config-found.js +0 -15
  651. package/packages/config-eslint/node_modules/eslint/messages/plugin-conflict.js +0 -22
  652. package/packages/config-eslint/node_modules/eslint/messages/plugin-invalid.js +0 -16
  653. package/packages/config-eslint/node_modules/eslint/messages/plugin-missing.js +0 -19
  654. package/packages/config-eslint/node_modules/eslint/messages/print-config-with-directory-path.js +0 -8
  655. package/packages/config-eslint/node_modules/eslint/messages/shared.js +0 -23
  656. package/packages/config-eslint/node_modules/eslint/messages/whitespace-found.js +0 -11
  657. package/packages/config-eslint/node_modules/eslint/package.json +0 -220
  658. package/packages/config-eslint/node_modules/eslint-scope/LICENSE +0 -22
  659. package/packages/config-eslint/node_modules/eslint-scope/README.md +0 -206
  660. package/packages/config-eslint/node_modules/eslint-scope/dist/eslint-scope.cjs +0 -2420
  661. package/packages/config-eslint/node_modules/eslint-scope/lib/assert.js +0 -17
  662. package/packages/config-eslint/node_modules/eslint-scope/lib/definition.js +0 -89
  663. package/packages/config-eslint/node_modules/eslint-scope/lib/index.d.cts +0 -1069
  664. package/packages/config-eslint/node_modules/eslint-scope/lib/index.d.ts +0 -6
  665. package/packages/config-eslint/node_modules/eslint-scope/lib/index.js +0 -170
  666. package/packages/config-eslint/node_modules/eslint-scope/lib/pattern-visitor.js +0 -157
  667. package/packages/config-eslint/node_modules/eslint-scope/lib/reference.js +0 -165
  668. package/packages/config-eslint/node_modules/eslint-scope/lib/referencer.js +0 -712
  669. package/packages/config-eslint/node_modules/eslint-scope/lib/scope-manager.js +0 -271
  670. package/packages/config-eslint/node_modules/eslint-scope/lib/scope.js +0 -839
  671. package/packages/config-eslint/node_modules/eslint-scope/lib/variable.js +0 -91
  672. package/packages/config-eslint/node_modules/eslint-scope/package.json +0 -69
  673. package/packages/config-eslint/node_modules/eslint-visitor-keys/LICENSE +0 -201
  674. package/packages/config-eslint/node_modules/eslint-visitor-keys/README.md +0 -121
  675. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +0 -396
  676. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +0 -28
  677. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/index.d.ts +0 -16
  678. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +0 -12
  679. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/index.js +0 -67
  680. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.js +0 -327
  681. package/packages/config-eslint/node_modules/eslint-visitor-keys/package.json +0 -59
  682. package/packages/config-eslint/node_modules/espree/LICENSE +0 -25
  683. package/packages/config-eslint/node_modules/espree/README.md +0 -262
  684. package/packages/config-eslint/node_modules/espree/dist/espree.cjs +0 -1272
  685. package/packages/config-eslint/node_modules/espree/dist/espree.d.cts +0 -3
  686. package/packages/config-eslint/node_modules/espree/dist/espree.d.cts.map +0 -1
  687. package/packages/config-eslint/node_modules/espree/dist/espree.d.ts +0 -71
  688. package/packages/config-eslint/node_modules/espree/dist/espree.d.ts.map +0 -1
  689. package/packages/config-eslint/node_modules/espree/espree.js +0 -291
  690. package/packages/config-eslint/node_modules/espree/lib/espree.js +0 -482
  691. package/packages/config-eslint/node_modules/espree/lib/features.js +0 -21
  692. package/packages/config-eslint/node_modules/espree/lib/options.js +0 -164
  693. package/packages/config-eslint/node_modules/espree/lib/token-translator.js +0 -306
  694. package/packages/config-eslint/node_modules/espree/lib/types.js +0 -118
  695. package/packages/config-eslint/node_modules/espree/package.json +0 -72
  696. package/packages/config-eslint/node_modules/ignore/LICENSE-MIT +0 -21
  697. package/packages/config-eslint/node_modules/ignore/README.md +0 -412
  698. package/packages/config-eslint/node_modules/ignore/index.d.ts +0 -61
  699. package/packages/config-eslint/node_modules/ignore/index.js +0 -636
  700. package/packages/config-eslint/node_modules/ignore/legacy.js +0 -559
  701. package/packages/config-eslint/node_modules/ignore/package.json +0 -74
  702. package/packages/config-eslint/node_modules/jackspeak/LICENSE.md +0 -55
  703. package/packages/config-eslint/node_modules/jackspeak/README.md +0 -394
  704. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/index.d.ts +0 -323
  705. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/index.d.ts.map +0 -1
  706. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/index.js +0 -944
  707. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/index.js.map +0 -1
  708. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/index.min.js +0 -33
  709. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/index.min.js.map +0 -7
  710. package/packages/config-eslint/node_modules/jackspeak/dist/commonjs/package.json +0 -3
  711. package/packages/config-eslint/node_modules/jackspeak/dist/esm/index.d.ts +0 -323
  712. package/packages/config-eslint/node_modules/jackspeak/dist/esm/index.d.ts.map +0 -1
  713. package/packages/config-eslint/node_modules/jackspeak/dist/esm/index.js +0 -936
  714. package/packages/config-eslint/node_modules/jackspeak/dist/esm/index.js.map +0 -1
  715. package/packages/config-eslint/node_modules/jackspeak/dist/esm/index.min.js +0 -33
  716. package/packages/config-eslint/node_modules/jackspeak/dist/esm/index.min.js.map +0 -7
  717. package/packages/config-eslint/node_modules/jackspeak/dist/esm/package.json +0 -3
  718. package/packages/config-eslint/node_modules/jackspeak/package.json +0 -115
  719. package/packages/config-eslint/node_modules/json-schema-traverse/.eslintrc.yml +0 -27
  720. package/packages/config-eslint/node_modules/json-schema-traverse/.travis.yml +0 -8
  721. package/packages/config-eslint/node_modules/json-schema-traverse/LICENSE +0 -21
  722. package/packages/config-eslint/node_modules/json-schema-traverse/README.md +0 -83
  723. package/packages/config-eslint/node_modules/json-schema-traverse/index.js +0 -89
  724. package/packages/config-eslint/node_modules/json-schema-traverse/package.json +0 -43
  725. package/packages/config-eslint/node_modules/json-schema-traverse/spec/.eslintrc.yml +0 -6
  726. package/packages/config-eslint/node_modules/json-schema-traverse/spec/fixtures/schema.js +0 -125
  727. package/packages/config-eslint/node_modules/json-schema-traverse/spec/index.spec.js +0 -171
  728. package/packages/config-eslint/node_modules/minimatch/LICENSE.md +0 -55
  729. package/packages/config-eslint/node_modules/minimatch/README.md +0 -455
  730. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +0 -2
  731. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +0 -1
  732. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +0 -14
  733. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +0 -1
  734. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -20
  735. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
  736. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.js +0 -601
  737. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
  738. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
  739. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
  740. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -150
  741. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
  742. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.d.ts +0 -15
  743. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.d.ts.map +0 -1
  744. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.js +0 -30
  745. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.js.map +0 -1
  746. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.d.ts +0 -144
  747. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.d.ts.map +0 -1
  748. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.js +0 -1035
  749. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.js.map +0 -1
  750. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/package.json +0 -3
  751. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.d.ts +0 -22
  752. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +0 -1
  753. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.js +0 -38
  754. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.js.map +0 -1
  755. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +0 -2
  756. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +0 -1
  757. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -10
  758. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +0 -1
  759. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.d.ts +0 -20
  760. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
  761. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.js +0 -597
  762. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.js.map +0 -1
  763. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
  764. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
  765. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.js +0 -146
  766. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
  767. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.d.ts +0 -15
  768. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.d.ts.map +0 -1
  769. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.js +0 -26
  770. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.js.map +0 -1
  771. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.d.ts +0 -144
  772. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.d.ts.map +0 -1
  773. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.js +0 -1022
  774. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.js.map +0 -1
  775. package/packages/config-eslint/node_modules/minimatch/dist/esm/package.json +0 -3
  776. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.d.ts +0 -22
  777. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.d.ts.map +0 -1
  778. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.js +0 -34
  779. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.js.map +0 -1
  780. package/packages/config-eslint/node_modules/minimatch/package.json +0 -67
@@ -1,1511 +0,0 @@
1
- // @ts-self-types="./index.d.ts"
2
- import * as posixPath from './std__path/posix.js';
3
- import * as windowsPath from './std__path/windows.js';
4
- import { Minimatch } from 'minimatch';
5
- import createDebug from 'debug';
6
- import { ObjectSchema } from '@eslint/object-schema';
7
- export { ObjectSchema } from '@eslint/object-schema';
8
-
9
- /**
10
- * @fileoverview ConfigSchema
11
- * @author Nicholas C. Zakas
12
- */
13
-
14
- //------------------------------------------------------------------------------
15
- // Types
16
- //------------------------------------------------------------------------------
17
-
18
- /** @import * as $eslintobjectschema from "@eslint/object-schema"; */
19
- /** @typedef {$eslintobjectschema.PropertyDefinition} PropertyDefinition */
20
- /** @typedef {$eslintobjectschema.ObjectDefinition} ObjectDefinition */
21
-
22
- //------------------------------------------------------------------------------
23
- // Helpers
24
- //------------------------------------------------------------------------------
25
-
26
- /**
27
- * A strategy that does nothing.
28
- * @type {PropertyDefinition}
29
- */
30
- const NOOP_STRATEGY = {
31
- required: false,
32
- merge() {
33
- return undefined;
34
- },
35
- validate() {},
36
- };
37
-
38
- //------------------------------------------------------------------------------
39
- // Exports
40
- //------------------------------------------------------------------------------
41
-
42
- /**
43
- * The base schema that every ConfigArray uses.
44
- * @type {ObjectDefinition}
45
- */
46
- const baseSchema = Object.freeze({
47
- name: {
48
- required: false,
49
- merge() {
50
- return undefined;
51
- },
52
- validate(value) {
53
- if (typeof value !== "string") {
54
- throw new TypeError("Property must be a string.");
55
- }
56
- },
57
- },
58
- basePath: NOOP_STRATEGY,
59
- files: NOOP_STRATEGY,
60
- ignores: NOOP_STRATEGY,
61
- });
62
-
63
- /**
64
- * @fileoverview ConfigSchema
65
- * @author Nicholas C. Zakas
66
- */
67
-
68
- //------------------------------------------------------------------------------
69
- // Types
70
- //------------------------------------------------------------------------------
71
-
72
-
73
- //------------------------------------------------------------------------------
74
- // Helpers
75
- //------------------------------------------------------------------------------
76
-
77
- /**
78
- * Asserts that a given value is an array.
79
- * @param {*} value The value to check.
80
- * @returns {void}
81
- * @throws {TypeError} When the value is not an array.
82
- */
83
- function assertIsArray(value) {
84
- if (!Array.isArray(value)) {
85
- throw new TypeError("Expected value to be an array.");
86
- }
87
- }
88
-
89
- /**
90
- * Asserts that a given value is an array containing only strings and functions.
91
- * @param {*} value The value to check.
92
- * @returns {void}
93
- * @throws {TypeError} When the value is not an array of strings and functions.
94
- */
95
- function assertIsArrayOfStringsAndFunctions(value) {
96
- assertIsArray(value);
97
-
98
- if (
99
- value.some(
100
- item => typeof item !== "string" && typeof item !== "function",
101
- )
102
- ) {
103
- throw new TypeError(
104
- "Expected array to only contain strings and functions.",
105
- );
106
- }
107
- }
108
-
109
- /**
110
- * Asserts that a given value is a non-empty array.
111
- * @param {*} value The value to check.
112
- * @returns {void}
113
- * @throws {TypeError} When the value is not an array or an empty array.
114
- */
115
- function assertIsNonEmptyArray(value) {
116
- if (!Array.isArray(value) || value.length === 0) {
117
- throw new TypeError("Expected value to be a non-empty array.");
118
- }
119
- }
120
-
121
- //------------------------------------------------------------------------------
122
- // Exports
123
- //------------------------------------------------------------------------------
124
-
125
- /**
126
- * The schema for `files` and `ignores` that every ConfigArray uses.
127
- * @type {ObjectDefinition}
128
- */
129
- const filesAndIgnoresSchema = Object.freeze({
130
- basePath: {
131
- required: false,
132
- merge() {
133
- return undefined;
134
- },
135
- validate(value) {
136
- if (typeof value !== "string") {
137
- throw new TypeError("Expected value to be a string.");
138
- }
139
- },
140
- },
141
- files: {
142
- required: false,
143
- merge() {
144
- return undefined;
145
- },
146
- validate(value) {
147
- // first check if it's an array
148
- assertIsNonEmptyArray(value);
149
-
150
- // then check each member
151
- value.forEach(item => {
152
- if (Array.isArray(item)) {
153
- assertIsArrayOfStringsAndFunctions(item);
154
- } else if (
155
- typeof item !== "string" &&
156
- typeof item !== "function"
157
- ) {
158
- throw new TypeError(
159
- "Items must be a string, a function, or an array of strings and functions.",
160
- );
161
- }
162
- });
163
- },
164
- },
165
- ignores: {
166
- required: false,
167
- merge() {
168
- return undefined;
169
- },
170
- validate: assertIsArrayOfStringsAndFunctions,
171
- },
172
- });
173
-
174
- /**
175
- * @fileoverview ConfigArray
176
- * @author Nicholas C. Zakas
177
- */
178
-
179
-
180
- //------------------------------------------------------------------------------
181
- // Types
182
- //------------------------------------------------------------------------------
183
-
184
- /** @import * as $typests from "./types.ts"; */
185
- /** @typedef {$typests.ConfigObject} ConfigObject */
186
- /** @import * as $minimatch from "minimatch"; */
187
- /** @typedef {$minimatch.MinimatchOptions} MinimatchOptions */
188
- /** @import * as PathImpl from "@jsr/std__path" */
189
-
190
- /*
191
- * This is a bit of a hack to make TypeScript happy with the Rollup-created
192
- * CommonJS file. Rollup doesn't do object destructuring for imported files
193
- * and instead imports the default via `require()`. This messes up type checking
194
- * for `ObjectSchema`. To work around that, we just import the type manually
195
- * and give it a different name to use in the JSDoc comments.
196
- */
197
- /** @typedef {ObjectSchema} ObjectSchemaInstance */
198
-
199
- //------------------------------------------------------------------------------
200
- // Helpers
201
- //------------------------------------------------------------------------------
202
-
203
- const debug = createDebug("@eslint/config-array");
204
-
205
- /**
206
- * A cache for minimatch instances.
207
- * @type {Map<string, Minimatch>}
208
- */
209
- const minimatchCache = new Map();
210
-
211
- /**
212
- * A cache for negated minimatch instances.
213
- * @type {Map<string, Minimatch>}
214
- */
215
- const negatedMinimatchCache = new Map();
216
-
217
- /**
218
- * Options to use with minimatch.
219
- * @type {MinimatchOptions}
220
- */
221
- const MINIMATCH_OPTIONS = {
222
- // matchBase: true,
223
- dot: true,
224
- };
225
-
226
- /**
227
- * The types of config objects that are supported.
228
- * @type {Set<string>}
229
- */
230
- const CONFIG_TYPES = new Set(["array", "function"]);
231
-
232
- /**
233
- * Fields that are considered metadata and not part of the config object.
234
- * @type {Set<string>}
235
- */
236
- const META_FIELDS = new Set(["name", "basePath"]);
237
-
238
- /**
239
- * A schema containing just files and ignores for early validation.
240
- * @type {ObjectSchemaInstance}
241
- */
242
- const FILES_AND_IGNORES_SCHEMA = new ObjectSchema(filesAndIgnoresSchema);
243
-
244
- // Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`.
245
-
246
- const CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: "external" });
247
- const CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: "ignored" });
248
- const CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({
249
- status: "unconfigured",
250
- });
251
-
252
- // Match two leading dots followed by a slash or the end of input.
253
- const EXTERNAL_PATH_REGEX = /^\.\.(?:\/|$)/u;
254
-
255
- /**
256
- * Wrapper error for config validation errors that adds a name to the front of the
257
- * error message.
258
- */
259
- class ConfigError extends Error {
260
- /**
261
- * Creates a new instance.
262
- * @param {string} name The config object name causing the error.
263
- * @param {number} index The index of the config object in the array.
264
- * @param {Object} options The options for the error.
265
- * @param {Error} [options.cause] The error that caused this error.
266
- * @param {string} [options.message] The message to use for the error.
267
- */
268
- constructor(name, index, { cause, message }) {
269
- const finalMessage = message || cause.message;
270
-
271
- super(`Config ${name}: ${finalMessage}`, { cause });
272
-
273
- // copy over custom properties that aren't represented
274
- if (cause) {
275
- for (const key of Object.keys(cause)) {
276
- if (!(key in this)) {
277
- this[key] = cause[key];
278
- }
279
- }
280
- }
281
-
282
- /**
283
- * The name of the error.
284
- * @type {string}
285
- * @readonly
286
- */
287
- this.name = "ConfigError";
288
-
289
- /**
290
- * The index of the config object in the array.
291
- * @type {number}
292
- * @readonly
293
- */
294
- this.index = index;
295
- }
296
- }
297
-
298
- /**
299
- * Gets the name of a config object.
300
- * @param {ConfigObject} config The config object to get the name of.
301
- * @returns {string} The name of the config object.
302
- */
303
- function getConfigName(config) {
304
- if (config && typeof config.name === "string" && config.name) {
305
- return `"${config.name}"`;
306
- }
307
-
308
- return "(unnamed)";
309
- }
310
-
311
- /**
312
- * Rethrows a config error with additional information about the config object.
313
- * @param {object} config The config object to get the name of.
314
- * @param {number} index The index of the config object in the array.
315
- * @param {Error} error The error to rethrow.
316
- * @throws {ConfigError} When the error is rethrown for a config.
317
- */
318
- function rethrowConfigError(config, index, error) {
319
- const configName = getConfigName(config);
320
- throw new ConfigError(configName, index, { cause: error });
321
- }
322
-
323
- /**
324
- * Shorthand for checking if a value is a string.
325
- * @param {any} value The value to check.
326
- * @returns {boolean} True if a string, false if not.
327
- */
328
- function isString(value) {
329
- return typeof value === "string";
330
- }
331
-
332
- /**
333
- * Creates a function that asserts that the config is valid
334
- * during normalization. This checks that the config is not nullish
335
- * and that files and ignores keys of a config object are valid as per base schema.
336
- * @param {Object} config The config object to check.
337
- * @param {number} index The index of the config object in the array.
338
- * @returns {void}
339
- * @throws {ConfigError} If the files and ignores keys of a config object are not valid.
340
- */
341
- function assertValidBaseConfig(config, index) {
342
- if (config === null) {
343
- throw new ConfigError(getConfigName(config), index, {
344
- message: "Unexpected null config.",
345
- });
346
- }
347
-
348
- if (config === undefined) {
349
- throw new ConfigError(getConfigName(config), index, {
350
- message: "Unexpected undefined config.",
351
- });
352
- }
353
-
354
- if (typeof config !== "object") {
355
- throw new ConfigError(getConfigName(config), index, {
356
- message: "Unexpected non-object config.",
357
- });
358
- }
359
-
360
- const validateConfig = {};
361
-
362
- if ("basePath" in config) {
363
- validateConfig.basePath = config.basePath;
364
- }
365
-
366
- if ("files" in config) {
367
- validateConfig.files = config.files;
368
- }
369
-
370
- if ("ignores" in config) {
371
- validateConfig.ignores = config.ignores;
372
- }
373
-
374
- try {
375
- FILES_AND_IGNORES_SCHEMA.validate(validateConfig);
376
- } catch (validationError) {
377
- rethrowConfigError(config, index, validationError);
378
- }
379
- }
380
-
381
- /**
382
- * Wrapper around minimatch that caches minimatch patterns for
383
- * faster matching speed over multiple file path evaluations.
384
- * @param {string} filepath The file path to match.
385
- * @param {string} pattern The glob pattern to match against.
386
- * @param {object} options The minimatch options to use.
387
- * @returns
388
- */
389
- function doMatch(filepath, pattern, options = {}) {
390
- let cache = minimatchCache;
391
-
392
- if (options.flipNegate) {
393
- cache = negatedMinimatchCache;
394
- }
395
-
396
- let matcher = cache.get(pattern);
397
-
398
- if (!matcher) {
399
- matcher = new Minimatch(
400
- pattern,
401
- Object.assign({}, MINIMATCH_OPTIONS, options),
402
- );
403
- cache.set(pattern, matcher);
404
- }
405
-
406
- return matcher.match(filepath);
407
- }
408
-
409
- /**
410
- * Normalizes a pattern by removing the leading "./" if present.
411
- * @param {string} pattern The pattern to normalize.
412
- * @returns {string} The normalized pattern.
413
- */
414
- function normalizePattern(pattern) {
415
- if (isString(pattern)) {
416
- if (pattern.startsWith("./")) {
417
- return pattern.slice(2);
418
- }
419
-
420
- if (pattern.startsWith("!./")) {
421
- return `!${pattern.slice(3)}`;
422
- }
423
- }
424
-
425
- return pattern;
426
- }
427
-
428
- /**
429
- * Checks if a given pattern requires normalization.
430
- * @param {any} pattern The pattern to check.
431
- * @returns {boolean} True if the pattern needs normalization, false otherwise.
432
- *
433
- */
434
- function needsPatternNormalization(pattern) {
435
- return (
436
- isString(pattern) &&
437
- (pattern.startsWith("./") || pattern.startsWith("!./"))
438
- );
439
- }
440
-
441
- /**
442
- * Normalizes `files` and `ignores` patterns in a config by removing "./" prefixes.
443
- * @param {Object} config The config object to normalize patterns in.
444
- * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative.
445
- * @param {PathImpl} path Path-handling implementation.
446
- * @returns {Object} The normalized config object.
447
- */
448
- function normalizeConfigPatterns(config, namespacedBasePath, path) {
449
- if (!config) {
450
- return config;
451
- }
452
-
453
- const hasBasePath = typeof config.basePath === "string";
454
-
455
- let needsNormalization = false;
456
-
457
- if (hasBasePath) {
458
- needsNormalization = true;
459
- }
460
-
461
- if (!needsNormalization && Array.isArray(config.files)) {
462
- needsNormalization = config.files.some(pattern => {
463
- if (Array.isArray(pattern)) {
464
- return pattern.some(needsPatternNormalization);
465
- }
466
- return needsPatternNormalization(pattern);
467
- });
468
- }
469
-
470
- if (!needsNormalization && Array.isArray(config.ignores)) {
471
- needsNormalization = config.ignores.some(needsPatternNormalization);
472
- }
473
-
474
- if (!needsNormalization) {
475
- return config;
476
- }
477
-
478
- const newConfig = { ...config };
479
-
480
- if (hasBasePath) {
481
- if (path.isAbsolute(config.basePath)) {
482
- newConfig.basePath = path.toNamespacedPath(config.basePath);
483
- } else {
484
- newConfig.basePath = path.resolve(
485
- namespacedBasePath,
486
- config.basePath,
487
- );
488
- }
489
- }
490
-
491
- if (Array.isArray(newConfig.files)) {
492
- newConfig.files = newConfig.files.map(pattern => {
493
- if (Array.isArray(pattern)) {
494
- return pattern.map(normalizePattern);
495
- }
496
- return normalizePattern(pattern);
497
- });
498
- }
499
-
500
- if (Array.isArray(newConfig.ignores)) {
501
- newConfig.ignores = newConfig.ignores.map(normalizePattern);
502
- }
503
-
504
- return newConfig;
505
- }
506
-
507
- /**
508
- * Normalizes a `ConfigArray` by flattening it and executing any functions
509
- * that are found inside.
510
- * @param {Array} items The items in a `ConfigArray`.
511
- * @param {Object} context The context object to pass into any function
512
- * found.
513
- * @param {Array<string>} extraConfigTypes The config types to check.
514
- * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative.
515
- * @param {PathImpl} path Path-handling implementation.
516
- * @returns {Promise<Array>} A flattened array containing only config objects.
517
- * @throws {TypeError} When a config function returns a function.
518
- */
519
- async function normalize(
520
- items,
521
- context,
522
- extraConfigTypes,
523
- namespacedBasePath,
524
- path,
525
- ) {
526
- const allowFunctions = extraConfigTypes.includes("function");
527
- const allowArrays = extraConfigTypes.includes("array");
528
-
529
- async function* flatTraverse(array) {
530
- for (let item of array) {
531
- if (typeof item === "function") {
532
- if (!allowFunctions) {
533
- throw new TypeError("Unexpected function.");
534
- }
535
-
536
- item = item(context);
537
- if (item.then) {
538
- item = await item;
539
- }
540
- }
541
-
542
- if (Array.isArray(item)) {
543
- if (!allowArrays) {
544
- throw new TypeError("Unexpected array.");
545
- }
546
- yield* flatTraverse(item);
547
- } else if (typeof item === "function") {
548
- throw new TypeError(
549
- "A config function can only return an object or array.",
550
- );
551
- } else {
552
- yield item;
553
- }
554
- }
555
- }
556
-
557
- /*
558
- * Async iterables cannot be used with the spread operator, so we need to manually
559
- * create the array to return.
560
- */
561
- const asyncIterable = await flatTraverse(items);
562
- const configs = [];
563
-
564
- for await (const config of asyncIterable) {
565
- configs.push(normalizeConfigPatterns(config, namespacedBasePath, path));
566
- }
567
-
568
- return configs;
569
- }
570
-
571
- /**
572
- * Normalizes a `ConfigArray` by flattening it and executing any functions
573
- * that are found inside.
574
- * @param {Array} items The items in a `ConfigArray`.
575
- * @param {Object} context The context object to pass into any function
576
- * found.
577
- * @param {Array<string>} extraConfigTypes The config types to check.
578
- * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative.
579
- * @param {PathImpl} path Path-handling implementation
580
- * @returns {Array} A flattened array containing only config objects.
581
- * @throws {TypeError} When a config function returns a function.
582
- */
583
- function normalizeSync(
584
- items,
585
- context,
586
- extraConfigTypes,
587
- namespacedBasePath,
588
- path,
589
- ) {
590
- const allowFunctions = extraConfigTypes.includes("function");
591
- const allowArrays = extraConfigTypes.includes("array");
592
-
593
- function* flatTraverse(array) {
594
- for (let item of array) {
595
- if (typeof item === "function") {
596
- if (!allowFunctions) {
597
- throw new TypeError("Unexpected function.");
598
- }
599
-
600
- item = item(context);
601
- if (item.then) {
602
- throw new TypeError(
603
- "Async config functions are not supported.",
604
- );
605
- }
606
- }
607
-
608
- if (Array.isArray(item)) {
609
- if (!allowArrays) {
610
- throw new TypeError("Unexpected array.");
611
- }
612
-
613
- yield* flatTraverse(item);
614
- } else if (typeof item === "function") {
615
- throw new TypeError(
616
- "A config function can only return an object or array.",
617
- );
618
- } else {
619
- yield item;
620
- }
621
- }
622
- }
623
-
624
- const configs = [];
625
-
626
- for (const config of flatTraverse(items)) {
627
- configs.push(normalizeConfigPatterns(config, namespacedBasePath, path));
628
- }
629
-
630
- return configs;
631
- }
632
-
633
- /**
634
- * Converts a given path to a relative path with all separator characters replaced by forward slashes (`"/"`).
635
- * @param {string} fileOrDirPath The unprocessed path to convert.
636
- * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative.
637
- * @param {PathImpl} path Path-handling implementations.
638
- * @returns {string} A relative path with all separator characters replaced by forward slashes.
639
- */
640
- function toRelativePath(fileOrDirPath, namespacedBasePath, path) {
641
- const fullPath = path.resolve(namespacedBasePath, fileOrDirPath);
642
- const namespacedFullPath = path.toNamespacedPath(fullPath);
643
- const relativePath = path.relative(namespacedBasePath, namespacedFullPath);
644
- return relativePath.replaceAll(path.SEPARATOR, "/");
645
- }
646
-
647
- /**
648
- * Determines if a given file path should be ignored based on the given
649
- * matcher.
650
- * @param {Array<{ basePath?: string, ignores: Array<string|((string) => boolean)>}>} configs Configuration objects containing `ignores`.
651
- * @param {string} filePath The unprocessed file path to check.
652
- * @param {string} relativeFilePath The path of the file to check relative to the base path,
653
- * using forward slash (`"/"`) as a separator.
654
- * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects
655
- * that have `basePath` property.
656
- * @param {string} [basePathData.basePath] Namespaced path to witch `relativeFilePath` is relative.
657
- * @param {PathImpl} [basePathData.path] Path-handling implementation.
658
- * @returns {boolean} True if the path should be ignored and false if not.
659
- */
660
- function shouldIgnorePath(
661
- configs,
662
- filePath,
663
- relativeFilePath,
664
- { basePath, path } = {},
665
- ) {
666
- let shouldIgnore = false;
667
-
668
- for (const config of configs) {
669
- let relativeFilePathToCheck = relativeFilePath;
670
- if (config.basePath) {
671
- relativeFilePathToCheck = toRelativePath(
672
- path.resolve(basePath, relativeFilePath),
673
- config.basePath,
674
- path,
675
- );
676
-
677
- if (
678
- relativeFilePathToCheck === "" ||
679
- EXTERNAL_PATH_REGEX.test(relativeFilePathToCheck)
680
- ) {
681
- continue;
682
- }
683
-
684
- if (relativeFilePath.endsWith("/")) {
685
- relativeFilePathToCheck += "/";
686
- }
687
- }
688
- shouldIgnore = config.ignores.reduce((ignored, matcher) => {
689
- if (!ignored) {
690
- if (typeof matcher === "function") {
691
- return matcher(filePath);
692
- }
693
-
694
- // don't check negated patterns because we're not ignored yet
695
- if (!matcher.startsWith("!")) {
696
- return doMatch(relativeFilePathToCheck, matcher);
697
- }
698
-
699
- // otherwise we're still not ignored
700
- return false;
701
- }
702
-
703
- // only need to check negated patterns because we're ignored
704
- if (typeof matcher === "string" && matcher.startsWith("!")) {
705
- return !doMatch(relativeFilePathToCheck, matcher, {
706
- flipNegate: true,
707
- });
708
- }
709
-
710
- return ignored;
711
- }, shouldIgnore);
712
- }
713
-
714
- return shouldIgnore;
715
- }
716
-
717
- /**
718
- * Determines if a given file path is matched by a config. If the config
719
- * has no `files` field, then it matches; otherwise, if a `files` field
720
- * is present then we match the globs in `files` and exclude any globs in
721
- * `ignores`.
722
- * @param {string} filePath The unprocessed file path to check.
723
- * @param {string} relativeFilePath The path of the file to check relative to the base path,
724
- * using forward slash (`"/"`) as a separator.
725
- * @param {Object} config The config object to check.
726
- * @returns {boolean} True if the file path is matched by the config,
727
- * false if not.
728
- */
729
- function pathMatches(filePath, relativeFilePath, config) {
730
- // match both strings and functions
731
- function match(pattern) {
732
- if (isString(pattern)) {
733
- return doMatch(relativeFilePath, pattern);
734
- }
735
-
736
- if (typeof pattern === "function") {
737
- return pattern(filePath);
738
- }
739
-
740
- throw new TypeError(`Unexpected matcher type ${pattern}.`);
741
- }
742
-
743
- // check for all matches to config.files
744
- let filePathMatchesPattern = config.files.some(pattern => {
745
- if (Array.isArray(pattern)) {
746
- return pattern.every(match);
747
- }
748
-
749
- return match(pattern);
750
- });
751
-
752
- /*
753
- * If the file path matches the config.files patterns, then check to see
754
- * if there are any files to ignore.
755
- */
756
- if (filePathMatchesPattern && config.ignores) {
757
- /*
758
- * Pass config object without `basePath`, because `relativeFilePath` is already
759
- * calculated as relative to it.
760
- */
761
- filePathMatchesPattern = !shouldIgnorePath(
762
- [{ ignores: config.ignores }],
763
- filePath,
764
- relativeFilePath,
765
- );
766
- }
767
-
768
- return filePathMatchesPattern;
769
- }
770
-
771
- /**
772
- * Ensures that a ConfigArray has been normalized.
773
- * @param {ConfigArray} configArray The ConfigArray to check.
774
- * @returns {void}
775
- * @throws {Error} When the `ConfigArray` is not normalized.
776
- */
777
- function assertNormalized(configArray) {
778
- // TODO: Throw more verbose error
779
- if (!configArray.isNormalized()) {
780
- throw new Error(
781
- "ConfigArray must be normalized to perform this operation.",
782
- );
783
- }
784
- }
785
-
786
- /**
787
- * Ensures that config types are valid.
788
- * @param {Array<string>} extraConfigTypes The config types to check.
789
- * @returns {void}
790
- * @throws {TypeError} When the config types array is invalid.
791
- */
792
- function assertExtraConfigTypes(extraConfigTypes) {
793
- if (extraConfigTypes.length > 2) {
794
- throw new TypeError(
795
- "configTypes must be an array with at most two items.",
796
- );
797
- }
798
-
799
- for (const configType of extraConfigTypes) {
800
- if (!CONFIG_TYPES.has(configType)) {
801
- throw new TypeError(
802
- `Unexpected config type "${configType}" found. Expected one of: "object", "array", "function".`,
803
- );
804
- }
805
- }
806
- }
807
-
808
- /**
809
- * Returns path-handling implementations for Unix or Windows, depending on a given absolute path.
810
- * @param {string} fileOrDirPath The absolute path to check.
811
- * @returns {PathImpl} Path-handling implementations for the specified path.
812
- * @throws {Error} An error is thrown if the specified argument is not an absolute path.
813
- */
814
- function getPathImpl(fileOrDirPath) {
815
- // Posix absolute paths always start with a slash.
816
- if (fileOrDirPath.startsWith("/")) {
817
- return posixPath;
818
- }
819
-
820
- // Windows absolute paths start with a letter followed by a colon and at least one backslash,
821
- // or with two backslashes in the case of UNC paths.
822
- // Forward slashed are automatically normalized to backslashes.
823
- if (/^(?:[A-Za-z]:[/\\]|[/\\]{2})/u.test(fileOrDirPath)) {
824
- return windowsPath;
825
- }
826
-
827
- throw new Error(
828
- `Expected an absolute path but received "${fileOrDirPath}"`,
829
- );
830
- }
831
-
832
- //------------------------------------------------------------------------------
833
- // Public Interface
834
- //------------------------------------------------------------------------------
835
-
836
- const ConfigArraySymbol = {
837
- isNormalized: Symbol("isNormalized"),
838
- configCache: Symbol("configCache"),
839
- schema: Symbol("schema"),
840
- finalizeConfig: Symbol("finalizeConfig"),
841
- preprocessConfig: Symbol("preprocessConfig"),
842
- };
843
-
844
- // used to store calculate data for faster lookup
845
- const dataCache = new WeakMap();
846
-
847
- /**
848
- * Represents an array of config objects and provides method for working with
849
- * those config objects.
850
- */
851
- class ConfigArray extends Array {
852
- /**
853
- * The namespaced path of the config file directory.
854
- * @type {string}
855
- */
856
- #namespacedBasePath;
857
-
858
- /**
859
- * Path-handling implementations.
860
- * @type {PathImpl}
861
- */
862
- #path;
863
-
864
- /**
865
- * Creates a new instance of ConfigArray.
866
- * @param {Iterable|Function|Object} configs An iterable yielding config
867
- * objects, or a config function, or a config object.
868
- * @param {Object} options The options for the ConfigArray.
869
- * @param {string} [options.basePath="/"] The absolute path of the config file directory.
870
- * Defaults to `"/"`.
871
- * @param {boolean} [options.normalized=false] Flag indicating if the
872
- * configs have already been normalized.
873
- * @param {Object} [options.schema] The additional schema
874
- * definitions to use for the ConfigArray schema.
875
- * @param {Array<string>} [options.extraConfigTypes] List of config types supported.
876
- * @throws {TypeError} When the `basePath` is not a non-empty string,
877
- */
878
- constructor(
879
- configs,
880
- {
881
- basePath = "/",
882
- normalized = false,
883
- schema: customSchema,
884
- extraConfigTypes = [],
885
- } = {},
886
- ) {
887
- super();
888
-
889
- /**
890
- * Tracks if the array has been normalized.
891
- * @property isNormalized
892
- * @type {boolean}
893
- * @private
894
- */
895
- this[ConfigArraySymbol.isNormalized] = normalized;
896
-
897
- /**
898
- * The schema used for validating and merging configs.
899
- * @property schema
900
- * @type {ObjectSchemaInstance}
901
- * @private
902
- */
903
- this[ConfigArraySymbol.schema] = new ObjectSchema(
904
- Object.assign({}, customSchema, baseSchema),
905
- );
906
-
907
- if (!isString(basePath) || !basePath) {
908
- throw new TypeError("basePath must be a non-empty string");
909
- }
910
-
911
- /**
912
- * The path of the config file that this array was loaded from.
913
- * This is used to calculate filename matches.
914
- * @property basePath
915
- * @type {string}
916
- */
917
- this.basePath = basePath;
918
-
919
- assertExtraConfigTypes(extraConfigTypes);
920
-
921
- /**
922
- * The supported config types.
923
- * @type {Array<string>}
924
- */
925
- this.extraConfigTypes = [...extraConfigTypes];
926
- Object.freeze(this.extraConfigTypes);
927
-
928
- /**
929
- * A cache to store calculated configs for faster repeat lookup.
930
- * @property configCache
931
- * @type {Map<string, Object>}
932
- * @private
933
- */
934
- this[ConfigArraySymbol.configCache] = new Map();
935
-
936
- // init cache
937
- dataCache.set(this, {
938
- explicitMatches: new Map(),
939
- directoryMatches: new Map(),
940
- files: undefined,
941
- ignores: undefined,
942
- });
943
-
944
- // load the configs into this array
945
- if (Array.isArray(configs)) {
946
- this.push(...configs);
947
- } else {
948
- this.push(configs);
949
- }
950
-
951
- // select path-handling implementations depending on the base path
952
- this.#path = getPathImpl(basePath);
953
-
954
- // On Windows, `path.relative()` returns an absolute path when given two paths on different drives.
955
- // The namespaced base path is useful to make sure that calculated relative paths are always relative.
956
- // On Unix, it is identical to the base path.
957
- this.#namespacedBasePath = this.#path.toNamespacedPath(basePath);
958
- }
959
-
960
- /**
961
- * Prevent normal array methods from creating a new `ConfigArray` instance.
962
- * This is to ensure that methods such as `slice()` won't try to create a
963
- * new instance of `ConfigArray` behind the scenes as doing so may throw
964
- * an error due to the different constructor signature.
965
- * @type {ArrayConstructor} The `Array` constructor.
966
- */
967
- static get [Symbol.species]() {
968
- return Array;
969
- }
970
-
971
- /**
972
- * Returns the `files` globs from every config object in the array.
973
- * This can be used to determine which files will be matched by a
974
- * config array or to use as a glob pattern when no patterns are provided
975
- * for a command line interface.
976
- * @returns {Array<string|Function>} An array of matchers.
977
- */
978
- get files() {
979
- assertNormalized(this);
980
-
981
- // if this data has been cached, retrieve it
982
- const cache = dataCache.get(this);
983
-
984
- if (cache.files) {
985
- return cache.files;
986
- }
987
-
988
- // otherwise calculate it
989
-
990
- const result = [];
991
-
992
- for (const config of this) {
993
- if (config.files) {
994
- config.files.forEach(filePattern => {
995
- result.push(filePattern);
996
- });
997
- }
998
- }
999
-
1000
- // store result
1001
- cache.files = result;
1002
- dataCache.set(this, cache);
1003
-
1004
- return result;
1005
- }
1006
-
1007
- /**
1008
- * Returns ignore matchers that should always be ignored regardless of
1009
- * the matching `files` fields in any configs. This is necessary to mimic
1010
- * the behavior of things like .gitignore and .eslintignore, allowing a
1011
- * globbing operation to be faster.
1012
- * @returns {Object[]} An array of config objects representing global ignores.
1013
- */
1014
- get ignores() {
1015
- assertNormalized(this);
1016
-
1017
- // if this data has been cached, retrieve it
1018
- const cache = dataCache.get(this);
1019
-
1020
- if (cache.ignores) {
1021
- return cache.ignores;
1022
- }
1023
-
1024
- // otherwise calculate it
1025
-
1026
- const result = [];
1027
-
1028
- for (const config of this) {
1029
- /*
1030
- * We only count ignores if there are no other keys in the object.
1031
- * In this case, it acts list a globally ignored pattern. If there
1032
- * are additional keys, then ignores act like exclusions.
1033
- */
1034
- if (
1035
- config.ignores &&
1036
- Object.keys(config).filter(key => !META_FIELDS.has(key))
1037
- .length === 1
1038
- ) {
1039
- result.push(config);
1040
- }
1041
- }
1042
-
1043
- // store result
1044
- cache.ignores = result;
1045
- dataCache.set(this, cache);
1046
-
1047
- return result;
1048
- }
1049
-
1050
- /**
1051
- * Indicates if the config array has been normalized.
1052
- * @returns {boolean} True if the config array is normalized, false if not.
1053
- */
1054
- isNormalized() {
1055
- return this[ConfigArraySymbol.isNormalized];
1056
- }
1057
-
1058
- /**
1059
- * Normalizes a config array by flattening embedded arrays and executing
1060
- * config functions.
1061
- * @param {Object} [context] The context object for config functions.
1062
- * @returns {Promise<ConfigArray>} The current ConfigArray instance.
1063
- */
1064
- async normalize(context = {}) {
1065
- if (!this.isNormalized()) {
1066
- const normalizedConfigs = await normalize(
1067
- this,
1068
- context,
1069
- this.extraConfigTypes,
1070
- this.#namespacedBasePath,
1071
- this.#path,
1072
- );
1073
- this.length = 0;
1074
- this.push(
1075
- ...normalizedConfigs.map(
1076
- this[ConfigArraySymbol.preprocessConfig].bind(this),
1077
- ),
1078
- );
1079
- this.forEach(assertValidBaseConfig);
1080
- this[ConfigArraySymbol.isNormalized] = true;
1081
-
1082
- // prevent further changes
1083
- Object.freeze(this);
1084
- }
1085
-
1086
- return this;
1087
- }
1088
-
1089
- /**
1090
- * Normalizes a config array by flattening embedded arrays and executing
1091
- * config functions.
1092
- * @param {Object} [context] The context object for config functions.
1093
- * @returns {ConfigArray} The current ConfigArray instance.
1094
- */
1095
- normalizeSync(context = {}) {
1096
- if (!this.isNormalized()) {
1097
- const normalizedConfigs = normalizeSync(
1098
- this,
1099
- context,
1100
- this.extraConfigTypes,
1101
- this.#namespacedBasePath,
1102
- this.#path,
1103
- );
1104
- this.length = 0;
1105
- this.push(
1106
- ...normalizedConfigs.map(
1107
- this[ConfigArraySymbol.preprocessConfig].bind(this),
1108
- ),
1109
- );
1110
- this.forEach(assertValidBaseConfig);
1111
- this[ConfigArraySymbol.isNormalized] = true;
1112
-
1113
- // prevent further changes
1114
- Object.freeze(this);
1115
- }
1116
-
1117
- return this;
1118
- }
1119
-
1120
- /* eslint-disable class-methods-use-this -- Desired as instance methods */
1121
-
1122
- /**
1123
- * Finalizes the state of a config before being cached and returned by
1124
- * `getConfig()`. Does nothing by default but is provided to be
1125
- * overridden by subclasses as necessary.
1126
- * @param {Object} config The config to finalize.
1127
- * @returns {Object} The finalized config.
1128
- */
1129
- // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.
1130
- [/** @type {never} */ (ConfigArraySymbol.finalizeConfig)](config) {
1131
- return config;
1132
- }
1133
-
1134
- /**
1135
- * Preprocesses a config during the normalization process. This is the
1136
- * method to override if you want to convert an array item before it is
1137
- * validated for the first time. For example, if you want to replace a
1138
- * string with an object, this is the method to override.
1139
- * @param {Object} config The config to preprocess.
1140
- * @returns {Object} The config to use in place of the argument.
1141
- */
1142
- // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.
1143
- [/** @type {never} */ (ConfigArraySymbol.preprocessConfig)](config) {
1144
- return config;
1145
- }
1146
-
1147
- /* eslint-enable class-methods-use-this -- Desired as instance methods */
1148
-
1149
- /**
1150
- * Returns the config object for a given file path and a status that can be used to determine why a file has no config.
1151
- * @param {string} filePath The path of a file to get a config for.
1152
- * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }}
1153
- * An object with an optional property `config` and property `status`.
1154
- * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig},
1155
- * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}.
1156
- */
1157
- getConfigWithStatus(filePath) {
1158
- assertNormalized(this);
1159
-
1160
- const cache = this[ConfigArraySymbol.configCache];
1161
-
1162
- // first check the cache for a filename match to avoid duplicate work
1163
- if (cache.has(filePath)) {
1164
- return cache.get(filePath);
1165
- }
1166
-
1167
- // check to see if the file is outside the base path
1168
-
1169
- const relativeToBaseFilePath = toRelativePath(
1170
- filePath,
1171
- this.#namespacedBasePath,
1172
- this.#path,
1173
- );
1174
-
1175
- if (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) {
1176
- debug(`No config for file ${filePath} outside of base path`);
1177
-
1178
- // cache and return result
1179
- cache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL);
1180
- return CONFIG_WITH_STATUS_EXTERNAL;
1181
- }
1182
-
1183
- // next check to see if the file should be ignored
1184
-
1185
- // check if this should be ignored due to its directory
1186
- if (this.isDirectoryIgnored(this.#path.dirname(filePath))) {
1187
- debug(`Ignoring ${filePath} based on directory pattern`);
1188
-
1189
- // cache and return result
1190
- cache.set(filePath, CONFIG_WITH_STATUS_IGNORED);
1191
- return CONFIG_WITH_STATUS_IGNORED;
1192
- }
1193
-
1194
- if (
1195
- shouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, {
1196
- basePath: this.#namespacedBasePath,
1197
- path: this.#path,
1198
- })
1199
- ) {
1200
- debug(`Ignoring ${filePath} based on file pattern`);
1201
-
1202
- // cache and return result
1203
- cache.set(filePath, CONFIG_WITH_STATUS_IGNORED);
1204
- return CONFIG_WITH_STATUS_IGNORED;
1205
- }
1206
-
1207
- // filePath isn't automatically ignored, so try to construct config
1208
-
1209
- const matchingConfigIndices = [];
1210
- let matchFound = false;
1211
- const universalPattern = /^\*$|^!|\/\*{1,2}$/u;
1212
-
1213
- this.forEach((config, index) => {
1214
- const relativeFilePath = config.basePath
1215
- ? toRelativePath(
1216
- this.#path.resolve(this.#namespacedBasePath, filePath),
1217
- config.basePath,
1218
- this.#path,
1219
- )
1220
- : relativeToBaseFilePath;
1221
-
1222
- if (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) {
1223
- debug(
1224
- `Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`,
1225
- );
1226
- return;
1227
- }
1228
-
1229
- if (!config.files) {
1230
- if (!config.ignores) {
1231
- debug(`Universal config found for ${filePath}`);
1232
- matchingConfigIndices.push(index);
1233
- return;
1234
- }
1235
-
1236
- if (
1237
- Object.keys(config).filter(key => !META_FIELDS.has(key))
1238
- .length === 1
1239
- ) {
1240
- debug(
1241
- `Skipped config found for ${filePath} (global ignores)`,
1242
- );
1243
- return;
1244
- }
1245
-
1246
- /*
1247
- * Pass config object without `basePath`, because `relativeFilePath` is already
1248
- * calculated as relative to it.
1249
- */
1250
- if (
1251
- shouldIgnorePath(
1252
- [{ ignores: config.ignores }],
1253
- filePath,
1254
- relativeFilePath,
1255
- )
1256
- ) {
1257
- debug(
1258
- `Skipped config found for ${filePath} (based on ignores: ${config.ignores})`,
1259
- );
1260
- return;
1261
- }
1262
-
1263
- debug(
1264
- `Matching config found for ${filePath} (based on ignores: ${config.ignores})`,
1265
- );
1266
- matchingConfigIndices.push(index);
1267
- return;
1268
- }
1269
-
1270
- /*
1271
- * If a config has a files pattern * or patterns ending in /** or /*,
1272
- * and the filePath only matches those patterns, then the config is only
1273
- * applied if there is another config where the filePath matches
1274
- * a file with a specific extensions such as *.js.
1275
- */
1276
-
1277
- const nonUniversalFiles = [];
1278
- const universalFiles = config.files.filter(element => {
1279
- if (Array.isArray(element)) {
1280
- /*
1281
- * filePath matches an element that is an array only if it matches
1282
- * all patterns in it (AND operation). Therefore, if there is at least
1283
- * one non-universal pattern in the array, and filePath matches the array,
1284
- * then we know for sure that filePath matches at least one non-universal
1285
- * pattern, so we can consider the entire array to be non-universal.
1286
- * In other words, all patterns in the array need to be universal
1287
- * for it to be considered universal.
1288
- */
1289
- if (
1290
- element.every(pattern => universalPattern.test(pattern))
1291
- ) {
1292
- return true;
1293
- }
1294
-
1295
- nonUniversalFiles.push(element);
1296
- return false;
1297
- }
1298
-
1299
- // element is a string
1300
-
1301
- if (universalPattern.test(element)) {
1302
- return true;
1303
- }
1304
-
1305
- nonUniversalFiles.push(element);
1306
- return false;
1307
- });
1308
-
1309
- // universal patterns were found so we need to check the config twice
1310
- if (universalFiles.length) {
1311
- debug("Universal files patterns found. Checking carefully.");
1312
-
1313
- // check that the config matches without the non-universal files first
1314
- if (
1315
- nonUniversalFiles.length &&
1316
- pathMatches(filePath, relativeFilePath, {
1317
- files: nonUniversalFiles,
1318
- ignores: config.ignores,
1319
- })
1320
- ) {
1321
- debug(`Matching config found for ${filePath}`);
1322
- matchingConfigIndices.push(index);
1323
- matchFound = true;
1324
- return;
1325
- }
1326
-
1327
- // if there wasn't a match then check if it matches with universal files
1328
- if (
1329
- universalFiles.length &&
1330
- pathMatches(filePath, relativeFilePath, {
1331
- files: universalFiles,
1332
- ignores: config.ignores,
1333
- })
1334
- ) {
1335
- debug(`Matching config found for ${filePath}`);
1336
- matchingConfigIndices.push(index);
1337
- return;
1338
- }
1339
-
1340
- // if we make here, then there was no match
1341
- return;
1342
- }
1343
-
1344
- // the normal case
1345
- if (pathMatches(filePath, relativeFilePath, config)) {
1346
- debug(`Matching config found for ${filePath}`);
1347
- matchingConfigIndices.push(index);
1348
- matchFound = true;
1349
- }
1350
- });
1351
-
1352
- // if matching both files and ignores, there will be no config to create
1353
- if (!matchFound) {
1354
- debug(`No matching configs found for ${filePath}`);
1355
-
1356
- // cache and return result
1357
- cache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED);
1358
- return CONFIG_WITH_STATUS_UNCONFIGURED;
1359
- }
1360
-
1361
- // check to see if there is a config cached by indices
1362
- const indicesKey = matchingConfigIndices.toString();
1363
- let configWithStatus = cache.get(indicesKey);
1364
-
1365
- if (configWithStatus) {
1366
- // also store for filename for faster lookup next time
1367
- cache.set(filePath, configWithStatus);
1368
-
1369
- return configWithStatus;
1370
- }
1371
-
1372
- // otherwise construct the config
1373
-
1374
- // eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error
1375
- let finalConfig = matchingConfigIndices.reduce((result, index) => {
1376
- try {
1377
- return this[ConfigArraySymbol.schema].merge(
1378
- result,
1379
- this[index],
1380
- );
1381
- } catch (validationError) {
1382
- rethrowConfigError(this[index], index, validationError);
1383
- }
1384
- }, {});
1385
-
1386
- finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig);
1387
-
1388
- configWithStatus = Object.freeze({
1389
- config: finalConfig,
1390
- status: "matched",
1391
- });
1392
- cache.set(filePath, configWithStatus);
1393
- cache.set(indicesKey, configWithStatus);
1394
-
1395
- return configWithStatus;
1396
- }
1397
-
1398
- /**
1399
- * Returns the config object for a given file path.
1400
- * @param {string} filePath The path of a file to get a config for.
1401
- * @returns {Object|undefined} The config object for this file or `undefined`.
1402
- */
1403
- getConfig(filePath) {
1404
- return this.getConfigWithStatus(filePath).config;
1405
- }
1406
-
1407
- /**
1408
- * Determines whether a file has a config or why it doesn't.
1409
- * @param {string} filePath The path of the file to check.
1410
- * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values:
1411
- * * `"ignored"`: the file is ignored
1412
- * * `"external"`: the file is outside the base path
1413
- * * `"unconfigured"`: the file is not matched by any config
1414
- * * `"matched"`: the file has a matching config
1415
- */
1416
- getConfigStatus(filePath) {
1417
- return this.getConfigWithStatus(filePath).status;
1418
- }
1419
-
1420
- /**
1421
- * Determines if the given filepath is ignored based on the configs.
1422
- * @param {string} filePath The path of a file to check.
1423
- * @returns {boolean} True if the path is ignored, false if not.
1424
- * @deprecated Use `isFileIgnored` instead.
1425
- */
1426
- isIgnored(filePath) {
1427
- return this.isFileIgnored(filePath);
1428
- }
1429
-
1430
- /**
1431
- * Determines if the given filepath is ignored based on the configs.
1432
- * @param {string} filePath The path of a file to check.
1433
- * @returns {boolean} True if the path is ignored, false if not.
1434
- */
1435
- isFileIgnored(filePath) {
1436
- return this.getConfigStatus(filePath) === "ignored";
1437
- }
1438
-
1439
- /**
1440
- * Determines if the given directory is ignored based on the configs.
1441
- * This checks only default `ignores` that don't have `files` in the
1442
- * same config. A pattern such as `/foo` be considered to ignore the directory
1443
- * while a pattern such as `/foo/**` is not considered to ignore the
1444
- * directory because it is matching files.
1445
- * @param {string} directoryPath The path of a directory to check.
1446
- * @returns {boolean} True if the directory is ignored, false if not. Will
1447
- * return true for any directory that is not inside of `basePath`.
1448
- * @throws {Error} When the `ConfigArray` is not normalized.
1449
- */
1450
- isDirectoryIgnored(directoryPath) {
1451
- assertNormalized(this);
1452
-
1453
- const relativeDirectoryPath = toRelativePath(
1454
- directoryPath,
1455
- this.#namespacedBasePath,
1456
- this.#path,
1457
- );
1458
-
1459
- // basePath directory can never be ignored
1460
- if (relativeDirectoryPath === "") {
1461
- return false;
1462
- }
1463
-
1464
- if (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) {
1465
- return true;
1466
- }
1467
-
1468
- // first check the cache
1469
- const cache = dataCache.get(this).directoryMatches;
1470
-
1471
- if (cache.has(relativeDirectoryPath)) {
1472
- return cache.get(relativeDirectoryPath);
1473
- }
1474
-
1475
- const directoryParts = relativeDirectoryPath.split("/");
1476
- let relativeDirectoryToCheck = "";
1477
- let result;
1478
-
1479
- /*
1480
- * In order to get the correct gitignore-style ignores, where an
1481
- * ignored parent directory cannot have any descendants unignored,
1482
- * we need to check every directory starting at the parent all
1483
- * the way down to the actual requested directory.
1484
- *
1485
- * We aggressively cache all of this info to make sure we don't
1486
- * have to recalculate everything for every call.
1487
- */
1488
- do {
1489
- relativeDirectoryToCheck += `${directoryParts.shift()}/`;
1490
-
1491
- result = shouldIgnorePath(
1492
- this.ignores,
1493
- this.#path.join(this.basePath, relativeDirectoryToCheck),
1494
- relativeDirectoryToCheck,
1495
- {
1496
- basePath: this.#namespacedBasePath,
1497
- path: this.#path,
1498
- },
1499
- );
1500
-
1501
- cache.set(relativeDirectoryToCheck, result);
1502
- } while (!result && directoryParts.length);
1503
-
1504
- // also cache the result for the requested path
1505
- cache.set(relativeDirectoryPath, result);
1506
-
1507
- return result;
1508
- }
1509
- }
1510
-
1511
- export { ConfigArray, ConfigArraySymbol };