repoburg 1.3.98 → 1.3.100

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 (1234) hide show
  1. package/backend/.env +3 -1
  2. package/backend/dist/src/application-state/application-state.controller.d.ts +6 -0
  3. package/backend/dist/src/application-state/application-state.controller.js +26 -0
  4. package/backend/dist/src/application-state/application-state.controller.js.map +1 -1
  5. package/backend/dist/src/application-state/application-state.service.d.ts +3 -0
  6. package/backend/dist/src/application-state/application-state.service.js +15 -0
  7. package/backend/dist/src/application-state/application-state.service.js.map +1 -1
  8. package/backend/dist/src/application-state/dto/set-ollama-config.dto.d.ts +3 -0
  9. package/backend/dist/src/application-state/dto/set-ollama-config.dto.js +23 -0
  10. package/backend/dist/src/application-state/dto/set-ollama-config.dto.js.map +1 -0
  11. package/backend/dist/src/core-entities/llm-call-log.entity.d.ts +1 -1
  12. package/backend/dist/src/core-entities/llm-call-log.entity.js +1 -1
  13. package/backend/dist/src/core-entities/llm-call-log.entity.js.map +1 -1
  14. package/backend/dist/src/global-config/dto/update-global-config.dto.d.ts +1 -0
  15. package/backend/dist/src/global-config/dto/update-global-config.dto.js +5 -0
  16. package/backend/dist/src/global-config/dto/update-global-config.dto.js.map +1 -1
  17. package/backend/dist/src/global-config/global-config.service.d.ts +1 -0
  18. package/backend/dist/src/global-config/global-config.service.js.map +1 -1
  19. package/backend/dist/src/interactive-chat/chat.service.js +19 -4
  20. package/backend/dist/src/interactive-chat/chat.service.js.map +1 -1
  21. package/backend/dist/src/llm-call-logs/dto/llm-call-log.dto.d.ts +1 -1
  22. package/backend/dist/src/llm-call-logs/dto/llm-call-log.dto.js +1 -1
  23. package/backend/dist/src/llm-call-logs/dto/llm-call-log.dto.js.map +1 -1
  24. package/backend/dist/src/llm-provider/llm-provider.interface.d.ts +1 -1
  25. package/backend/dist/src/llm-provider/llm-provider.module.js +2 -0
  26. package/backend/dist/src/llm-provider/llm-provider.module.js.map +1 -1
  27. package/backend/dist/src/llm-provider/ollama-llm.provider.d.ts +18 -0
  28. package/backend/dist/src/llm-provider/ollama-llm.provider.js +444 -0
  29. package/backend/dist/src/llm-provider/ollama-llm.provider.js.map +1 -0
  30. package/backend/dist/src/llm-provider/proxy-llm.provider.d.ts +3 -1
  31. package/backend/dist/src/llm-provider/proxy-llm.provider.js +10 -2
  32. package/backend/dist/src/llm-provider/proxy-llm.provider.js.map +1 -1
  33. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  34. package/backend/package.json +2 -2
  35. package/package.json +4 -2
  36. package/visual-editor-proxy/dist/tsconfig.tsbuildinfo +1 -1
  37. package/backend/node_modules/@eslint/eslintrc/LICENSE +0 -19
  38. package/backend/node_modules/@eslint/eslintrc/README.md +0 -115
  39. package/backend/node_modules/@eslint/eslintrc/conf/config-schema.js +0 -79
  40. package/backend/node_modules/@eslint/eslintrc/conf/environments.js +0 -215
  41. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +0 -1104
  42. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +0 -1
  43. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +0 -4344
  44. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +0 -1
  45. package/backend/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +0 -532
  46. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +0 -523
  47. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +0 -124
  48. package/backend/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +0 -145
  49. package/backend/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +0 -238
  50. package/backend/node_modules/@eslint/eslintrc/lib/config-array/index.js +0 -19
  51. package/backend/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +0 -225
  52. package/backend/node_modules/@eslint/eslintrc/lib/config-array-factory.js +0 -1151
  53. package/backend/node_modules/@eslint/eslintrc/lib/flat-compat.js +0 -318
  54. package/backend/node_modules/@eslint/eslintrc/lib/index-universal.js +0 -29
  55. package/backend/node_modules/@eslint/eslintrc/lib/index.js +0 -56
  56. package/backend/node_modules/@eslint/eslintrc/lib/shared/ajv.js +0 -191
  57. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +0 -135
  58. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +0 -325
  59. package/backend/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +0 -63
  60. package/backend/node_modules/@eslint/eslintrc/lib/shared/naming.js +0 -96
  61. package/backend/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +0 -42
  62. package/backend/node_modules/@eslint/eslintrc/lib/shared/types.js +0 -149
  63. package/backend/node_modules/@eslint/eslintrc/package.json +0 -82
  64. package/backend/node_modules/@eslint/eslintrc/universal.js +0 -9
  65. package/backend/node_modules/@typescript-eslint/eslint-plugin/LICENSE +0 -21
  66. package/backend/node_modules/@typescript-eslint/eslint-plugin/README.md +0 -12
  67. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +0 -156
  68. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +0 -1
  69. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js +0 -13
  70. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js.map +0 -1
  71. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/disable-type-checked.js +0 -64
  72. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/disable-type-checked.js.map +0 -1
  73. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js +0 -31
  74. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map +0 -1
  75. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-type-checked.js +0 -54
  76. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-type-checked.js.map +0 -1
  77. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js +0 -33
  78. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js.map +0 -1
  79. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict-type-checked.js +0 -79
  80. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict-type-checked.js.map +0 -1
  81. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +0 -43
  82. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +0 -1
  83. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/stylistic-type-checked.js +0 -35
  84. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/stylistic-type-checked.js.map +0 -1
  85. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/stylistic.js +0 -29
  86. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/configs/stylistic.js.map +0 -1
  87. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0 -39
  88. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map +0 -1
  89. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +0 -140
  90. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map +0 -1
  91. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +0 -222
  92. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +0 -1
  93. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js +0 -76
  94. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map +0 -1
  95. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +0 -156
  96. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +0 -1
  97. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js +0 -56
  98. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js.map +0 -1
  99. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +0 -240
  100. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +0 -1
  101. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js +0 -140
  102. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js.map +0 -1
  103. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js +0 -99
  104. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map +0 -1
  105. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js +0 -123
  106. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js.map +0 -1
  107. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js +0 -211
  108. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-methods-use-this.js.map +0 -1
  109. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js +0 -166
  110. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js.map +0 -1
  111. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js +0 -152
  112. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map +0 -1
  113. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +0 -109
  114. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +0 -1
  115. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +0 -128
  116. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js.map +0 -1
  117. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +0 -222
  118. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map +0 -1
  119. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js +0 -98
  120. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map +0 -1
  121. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js +0 -245
  122. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js.map +0 -1
  123. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +0 -635
  124. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map +0 -1
  125. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js +0 -63
  126. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js.map +0 -1
  127. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js +0 -120
  128. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js.map +0 -1
  129. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js +0 -112
  130. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js.map +0 -1
  131. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +0 -164
  132. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +0 -1
  133. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +0 -283
  134. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map +0 -1
  135. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +0 -366
  136. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map +0 -1
  137. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js +0 -147
  138. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map +0 -1
  139. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js +0 -415
  140. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map +0 -1
  141. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +0 -288
  142. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +0 -1
  143. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js +0 -48
  144. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js.map +0 -1
  145. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js +0 -322
  146. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js.map +0 -1
  147. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js +0 -95
  148. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map +0 -1
  149. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js +0 -357
  150. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js.map +0 -1
  151. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js +0 -57
  152. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js.map +0 -1
  153. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js +0 -67
  154. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/max-params.js.map +0 -1
  155. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js +0 -258
  156. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map +0 -1
  157. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +0 -747
  158. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +0 -1
  159. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +0 -181
  160. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js.map +0 -1
  161. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +0 -101
  162. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js.map +0 -1
  163. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js +0 -91
  164. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/format.js.map +0 -1
  165. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js +0 -12
  166. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/index.js.map +0 -1
  167. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js +0 -75
  168. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/parse-options.js.map +0 -1
  169. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +0 -291
  170. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js.map +0 -1
  171. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js +0 -18
  172. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/shared.js.map +0 -1
  173. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js +0 -3
  174. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/types.js.map +0 -1
  175. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js +0 -351
  176. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js.map +0 -1
  177. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +0 -488
  178. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map +0 -1
  179. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js +0 -53
  180. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js.map +0 -1
  181. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js +0 -83
  182. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-delete.js.map +0 -1
  183. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +0 -164
  184. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map +0 -1
  185. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js +0 -78
  186. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js.map +0 -1
  187. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +0 -293
  188. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js.map +0 -1
  189. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js +0 -51
  190. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js.map +0 -1
  191. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js +0 -62
  192. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js.map +0 -1
  193. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js +0 -139
  194. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js.map +0 -1
  195. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js +0 -95
  196. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map +0 -1
  197. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js +0 -132
  198. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map +0 -1
  199. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +0 -94
  200. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +0 -1
  201. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +0 -170
  202. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +0 -1
  203. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js +0 -36
  204. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js.map +0 -1
  205. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js +0 -297
  206. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map +0 -1
  207. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js +0 -43
  208. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js.map +0 -1
  209. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +0 -112
  210. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map +0 -1
  211. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +0 -342
  212. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +0 -1
  213. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js +0 -60
  214. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js.map +0 -1
  215. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js +0 -160
  216. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map +0 -1
  217. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js +0 -56
  218. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js.map +0 -1
  219. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +0 -185
  220. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +0 -1
  221. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js +0 -76
  222. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js.map +0 -1
  223. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js +0 -182
  224. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map +0 -1
  225. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js +0 -169
  226. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js.map +0 -1
  227. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js +0 -39
  228. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map +0 -1
  229. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js +0 -213
  230. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js.map +0 -1
  231. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +0 -96
  232. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js.map +0 -1
  233. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js +0 -82
  234. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js.map +0 -1
  235. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +0 -523
  236. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map +0 -1
  237. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js +0 -193
  238. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js.map +0 -1
  239. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +0 -63
  240. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map +0 -1
  241. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +0 -76
  242. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js.map +0 -1
  243. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js +0 -66
  244. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map +0 -1
  245. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +0 -104
  246. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map +0 -1
  247. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js +0 -201
  248. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js.map +0 -1
  249. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js +0 -372
  250. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js.map +0 -1
  251. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js +0 -90
  252. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map +0 -1
  253. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js +0 -237
  254. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js.map +0 -1
  255. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +0 -482
  256. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +0 -1
  257. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +0 -65
  258. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map +0 -1
  259. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js +0 -96
  260. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js.map +0 -1
  261. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +0 -260
  262. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map +0 -1
  263. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +0 -234
  264. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +0 -1
  265. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +0 -540
  266. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +0 -1
  267. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +0 -149
  268. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map +0 -1
  269. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js +0 -150
  270. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js.map +0 -1
  271. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +0 -252
  272. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map +0 -1
  273. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +0 -112
  274. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js.map +0 -1
  275. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +0 -226
  276. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +0 -1
  277. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js +0 -282
  278. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js.map +0 -1
  279. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js +0 -83
  280. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js.map +0 -1
  281. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js +0 -56
  282. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-declaration-merging.js.map +0 -1
  283. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js +0 -168
  284. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js.map +0 -1
  285. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js +0 -123
  286. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js.map +0 -1
  287. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js +0 -161
  288. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map +0 -1
  289. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js +0 -68
  290. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-unary-minus.js.map +0 -1
  291. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js +0 -58
  292. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js.map +0 -1
  293. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +0 -490
  294. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +0 -1
  295. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +0 -297
  296. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +0 -1
  297. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +0 -59
  298. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map +0 -1
  299. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +0 -72
  300. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js.map +0 -1
  301. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-template-literals.js +0 -138
  302. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-template-literals.js.map +0 -1
  303. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js +0 -67
  304. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map +0 -1
  305. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +0 -125
  306. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js.map +0 -1
  307. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +0 -226
  308. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +0 -1
  309. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +0 -634
  310. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +0 -1
  311. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js +0 -171
  312. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js.map +0 -1
  313. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +0 -73
  314. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map +0 -1
  315. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js +0 -200
  316. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-destructuring.js.map +0 -1
  317. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +0 -65
  318. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map +0 -1
  319. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js +0 -235
  320. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-find.js.map +0 -1
  321. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +0 -156
  322. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map +0 -1
  323. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +0 -186
  324. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map +0 -1
  325. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +0 -231
  326. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map +0 -1
  327. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js +0 -72
  328. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js.map +0 -1
  329. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js +0 -46
  330. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map +0 -1
  331. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +0 -348
  332. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +0 -1
  333. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js +0 -3
  334. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/PreferOptionalChainOptions.js.map +0 -1
  335. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js +0 -417
  336. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/analyzeChain.js.map +0 -1
  337. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js +0 -318
  338. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/compareNodes.js.map +0 -1
  339. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js +0 -279
  340. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain-utils/gatherLogicalOperands.js.map +0 -1
  341. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +0 -175
  342. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +0 -1
  343. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js +0 -107
  344. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-promise-reject-errors.js.map +0 -1
  345. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js +0 -82
  346. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js.map +0 -1
  347. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +0 -315
  348. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map +0 -1
  349. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js +0 -74
  350. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js.map +0 -1
  351. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +0 -159
  352. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map +0 -1
  353. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js +0 -137
  354. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-return-this-type.js.map +0 -1
  355. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +0 -508
  356. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map +0 -1
  357. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js +0 -62
  358. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js.map +0 -1
  359. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +0 -182
  360. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +0 -1
  361. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js +0 -63
  362. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js.map +0 -1
  363. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +0 -62
  364. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +0 -1
  365. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +0 -212
  366. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map +0 -1
  367. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +0 -211
  368. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map +0 -1
  369. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +0 -145
  370. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +0 -1
  371. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js +0 -268
  372. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map +0 -1
  373. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js +0 -64
  374. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js.map +0 -1
  375. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js +0 -228
  376. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js.map +0 -1
  377. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js +0 -80
  378. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js.map +0 -1
  379. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js +0 -143
  380. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map +0 -1
  381. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js +0 -133
  382. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js.map +0 -1
  383. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +0 -800
  384. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map +0 -1
  385. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +0 -242
  386. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +0 -1
  387. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +0 -110
  388. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map +0 -1
  389. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js +0 -228
  390. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js.map +0 -1
  391. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +0 -200
  392. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map +0 -1
  393. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +0 -245
  394. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +0 -1
  395. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +0 -398
  396. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +0 -1
  397. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js +0 -89
  398. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js.map +0 -1
  399. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js +0 -562
  400. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js.map +0 -1
  401. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js +0 -6
  402. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js.map +0 -1
  403. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js +0 -16
  404. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/escapeRegExp.js.map +0 -1
  405. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js +0 -241
  406. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js.map +0 -1
  407. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js +0 -45
  408. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js.map +0 -1
  409. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js +0 -163
  410. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getFunctionHeadLoc.js.map +0 -1
  411. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js +0 -418
  412. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js.map +0 -1
  413. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js +0 -46
  414. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStaticStringValue.js.map +0 -1
  415. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js +0 -20
  416. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js.map +0 -1
  417. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js +0 -26
  418. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getThisExpression.js.map +0 -1
  419. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js +0 -8
  420. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js.map +0 -1
  421. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +0 -155
  422. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map +0 -1
  423. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +0 -42
  424. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +0 -1
  425. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +0 -27
  426. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js.map +0 -1
  427. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +0 -9
  428. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +0 -1
  429. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +0 -9
  430. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js.map +0 -1
  431. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +0 -189
  432. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map +0 -1
  433. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js +0 -27
  434. package/backend/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js.map +0 -1
  435. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +0 -60
  436. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/TEMPLATE.md +0 -30
  437. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +0 -99
  438. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +0 -111
  439. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +0 -42
  440. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +0 -151
  441. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +0 -39
  442. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +0 -132
  443. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.md +0 -10
  444. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +0 -10
  445. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +0 -13
  446. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +0 -105
  447. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-methods-use-this.md +0 -96
  448. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +0 -20
  449. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +0 -10
  450. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +0 -76
  451. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +0 -80
  452. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +0 -113
  453. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +0 -81
  454. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +0 -105
  455. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +0 -108
  456. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +0 -58
  457. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +0 -82
  458. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +0 -320
  459. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +0 -344
  460. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +0 -249
  461. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +0 -10
  462. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +0 -18
  463. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +0 -10
  464. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.md +0 -10
  465. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +0 -10
  466. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.md +0 -25
  467. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +0 -55
  468. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/max-params.md +0 -10
  469. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +0 -164
  470. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +0 -1438
  471. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +0 -113
  472. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +0 -721
  473. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +0 -29
  474. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-delete.md +0 -40
  475. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +0 -88
  476. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +0 -56
  477. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +0 -116
  478. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +0 -14
  479. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +0 -58
  480. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +0 -13
  481. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.md +0 -66
  482. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +0 -53
  483. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +0 -92
  484. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +0 -59
  485. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +0 -168
  486. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +0 -54
  487. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +0 -10
  488. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +0 -12
  489. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +0 -295
  490. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +0 -124
  491. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +0 -61
  492. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +0 -102
  493. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.md +0 -74
  494. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +0 -103
  495. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +0 -14
  496. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +0 -112
  497. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +0 -10
  498. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +0 -10
  499. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +0 -119
  500. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +0 -53
  501. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +0 -47
  502. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +0 -246
  503. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.md +0 -88
  504. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +0 -131
  505. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +0 -54
  506. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +0 -40
  507. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +0 -42
  508. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +0 -12
  509. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +0 -75
  510. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +0 -92
  511. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +0 -60
  512. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +0 -71
  513. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +0 -105
  514. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +0 -108
  515. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +0 -109
  516. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +0 -623
  517. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +0 -133
  518. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +0 -119
  519. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +0 -51
  520. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +0 -79
  521. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +0 -77
  522. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +0 -55
  523. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +0 -93
  524. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +0 -96
  525. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +0 -68
  526. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md +0 -59
  527. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md +0 -82
  528. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +0 -74
  529. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +0 -113
  530. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-unary-minus.md +0 -52
  531. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +0 -10
  532. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +0 -27
  533. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +0 -87
  534. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +0 -19
  535. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +0 -47
  536. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-template-literals.md +0 -57
  537. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +0 -60
  538. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +0 -41
  539. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +0 -10
  540. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +0 -33
  541. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +0 -488
  542. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +0 -47
  543. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-destructuring.md +0 -91
  544. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +0 -62
  545. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-find.md +0 -39
  546. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +0 -44
  547. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +0 -92
  548. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +0 -75
  549. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +0 -103
  550. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +0 -47
  551. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +0 -187
  552. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +0 -263
  553. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-promise-reject-errors.md +0 -50
  554. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +0 -389
  555. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +0 -102
  556. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +0 -60
  557. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +0 -46
  558. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +0 -87
  559. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +0 -58
  560. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +0 -70
  561. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +0 -132
  562. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +0 -10
  563. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +0 -78
  564. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +0 -22
  565. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +0 -208
  566. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +0 -121
  567. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +0 -216
  568. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +0 -12
  569. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-constituents.md +0 -163
  570. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +0 -43
  571. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +0 -10
  572. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +0 -16
  573. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +0 -190
  574. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +0 -225
  575. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +0 -110
  576. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +0 -317
  577. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +0 -320
  578. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +0 -105
  579. package/backend/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +0 -77
  580. package/backend/node_modules/@typescript-eslint/eslint-plugin/index.d.ts +0 -9
  581. package/backend/node_modules/@typescript-eslint/eslint-plugin/package.json +0 -106
  582. package/backend/node_modules/@typescript-eslint/eslint-plugin/rules.d.ts +0 -45
  583. package/backend/node_modules/@typescript-eslint/parser/LICENSE +0 -22
  584. package/backend/node_modules/@typescript-eslint/parser/README.md +0 -12
  585. package/backend/node_modules/@typescript-eslint/parser/dist/index.d.ts +0 -8
  586. package/backend/node_modules/@typescript-eslint/parser/dist/index.d.ts.map +0 -1
  587. package/backend/node_modules/@typescript-eslint/parser/dist/index.js +0 -17
  588. package/backend/node_modules/@typescript-eslint/parser/dist/index.js.map +0 -1
  589. package/backend/node_modules/@typescript-eslint/parser/dist/parser.d.ts +0 -20
  590. package/backend/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +0 -1
  591. package/backend/node_modules/@typescript-eslint/parser/dist/parser.js +0 -130
  592. package/backend/node_modules/@typescript-eslint/parser/dist/parser.js.map +0 -1
  593. package/backend/node_modules/@typescript-eslint/parser/package.json +0 -85
  594. package/backend/node_modules/@typescript-eslint/type-utils/LICENSE +0 -21
  595. package/backend/node_modules/@typescript-eslint/type-utils/README.md +0 -14
  596. package/backend/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts +0 -21
  597. package/backend/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.d.ts.map +0 -1
  598. package/backend/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js +0 -188
  599. package/backend/node_modules/@typescript-eslint/type-utils/dist/TypeOrValueSpecifier.js.map +0 -1
  600. package/backend/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts +0 -39
  601. package/backend/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.d.ts.map +0 -1
  602. package/backend/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js +0 -130
  603. package/backend/node_modules/@typescript-eslint/type-utils/dist/builtinSymbolLikes.js.map +0 -1
  604. package/backend/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts +0 -10
  605. package/backend/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map +0 -1
  606. package/backend/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js +0 -61
  607. package/backend/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js.map +0 -1
  608. package/backend/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts +0 -7
  609. package/backend/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.d.ts.map +0 -1
  610. package/backend/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js +0 -15
  611. package/backend/node_modules/@typescript-eslint/type-utils/dist/getConstrainedTypeAtLocation.js.map +0 -1
  612. package/backend/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts +0 -8
  613. package/backend/node_modules/@typescript-eslint/type-utils/dist/getContextualType.d.ts.map +0 -1
  614. package/backend/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js +0 -66
  615. package/backend/node_modules/@typescript-eslint/type-utils/dist/getContextualType.js.map +0 -1
  616. package/backend/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts +0 -7
  617. package/backend/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.d.ts.map +0 -1
  618. package/backend/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js +0 -16
  619. package/backend/node_modules/@typescript-eslint/type-utils/dist/getDeclaration.js.map +0 -1
  620. package/backend/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts +0 -6
  621. package/backend/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.d.ts.map +0 -1
  622. package/backend/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js +0 -38
  623. package/backend/node_modules/@typescript-eslint/type-utils/dist/getSourceFileOfNode.js.map +0 -1
  624. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTokenAtPosition.d.ts +0 -3
  625. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTokenAtPosition.d.ts.map +0 -1
  626. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTokenAtPosition.js +0 -51
  627. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTokenAtPosition.js.map +0 -1
  628. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeArguments.d.ts +0 -6
  629. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeArguments.d.ts.map +0 -1
  630. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeArguments.js +0 -16
  631. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeArguments.js.map +0 -1
  632. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts +0 -8
  633. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeName.d.ts.map +0 -1
  634. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js +0 -74
  635. package/backend/node_modules/@typescript-eslint/type-utils/dist/getTypeName.js.map +0 -1
  636. package/backend/node_modules/@typescript-eslint/type-utils/dist/index.d.ts +0 -19
  637. package/backend/node_modules/@typescript-eslint/type-utils/dist/index.d.ts.map +0 -1
  638. package/backend/node_modules/@typescript-eslint/type-utils/dist/index.js +0 -39
  639. package/backend/node_modules/@typescript-eslint/type-utils/dist/index.js.map +0 -1
  640. package/backend/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts +0 -3
  641. package/backend/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.d.ts.map +0 -1
  642. package/backend/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js +0 -18
  643. package/backend/node_modules/@typescript-eslint/type-utils/dist/isSymbolFromDefaultLibrary.js.map +0 -1
  644. package/backend/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts +0 -27
  645. package/backend/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map +0 -1
  646. package/backend/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +0 -226
  647. package/backend/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +0 -1
  648. package/backend/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts +0 -17
  649. package/backend/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.d.ts.map +0 -1
  650. package/backend/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js +0 -106
  651. package/backend/node_modules/@typescript-eslint/type-utils/dist/isUnsafeAssignment.js.map +0 -1
  652. package/backend/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts +0 -58
  653. package/backend/node_modules/@typescript-eslint/type-utils/dist/predicates.d.ts.map +0 -1
  654. package/backend/node_modules/@typescript-eslint/type-utils/dist/predicates.js +0 -169
  655. package/backend/node_modules/@typescript-eslint/type-utils/dist/predicates.js.map +0 -1
  656. package/backend/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts +0 -4
  657. package/backend/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.d.ts.map +0 -1
  658. package/backend/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js +0 -37
  659. package/backend/node_modules/@typescript-eslint/type-utils/dist/propertyTypes.js.map +0 -1
  660. package/backend/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts +0 -4
  661. package/backend/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.d.ts.map +0 -1
  662. package/backend/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js +0 -43
  663. package/backend/node_modules/@typescript-eslint/type-utils/dist/requiresQuoting.js.map +0 -1
  664. package/backend/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts +0 -16
  665. package/backend/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map +0 -1
  666. package/backend/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +0 -59
  667. package/backend/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js.map +0 -1
  668. package/backend/node_modules/@typescript-eslint/type-utils/package.json +0 -81
  669. package/backend/node_modules/@typescript-eslint/utils/LICENSE +0 -21
  670. package/backend/node_modules/@typescript-eslint/utils/README.md +0 -12
  671. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +0 -48
  672. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts.map +0 -1
  673. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js +0 -36
  674. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js.map +0 -1
  675. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +0 -76
  676. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts.map +0 -1
  677. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js +0 -40
  678. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js.map +0 -1
  679. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts +0 -76
  680. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts.map +0 -1
  681. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js +0 -99
  682. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js.map +0 -1
  683. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts +0 -6
  684. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.d.ts.map +0 -1
  685. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js +0 -22
  686. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/index.js.map +0 -1
  687. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts +0 -32
  688. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map +0 -1
  689. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js +0 -72
  690. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js.map +0 -1
  691. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +0 -18
  692. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts.map +0 -1
  693. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js +0 -44
  694. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js.map +0 -1
  695. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts +0 -1231
  696. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +0 -1
  697. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js +0 -22
  698. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js.map +0 -1
  699. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts +0 -5
  700. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/index.d.ts.map +0 -1
  701. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js +0 -21
  702. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/index.js.map +0 -1
  703. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts +0 -8
  704. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.d.ts.map +0 -1
  705. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js +0 -13
  706. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/misc.js.map +0 -1
  707. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +0 -70
  708. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +0 -1
  709. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js +0 -135
  710. package/backend/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js.map +0 -1
  711. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts +0 -11
  712. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map +0 -1
  713. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js +0 -3
  714. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js.map +0 -1
  715. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts +0 -35
  716. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +0 -1
  717. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +0 -45
  718. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js.map +0 -1
  719. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts +0 -10
  720. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts.map +0 -1
  721. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +0 -34
  722. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js.map +0 -1
  723. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/context.d.ts +0 -10
  724. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/context.d.ts.map +0 -1
  725. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/context.js +0 -32
  726. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/context.js.map +0 -1
  727. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts +0 -17
  728. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map +0 -1
  729. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js +0 -48
  730. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js.map +0 -1
  731. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts +0 -24
  732. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map +0 -1
  733. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +0 -46
  734. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js.map +0 -1
  735. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts +0 -8
  736. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.d.ts.map +0 -1
  737. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js +0 -24
  738. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js.map +0 -1
  739. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts +0 -14
  740. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.d.ts.map +0 -1
  741. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js +0 -28
  742. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js.map +0 -1
  743. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserPathSeemsToBeTSESLint.d.ts +0 -2
  744. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserPathSeemsToBeTSESLint.d.ts.map +0 -1
  745. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserPathSeemsToBeTSESLint.js +0 -8
  746. package/backend/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserPathSeemsToBeTSESLint.js.map +0 -1
  747. package/backend/node_modules/@typescript-eslint/utils/dist/index.d.ts +0 -8
  748. package/backend/node_modules/@typescript-eslint/utils/dist/index.d.ts.map +0 -1
  749. package/backend/node_modules/@typescript-eslint/utils/dist/index.js +0 -41
  750. package/backend/node_modules/@typescript-eslint/utils/dist/index.js.map +0 -1
  751. package/backend/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts +0 -388
  752. package/backend/node_modules/@typescript-eslint/utils/dist/json-schema.d.ts.map +0 -1
  753. package/backend/node_modules/@typescript-eslint/utils/dist/json-schema.js +0 -9
  754. package/backend/node_modules/@typescript-eslint/utils/dist/json-schema.js.map +0 -1
  755. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts +0 -9
  756. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.d.ts.map +0 -1
  757. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js +0 -4
  758. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/AST.js.map +0 -1
  759. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts +0 -131
  760. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts.map +0 -1
  761. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.js +0 -18
  762. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.js.map +0 -1
  763. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts +0 -260
  764. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.d.ts.map +0 -1
  765. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js +0 -4
  766. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config.js.map +0 -1
  767. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts +0 -374
  768. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.d.ts.map +0 -1
  769. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js +0 -24
  770. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ESLint.js.map +0 -1
  771. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts +0 -247
  772. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts.map +0 -1
  773. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js +0 -14
  774. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.js.map +0 -1
  775. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts +0 -89
  776. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.d.ts.map +0 -1
  777. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js +0 -4
  778. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Parser.js.map +0 -1
  779. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts +0 -2
  780. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.d.ts.map +0 -1
  781. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js +0 -3
  782. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/ParserOptions.js.map +0 -1
  783. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts +0 -37
  784. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.d.ts.map +0 -1
  785. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.js +0 -4
  786. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Processor.js.map +0 -1
  787. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +0 -514
  788. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +0 -1
  789. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js +0 -3
  790. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.js.map +0 -1
  791. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts +0 -162
  792. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map +0 -1
  793. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js +0 -8
  794. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.js.map +0 -1
  795. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts +0 -44
  796. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.d.ts.map +0 -1
  797. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js +0 -34
  798. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/Scope.js.map +0 -1
  799. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +0 -362
  800. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +0 -1
  801. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js +0 -9
  802. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js.map +0 -1
  803. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts +0 -13
  804. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.d.ts.map +0 -1
  805. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js +0 -29
  806. package/backend/node_modules/@typescript-eslint/utils/dist/ts-eslint/index.js.map +0 -1
  807. package/backend/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts +0 -3
  808. package/backend/node_modules/@typescript-eslint/utils/dist/ts-estree.d.ts.map +0 -1
  809. package/backend/node_modules/@typescript-eslint/utils/dist/ts-estree.js +0 -10
  810. package/backend/node_modules/@typescript-eslint/utils/dist/ts-estree.js.map +0 -1
  811. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts +0 -2
  812. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/index.d.ts.map +0 -1
  813. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js +0 -18
  814. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/index.js.map +0 -1
  815. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts +0 -2
  816. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.d.ts.map +0 -1
  817. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js +0 -9
  818. package/backend/node_modules/@typescript-eslint/utils/dist/ts-utils/isArray.js.map +0 -1
  819. package/backend/node_modules/@typescript-eslint/utils/package.json +0 -98
  820. package/backend/node_modules/chalk/index.d.ts +0 -415
  821. package/backend/node_modules/chalk/license +0 -9
  822. package/backend/node_modules/chalk/package.json +0 -68
  823. package/backend/node_modules/chalk/readme.md +0 -341
  824. package/backend/node_modules/chalk/source/index.js +0 -229
  825. package/backend/node_modules/chalk/source/templates.js +0 -134
  826. package/backend/node_modules/chalk/source/util.js +0 -39
  827. package/backend/node_modules/eslint/LICENSE +0 -19
  828. package/backend/node_modules/eslint/README.md +0 -304
  829. package/backend/node_modules/eslint/bin/eslint.js +0 -173
  830. package/backend/node_modules/eslint/conf/config-schema.js +0 -93
  831. package/backend/node_modules/eslint/conf/default-cli-options.js +0 -32
  832. package/backend/node_modules/eslint/conf/globals.js +0 -154
  833. package/backend/node_modules/eslint/conf/replacements.json +0 -22
  834. package/backend/node_modules/eslint/conf/rule-type-list.json +0 -28
  835. package/backend/node_modules/eslint/lib/api.js +0 -54
  836. package/backend/node_modules/eslint/lib/cli-engine/cli-engine.js +0 -1078
  837. package/backend/node_modules/eslint/lib/cli-engine/file-enumerator.js +0 -547
  838. package/backend/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js +0 -60
  839. package/backend/node_modules/eslint/lib/cli-engine/formatters/compact.js +0 -60
  840. package/backend/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +0 -46
  841. package/backend/node_modules/eslint/lib/cli-engine/formatters/html.js +0 -351
  842. package/backend/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js +0 -41
  843. package/backend/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js +0 -16
  844. package/backend/node_modules/eslint/lib/cli-engine/formatters/json.js +0 -13
  845. package/backend/node_modules/eslint/lib/cli-engine/formatters/junit.js +0 -82
  846. package/backend/node_modules/eslint/lib/cli-engine/formatters/stylish.js +0 -101
  847. package/backend/node_modules/eslint/lib/cli-engine/formatters/tap.js +0 -95
  848. package/backend/node_modules/eslint/lib/cli-engine/formatters/unix.js +0 -58
  849. package/backend/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js +0 -63
  850. package/backend/node_modules/eslint/lib/cli-engine/hash.js +0 -35
  851. package/backend/node_modules/eslint/lib/cli-engine/index.js +0 -7
  852. package/backend/node_modules/eslint/lib/cli-engine/lint-result-cache.js +0 -203
  853. package/backend/node_modules/eslint/lib/cli-engine/load-rules.js +0 -46
  854. package/backend/node_modules/eslint/lib/cli-engine/xml-escape.js +0 -34
  855. package/backend/node_modules/eslint/lib/cli.js +0 -471
  856. package/backend/node_modules/eslint/lib/config/default-config.js +0 -67
  857. package/backend/node_modules/eslint/lib/config/flat-config-array.js +0 -380
  858. package/backend/node_modules/eslint/lib/config/flat-config-helpers.js +0 -111
  859. package/backend/node_modules/eslint/lib/config/flat-config-schema.js +0 -598
  860. package/backend/node_modules/eslint/lib/config/rule-validator.js +0 -158
  861. package/backend/node_modules/eslint/lib/eslint/eslint-helpers.js +0 -932
  862. package/backend/node_modules/eslint/lib/eslint/eslint.js +0 -707
  863. package/backend/node_modules/eslint/lib/eslint/flat-eslint.js +0 -1159
  864. package/backend/node_modules/eslint/lib/eslint/index.js +0 -9
  865. package/backend/node_modules/eslint/lib/linter/apply-disable-directives.js +0 -465
  866. package/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -852
  867. package/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +0 -263
  868. package/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js +0 -2348
  869. package/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +0 -342
  870. package/backend/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +0 -203
  871. package/backend/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +0 -349
  872. package/backend/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js +0 -45
  873. package/backend/node_modules/eslint/lib/linter/config-comment-parser.js +0 -185
  874. package/backend/node_modules/eslint/lib/linter/index.js +0 -13
  875. package/backend/node_modules/eslint/lib/linter/interpolate.js +0 -28
  876. package/backend/node_modules/eslint/lib/linter/linter.js +0 -2119
  877. package/backend/node_modules/eslint/lib/linter/node-event-generator.js +0 -354
  878. package/backend/node_modules/eslint/lib/linter/report-translator.js +0 -369
  879. package/backend/node_modules/eslint/lib/linter/rule-fixer.js +0 -140
  880. package/backend/node_modules/eslint/lib/linter/rules.js +0 -80
  881. package/backend/node_modules/eslint/lib/linter/safe-emitter.js +0 -52
  882. package/backend/node_modules/eslint/lib/linter/source-code-fixer.js +0 -152
  883. package/backend/node_modules/eslint/lib/linter/timing.js +0 -161
  884. package/backend/node_modules/eslint/lib/options.js +0 -398
  885. package/backend/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +0 -1131
  886. package/backend/node_modules/eslint/lib/rule-tester/index.js +0 -5
  887. package/backend/node_modules/eslint/lib/rule-tester/rule-tester.js +0 -1206
  888. package/backend/node_modules/eslint/lib/rules/accessor-pairs.js +0 -346
  889. package/backend/node_modules/eslint/lib/rules/array-bracket-newline.js +0 -261
  890. package/backend/node_modules/eslint/lib/rules/array-bracket-spacing.js +0 -244
  891. package/backend/node_modules/eslint/lib/rules/array-callback-return.js +0 -446
  892. package/backend/node_modules/eslint/lib/rules/array-element-newline.js +0 -311
  893. package/backend/node_modules/eslint/lib/rules/arrow-body-style.js +0 -296
  894. package/backend/node_modules/eslint/lib/rules/arrow-parens.js +0 -186
  895. package/backend/node_modules/eslint/lib/rules/arrow-spacing.js +0 -164
  896. package/backend/node_modules/eslint/lib/rules/block-scoped-var.js +0 -135
  897. package/backend/node_modules/eslint/lib/rules/block-spacing.js +0 -174
  898. package/backend/node_modules/eslint/lib/rules/brace-style.js +0 -197
  899. package/backend/node_modules/eslint/lib/rules/callback-return.js +0 -187
  900. package/backend/node_modules/eslint/lib/rules/camelcase.js +0 -399
  901. package/backend/node_modules/eslint/lib/rules/capitalized-comments.js +0 -300
  902. package/backend/node_modules/eslint/lib/rules/class-methods-use-this.js +0 -187
  903. package/backend/node_modules/eslint/lib/rules/comma-dangle.js +0 -373
  904. package/backend/node_modules/eslint/lib/rules/comma-spacing.js +0 -192
  905. package/backend/node_modules/eslint/lib/rules/comma-style.js +0 -314
  906. package/backend/node_modules/eslint/lib/rules/complexity.js +0 -165
  907. package/backend/node_modules/eslint/lib/rules/computed-property-spacing.js +0 -208
  908. package/backend/node_modules/eslint/lib/rules/consistent-return.js +0 -210
  909. package/backend/node_modules/eslint/lib/rules/consistent-this.js +0 -153
  910. package/backend/node_modules/eslint/lib/rules/constructor-super.js +0 -446
  911. package/backend/node_modules/eslint/lib/rules/curly.js +0 -486
  912. package/backend/node_modules/eslint/lib/rules/default-case-last.js +0 -44
  913. package/backend/node_modules/eslint/lib/rules/default-case.js +0 -97
  914. package/backend/node_modules/eslint/lib/rules/default-param-last.js +0 -62
  915. package/backend/node_modules/eslint/lib/rules/dot-location.js +0 -108
  916. package/backend/node_modules/eslint/lib/rules/dot-notation.js +0 -176
  917. package/backend/node_modules/eslint/lib/rules/eol-last.js +0 -115
  918. package/backend/node_modules/eslint/lib/rules/eqeqeq.js +0 -174
  919. package/backend/node_modules/eslint/lib/rules/for-direction.js +0 -140
  920. package/backend/node_modules/eslint/lib/rules/func-call-spacing.js +0 -233
  921. package/backend/node_modules/eslint/lib/rules/func-name-matching.js +0 -253
  922. package/backend/node_modules/eslint/lib/rules/func-names.js +0 -191
  923. package/backend/node_modules/eslint/lib/rules/func-style.js +0 -98
  924. package/backend/node_modules/eslint/lib/rules/function-call-argument-newline.js +0 -125
  925. package/backend/node_modules/eslint/lib/rules/function-paren-newline.js +0 -292
  926. package/backend/node_modules/eslint/lib/rules/generator-star-spacing.js +0 -209
  927. package/backend/node_modules/eslint/lib/rules/getter-return.js +0 -204
  928. package/backend/node_modules/eslint/lib/rules/global-require.js +0 -90
  929. package/backend/node_modules/eslint/lib/rules/grouped-accessor-pairs.js +0 -215
  930. package/backend/node_modules/eslint/lib/rules/guard-for-in.js +0 -76
  931. package/backend/node_modules/eslint/lib/rules/handle-callback-err.js +0 -101
  932. package/backend/node_modules/eslint/lib/rules/id-blacklist.js +0 -246
  933. package/backend/node_modules/eslint/lib/rules/id-denylist.js +0 -228
  934. package/backend/node_modules/eslint/lib/rules/id-length.js +0 -177
  935. package/backend/node_modules/eslint/lib/rules/id-match.js +0 -299
  936. package/backend/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +0 -84
  937. package/backend/node_modules/eslint/lib/rules/indent-legacy.js +0 -1126
  938. package/backend/node_modules/eslint/lib/rules/indent.js +0 -1803
  939. package/backend/node_modules/eslint/lib/rules/index.js +0 -306
  940. package/backend/node_modules/eslint/lib/rules/init-declarations.js +0 -139
  941. package/backend/node_modules/eslint/lib/rules/jsx-quotes.js +0 -98
  942. package/backend/node_modules/eslint/lib/rules/key-spacing.js +0 -687
  943. package/backend/node_modules/eslint/lib/rules/keyword-spacing.js +0 -640
  944. package/backend/node_modules/eslint/lib/rules/line-comment-position.js +0 -122
  945. package/backend/node_modules/eslint/lib/rules/linebreak-style.js +0 -108
  946. package/backend/node_modules/eslint/lib/rules/lines-around-comment.js +0 -471
  947. package/backend/node_modules/eslint/lib/rules/lines-around-directive.js +0 -201
  948. package/backend/node_modules/eslint/lib/rules/lines-between-class-members.js +0 -269
  949. package/backend/node_modules/eslint/lib/rules/logical-assignment-operators.js +0 -504
  950. package/backend/node_modules/eslint/lib/rules/max-classes-per-file.js +0 -89
  951. package/backend/node_modules/eslint/lib/rules/max-depth.js +0 -156
  952. package/backend/node_modules/eslint/lib/rules/max-len.js +0 -440
  953. package/backend/node_modules/eslint/lib/rules/max-lines-per-function.js +0 -213
  954. package/backend/node_modules/eslint/lib/rules/max-lines.js +0 -193
  955. package/backend/node_modules/eslint/lib/rules/max-nested-callbacks.js +0 -117
  956. package/backend/node_modules/eslint/lib/rules/max-params.js +0 -102
  957. package/backend/node_modules/eslint/lib/rules/max-statements-per-line.js +0 -199
  958. package/backend/node_modules/eslint/lib/rules/max-statements.js +0 -184
  959. package/backend/node_modules/eslint/lib/rules/multiline-comment-style.js +0 -474
  960. package/backend/node_modules/eslint/lib/rules/multiline-ternary.js +0 -174
  961. package/backend/node_modules/eslint/lib/rules/new-cap.js +0 -276
  962. package/backend/node_modules/eslint/lib/rules/new-parens.js +0 -93
  963. package/backend/node_modules/eslint/lib/rules/newline-after-var.js +0 -253
  964. package/backend/node_modules/eslint/lib/rules/newline-before-return.js +0 -217
  965. package/backend/node_modules/eslint/lib/rules/newline-per-chained-call.js +0 -126
  966. package/backend/node_modules/eslint/lib/rules/no-alert.js +0 -138
  967. package/backend/node_modules/eslint/lib/rules/no-array-constructor.js +0 -133
  968. package/backend/node_modules/eslint/lib/rules/no-async-promise-executor.js +0 -39
  969. package/backend/node_modules/eslint/lib/rules/no-await-in-loop.js +0 -106
  970. package/backend/node_modules/eslint/lib/rules/no-bitwise.js +0 -119
  971. package/backend/node_modules/eslint/lib/rules/no-buffer-constructor.js +0 -50
  972. package/backend/node_modules/eslint/lib/rules/no-caller.js +0 -46
  973. package/backend/node_modules/eslint/lib/rules/no-case-declarations.js +0 -64
  974. package/backend/node_modules/eslint/lib/rules/no-catch-shadow.js +0 -82
  975. package/backend/node_modules/eslint/lib/rules/no-class-assign.js +0 -63
  976. package/backend/node_modules/eslint/lib/rules/no-compare-neg-zero.js +0 -60
  977. package/backend/node_modules/eslint/lib/rules/no-cond-assign.js +0 -159
  978. package/backend/node_modules/eslint/lib/rules/no-confusing-arrow.js +0 -92
  979. package/backend/node_modules/eslint/lib/rules/no-console.js +0 -207
  980. package/backend/node_modules/eslint/lib/rules/no-const-assign.js +0 -56
  981. package/backend/node_modules/eslint/lib/rules/no-constant-binary-expression.js +0 -509
  982. package/backend/node_modules/eslint/lib/rules/no-constant-condition.js +0 -150
  983. package/backend/node_modules/eslint/lib/rules/no-constructor-return.js +0 -62
  984. package/backend/node_modules/eslint/lib/rules/no-continue.js +0 -39
  985. package/backend/node_modules/eslint/lib/rules/no-control-regex.js +0 -138
  986. package/backend/node_modules/eslint/lib/rules/no-debugger.js +0 -43
  987. package/backend/node_modules/eslint/lib/rules/no-delete-var.js +0 -42
  988. package/backend/node_modules/eslint/lib/rules/no-div-regex.js +0 -53
  989. package/backend/node_modules/eslint/lib/rules/no-dupe-args.js +0 -82
  990. package/backend/node_modules/eslint/lib/rules/no-dupe-class-members.js +0 -104
  991. package/backend/node_modules/eslint/lib/rules/no-dupe-else-if.js +0 -122
  992. package/backend/node_modules/eslint/lib/rules/no-dupe-keys.js +0 -142
  993. package/backend/node_modules/eslint/lib/rules/no-duplicate-case.js +0 -71
  994. package/backend/node_modules/eslint/lib/rules/no-duplicate-imports.js +0 -290
  995. package/backend/node_modules/eslint/lib/rules/no-else-return.js +0 -405
  996. package/backend/node_modules/eslint/lib/rules/no-empty-character-class.js +0 -76
  997. package/backend/node_modules/eslint/lib/rules/no-empty-function.js +0 -167
  998. package/backend/node_modules/eslint/lib/rules/no-empty-pattern.js +0 -78
  999. package/backend/node_modules/eslint/lib/rules/no-empty-static-block.js +0 -47
  1000. package/backend/node_modules/eslint/lib/rules/no-empty.js +0 -103
  1001. package/backend/node_modules/eslint/lib/rules/no-eq-null.js +0 -46
  1002. package/backend/node_modules/eslint/lib/rules/no-eval.js +0 -286
  1003. package/backend/node_modules/eslint/lib/rules/no-ex-assign.js +0 -54
  1004. package/backend/node_modules/eslint/lib/rules/no-extend-native.js +0 -179
  1005. package/backend/node_modules/eslint/lib/rules/no-extra-bind.js +0 -213
  1006. package/backend/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +0 -317
  1007. package/backend/node_modules/eslint/lib/rules/no-extra-label.js +0 -149
  1008. package/backend/node_modules/eslint/lib/rules/no-extra-parens.js +0 -1322
  1009. package/backend/node_modules/eslint/lib/rules/no-extra-semi.js +0 -147
  1010. package/backend/node_modules/eslint/lib/rules/no-fallthrough.js +0 -196
  1011. package/backend/node_modules/eslint/lib/rules/no-floating-decimal.js +0 -73
  1012. package/backend/node_modules/eslint/lib/rules/no-func-assign.js +0 -78
  1013. package/backend/node_modules/eslint/lib/rules/no-global-assign.js +0 -95
  1014. package/backend/node_modules/eslint/lib/rules/no-implicit-coercion.js +0 -380
  1015. package/backend/node_modules/eslint/lib/rules/no-implicit-globals.js +0 -146
  1016. package/backend/node_modules/eslint/lib/rules/no-implied-eval.js +0 -132
  1017. package/backend/node_modules/eslint/lib/rules/no-import-assign.js +0 -241
  1018. package/backend/node_modules/eslint/lib/rules/no-inline-comments.js +0 -110
  1019. package/backend/node_modules/eslint/lib/rules/no-inner-declarations.js +0 -110
  1020. package/backend/node_modules/eslint/lib/rules/no-invalid-regexp.js +0 -194
  1021. package/backend/node_modules/eslint/lib/rules/no-invalid-this.js +0 -150
  1022. package/backend/node_modules/eslint/lib/rules/no-irregular-whitespace.js +0 -276
  1023. package/backend/node_modules/eslint/lib/rules/no-iterator.js +0 -52
  1024. package/backend/node_modules/eslint/lib/rules/no-label-var.js +0 -80
  1025. package/backend/node_modules/eslint/lib/rules/no-labels.js +0 -149
  1026. package/backend/node_modules/eslint/lib/rules/no-lone-blocks.js +0 -136
  1027. package/backend/node_modules/eslint/lib/rules/no-lonely-if.js +0 -88
  1028. package/backend/node_modules/eslint/lib/rules/no-loop-func.js +0 -206
  1029. package/backend/node_modules/eslint/lib/rules/no-loss-of-precision.js +0 -214
  1030. package/backend/node_modules/eslint/lib/rules/no-magic-numbers.js +0 -243
  1031. package/backend/node_modules/eslint/lib/rules/no-misleading-character-class.js +0 -300
  1032. package/backend/node_modules/eslint/lib/rules/no-mixed-operators.js +0 -229
  1033. package/backend/node_modules/eslint/lib/rules/no-mixed-requires.js +0 -238
  1034. package/backend/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +0 -116
  1035. package/backend/node_modules/eslint/lib/rules/no-multi-assign.js +0 -67
  1036. package/backend/node_modules/eslint/lib/rules/no-multi-spaces.js +0 -141
  1037. package/backend/node_modules/eslint/lib/rules/no-multi-str.js +0 -65
  1038. package/backend/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +0 -154
  1039. package/backend/node_modules/eslint/lib/rules/no-native-reassign.js +0 -98
  1040. package/backend/node_modules/eslint/lib/rules/no-negated-condition.js +0 -95
  1041. package/backend/node_modules/eslint/lib/rules/no-negated-in-lhs.js +0 -46
  1042. package/backend/node_modules/eslint/lib/rules/no-nested-ternary.js +0 -44
  1043. package/backend/node_modules/eslint/lib/rules/no-new-func.js +0 -87
  1044. package/backend/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +0 -66
  1045. package/backend/node_modules/eslint/lib/rules/no-new-object.js +0 -67
  1046. package/backend/node_modules/eslint/lib/rules/no-new-require.js +0 -50
  1047. package/backend/node_modules/eslint/lib/rules/no-new-symbol.js +0 -56
  1048. package/backend/node_modules/eslint/lib/rules/no-new-wrappers.js +0 -60
  1049. package/backend/node_modules/eslint/lib/rules/no-new.js +0 -43
  1050. package/backend/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js +0 -148
  1051. package/backend/node_modules/eslint/lib/rules/no-obj-calls.js +0 -86
  1052. package/backend/node_modules/eslint/lib/rules/no-object-constructor.js +0 -117
  1053. package/backend/node_modules/eslint/lib/rules/no-octal-escape.js +0 -56
  1054. package/backend/node_modules/eslint/lib/rules/no-octal.js +0 -45
  1055. package/backend/node_modules/eslint/lib/rules/no-param-reassign.js +0 -230
  1056. package/backend/node_modules/eslint/lib/rules/no-path-concat.js +0 -64
  1057. package/backend/node_modules/eslint/lib/rules/no-plusplus.js +0 -105
  1058. package/backend/node_modules/eslint/lib/rules/no-process-env.js +0 -51
  1059. package/backend/node_modules/eslint/lib/rules/no-process-exit.js +0 -47
  1060. package/backend/node_modules/eslint/lib/rules/no-promise-executor-return.js +0 -263
  1061. package/backend/node_modules/eslint/lib/rules/no-proto.js +0 -48
  1062. package/backend/node_modules/eslint/lib/rules/no-prototype-builtins.js +0 -159
  1063. package/backend/node_modules/eslint/lib/rules/no-redeclare.js +0 -174
  1064. package/backend/node_modules/eslint/lib/rules/no-regex-spaces.js +0 -197
  1065. package/backend/node_modules/eslint/lib/rules/no-restricted-exports.js +0 -193
  1066. package/backend/node_modules/eslint/lib/rules/no-restricted-globals.js +0 -124
  1067. package/backend/node_modules/eslint/lib/rules/no-restricted-imports.js +0 -410
  1068. package/backend/node_modules/eslint/lib/rules/no-restricted-modules.js +0 -213
  1069. package/backend/node_modules/eslint/lib/rules/no-restricted-properties.js +0 -168
  1070. package/backend/node_modules/eslint/lib/rules/no-restricted-syntax.js +0 -70
  1071. package/backend/node_modules/eslint/lib/rules/no-return-assign.js +0 -80
  1072. package/backend/node_modules/eslint/lib/rules/no-return-await.js +0 -135
  1073. package/backend/node_modules/eslint/lib/rules/no-script-url.js +0 -61
  1074. package/backend/node_modules/eslint/lib/rules/no-self-assign.js +0 -183
  1075. package/backend/node_modules/eslint/lib/rules/no-self-compare.js +0 -60
  1076. package/backend/node_modules/eslint/lib/rules/no-sequences.js +0 -138
  1077. package/backend/node_modules/eslint/lib/rules/no-setter-return.js +0 -226
  1078. package/backend/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +0 -65
  1079. package/backend/node_modules/eslint/lib/rules/no-shadow.js +0 -336
  1080. package/backend/node_modules/eslint/lib/rules/no-spaced-func.js +0 -83
  1081. package/backend/node_modules/eslint/lib/rules/no-sparse-arrays.js +0 -50
  1082. package/backend/node_modules/eslint/lib/rules/no-sync.js +0 -64
  1083. package/backend/node_modules/eslint/lib/rules/no-tabs.js +0 -81
  1084. package/backend/node_modules/eslint/lib/rules/no-template-curly-in-string.js +0 -44
  1085. package/backend/node_modules/eslint/lib/rules/no-ternary.js +0 -41
  1086. package/backend/node_modules/eslint/lib/rules/no-this-before-super.js +0 -331
  1087. package/backend/node_modules/eslint/lib/rules/no-throw-literal.js +0 -51
  1088. package/backend/node_modules/eslint/lib/rules/no-trailing-spaces.js +0 -193
  1089. package/backend/node_modules/eslint/lib/rules/no-undef-init.js +0 -75
  1090. package/backend/node_modules/eslint/lib/rules/no-undef.js +0 -79
  1091. package/backend/node_modules/eslint/lib/rules/no-undefined.js +0 -86
  1092. package/backend/node_modules/eslint/lib/rules/no-underscore-dangle.js +0 -335
  1093. package/backend/node_modules/eslint/lib/rules/no-unexpected-multiline.js +0 -120
  1094. package/backend/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +0 -360
  1095. package/backend/node_modules/eslint/lib/rules/no-unneeded-ternary.js +0 -166
  1096. package/backend/node_modules/eslint/lib/rules/no-unreachable-loop.js +0 -185
  1097. package/backend/node_modules/eslint/lib/rules/no-unreachable.js +0 -293
  1098. package/backend/node_modules/eslint/lib/rules/no-unsafe-finally.js +0 -111
  1099. package/backend/node_modules/eslint/lib/rules/no-unsafe-negation.js +0 -128
  1100. package/backend/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +0 -205
  1101. package/backend/node_modules/eslint/lib/rules/no-unused-expressions.js +0 -186
  1102. package/backend/node_modules/eslint/lib/rules/no-unused-labels.js +0 -143
  1103. package/backend/node_modules/eslint/lib/rules/no-unused-private-class-members.js +0 -195
  1104. package/backend/node_modules/eslint/lib/rules/no-unused-vars.js +0 -718
  1105. package/backend/node_modules/eslint/lib/rules/no-use-before-define.js +0 -348
  1106. package/backend/node_modules/eslint/lib/rules/no-useless-backreference.js +0 -194
  1107. package/backend/node_modules/eslint/lib/rules/no-useless-call.js +0 -90
  1108. package/backend/node_modules/eslint/lib/rules/no-useless-catch.js +0 -57
  1109. package/backend/node_modules/eslint/lib/rules/no-useless-computed-key.js +0 -168
  1110. package/backend/node_modules/eslint/lib/rules/no-useless-concat.js +0 -115
  1111. package/backend/node_modules/eslint/lib/rules/no-useless-constructor.js +0 -189
  1112. package/backend/node_modules/eslint/lib/rules/no-useless-escape.js +0 -333
  1113. package/backend/node_modules/eslint/lib/rules/no-useless-rename.js +0 -172
  1114. package/backend/node_modules/eslint/lib/rules/no-useless-return.js +0 -364
  1115. package/backend/node_modules/eslint/lib/rules/no-var.js +0 -334
  1116. package/backend/node_modules/eslint/lib/rules/no-void.js +0 -64
  1117. package/backend/node_modules/eslint/lib/rules/no-warning-comments.js +0 -201
  1118. package/backend/node_modules/eslint/lib/rules/no-whitespace-before-property.js +0 -116
  1119. package/backend/node_modules/eslint/lib/rules/no-with.js +0 -39
  1120. package/backend/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +0 -127
  1121. package/backend/node_modules/eslint/lib/rules/object-curly-newline.js +0 -324
  1122. package/backend/node_modules/eslint/lib/rules/object-curly-spacing.js +0 -311
  1123. package/backend/node_modules/eslint/lib/rules/object-property-newline.js +0 -102
  1124. package/backend/node_modules/eslint/lib/rules/object-shorthand.js +0 -520
  1125. package/backend/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +0 -95
  1126. package/backend/node_modules/eslint/lib/rules/one-var.js +0 -567
  1127. package/backend/node_modules/eslint/lib/rules/operator-assignment.js +0 -209
  1128. package/backend/node_modules/eslint/lib/rules/operator-linebreak.js +0 -253
  1129. package/backend/node_modules/eslint/lib/rules/padded-blocks.js +0 -310
  1130. package/backend/node_modules/eslint/lib/rules/padding-line-between-statements.js +0 -590
  1131. package/backend/node_modules/eslint/lib/rules/prefer-arrow-callback.js +0 -381
  1132. package/backend/node_modules/eslint/lib/rules/prefer-const.js +0 -501
  1133. package/backend/node_modules/eslint/lib/rules/prefer-destructuring.js +0 -301
  1134. package/backend/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +0 -191
  1135. package/backend/node_modules/eslint/lib/rules/prefer-named-capture-group.js +0 -178
  1136. package/backend/node_modules/eslint/lib/rules/prefer-numeric-literals.js +0 -148
  1137. package/backend/node_modules/eslint/lib/rules/prefer-object-has-own.js +0 -114
  1138. package/backend/node_modules/eslint/lib/rules/prefer-object-spread.js +0 -298
  1139. package/backend/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +0 -132
  1140. package/backend/node_modules/eslint/lib/rules/prefer-reflect.js +0 -127
  1141. package/backend/node_modules/eslint/lib/rules/prefer-regex-literals.js +0 -507
  1142. package/backend/node_modules/eslint/lib/rules/prefer-rest-params.js +0 -118
  1143. package/backend/node_modules/eslint/lib/rules/prefer-spread.js +0 -87
  1144. package/backend/node_modules/eslint/lib/rules/prefer-template.js +0 -275
  1145. package/backend/node_modules/eslint/lib/rules/quote-props.js +0 -310
  1146. package/backend/node_modules/eslint/lib/rules/quotes.js +0 -350
  1147. package/backend/node_modules/eslint/lib/rules/radix.js +0 -198
  1148. package/backend/node_modules/eslint/lib/rules/require-atomic-updates.js +0 -331
  1149. package/backend/node_modules/eslint/lib/rules/require-await.js +0 -113
  1150. package/backend/node_modules/eslint/lib/rules/require-jsdoc.js +0 -122
  1151. package/backend/node_modules/eslint/lib/rules/require-unicode-regexp.js +0 -129
  1152. package/backend/node_modules/eslint/lib/rules/require-yield.js +0 -77
  1153. package/backend/node_modules/eslint/lib/rules/rest-spread-spacing.js +0 -123
  1154. package/backend/node_modules/eslint/lib/rules/semi-spacing.js +0 -248
  1155. package/backend/node_modules/eslint/lib/rules/semi-style.js +0 -158
  1156. package/backend/node_modules/eslint/lib/rules/semi.js +0 -438
  1157. package/backend/node_modules/eslint/lib/rules/sort-imports.js +0 -241
  1158. package/backend/node_modules/eslint/lib/rules/sort-keys.js +0 -230
  1159. package/backend/node_modules/eslint/lib/rules/sort-vars.js +0 -104
  1160. package/backend/node_modules/eslint/lib/rules/space-before-blocks.js +0 -204
  1161. package/backend/node_modules/eslint/lib/rules/space-before-function-paren.js +0 -167
  1162. package/backend/node_modules/eslint/lib/rules/space-in-parens.js +0 -285
  1163. package/backend/node_modules/eslint/lib/rules/space-infix-ops.js +0 -198
  1164. package/backend/node_modules/eslint/lib/rules/space-unary-ops.js +0 -324
  1165. package/backend/node_modules/eslint/lib/rules/spaced-comment.js +0 -385
  1166. package/backend/node_modules/eslint/lib/rules/strict.js +0 -277
  1167. package/backend/node_modules/eslint/lib/rules/switch-colon-spacing.js +0 -132
  1168. package/backend/node_modules/eslint/lib/rules/symbol-description.js +0 -73
  1169. package/backend/node_modules/eslint/lib/rules/template-curly-spacing.js +0 -144
  1170. package/backend/node_modules/eslint/lib/rules/template-tag-spacing.js +0 -93
  1171. package/backend/node_modules/eslint/lib/rules/unicode-bom.js +0 -73
  1172. package/backend/node_modules/eslint/lib/rules/use-isnan.js +0 -141
  1173. package/backend/node_modules/eslint/lib/rules/utils/ast-utils.js +0 -2282
  1174. package/backend/node_modules/eslint/lib/rules/utils/fix-tracker.js +0 -114
  1175. package/backend/node_modules/eslint/lib/rules/utils/keywords.js +0 -67
  1176. package/backend/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +0 -115
  1177. package/backend/node_modules/eslint/lib/rules/utils/patterns/letters.js +0 -36
  1178. package/backend/node_modules/eslint/lib/rules/utils/regular-expressions.js +0 -42
  1179. package/backend/node_modules/eslint/lib/rules/utils/unicode/index.js +0 -11
  1180. package/backend/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js +0 -13
  1181. package/backend/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js +0 -13
  1182. package/backend/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js +0 -13
  1183. package/backend/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js +0 -14
  1184. package/backend/node_modules/eslint/lib/rules/valid-jsdoc.js +0 -516
  1185. package/backend/node_modules/eslint/lib/rules/valid-typeof.js +0 -127
  1186. package/backend/node_modules/eslint/lib/rules/vars-on-top.js +0 -157
  1187. package/backend/node_modules/eslint/lib/rules/wrap-iife.js +0 -207
  1188. package/backend/node_modules/eslint/lib/rules/wrap-regex.js +0 -61
  1189. package/backend/node_modules/eslint/lib/rules/yield-star-spacing.js +0 -130
  1190. package/backend/node_modules/eslint/lib/rules/yoda.js +0 -353
  1191. package/backend/node_modules/eslint/lib/shared/ajv.js +0 -34
  1192. package/backend/node_modules/eslint/lib/shared/ast-utils.js +0 -29
  1193. package/backend/node_modules/eslint/lib/shared/config-validator.js +0 -347
  1194. package/backend/node_modules/eslint/lib/shared/deprecation-warnings.js +0 -58
  1195. package/backend/node_modules/eslint/lib/shared/directives.js +0 -15
  1196. package/backend/node_modules/eslint/lib/shared/logging.js +0 -30
  1197. package/backend/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -50
  1198. package/backend/node_modules/eslint/lib/shared/runtime-info.js +0 -167
  1199. package/backend/node_modules/eslint/lib/shared/severity.js +0 -49
  1200. package/backend/node_modules/eslint/lib/shared/string-utils.js +0 -60
  1201. package/backend/node_modules/eslint/lib/shared/traverser.js +0 -195
  1202. package/backend/node_modules/eslint/lib/shared/types.js +0 -216
  1203. package/backend/node_modules/eslint/lib/source-code/index.js +0 -5
  1204. package/backend/node_modules/eslint/lib/source-code/source-code.js +0 -1055
  1205. package/backend/node_modules/eslint/lib/source-code/token-store/backward-token-comment-cursor.js +0 -57
  1206. package/backend/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js +0 -58
  1207. package/backend/node_modules/eslint/lib/source-code/token-store/cursor.js +0 -76
  1208. package/backend/node_modules/eslint/lib/source-code/token-store/cursors.js +0 -90
  1209. package/backend/node_modules/eslint/lib/source-code/token-store/decorative-cursor.js +0 -39
  1210. package/backend/node_modules/eslint/lib/source-code/token-store/filter-cursor.js +0 -43
  1211. package/backend/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js +0 -57
  1212. package/backend/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js +0 -63
  1213. package/backend/node_modules/eslint/lib/source-code/token-store/index.js +0 -627
  1214. package/backend/node_modules/eslint/lib/source-code/token-store/limit-cursor.js +0 -40
  1215. package/backend/node_modules/eslint/lib/source-code/token-store/padded-token-cursor.js +0 -38
  1216. package/backend/node_modules/eslint/lib/source-code/token-store/skip-cursor.js +0 -42
  1217. package/backend/node_modules/eslint/lib/source-code/token-store/utils.js +0 -107
  1218. package/backend/node_modules/eslint/lib/unsupported-api.js +0 -30
  1219. package/backend/node_modules/eslint/messages/all-files-ignored.js +0 -16
  1220. package/backend/node_modules/eslint/messages/eslintrc-incompat.js +0 -98
  1221. package/backend/node_modules/eslint/messages/eslintrc-plugins.js +0 -24
  1222. package/backend/node_modules/eslint/messages/extend-config-missing.js +0 -13
  1223. package/backend/node_modules/eslint/messages/failed-to-read-json.js +0 -11
  1224. package/backend/node_modules/eslint/messages/file-not-found.js +0 -10
  1225. package/backend/node_modules/eslint/messages/invalid-rule-options.js +0 -17
  1226. package/backend/node_modules/eslint/messages/invalid-rule-severity.js +0 -13
  1227. package/backend/node_modules/eslint/messages/no-config-found.js +0 -15
  1228. package/backend/node_modules/eslint/messages/plugin-conflict.js +0 -22
  1229. package/backend/node_modules/eslint/messages/plugin-invalid.js +0 -16
  1230. package/backend/node_modules/eslint/messages/plugin-missing.js +0 -19
  1231. package/backend/node_modules/eslint/messages/print-config-with-directory-path.js +0 -8
  1232. package/backend/node_modules/eslint/messages/shared.js +0 -18
  1233. package/backend/node_modules/eslint/messages/whitespace-found.js +0 -11
  1234. package/backend/node_modules/eslint/package.json +0 -181
@@ -1,4344 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var debugOrig = require('debug');
6
- var fs = require('fs');
7
- var importFresh = require('import-fresh');
8
- var Module = require('module');
9
- var path = require('path');
10
- var stripComments = require('strip-json-comments');
11
- var assert = require('assert');
12
- var ignore = require('ignore');
13
- var util = require('util');
14
- var minimatch = require('minimatch');
15
- var Ajv = require('ajv');
16
- var globals = require('globals');
17
- var os = require('os');
18
-
19
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
-
21
- var debugOrig__default = /*#__PURE__*/_interopDefaultLegacy(debugOrig);
22
- var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
23
- var importFresh__default = /*#__PURE__*/_interopDefaultLegacy(importFresh);
24
- var Module__default = /*#__PURE__*/_interopDefaultLegacy(Module);
25
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
26
- var stripComments__default = /*#__PURE__*/_interopDefaultLegacy(stripComments);
27
- var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert);
28
- var ignore__default = /*#__PURE__*/_interopDefaultLegacy(ignore);
29
- var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
30
- var minimatch__default = /*#__PURE__*/_interopDefaultLegacy(minimatch);
31
- var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv);
32
- var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals);
33
- var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
34
-
35
- /**
36
- * @fileoverview `IgnorePattern` class.
37
- *
38
- * `IgnorePattern` class has the set of glob patterns and the base path.
39
- *
40
- * It provides two static methods.
41
- *
42
- * - `IgnorePattern.createDefaultIgnore(cwd)`
43
- * Create the default predicate function.
44
- * - `IgnorePattern.createIgnore(ignorePatterns)`
45
- * Create the predicate function from multiple `IgnorePattern` objects.
46
- *
47
- * It provides two properties and a method.
48
- *
49
- * - `patterns`
50
- * The glob patterns that ignore to lint.
51
- * - `basePath`
52
- * The base path of the glob patterns. If absolute paths existed in the
53
- * glob patterns, those are handled as relative paths to the base path.
54
- * - `getPatternsRelativeTo(basePath)`
55
- * Get `patterns` as modified for a given base path. It modifies the
56
- * absolute paths in the patterns as prepending the difference of two base
57
- * paths.
58
- *
59
- * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes
60
- * `ignorePatterns` properties.
61
- *
62
- * @author Toru Nagashima <https://github.com/mysticatea>
63
- */
64
-
65
- const debug$3 = debugOrig__default["default"]("eslintrc:ignore-pattern");
66
-
67
- /** @typedef {ReturnType<import("ignore").default>} Ignore */
68
-
69
- //------------------------------------------------------------------------------
70
- // Helpers
71
- //------------------------------------------------------------------------------
72
-
73
- /**
74
- * Get the path to the common ancestor directory of given paths.
75
- * @param {string[]} sourcePaths The paths to calculate the common ancestor.
76
- * @returns {string} The path to the common ancestor directory.
77
- */
78
- function getCommonAncestorPath(sourcePaths) {
79
- let result = sourcePaths[0];
80
-
81
- for (let i = 1; i < sourcePaths.length; ++i) {
82
- const a = result;
83
- const b = sourcePaths[i];
84
-
85
- // Set the shorter one (it's the common ancestor if one includes the other).
86
- result = a.length < b.length ? a : b;
87
-
88
- // Set the common ancestor.
89
- for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {
90
- if (a[j] !== b[j]) {
91
- result = a.slice(0, lastSepPos);
92
- break;
93
- }
94
- if (a[j] === path__default["default"].sep) {
95
- lastSepPos = j;
96
- }
97
- }
98
- }
99
-
100
- let resolvedResult = result || path__default["default"].sep;
101
-
102
- // if Windows common ancestor is root of drive must have trailing slash to be absolute.
103
- if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") {
104
- resolvedResult += path__default["default"].sep;
105
- }
106
- return resolvedResult;
107
- }
108
-
109
- /**
110
- * Make relative path.
111
- * @param {string} from The source path to get relative path.
112
- * @param {string} to The destination path to get relative path.
113
- * @returns {string} The relative path.
114
- */
115
- function relative(from, to) {
116
- const relPath = path__default["default"].relative(from, to);
117
-
118
- if (path__default["default"].sep === "/") {
119
- return relPath;
120
- }
121
- return relPath.split(path__default["default"].sep).join("/");
122
- }
123
-
124
- /**
125
- * Get the trailing slash if existed.
126
- * @param {string} filePath The path to check.
127
- * @returns {string} The trailing slash if existed.
128
- */
129
- function dirSuffix(filePath) {
130
- const isDir = (
131
- filePath.endsWith(path__default["default"].sep) ||
132
- (process.platform === "win32" && filePath.endsWith("/"))
133
- );
134
-
135
- return isDir ? "/" : "";
136
- }
137
-
138
- const DefaultPatterns = Object.freeze(["/**/node_modules/*"]);
139
- const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]);
140
-
141
- //------------------------------------------------------------------------------
142
- // Public
143
- //------------------------------------------------------------------------------
144
-
145
- class IgnorePattern {
146
-
147
- /**
148
- * The default patterns.
149
- * @type {string[]}
150
- */
151
- static get DefaultPatterns() {
152
- return DefaultPatterns;
153
- }
154
-
155
- /**
156
- * Create the default predicate function.
157
- * @param {string} cwd The current working directory.
158
- * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}
159
- * The preficate function.
160
- * The first argument is an absolute path that is checked.
161
- * The second argument is the flag to not ignore dotfiles.
162
- * If the predicate function returned `true`, it means the path should be ignored.
163
- */
164
- static createDefaultIgnore(cwd) {
165
- return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);
166
- }
167
-
168
- /**
169
- * Create the predicate function from multiple `IgnorePattern` objects.
170
- * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.
171
- * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}
172
- * The preficate function.
173
- * The first argument is an absolute path that is checked.
174
- * The second argument is the flag to not ignore dotfiles.
175
- * If the predicate function returned `true`, it means the path should be ignored.
176
- */
177
- static createIgnore(ignorePatterns) {
178
- debug$3("Create with: %o", ignorePatterns);
179
-
180
- const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));
181
- const patterns = [].concat(
182
- ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath))
183
- );
184
- const ig = ignore__default["default"]({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);
185
- const dotIg = ignore__default["default"]({ allowRelativePaths: true }).add(patterns);
186
-
187
- debug$3(" processed: %o", { basePath, patterns });
188
-
189
- return Object.assign(
190
- (filePath, dot = false) => {
191
- assert__default["default"](path__default["default"].isAbsolute(filePath), "'filePath' should be an absolute path.");
192
- const relPathRaw = relative(basePath, filePath);
193
- const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));
194
- const adoptedIg = dot ? dotIg : ig;
195
- const result = relPath !== "" && adoptedIg.ignores(relPath);
196
-
197
- debug$3("Check", { filePath, dot, relativePath: relPath, result });
198
- return result;
199
- },
200
- { basePath, patterns }
201
- );
202
- }
203
-
204
- /**
205
- * Initialize a new `IgnorePattern` instance.
206
- * @param {string[]} patterns The glob patterns that ignore to lint.
207
- * @param {string} basePath The base path of `patterns`.
208
- */
209
- constructor(patterns, basePath) {
210
- assert__default["default"](path__default["default"].isAbsolute(basePath), "'basePath' should be an absolute path.");
211
-
212
- /**
213
- * The glob patterns that ignore to lint.
214
- * @type {string[]}
215
- */
216
- this.patterns = patterns;
217
-
218
- /**
219
- * The base path of `patterns`.
220
- * @type {string}
221
- */
222
- this.basePath = basePath;
223
-
224
- /**
225
- * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.
226
- *
227
- * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.
228
- * It's `false` as-is for `ignorePatterns` property in config files.
229
- * @type {boolean}
230
- */
231
- this.loose = false;
232
- }
233
-
234
- /**
235
- * Get `patterns` as modified for a given base path. It modifies the
236
- * absolute paths in the patterns as prepending the difference of two base
237
- * paths.
238
- * @param {string} newBasePath The base path.
239
- * @returns {string[]} Modifired patterns.
240
- */
241
- getPatternsRelativeTo(newBasePath) {
242
- assert__default["default"](path__default["default"].isAbsolute(newBasePath), "'newBasePath' should be an absolute path.");
243
- const { basePath, loose, patterns } = this;
244
-
245
- if (newBasePath === basePath) {
246
- return patterns;
247
- }
248
- const prefix = `/${relative(newBasePath, basePath)}`;
249
-
250
- return patterns.map(pattern => {
251
- const negative = pattern.startsWith("!");
252
- const head = negative ? "!" : "";
253
- const body = negative ? pattern.slice(1) : pattern;
254
-
255
- if (body.startsWith("/") || body.startsWith("../")) {
256
- return `${head}${prefix}${body}`;
257
- }
258
- return loose ? pattern : `${head}${prefix}/**/${body}`;
259
- });
260
- }
261
- }
262
-
263
- /**
264
- * @fileoverview `ExtractedConfig` class.
265
- *
266
- * `ExtractedConfig` class expresses a final configuration for a specific file.
267
- *
268
- * It provides one method.
269
- *
270
- * - `toCompatibleObjectAsConfigFileContent()`
271
- * Convert this configuration to the compatible object as the content of
272
- * config files. It converts the loaded parser and plugins to strings.
273
- * `CLIEngine#getConfigForFile(filePath)` method uses this method.
274
- *
275
- * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.
276
- *
277
- * @author Toru Nagashima <https://github.com/mysticatea>
278
- */
279
-
280
- // For VSCode intellisense
281
- /** @typedef {import("../../shared/types").ConfigData} ConfigData */
282
- /** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
283
- /** @typedef {import("../../shared/types").SeverityConf} SeverityConf */
284
- /** @typedef {import("./config-dependency").DependentParser} DependentParser */
285
- /** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
286
-
287
- /**
288
- * Check if `xs` starts with `ys`.
289
- * @template T
290
- * @param {T[]} xs The array to check.
291
- * @param {T[]} ys The array that may be the first part of `xs`.
292
- * @returns {boolean} `true` if `xs` starts with `ys`.
293
- */
294
- function startsWith(xs, ys) {
295
- return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);
296
- }
297
-
298
- /**
299
- * The class for extracted config data.
300
- */
301
- class ExtractedConfig {
302
- constructor() {
303
-
304
- /**
305
- * The config name what `noInlineConfig` setting came from.
306
- * @type {string}
307
- */
308
- this.configNameOfNoInlineConfig = "";
309
-
310
- /**
311
- * Environments.
312
- * @type {Record<string, boolean>}
313
- */
314
- this.env = {};
315
-
316
- /**
317
- * Global variables.
318
- * @type {Record<string, GlobalConf>}
319
- */
320
- this.globals = {};
321
-
322
- /**
323
- * The glob patterns that ignore to lint.
324
- * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}
325
- */
326
- this.ignores = void 0;
327
-
328
- /**
329
- * The flag that disables directive comments.
330
- * @type {boolean|undefined}
331
- */
332
- this.noInlineConfig = void 0;
333
-
334
- /**
335
- * Parser definition.
336
- * @type {DependentParser|null}
337
- */
338
- this.parser = null;
339
-
340
- /**
341
- * Options for the parser.
342
- * @type {Object}
343
- */
344
- this.parserOptions = {};
345
-
346
- /**
347
- * Plugin definitions.
348
- * @type {Record<string, DependentPlugin>}
349
- */
350
- this.plugins = {};
351
-
352
- /**
353
- * Processor ID.
354
- * @type {string|null}
355
- */
356
- this.processor = null;
357
-
358
- /**
359
- * The flag that reports unused `eslint-disable` directive comments.
360
- * @type {boolean|undefined}
361
- */
362
- this.reportUnusedDisableDirectives = void 0;
363
-
364
- /**
365
- * Rule settings.
366
- * @type {Record<string, [SeverityConf, ...any[]]>}
367
- */
368
- this.rules = {};
369
-
370
- /**
371
- * Shared settings.
372
- * @type {Object}
373
- */
374
- this.settings = {};
375
- }
376
-
377
- /**
378
- * Convert this config to the compatible object as a config file content.
379
- * @returns {ConfigData} The converted object.
380
- */
381
- toCompatibleObjectAsConfigFileContent() {
382
- const {
383
- /* eslint-disable no-unused-vars */
384
- configNameOfNoInlineConfig: _ignore1,
385
- processor: _ignore2,
386
- /* eslint-enable no-unused-vars */
387
- ignores,
388
- ...config
389
- } = this;
390
-
391
- config.parser = config.parser && config.parser.filePath;
392
- config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();
393
- config.ignorePatterns = ignores ? ignores.patterns : [];
394
-
395
- // Strip the default patterns from `ignorePatterns`.
396
- if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {
397
- config.ignorePatterns =
398
- config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);
399
- }
400
-
401
- return config;
402
- }
403
- }
404
-
405
- /**
406
- * @fileoverview `ConfigArray` class.
407
- *
408
- * `ConfigArray` class expresses the full of a configuration. It has the entry
409
- * config file, base config files that were extended, loaded parsers, and loaded
410
- * plugins.
411
- *
412
- * `ConfigArray` class provides three properties and two methods.
413
- *
414
- * - `pluginEnvironments`
415
- * - `pluginProcessors`
416
- * - `pluginRules`
417
- * The `Map` objects that contain the members of all plugins that this
418
- * config array contains. Those map objects don't have mutation methods.
419
- * Those keys are the member ID such as `pluginId/memberName`.
420
- * - `isRoot()`
421
- * If `true` then this configuration has `root:true` property.
422
- * - `extractConfig(filePath)`
423
- * Extract the final configuration for a given file. This means merging
424
- * every config array element which that `criteria` property matched. The
425
- * `filePath` argument must be an absolute path.
426
- *
427
- * `ConfigArrayFactory` provides the loading logic of config files.
428
- *
429
- * @author Toru Nagashima <https://github.com/mysticatea>
430
- */
431
-
432
- //------------------------------------------------------------------------------
433
- // Helpers
434
- //------------------------------------------------------------------------------
435
-
436
- // Define types for VSCode IntelliSense.
437
- /** @typedef {import("../../shared/types").Environment} Environment */
438
- /** @typedef {import("../../shared/types").GlobalConf} GlobalConf */
439
- /** @typedef {import("../../shared/types").RuleConf} RuleConf */
440
- /** @typedef {import("../../shared/types").Rule} Rule */
441
- /** @typedef {import("../../shared/types").Plugin} Plugin */
442
- /** @typedef {import("../../shared/types").Processor} Processor */
443
- /** @typedef {import("./config-dependency").DependentParser} DependentParser */
444
- /** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */
445
- /** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */
446
-
447
- /**
448
- * @typedef {Object} ConfigArrayElement
449
- * @property {string} name The name of this config element.
450
- * @property {string} filePath The path to the source file of this config element.
451
- * @property {InstanceType<OverrideTester>|null} criteria The tester for the `files` and `excludedFiles` of this config element.
452
- * @property {Record<string, boolean>|undefined} env The environment settings.
453
- * @property {Record<string, GlobalConf>|undefined} globals The global variable settings.
454
- * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.
455
- * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.
456
- * @property {DependentParser|undefined} parser The parser loader.
457
- * @property {Object|undefined} parserOptions The parser options.
458
- * @property {Record<string, DependentPlugin>|undefined} plugins The plugin loaders.
459
- * @property {string|undefined} processor The processor name to refer plugin's processor.
460
- * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.
461
- * @property {boolean|undefined} root The flag to express root.
462
- * @property {Record<string, RuleConf>|undefined} rules The rule settings
463
- * @property {Object|undefined} settings The shared settings.
464
- * @property {"config" | "ignore" | "implicit-processor"} type The element type.
465
- */
466
-
467
- /**
468
- * @typedef {Object} ConfigArrayInternalSlots
469
- * @property {Map<string, ExtractedConfig>} cache The cache to extract configs.
470
- * @property {ReadonlyMap<string, Environment>|null} envMap The map from environment ID to environment definition.
471
- * @property {ReadonlyMap<string, Processor>|null} processorMap The map from processor ID to environment definition.
472
- * @property {ReadonlyMap<string, Rule>|null} ruleMap The map from rule ID to rule definition.
473
- */
474
-
475
- /** @type {WeakMap<ConfigArray, ConfigArrayInternalSlots>} */
476
- const internalSlotsMap$2 = new class extends WeakMap {
477
- get(key) {
478
- let value = super.get(key);
479
-
480
- if (!value) {
481
- value = {
482
- cache: new Map(),
483
- envMap: null,
484
- processorMap: null,
485
- ruleMap: null
486
- };
487
- super.set(key, value);
488
- }
489
-
490
- return value;
491
- }
492
- }();
493
-
494
- /**
495
- * Get the indices which are matched to a given file.
496
- * @param {ConfigArrayElement[]} elements The elements.
497
- * @param {string} filePath The path to a target file.
498
- * @returns {number[]} The indices.
499
- */
500
- function getMatchedIndices(elements, filePath) {
501
- const indices = [];
502
-
503
- for (let i = elements.length - 1; i >= 0; --i) {
504
- const element = elements[i];
505
-
506
- if (!element.criteria || (filePath && element.criteria.test(filePath))) {
507
- indices.push(i);
508
- }
509
- }
510
-
511
- return indices;
512
- }
513
-
514
- /**
515
- * Check if a value is a non-null object.
516
- * @param {any} x The value to check.
517
- * @returns {boolean} `true` if the value is a non-null object.
518
- */
519
- function isNonNullObject(x) {
520
- return typeof x === "object" && x !== null;
521
- }
522
-
523
- /**
524
- * Merge two objects.
525
- *
526
- * Assign every property values of `y` to `x` if `x` doesn't have the property.
527
- * If `x`'s property value is an object, it does recursive.
528
- * @param {Object} target The destination to merge
529
- * @param {Object|undefined} source The source to merge.
530
- * @returns {void}
531
- */
532
- function mergeWithoutOverwrite(target, source) {
533
- if (!isNonNullObject(source)) {
534
- return;
535
- }
536
-
537
- for (const key of Object.keys(source)) {
538
- if (key === "__proto__") {
539
- continue;
540
- }
541
-
542
- if (isNonNullObject(target[key])) {
543
- mergeWithoutOverwrite(target[key], source[key]);
544
- } else if (target[key] === void 0) {
545
- if (isNonNullObject(source[key])) {
546
- target[key] = Array.isArray(source[key]) ? [] : {};
547
- mergeWithoutOverwrite(target[key], source[key]);
548
- } else if (source[key] !== void 0) {
549
- target[key] = source[key];
550
- }
551
- }
552
- }
553
- }
554
-
555
- /**
556
- * The error for plugin conflicts.
557
- */
558
- class PluginConflictError extends Error {
559
-
560
- /**
561
- * Initialize this error object.
562
- * @param {string} pluginId The plugin ID.
563
- * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.
564
- */
565
- constructor(pluginId, plugins) {
566
- super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`);
567
- this.messageTemplate = "plugin-conflict";
568
- this.messageData = { pluginId, plugins };
569
- }
570
- }
571
-
572
- /**
573
- * Merge plugins.
574
- * `target`'s definition is prior to `source`'s.
575
- * @param {Record<string, DependentPlugin>} target The destination to merge
576
- * @param {Record<string, DependentPlugin>|undefined} source The source to merge.
577
- * @returns {void}
578
- */
579
- function mergePlugins(target, source) {
580
- if (!isNonNullObject(source)) {
581
- return;
582
- }
583
-
584
- for (const key of Object.keys(source)) {
585
- if (key === "__proto__") {
586
- continue;
587
- }
588
- const targetValue = target[key];
589
- const sourceValue = source[key];
590
-
591
- // Adopt the plugin which was found at first.
592
- if (targetValue === void 0) {
593
- if (sourceValue.error) {
594
- throw sourceValue.error;
595
- }
596
- target[key] = sourceValue;
597
- } else if (sourceValue.filePath !== targetValue.filePath) {
598
- throw new PluginConflictError(key, [
599
- {
600
- filePath: targetValue.filePath,
601
- importerName: targetValue.importerName
602
- },
603
- {
604
- filePath: sourceValue.filePath,
605
- importerName: sourceValue.importerName
606
- }
607
- ]);
608
- }
609
- }
610
- }
611
-
612
- /**
613
- * Merge rule configs.
614
- * `target`'s definition is prior to `source`'s.
615
- * @param {Record<string, Array>} target The destination to merge
616
- * @param {Record<string, RuleConf>|undefined} source The source to merge.
617
- * @returns {void}
618
- */
619
- function mergeRuleConfigs(target, source) {
620
- if (!isNonNullObject(source)) {
621
- return;
622
- }
623
-
624
- for (const key of Object.keys(source)) {
625
- if (key === "__proto__") {
626
- continue;
627
- }
628
- const targetDef = target[key];
629
- const sourceDef = source[key];
630
-
631
- // Adopt the rule config which was found at first.
632
- if (targetDef === void 0) {
633
- if (Array.isArray(sourceDef)) {
634
- target[key] = [...sourceDef];
635
- } else {
636
- target[key] = [sourceDef];
637
- }
638
-
639
- /*
640
- * If the first found rule config is severity only and the current rule
641
- * config has options, merge the severity and the options.
642
- */
643
- } else if (
644
- targetDef.length === 1 &&
645
- Array.isArray(sourceDef) &&
646
- sourceDef.length >= 2
647
- ) {
648
- targetDef.push(...sourceDef.slice(1));
649
- }
650
- }
651
- }
652
-
653
- /**
654
- * Create the extracted config.
655
- * @param {ConfigArray} instance The config elements.
656
- * @param {number[]} indices The indices to use.
657
- * @returns {ExtractedConfig} The extracted config.
658
- */
659
- function createConfig(instance, indices) {
660
- const config = new ExtractedConfig();
661
- const ignorePatterns = [];
662
-
663
- // Merge elements.
664
- for (const index of indices) {
665
- const element = instance[index];
666
-
667
- // Adopt the parser which was found at first.
668
- if (!config.parser && element.parser) {
669
- if (element.parser.error) {
670
- throw element.parser.error;
671
- }
672
- config.parser = element.parser;
673
- }
674
-
675
- // Adopt the processor which was found at first.
676
- if (!config.processor && element.processor) {
677
- config.processor = element.processor;
678
- }
679
-
680
- // Adopt the noInlineConfig which was found at first.
681
- if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {
682
- config.noInlineConfig = element.noInlineConfig;
683
- config.configNameOfNoInlineConfig = element.name;
684
- }
685
-
686
- // Adopt the reportUnusedDisableDirectives which was found at first.
687
- if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {
688
- config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;
689
- }
690
-
691
- // Collect ignorePatterns
692
- if (element.ignorePattern) {
693
- ignorePatterns.push(element.ignorePattern);
694
- }
695
-
696
- // Merge others.
697
- mergeWithoutOverwrite(config.env, element.env);
698
- mergeWithoutOverwrite(config.globals, element.globals);
699
- mergeWithoutOverwrite(config.parserOptions, element.parserOptions);
700
- mergeWithoutOverwrite(config.settings, element.settings);
701
- mergePlugins(config.plugins, element.plugins);
702
- mergeRuleConfigs(config.rules, element.rules);
703
- }
704
-
705
- // Create the predicate function for ignore patterns.
706
- if (ignorePatterns.length > 0) {
707
- config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());
708
- }
709
-
710
- return config;
711
- }
712
-
713
- /**
714
- * Collect definitions.
715
- * @template T, U
716
- * @param {string} pluginId The plugin ID for prefix.
717
- * @param {Record<string,T>} defs The definitions to collect.
718
- * @param {Map<string, U>} map The map to output.
719
- * @param {function(T): U} [normalize] The normalize function for each value.
720
- * @returns {void}
721
- */
722
- function collect(pluginId, defs, map, normalize) {
723
- if (defs) {
724
- const prefix = pluginId && `${pluginId}/`;
725
-
726
- for (const [key, value] of Object.entries(defs)) {
727
- map.set(
728
- `${prefix}${key}`,
729
- normalize ? normalize(value) : value
730
- );
731
- }
732
- }
733
- }
734
-
735
- /**
736
- * Normalize a rule definition.
737
- * @param {Function|Rule} rule The rule definition to normalize.
738
- * @returns {Rule} The normalized rule definition.
739
- */
740
- function normalizePluginRule(rule) {
741
- return typeof rule === "function" ? { create: rule } : rule;
742
- }
743
-
744
- /**
745
- * Delete the mutation methods from a given map.
746
- * @param {Map<any, any>} map The map object to delete.
747
- * @returns {void}
748
- */
749
- function deleteMutationMethods(map) {
750
- Object.defineProperties(map, {
751
- clear: { configurable: true, value: void 0 },
752
- delete: { configurable: true, value: void 0 },
753
- set: { configurable: true, value: void 0 }
754
- });
755
- }
756
-
757
- /**
758
- * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
759
- * @param {ConfigArrayElement[]} elements The config elements.
760
- * @param {ConfigArrayInternalSlots} slots The internal slots.
761
- * @returns {void}
762
- */
763
- function initPluginMemberMaps(elements, slots) {
764
- const processed = new Set();
765
-
766
- slots.envMap = new Map();
767
- slots.processorMap = new Map();
768
- slots.ruleMap = new Map();
769
-
770
- for (const element of elements) {
771
- if (!element.plugins) {
772
- continue;
773
- }
774
-
775
- for (const [pluginId, value] of Object.entries(element.plugins)) {
776
- const plugin = value.definition;
777
-
778
- if (!plugin || processed.has(pluginId)) {
779
- continue;
780
- }
781
- processed.add(pluginId);
782
-
783
- collect(pluginId, plugin.environments, slots.envMap);
784
- collect(pluginId, plugin.processors, slots.processorMap);
785
- collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule);
786
- }
787
- }
788
-
789
- deleteMutationMethods(slots.envMap);
790
- deleteMutationMethods(slots.processorMap);
791
- deleteMutationMethods(slots.ruleMap);
792
- }
793
-
794
- /**
795
- * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.
796
- * @param {ConfigArray} instance The config elements.
797
- * @returns {ConfigArrayInternalSlots} The extracted config.
798
- */
799
- function ensurePluginMemberMaps(instance) {
800
- const slots = internalSlotsMap$2.get(instance);
801
-
802
- if (!slots.ruleMap) {
803
- initPluginMemberMaps(instance, slots);
804
- }
805
-
806
- return slots;
807
- }
808
-
809
- //------------------------------------------------------------------------------
810
- // Public Interface
811
- //------------------------------------------------------------------------------
812
-
813
- /**
814
- * The Config Array.
815
- *
816
- * `ConfigArray` instance contains all settings, parsers, and plugins.
817
- * You need to call `ConfigArray#extractConfig(filePath)` method in order to
818
- * extract, merge and get only the config data which is related to an arbitrary
819
- * file.
820
- * @extends {Array<ConfigArrayElement>}
821
- */
822
- class ConfigArray extends Array {
823
-
824
- /**
825
- * Get the plugin environments.
826
- * The returned map cannot be mutated.
827
- * @type {ReadonlyMap<string, Environment>} The plugin environments.
828
- */
829
- get pluginEnvironments() {
830
- return ensurePluginMemberMaps(this).envMap;
831
- }
832
-
833
- /**
834
- * Get the plugin processors.
835
- * The returned map cannot be mutated.
836
- * @type {ReadonlyMap<string, Processor>} The plugin processors.
837
- */
838
- get pluginProcessors() {
839
- return ensurePluginMemberMaps(this).processorMap;
840
- }
841
-
842
- /**
843
- * Get the plugin rules.
844
- * The returned map cannot be mutated.
845
- * @returns {ReadonlyMap<string, Rule>} The plugin rules.
846
- */
847
- get pluginRules() {
848
- return ensurePluginMemberMaps(this).ruleMap;
849
- }
850
-
851
- /**
852
- * Check if this config has `root` flag.
853
- * @returns {boolean} `true` if this config array is root.
854
- */
855
- isRoot() {
856
- for (let i = this.length - 1; i >= 0; --i) {
857
- const root = this[i].root;
858
-
859
- if (typeof root === "boolean") {
860
- return root;
861
- }
862
- }
863
- return false;
864
- }
865
-
866
- /**
867
- * Extract the config data which is related to a given file.
868
- * @param {string} filePath The absolute path to the target file.
869
- * @returns {ExtractedConfig} The extracted config data.
870
- */
871
- extractConfig(filePath) {
872
- const { cache } = internalSlotsMap$2.get(this);
873
- const indices = getMatchedIndices(this, filePath);
874
- const cacheKey = indices.join(",");
875
-
876
- if (!cache.has(cacheKey)) {
877
- cache.set(cacheKey, createConfig(this, indices));
878
- }
879
-
880
- return cache.get(cacheKey);
881
- }
882
-
883
- /**
884
- * Check if a given path is an additional lint target.
885
- * @param {string} filePath The absolute path to the target file.
886
- * @returns {boolean} `true` if the file is an additional lint target.
887
- */
888
- isAdditionalTargetPath(filePath) {
889
- for (const { criteria, type } of this) {
890
- if (
891
- type === "config" &&
892
- criteria &&
893
- !criteria.endsWithWildcard &&
894
- criteria.test(filePath)
895
- ) {
896
- return true;
897
- }
898
- }
899
- return false;
900
- }
901
- }
902
-
903
- /**
904
- * Get the used extracted configs.
905
- * CLIEngine will use this method to collect used deprecated rules.
906
- * @param {ConfigArray} instance The config array object to get.
907
- * @returns {ExtractedConfig[]} The used extracted configs.
908
- * @private
909
- */
910
- function getUsedExtractedConfigs(instance) {
911
- const { cache } = internalSlotsMap$2.get(instance);
912
-
913
- return Array.from(cache.values());
914
- }
915
-
916
- /**
917
- * @fileoverview `ConfigDependency` class.
918
- *
919
- * `ConfigDependency` class expresses a loaded parser or plugin.
920
- *
921
- * If the parser or plugin was loaded successfully, it has `definition` property
922
- * and `filePath` property. Otherwise, it has `error` property.
923
- *
924
- * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it
925
- * omits `definition` property.
926
- *
927
- * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers
928
- * or plugins.
929
- *
930
- * @author Toru Nagashima <https://github.com/mysticatea>
931
- */
932
-
933
- /**
934
- * The class is to store parsers or plugins.
935
- * This class hides the loaded object from `JSON.stringify()` and `console.log`.
936
- * @template T
937
- */
938
- class ConfigDependency {
939
-
940
- /**
941
- * Initialize this instance.
942
- * @param {Object} data The dependency data.
943
- * @param {T} [data.definition] The dependency if the loading succeeded.
944
- * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded.
945
- * @param {Error} [data.error] The error object if the loading failed.
946
- * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.
947
- * @param {string} data.id The ID of this dependency.
948
- * @param {string} data.importerName The name of the config file which loads this dependency.
949
- * @param {string} data.importerPath The path to the config file which loads this dependency.
950
- */
951
- constructor({
952
- definition = null,
953
- original = null,
954
- error = null,
955
- filePath = null,
956
- id,
957
- importerName,
958
- importerPath
959
- }) {
960
-
961
- /**
962
- * The loaded dependency if the loading succeeded.
963
- * @type {T|null}
964
- */
965
- this.definition = definition;
966
-
967
- /**
968
- * The original dependency as loaded directly from disk if the loading succeeded.
969
- * @type {T|null}
970
- */
971
- this.original = original;
972
-
973
- /**
974
- * The error object if the loading failed.
975
- * @type {Error|null}
976
- */
977
- this.error = error;
978
-
979
- /**
980
- * The loaded dependency if the loading succeeded.
981
- * @type {string|null}
982
- */
983
- this.filePath = filePath;
984
-
985
- /**
986
- * The ID of this dependency.
987
- * @type {string}
988
- */
989
- this.id = id;
990
-
991
- /**
992
- * The name of the config file which loads this dependency.
993
- * @type {string}
994
- */
995
- this.importerName = importerName;
996
-
997
- /**
998
- * The path to the config file which loads this dependency.
999
- * @type {string}
1000
- */
1001
- this.importerPath = importerPath;
1002
- }
1003
-
1004
- // eslint-disable-next-line jsdoc/require-description
1005
- /**
1006
- * @returns {Object} a JSON compatible object.
1007
- */
1008
- toJSON() {
1009
- const obj = this[util__default["default"].inspect.custom]();
1010
-
1011
- // Display `error.message` (`Error#message` is unenumerable).
1012
- if (obj.error instanceof Error) {
1013
- obj.error = { ...obj.error, message: obj.error.message };
1014
- }
1015
-
1016
- return obj;
1017
- }
1018
-
1019
- // eslint-disable-next-line jsdoc/require-description
1020
- /**
1021
- * @returns {Object} an object to display by `console.log()`.
1022
- */
1023
- [util__default["default"].inspect.custom]() {
1024
- const {
1025
- definition: _ignore1, // eslint-disable-line no-unused-vars
1026
- original: _ignore2, // eslint-disable-line no-unused-vars
1027
- ...obj
1028
- } = this;
1029
-
1030
- return obj;
1031
- }
1032
- }
1033
-
1034
- /**
1035
- * @fileoverview `OverrideTester` class.
1036
- *
1037
- * `OverrideTester` class handles `files` property and `excludedFiles` property
1038
- * of `overrides` config.
1039
- *
1040
- * It provides one method.
1041
- *
1042
- * - `test(filePath)`
1043
- * Test if a file path matches the pair of `files` property and
1044
- * `excludedFiles` property. The `filePath` argument must be an absolute
1045
- * path.
1046
- *
1047
- * `ConfigArrayFactory` creates `OverrideTester` objects when it processes
1048
- * `overrides` properties.
1049
- *
1050
- * @author Toru Nagashima <https://github.com/mysticatea>
1051
- */
1052
-
1053
- const { Minimatch } = minimatch__default["default"];
1054
-
1055
- const minimatchOpts = { dot: true, matchBase: true };
1056
-
1057
- /**
1058
- * @typedef {Object} Pattern
1059
- * @property {InstanceType<Minimatch>[] | null} includes The positive matchers.
1060
- * @property {InstanceType<Minimatch>[] | null} excludes The negative matchers.
1061
- */
1062
-
1063
- /**
1064
- * Normalize a given pattern to an array.
1065
- * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.
1066
- * @returns {string[]|null} Normalized patterns.
1067
- * @private
1068
- */
1069
- function normalizePatterns(patterns) {
1070
- if (Array.isArray(patterns)) {
1071
- return patterns.filter(Boolean);
1072
- }
1073
- if (typeof patterns === "string" && patterns) {
1074
- return [patterns];
1075
- }
1076
- return [];
1077
- }
1078
-
1079
- /**
1080
- * Create the matchers of given patterns.
1081
- * @param {string[]} patterns The patterns.
1082
- * @returns {InstanceType<Minimatch>[] | null} The matchers.
1083
- */
1084
- function toMatcher(patterns) {
1085
- if (patterns.length === 0) {
1086
- return null;
1087
- }
1088
- return patterns.map(pattern => {
1089
- if (/^\.[/\\]/u.test(pattern)) {
1090
- return new Minimatch(
1091
- pattern.slice(2),
1092
-
1093
- // `./*.js` should not match with `subdir/foo.js`
1094
- { ...minimatchOpts, matchBase: false }
1095
- );
1096
- }
1097
- return new Minimatch(pattern, minimatchOpts);
1098
- });
1099
- }
1100
-
1101
- /**
1102
- * Convert a given matcher to string.
1103
- * @param {Pattern} matchers The matchers.
1104
- * @returns {string} The string expression of the matcher.
1105
- */
1106
- function patternToJson({ includes, excludes }) {
1107
- return {
1108
- includes: includes && includes.map(m => m.pattern),
1109
- excludes: excludes && excludes.map(m => m.pattern)
1110
- };
1111
- }
1112
-
1113
- /**
1114
- * The class to test given paths are matched by the patterns.
1115
- */
1116
- class OverrideTester {
1117
-
1118
- /**
1119
- * Create a tester with given criteria.
1120
- * If there are no criteria, returns `null`.
1121
- * @param {string|string[]} files The glob patterns for included files.
1122
- * @param {string|string[]} excludedFiles The glob patterns for excluded files.
1123
- * @param {string} basePath The path to the base directory to test paths.
1124
- * @returns {OverrideTester|null} The created instance or `null`.
1125
- */
1126
- static create(files, excludedFiles, basePath) {
1127
- const includePatterns = normalizePatterns(files);
1128
- const excludePatterns = normalizePatterns(excludedFiles);
1129
- let endsWithWildcard = false;
1130
-
1131
- if (includePatterns.length === 0) {
1132
- return null;
1133
- }
1134
-
1135
- // Rejects absolute paths or relative paths to parents.
1136
- for (const pattern of includePatterns) {
1137
- if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) {
1138
- throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
1139
- }
1140
- if (pattern.endsWith("*")) {
1141
- endsWithWildcard = true;
1142
- }
1143
- }
1144
- for (const pattern of excludePatterns) {
1145
- if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) {
1146
- throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
1147
- }
1148
- }
1149
-
1150
- const includes = toMatcher(includePatterns);
1151
- const excludes = toMatcher(excludePatterns);
1152
-
1153
- return new OverrideTester(
1154
- [{ includes, excludes }],
1155
- basePath,
1156
- endsWithWildcard
1157
- );
1158
- }
1159
-
1160
- /**
1161
- * Combine two testers by logical and.
1162
- * If either of the testers was `null`, returns the other tester.
1163
- * The `basePath` property of the two must be the same value.
1164
- * @param {OverrideTester|null} a A tester.
1165
- * @param {OverrideTester|null} b Another tester.
1166
- * @returns {OverrideTester|null} Combined tester.
1167
- */
1168
- static and(a, b) {
1169
- if (!b) {
1170
- return a && new OverrideTester(
1171
- a.patterns,
1172
- a.basePath,
1173
- a.endsWithWildcard
1174
- );
1175
- }
1176
- if (!a) {
1177
- return new OverrideTester(
1178
- b.patterns,
1179
- b.basePath,
1180
- b.endsWithWildcard
1181
- );
1182
- }
1183
-
1184
- assert__default["default"].strictEqual(a.basePath, b.basePath);
1185
- return new OverrideTester(
1186
- a.patterns.concat(b.patterns),
1187
- a.basePath,
1188
- a.endsWithWildcard || b.endsWithWildcard
1189
- );
1190
- }
1191
-
1192
- /**
1193
- * Initialize this instance.
1194
- * @param {Pattern[]} patterns The matchers.
1195
- * @param {string} basePath The base path.
1196
- * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.
1197
- */
1198
- constructor(patterns, basePath, endsWithWildcard = false) {
1199
-
1200
- /** @type {Pattern[]} */
1201
- this.patterns = patterns;
1202
-
1203
- /** @type {string} */
1204
- this.basePath = basePath;
1205
-
1206
- /** @type {boolean} */
1207
- this.endsWithWildcard = endsWithWildcard;
1208
- }
1209
-
1210
- /**
1211
- * Test if a given path is matched or not.
1212
- * @param {string} filePath The absolute path to the target file.
1213
- * @returns {boolean} `true` if the path was matched.
1214
- */
1215
- test(filePath) {
1216
- if (typeof filePath !== "string" || !path__default["default"].isAbsolute(filePath)) {
1217
- throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);
1218
- }
1219
- const relativePath = path__default["default"].relative(this.basePath, filePath);
1220
-
1221
- return this.patterns.every(({ includes, excludes }) => (
1222
- (!includes || includes.some(m => m.match(relativePath))) &&
1223
- (!excludes || !excludes.some(m => m.match(relativePath)))
1224
- ));
1225
- }
1226
-
1227
- // eslint-disable-next-line jsdoc/require-description
1228
- /**
1229
- * @returns {Object} a JSON compatible object.
1230
- */
1231
- toJSON() {
1232
- if (this.patterns.length === 1) {
1233
- return {
1234
- ...patternToJson(this.patterns[0]),
1235
- basePath: this.basePath
1236
- };
1237
- }
1238
- return {
1239
- AND: this.patterns.map(patternToJson),
1240
- basePath: this.basePath
1241
- };
1242
- }
1243
-
1244
- // eslint-disable-next-line jsdoc/require-description
1245
- /**
1246
- * @returns {Object} an object to display by `console.log()`.
1247
- */
1248
- [util__default["default"].inspect.custom]() {
1249
- return this.toJSON();
1250
- }
1251
- }
1252
-
1253
- /**
1254
- * @fileoverview `ConfigArray` class.
1255
- * @author Toru Nagashima <https://github.com/mysticatea>
1256
- */
1257
-
1258
- /**
1259
- * @fileoverview Config file operations. This file must be usable in the browser,
1260
- * so no Node-specific code can be here.
1261
- * @author Nicholas C. Zakas
1262
- */
1263
-
1264
- //------------------------------------------------------------------------------
1265
- // Private
1266
- //------------------------------------------------------------------------------
1267
-
1268
- const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
1269
- RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
1270
- map[value] = index;
1271
- return map;
1272
- }, {}),
1273
- VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
1274
-
1275
- //------------------------------------------------------------------------------
1276
- // Public Interface
1277
- //------------------------------------------------------------------------------
1278
-
1279
- /**
1280
- * Normalizes the severity value of a rule's configuration to a number
1281
- * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
1282
- * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
1283
- * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
1284
- * whose first element is one of the above values. Strings are matched case-insensitively.
1285
- * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
1286
- */
1287
- function getRuleSeverity(ruleConfig) {
1288
- const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
1289
-
1290
- if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
1291
- return severityValue;
1292
- }
1293
-
1294
- if (typeof severityValue === "string") {
1295
- return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
1296
- }
1297
-
1298
- return 0;
1299
- }
1300
-
1301
- /**
1302
- * Converts old-style severity settings (0, 1, 2) into new-style
1303
- * severity settings (off, warn, error) for all rules. Assumption is that severity
1304
- * values have already been validated as correct.
1305
- * @param {Object} config The config object to normalize.
1306
- * @returns {void}
1307
- */
1308
- function normalizeToStrings(config) {
1309
-
1310
- if (config.rules) {
1311
- Object.keys(config.rules).forEach(ruleId => {
1312
- const ruleConfig = config.rules[ruleId];
1313
-
1314
- if (typeof ruleConfig === "number") {
1315
- config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
1316
- } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
1317
- ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
1318
- }
1319
- });
1320
- }
1321
- }
1322
-
1323
- /**
1324
- * Determines if the severity for the given rule configuration represents an error.
1325
- * @param {int|string|Array} ruleConfig The configuration for an individual rule.
1326
- * @returns {boolean} True if the rule represents an error, false if not.
1327
- */
1328
- function isErrorSeverity(ruleConfig) {
1329
- return getRuleSeverity(ruleConfig) === 2;
1330
- }
1331
-
1332
- /**
1333
- * Checks whether a given config has valid severity or not.
1334
- * @param {number|string|Array} ruleConfig The configuration for an individual rule.
1335
- * @returns {boolean} `true` if the configuration has valid severity.
1336
- */
1337
- function isValidSeverity(ruleConfig) {
1338
- let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
1339
-
1340
- if (typeof severity === "string") {
1341
- severity = severity.toLowerCase();
1342
- }
1343
- return VALID_SEVERITIES.indexOf(severity) !== -1;
1344
- }
1345
-
1346
- /**
1347
- * Checks whether every rule of a given config has valid severity or not.
1348
- * @param {Object} config The configuration for rules.
1349
- * @returns {boolean} `true` if the configuration has valid severity.
1350
- */
1351
- function isEverySeverityValid(config) {
1352
- return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));
1353
- }
1354
-
1355
- /**
1356
- * Normalizes a value for a global in a config
1357
- * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in
1358
- * a global directive comment
1359
- * @returns {("readable"|"writeable"|"off")} The value normalized as a string
1360
- * @throws Error if global value is invalid
1361
- */
1362
- function normalizeConfigGlobal(configuredValue) {
1363
- switch (configuredValue) {
1364
- case "off":
1365
- return "off";
1366
-
1367
- case true:
1368
- case "true":
1369
- case "writeable":
1370
- case "writable":
1371
- return "writable";
1372
-
1373
- case null:
1374
- case false:
1375
- case "false":
1376
- case "readable":
1377
- case "readonly":
1378
- return "readonly";
1379
-
1380
- default:
1381
- throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);
1382
- }
1383
- }
1384
-
1385
- var ConfigOps = {
1386
- __proto__: null,
1387
- getRuleSeverity: getRuleSeverity,
1388
- normalizeToStrings: normalizeToStrings,
1389
- isErrorSeverity: isErrorSeverity,
1390
- isValidSeverity: isValidSeverity,
1391
- isEverySeverityValid: isEverySeverityValid,
1392
- normalizeConfigGlobal: normalizeConfigGlobal
1393
- };
1394
-
1395
- /**
1396
- * @fileoverview Provide the function that emits deprecation warnings.
1397
- * @author Toru Nagashima <http://github.com/mysticatea>
1398
- */
1399
-
1400
- //------------------------------------------------------------------------------
1401
- // Private
1402
- //------------------------------------------------------------------------------
1403
-
1404
- // Defitions for deprecation warnings.
1405
- const deprecationWarningMessages = {
1406
- ESLINT_LEGACY_ECMAFEATURES:
1407
- "The 'ecmaFeatures' config file property is deprecated and has no effect.",
1408
- ESLINT_PERSONAL_CONFIG_LOAD:
1409
- "'~/.eslintrc.*' config files have been deprecated. " +
1410
- "Please use a config file per project or the '--config' option.",
1411
- ESLINT_PERSONAL_CONFIG_SUPPRESS:
1412
- "'~/.eslintrc.*' config files have been deprecated. " +
1413
- "Please remove it or add 'root:true' to the config files in your " +
1414
- "projects in order to avoid loading '~/.eslintrc.*' accidentally."
1415
- };
1416
-
1417
- const sourceFileErrorCache = new Set();
1418
-
1419
- /**
1420
- * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
1421
- * for each unique file path, but repeated invocations with the same file path have no effect.
1422
- * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
1423
- * @param {string} source The name of the configuration source to report the warning for.
1424
- * @param {string} errorCode The warning message to show.
1425
- * @returns {void}
1426
- */
1427
- function emitDeprecationWarning(source, errorCode) {
1428
- const cacheKey = JSON.stringify({ source, errorCode });
1429
-
1430
- if (sourceFileErrorCache.has(cacheKey)) {
1431
- return;
1432
- }
1433
- sourceFileErrorCache.add(cacheKey);
1434
-
1435
- const rel = path__default["default"].relative(process.cwd(), source);
1436
- const message = deprecationWarningMessages[errorCode];
1437
-
1438
- process.emitWarning(
1439
- `${message} (found in "${rel}")`,
1440
- "DeprecationWarning",
1441
- errorCode
1442
- );
1443
- }
1444
-
1445
- /**
1446
- * @fileoverview The instance of Ajv validator.
1447
- * @author Evgeny Poberezkin
1448
- */
1449
-
1450
- //-----------------------------------------------------------------------------
1451
- // Helpers
1452
- //-----------------------------------------------------------------------------
1453
-
1454
- /*
1455
- * Copied from ajv/lib/refs/json-schema-draft-04.json
1456
- * The MIT License (MIT)
1457
- * Copyright (c) 2015-2017 Evgeny Poberezkin
1458
- */
1459
- const metaSchema = {
1460
- id: "http://json-schema.org/draft-04/schema#",
1461
- $schema: "http://json-schema.org/draft-04/schema#",
1462
- description: "Core schema meta-schema",
1463
- definitions: {
1464
- schemaArray: {
1465
- type: "array",
1466
- minItems: 1,
1467
- items: { $ref: "#" }
1468
- },
1469
- positiveInteger: {
1470
- type: "integer",
1471
- minimum: 0
1472
- },
1473
- positiveIntegerDefault0: {
1474
- allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }]
1475
- },
1476
- simpleTypes: {
1477
- enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
1478
- },
1479
- stringArray: {
1480
- type: "array",
1481
- items: { type: "string" },
1482
- minItems: 1,
1483
- uniqueItems: true
1484
- }
1485
- },
1486
- type: "object",
1487
- properties: {
1488
- id: {
1489
- type: "string"
1490
- },
1491
- $schema: {
1492
- type: "string"
1493
- },
1494
- title: {
1495
- type: "string"
1496
- },
1497
- description: {
1498
- type: "string"
1499
- },
1500
- default: { },
1501
- multipleOf: {
1502
- type: "number",
1503
- minimum: 0,
1504
- exclusiveMinimum: true
1505
- },
1506
- maximum: {
1507
- type: "number"
1508
- },
1509
- exclusiveMaximum: {
1510
- type: "boolean",
1511
- default: false
1512
- },
1513
- minimum: {
1514
- type: "number"
1515
- },
1516
- exclusiveMinimum: {
1517
- type: "boolean",
1518
- default: false
1519
- },
1520
- maxLength: { $ref: "#/definitions/positiveInteger" },
1521
- minLength: { $ref: "#/definitions/positiveIntegerDefault0" },
1522
- pattern: {
1523
- type: "string",
1524
- format: "regex"
1525
- },
1526
- additionalItems: {
1527
- anyOf: [
1528
- { type: "boolean" },
1529
- { $ref: "#" }
1530
- ],
1531
- default: { }
1532
- },
1533
- items: {
1534
- anyOf: [
1535
- { $ref: "#" },
1536
- { $ref: "#/definitions/schemaArray" }
1537
- ],
1538
- default: { }
1539
- },
1540
- maxItems: { $ref: "#/definitions/positiveInteger" },
1541
- minItems: { $ref: "#/definitions/positiveIntegerDefault0" },
1542
- uniqueItems: {
1543
- type: "boolean",
1544
- default: false
1545
- },
1546
- maxProperties: { $ref: "#/definitions/positiveInteger" },
1547
- minProperties: { $ref: "#/definitions/positiveIntegerDefault0" },
1548
- required: { $ref: "#/definitions/stringArray" },
1549
- additionalProperties: {
1550
- anyOf: [
1551
- { type: "boolean" },
1552
- { $ref: "#" }
1553
- ],
1554
- default: { }
1555
- },
1556
- definitions: {
1557
- type: "object",
1558
- additionalProperties: { $ref: "#" },
1559
- default: { }
1560
- },
1561
- properties: {
1562
- type: "object",
1563
- additionalProperties: { $ref: "#" },
1564
- default: { }
1565
- },
1566
- patternProperties: {
1567
- type: "object",
1568
- additionalProperties: { $ref: "#" },
1569
- default: { }
1570
- },
1571
- dependencies: {
1572
- type: "object",
1573
- additionalProperties: {
1574
- anyOf: [
1575
- { $ref: "#" },
1576
- { $ref: "#/definitions/stringArray" }
1577
- ]
1578
- }
1579
- },
1580
- enum: {
1581
- type: "array",
1582
- minItems: 1,
1583
- uniqueItems: true
1584
- },
1585
- type: {
1586
- anyOf: [
1587
- { $ref: "#/definitions/simpleTypes" },
1588
- {
1589
- type: "array",
1590
- items: { $ref: "#/definitions/simpleTypes" },
1591
- minItems: 1,
1592
- uniqueItems: true
1593
- }
1594
- ]
1595
- },
1596
- format: { type: "string" },
1597
- allOf: { $ref: "#/definitions/schemaArray" },
1598
- anyOf: { $ref: "#/definitions/schemaArray" },
1599
- oneOf: { $ref: "#/definitions/schemaArray" },
1600
- not: { $ref: "#" }
1601
- },
1602
- dependencies: {
1603
- exclusiveMaximum: ["maximum"],
1604
- exclusiveMinimum: ["minimum"]
1605
- },
1606
- default: { }
1607
- };
1608
-
1609
- //------------------------------------------------------------------------------
1610
- // Public Interface
1611
- //------------------------------------------------------------------------------
1612
-
1613
- var ajvOrig = (additionalOptions = {}) => {
1614
- const ajv = new Ajv__default["default"]({
1615
- meta: false,
1616
- useDefaults: true,
1617
- validateSchema: false,
1618
- missingRefs: "ignore",
1619
- verbose: true,
1620
- schemaId: "auto",
1621
- ...additionalOptions
1622
- });
1623
-
1624
- ajv.addMetaSchema(metaSchema);
1625
- // eslint-disable-next-line no-underscore-dangle
1626
- ajv._opts.defaultMeta = metaSchema.id;
1627
-
1628
- return ajv;
1629
- };
1630
-
1631
- /**
1632
- * @fileoverview Defines a schema for configs.
1633
- * @author Sylvan Mably
1634
- */
1635
-
1636
- const baseConfigProperties = {
1637
- $schema: { type: "string" },
1638
- env: { type: "object" },
1639
- extends: { $ref: "#/definitions/stringOrStrings" },
1640
- globals: { type: "object" },
1641
- overrides: {
1642
- type: "array",
1643
- items: { $ref: "#/definitions/overrideConfig" },
1644
- additionalItems: false
1645
- },
1646
- parser: { type: ["string", "null"] },
1647
- parserOptions: { type: "object" },
1648
- plugins: { type: "array" },
1649
- processor: { type: "string" },
1650
- rules: { type: "object" },
1651
- settings: { type: "object" },
1652
- noInlineConfig: { type: "boolean" },
1653
- reportUnusedDisableDirectives: { type: "boolean" },
1654
-
1655
- ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
1656
- };
1657
-
1658
- const configSchema = {
1659
- definitions: {
1660
- stringOrStrings: {
1661
- oneOf: [
1662
- { type: "string" },
1663
- {
1664
- type: "array",
1665
- items: { type: "string" },
1666
- additionalItems: false
1667
- }
1668
- ]
1669
- },
1670
- stringOrStringsRequired: {
1671
- oneOf: [
1672
- { type: "string" },
1673
- {
1674
- type: "array",
1675
- items: { type: "string" },
1676
- additionalItems: false,
1677
- minItems: 1
1678
- }
1679
- ]
1680
- },
1681
-
1682
- // Config at top-level.
1683
- objectConfig: {
1684
- type: "object",
1685
- properties: {
1686
- root: { type: "boolean" },
1687
- ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
1688
- ...baseConfigProperties
1689
- },
1690
- additionalProperties: false
1691
- },
1692
-
1693
- // Config in `overrides`.
1694
- overrideConfig: {
1695
- type: "object",
1696
- properties: {
1697
- excludedFiles: { $ref: "#/definitions/stringOrStrings" },
1698
- files: { $ref: "#/definitions/stringOrStringsRequired" },
1699
- ...baseConfigProperties
1700
- },
1701
- required: ["files"],
1702
- additionalProperties: false
1703
- }
1704
- },
1705
-
1706
- $ref: "#/definitions/objectConfig"
1707
- };
1708
-
1709
- /**
1710
- * @fileoverview Defines environment settings and globals.
1711
- * @author Elan Shanker
1712
- */
1713
-
1714
- //------------------------------------------------------------------------------
1715
- // Helpers
1716
- //------------------------------------------------------------------------------
1717
-
1718
- /**
1719
- * Get the object that has difference.
1720
- * @param {Record<string,boolean>} current The newer object.
1721
- * @param {Record<string,boolean>} prev The older object.
1722
- * @returns {Record<string,boolean>} The difference object.
1723
- */
1724
- function getDiff(current, prev) {
1725
- const retv = {};
1726
-
1727
- for (const [key, value] of Object.entries(current)) {
1728
- if (!Object.hasOwnProperty.call(prev, key)) {
1729
- retv[key] = value;
1730
- }
1731
- }
1732
-
1733
- return retv;
1734
- }
1735
-
1736
- const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ...
1737
- const newGlobals2017 = {
1738
- Atomics: false,
1739
- SharedArrayBuffer: false
1740
- };
1741
- const newGlobals2020 = {
1742
- BigInt: false,
1743
- BigInt64Array: false,
1744
- BigUint64Array: false,
1745
- globalThis: false
1746
- };
1747
-
1748
- const newGlobals2021 = {
1749
- AggregateError: false,
1750
- FinalizationRegistry: false,
1751
- WeakRef: false
1752
- };
1753
-
1754
- //------------------------------------------------------------------------------
1755
- // Public Interface
1756
- //------------------------------------------------------------------------------
1757
-
1758
- /** @type {Map<string, import("../lib/shared/types").Environment>} */
1759
- var environments = new Map(Object.entries({
1760
-
1761
- // Language
1762
- builtin: {
1763
- globals: globals__default["default"].es5
1764
- },
1765
- es6: {
1766
- globals: newGlobals2015,
1767
- parserOptions: {
1768
- ecmaVersion: 6
1769
- }
1770
- },
1771
- es2015: {
1772
- globals: newGlobals2015,
1773
- parserOptions: {
1774
- ecmaVersion: 6
1775
- }
1776
- },
1777
- es2016: {
1778
- globals: newGlobals2015,
1779
- parserOptions: {
1780
- ecmaVersion: 7
1781
- }
1782
- },
1783
- es2017: {
1784
- globals: { ...newGlobals2015, ...newGlobals2017 },
1785
- parserOptions: {
1786
- ecmaVersion: 8
1787
- }
1788
- },
1789
- es2018: {
1790
- globals: { ...newGlobals2015, ...newGlobals2017 },
1791
- parserOptions: {
1792
- ecmaVersion: 9
1793
- }
1794
- },
1795
- es2019: {
1796
- globals: { ...newGlobals2015, ...newGlobals2017 },
1797
- parserOptions: {
1798
- ecmaVersion: 10
1799
- }
1800
- },
1801
- es2020: {
1802
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },
1803
- parserOptions: {
1804
- ecmaVersion: 11
1805
- }
1806
- },
1807
- es2021: {
1808
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
1809
- parserOptions: {
1810
- ecmaVersion: 12
1811
- }
1812
- },
1813
- es2022: {
1814
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
1815
- parserOptions: {
1816
- ecmaVersion: 13
1817
- }
1818
- },
1819
- es2023: {
1820
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
1821
- parserOptions: {
1822
- ecmaVersion: 14
1823
- }
1824
- },
1825
- es2024: {
1826
- globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },
1827
- parserOptions: {
1828
- ecmaVersion: 15
1829
- }
1830
- },
1831
-
1832
- // Platforms
1833
- browser: {
1834
- globals: globals__default["default"].browser
1835
- },
1836
- node: {
1837
- globals: globals__default["default"].node,
1838
- parserOptions: {
1839
- ecmaFeatures: {
1840
- globalReturn: true
1841
- }
1842
- }
1843
- },
1844
- "shared-node-browser": {
1845
- globals: globals__default["default"]["shared-node-browser"]
1846
- },
1847
- worker: {
1848
- globals: globals__default["default"].worker
1849
- },
1850
- serviceworker: {
1851
- globals: globals__default["default"].serviceworker
1852
- },
1853
-
1854
- // Frameworks
1855
- commonjs: {
1856
- globals: globals__default["default"].commonjs,
1857
- parserOptions: {
1858
- ecmaFeatures: {
1859
- globalReturn: true
1860
- }
1861
- }
1862
- },
1863
- amd: {
1864
- globals: globals__default["default"].amd
1865
- },
1866
- mocha: {
1867
- globals: globals__default["default"].mocha
1868
- },
1869
- jasmine: {
1870
- globals: globals__default["default"].jasmine
1871
- },
1872
- jest: {
1873
- globals: globals__default["default"].jest
1874
- },
1875
- phantomjs: {
1876
- globals: globals__default["default"].phantomjs
1877
- },
1878
- jquery: {
1879
- globals: globals__default["default"].jquery
1880
- },
1881
- qunit: {
1882
- globals: globals__default["default"].qunit
1883
- },
1884
- prototypejs: {
1885
- globals: globals__default["default"].prototypejs
1886
- },
1887
- shelljs: {
1888
- globals: globals__default["default"].shelljs
1889
- },
1890
- meteor: {
1891
- globals: globals__default["default"].meteor
1892
- },
1893
- mongo: {
1894
- globals: globals__default["default"].mongo
1895
- },
1896
- protractor: {
1897
- globals: globals__default["default"].protractor
1898
- },
1899
- applescript: {
1900
- globals: globals__default["default"].applescript
1901
- },
1902
- nashorn: {
1903
- globals: globals__default["default"].nashorn
1904
- },
1905
- atomtest: {
1906
- globals: globals__default["default"].atomtest
1907
- },
1908
- embertest: {
1909
- globals: globals__default["default"].embertest
1910
- },
1911
- webextensions: {
1912
- globals: globals__default["default"].webextensions
1913
- },
1914
- greasemonkey: {
1915
- globals: globals__default["default"].greasemonkey
1916
- }
1917
- }));
1918
-
1919
- /**
1920
- * @fileoverview Validates configs.
1921
- * @author Brandon Mills
1922
- */
1923
-
1924
- const ajv = ajvOrig();
1925
-
1926
- const ruleValidators = new WeakMap();
1927
- const noop = Function.prototype;
1928
-
1929
- //------------------------------------------------------------------------------
1930
- // Private
1931
- //------------------------------------------------------------------------------
1932
- let validateSchema;
1933
- const severityMap = {
1934
- error: 2,
1935
- warn: 1,
1936
- off: 0
1937
- };
1938
-
1939
- const validated = new WeakSet();
1940
-
1941
- //-----------------------------------------------------------------------------
1942
- // Exports
1943
- //-----------------------------------------------------------------------------
1944
-
1945
- class ConfigValidator {
1946
- constructor({ builtInRules = new Map() } = {}) {
1947
- this.builtInRules = builtInRules;
1948
- }
1949
-
1950
- /**
1951
- * Gets a complete options schema for a rule.
1952
- * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
1953
- * @returns {Object} JSON Schema for the rule's options.
1954
- */
1955
- getRuleOptionsSchema(rule) {
1956
- if (!rule) {
1957
- return null;
1958
- }
1959
-
1960
- const schema = rule.schema || rule.meta && rule.meta.schema;
1961
-
1962
- // Given a tuple of schemas, insert warning level at the beginning
1963
- if (Array.isArray(schema)) {
1964
- if (schema.length) {
1965
- return {
1966
- type: "array",
1967
- items: schema,
1968
- minItems: 0,
1969
- maxItems: schema.length
1970
- };
1971
- }
1972
- return {
1973
- type: "array",
1974
- minItems: 0,
1975
- maxItems: 0
1976
- };
1977
-
1978
- }
1979
-
1980
- // Given a full schema, leave it alone
1981
- return schema || null;
1982
- }
1983
-
1984
- /**
1985
- * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
1986
- * @param {options} options The given options for the rule.
1987
- * @returns {number|string} The rule's severity value
1988
- */
1989
- validateRuleSeverity(options) {
1990
- const severity = Array.isArray(options) ? options[0] : options;
1991
- const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity;
1992
-
1993
- if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {
1994
- return normSeverity;
1995
- }
1996
-
1997
- throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`);
1998
-
1999
- }
2000
-
2001
- /**
2002
- * Validates the non-severity options passed to a rule, based on its schema.
2003
- * @param {{create: Function}} rule The rule to validate
2004
- * @param {Array} localOptions The options for the rule, excluding severity
2005
- * @returns {void}
2006
- */
2007
- validateRuleSchema(rule, localOptions) {
2008
- if (!ruleValidators.has(rule)) {
2009
- const schema = this.getRuleOptionsSchema(rule);
2010
-
2011
- if (schema) {
2012
- ruleValidators.set(rule, ajv.compile(schema));
2013
- }
2014
- }
2015
-
2016
- const validateRule = ruleValidators.get(rule);
2017
-
2018
- if (validateRule) {
2019
- validateRule(localOptions);
2020
- if (validateRule.errors) {
2021
- throw new Error(validateRule.errors.map(
2022
- error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
2023
- ).join(""));
2024
- }
2025
- }
2026
- }
2027
-
2028
- /**
2029
- * Validates a rule's options against its schema.
2030
- * @param {{create: Function}|null} rule The rule that the config is being validated for
2031
- * @param {string} ruleId The rule's unique name.
2032
- * @param {Array|number} options The given options for the rule.
2033
- * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
2034
- * no source is prepended to the message.
2035
- * @returns {void}
2036
- */
2037
- validateRuleOptions(rule, ruleId, options, source = null) {
2038
- try {
2039
- const severity = this.validateRuleSeverity(options);
2040
-
2041
- if (severity !== 0) {
2042
- this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
2043
- }
2044
- } catch (err) {
2045
- const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
2046
-
2047
- if (typeof source === "string") {
2048
- throw new Error(`${source}:\n\t${enhancedMessage}`);
2049
- } else {
2050
- throw new Error(enhancedMessage);
2051
- }
2052
- }
2053
- }
2054
-
2055
- /**
2056
- * Validates an environment object
2057
- * @param {Object} environment The environment config object to validate.
2058
- * @param {string} source The name of the configuration source to report in any errors.
2059
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.
2060
- * @returns {void}
2061
- */
2062
- validateEnvironment(
2063
- environment,
2064
- source,
2065
- getAdditionalEnv = noop
2066
- ) {
2067
-
2068
- // not having an environment is ok
2069
- if (!environment) {
2070
- return;
2071
- }
2072
-
2073
- Object.keys(environment).forEach(id => {
2074
- const env = getAdditionalEnv(id) || environments.get(id) || null;
2075
-
2076
- if (!env) {
2077
- const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`;
2078
-
2079
- throw new Error(message);
2080
- }
2081
- });
2082
- }
2083
-
2084
- /**
2085
- * Validates a rules config object
2086
- * @param {Object} rulesConfig The rules config object to validate.
2087
- * @param {string} source The name of the configuration source to report in any errors.
2088
- * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules
2089
- * @returns {void}
2090
- */
2091
- validateRules(
2092
- rulesConfig,
2093
- source,
2094
- getAdditionalRule = noop
2095
- ) {
2096
- if (!rulesConfig) {
2097
- return;
2098
- }
2099
-
2100
- Object.keys(rulesConfig).forEach(id => {
2101
- const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;
2102
-
2103
- this.validateRuleOptions(rule, id, rulesConfig[id], source);
2104
- });
2105
- }
2106
-
2107
- /**
2108
- * Validates a `globals` section of a config file
2109
- * @param {Object} globalsConfig The `globals` section
2110
- * @param {string|null} source The name of the configuration source to report in the event of an error.
2111
- * @returns {void}
2112
- */
2113
- validateGlobals(globalsConfig, source = null) {
2114
- if (!globalsConfig) {
2115
- return;
2116
- }
2117
-
2118
- Object.entries(globalsConfig)
2119
- .forEach(([configuredGlobal, configuredValue]) => {
2120
- try {
2121
- normalizeConfigGlobal(configuredValue);
2122
- } catch (err) {
2123
- throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`);
2124
- }
2125
- });
2126
- }
2127
-
2128
- /**
2129
- * Validate `processor` configuration.
2130
- * @param {string|undefined} processorName The processor name.
2131
- * @param {string} source The name of config file.
2132
- * @param {function(id:string): Processor} getProcessor The getter of defined processors.
2133
- * @returns {void}
2134
- */
2135
- validateProcessor(processorName, source, getProcessor) {
2136
- if (processorName && !getProcessor(processorName)) {
2137
- throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);
2138
- }
2139
- }
2140
-
2141
- /**
2142
- * Formats an array of schema validation errors.
2143
- * @param {Array} errors An array of error messages to format.
2144
- * @returns {string} Formatted error message
2145
- */
2146
- formatErrors(errors) {
2147
- return errors.map(error => {
2148
- if (error.keyword === "additionalProperties") {
2149
- const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
2150
-
2151
- return `Unexpected top-level property "${formattedPropertyPath}"`;
2152
- }
2153
- if (error.keyword === "type") {
2154
- const formattedField = error.dataPath.slice(1);
2155
- const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
2156
- const formattedValue = JSON.stringify(error.data);
2157
-
2158
- return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
2159
- }
2160
-
2161
- const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
2162
-
2163
- return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
2164
- }).map(message => `\t- ${message}.\n`).join("");
2165
- }
2166
-
2167
- /**
2168
- * Validates the top level properties of the config object.
2169
- * @param {Object} config The config object to validate.
2170
- * @param {string} source The name of the configuration source to report in any errors.
2171
- * @returns {void}
2172
- */
2173
- validateConfigSchema(config, source = null) {
2174
- validateSchema = validateSchema || ajv.compile(configSchema);
2175
-
2176
- if (!validateSchema(config)) {
2177
- throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
2178
- }
2179
-
2180
- if (Object.hasOwnProperty.call(config, "ecmaFeatures")) {
2181
- emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES");
2182
- }
2183
- }
2184
-
2185
- /**
2186
- * Validates an entire config object.
2187
- * @param {Object} config The config object to validate.
2188
- * @param {string} source The name of the configuration source to report in any errors.
2189
- * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.
2190
- * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.
2191
- * @returns {void}
2192
- */
2193
- validate(config, source, getAdditionalRule, getAdditionalEnv) {
2194
- this.validateConfigSchema(config, source);
2195
- this.validateRules(config.rules, source, getAdditionalRule);
2196
- this.validateEnvironment(config.env, source, getAdditionalEnv);
2197
- this.validateGlobals(config.globals, source);
2198
-
2199
- for (const override of config.overrides || []) {
2200
- this.validateRules(override.rules, source, getAdditionalRule);
2201
- this.validateEnvironment(override.env, source, getAdditionalEnv);
2202
- this.validateGlobals(config.globals, source);
2203
- }
2204
- }
2205
-
2206
- /**
2207
- * Validate config array object.
2208
- * @param {ConfigArray} configArray The config array to validate.
2209
- * @returns {void}
2210
- */
2211
- validateConfigArray(configArray) {
2212
- const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);
2213
- const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);
2214
- const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);
2215
-
2216
- // Validate.
2217
- for (const element of configArray) {
2218
- if (validated.has(element)) {
2219
- continue;
2220
- }
2221
- validated.add(element);
2222
-
2223
- this.validateEnvironment(element.env, element.name, getPluginEnv);
2224
- this.validateGlobals(element.globals, element.name);
2225
- this.validateProcessor(element.processor, element.name, getPluginProcessor);
2226
- this.validateRules(element.rules, element.name, getPluginRule);
2227
- }
2228
- }
2229
-
2230
- }
2231
-
2232
- /**
2233
- * @fileoverview Common helpers for naming of plugins, formatters and configs
2234
- */
2235
-
2236
- const NAMESPACE_REGEX = /^@.*\//iu;
2237
-
2238
- /**
2239
- * Brings package name to correct format based on prefix
2240
- * @param {string} name The name of the package.
2241
- * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter"
2242
- * @returns {string} Normalized name of the package
2243
- * @private
2244
- */
2245
- function normalizePackageName(name, prefix) {
2246
- let normalizedName = name;
2247
-
2248
- /**
2249
- * On Windows, name can come in with Windows slashes instead of Unix slashes.
2250
- * Normalize to Unix first to avoid errors later on.
2251
- * https://github.com/eslint/eslint/issues/5644
2252
- */
2253
- if (normalizedName.includes("\\")) {
2254
- normalizedName = normalizedName.replace(/\\/gu, "/");
2255
- }
2256
-
2257
- if (normalizedName.charAt(0) === "@") {
2258
-
2259
- /**
2260
- * it's a scoped package
2261
- * package name is the prefix, or just a username
2262
- */
2263
- const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"),
2264
- scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u");
2265
-
2266
- if (scopedPackageShortcutRegex.test(normalizedName)) {
2267
- normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
2268
- } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) {
2269
-
2270
- /**
2271
- * for scoped packages, insert the prefix after the first / unless
2272
- * the path is already @scope/eslint or @scope/eslint-xxx-yyy
2273
- */
2274
- normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`);
2275
- }
2276
- } else if (!normalizedName.startsWith(`${prefix}-`)) {
2277
- normalizedName = `${prefix}-${normalizedName}`;
2278
- }
2279
-
2280
- return normalizedName;
2281
- }
2282
-
2283
- /**
2284
- * Removes the prefix from a fullname.
2285
- * @param {string} fullname The term which may have the prefix.
2286
- * @param {string} prefix The prefix to remove.
2287
- * @returns {string} The term without prefix.
2288
- */
2289
- function getShorthandName(fullname, prefix) {
2290
- if (fullname[0] === "@") {
2291
- let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);
2292
-
2293
- if (matchResult) {
2294
- return matchResult[1];
2295
- }
2296
-
2297
- matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
2298
- if (matchResult) {
2299
- return `${matchResult[1]}/${matchResult[2]}`;
2300
- }
2301
- } else if (fullname.startsWith(`${prefix}-`)) {
2302
- return fullname.slice(prefix.length + 1);
2303
- }
2304
-
2305
- return fullname;
2306
- }
2307
-
2308
- /**
2309
- * Gets the scope (namespace) of a term.
2310
- * @param {string} term The term which may have the namespace.
2311
- * @returns {string} The namespace of the term if it has one.
2312
- */
2313
- function getNamespaceFromTerm(term) {
2314
- const match = term.match(NAMESPACE_REGEX);
2315
-
2316
- return match ? match[0] : "";
2317
- }
2318
-
2319
- var naming = {
2320
- __proto__: null,
2321
- normalizePackageName: normalizePackageName,
2322
- getShorthandName: getShorthandName,
2323
- getNamespaceFromTerm: getNamespaceFromTerm
2324
- };
2325
-
2326
- /**
2327
- * Utility for resolving a module relative to another module
2328
- * @author Teddy Katz
2329
- */
2330
-
2331
- /*
2332
- * `Module.createRequire` is added in v12.2.0. It supports URL as well.
2333
- * We only support the case where the argument is a filepath, not a URL.
2334
- */
2335
- const createRequire = Module__default["default"].createRequire;
2336
-
2337
- /**
2338
- * Resolves a Node module relative to another module
2339
- * @param {string} moduleName The name of a Node module, or a path to a Node module.
2340
- * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be
2341
- * a file rather than a directory, but the file need not actually exist.
2342
- * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`
2343
- */
2344
- function resolve(moduleName, relativeToPath) {
2345
- try {
2346
- return createRequire(relativeToPath).resolve(moduleName);
2347
- } catch (error) {
2348
-
2349
- // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.
2350
- if (
2351
- typeof error === "object" &&
2352
- error !== null &&
2353
- error.code === "MODULE_NOT_FOUND" &&
2354
- !error.requireStack &&
2355
- error.message.includes(moduleName)
2356
- ) {
2357
- error.message += `\nRequire stack:\n- ${relativeToPath}`;
2358
- }
2359
- throw error;
2360
- }
2361
- }
2362
-
2363
- var ModuleResolver = {
2364
- __proto__: null,
2365
- resolve: resolve
2366
- };
2367
-
2368
- /**
2369
- * @fileoverview The factory of `ConfigArray` objects.
2370
- *
2371
- * This class provides methods to create `ConfigArray` instance.
2372
- *
2373
- * - `create(configData, options)`
2374
- * Create a `ConfigArray` instance from a config data. This is to handle CLI
2375
- * options except `--config`.
2376
- * - `loadFile(filePath, options)`
2377
- * Create a `ConfigArray` instance from a config file. This is to handle
2378
- * `--config` option. If the file was not found, throws the following error:
2379
- * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.
2380
- * - If the filename was `package.json`, an IO error or an
2381
- * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.
2382
- * - Otherwise, an IO error such as `ENOENT`.
2383
- * - `loadInDirectory(directoryPath, options)`
2384
- * Create a `ConfigArray` instance from a config file which is on a given
2385
- * directory. This tries to load `.eslintrc.*` or `package.json`. If not
2386
- * found, returns an empty `ConfigArray`.
2387
- * - `loadESLintIgnore(filePath)`
2388
- * Create a `ConfigArray` instance from a config file that is `.eslintignore`
2389
- * format. This is to handle `--ignore-path` option.
2390
- * - `loadDefaultESLintIgnore()`
2391
- * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in
2392
- * the current working directory.
2393
- *
2394
- * `ConfigArrayFactory` class has the responsibility that loads configuration
2395
- * files, including loading `extends`, `parser`, and `plugins`. The created
2396
- * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.
2397
- *
2398
- * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class
2399
- * handles cascading and hierarchy.
2400
- *
2401
- * @author Toru Nagashima <https://github.com/mysticatea>
2402
- */
2403
-
2404
- const require$1 = Module.createRequire(require('url').pathToFileURL(__filename).toString());
2405
-
2406
- const debug$2 = debugOrig__default["default"]("eslintrc:config-array-factory");
2407
-
2408
- //------------------------------------------------------------------------------
2409
- // Helpers
2410
- //------------------------------------------------------------------------------
2411
-
2412
- const configFilenames = [
2413
- ".eslintrc.js",
2414
- ".eslintrc.cjs",
2415
- ".eslintrc.yaml",
2416
- ".eslintrc.yml",
2417
- ".eslintrc.json",
2418
- ".eslintrc",
2419
- "package.json"
2420
- ];
2421
-
2422
- // Define types for VSCode IntelliSense.
2423
- /** @typedef {import("./shared/types").ConfigData} ConfigData */
2424
- /** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */
2425
- /** @typedef {import("./shared/types").Parser} Parser */
2426
- /** @typedef {import("./shared/types").Plugin} Plugin */
2427
- /** @typedef {import("./shared/types").Rule} Rule */
2428
- /** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */
2429
- /** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */
2430
- /** @typedef {ConfigArray[0]} ConfigArrayElement */
2431
-
2432
- /**
2433
- * @typedef {Object} ConfigArrayFactoryOptions
2434
- * @property {Map<string,Plugin>} [additionalPluginPool] The map for additional plugins.
2435
- * @property {string} [cwd] The path to the current working directory.
2436
- * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.
2437
- * @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
2438
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
2439
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
2440
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
2441
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
2442
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
2443
- */
2444
-
2445
- /**
2446
- * @typedef {Object} ConfigArrayFactoryInternalSlots
2447
- * @property {Map<string,Plugin>} additionalPluginPool The map for additional plugins.
2448
- * @property {string} cwd The path to the current working directory.
2449
- * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.
2450
- * @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
2451
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
2452
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
2453
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
2454
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
2455
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
2456
- */
2457
-
2458
- /**
2459
- * @typedef {Object} ConfigArrayFactoryLoadingContext
2460
- * @property {string} filePath The path to the current configuration.
2461
- * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
2462
- * @property {string} name The name of the current configuration.
2463
- * @property {string} pluginBasePath The base path to resolve plugins.
2464
- * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
2465
- */
2466
-
2467
- /**
2468
- * @typedef {Object} ConfigArrayFactoryLoadingContext
2469
- * @property {string} filePath The path to the current configuration.
2470
- * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
2471
- * @property {string} name The name of the current configuration.
2472
- * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
2473
- */
2474
-
2475
- /** @type {WeakMap<ConfigArrayFactory, ConfigArrayFactoryInternalSlots>} */
2476
- const internalSlotsMap$1 = new WeakMap();
2477
-
2478
- /** @type {WeakMap<object, Plugin>} */
2479
- const normalizedPlugins = new WeakMap();
2480
-
2481
- /**
2482
- * Check if a given string is a file path.
2483
- * @param {string} nameOrPath A module name or file path.
2484
- * @returns {boolean} `true` if the `nameOrPath` is a file path.
2485
- */
2486
- function isFilePath(nameOrPath) {
2487
- return (
2488
- /^\.{1,2}[/\\]/u.test(nameOrPath) ||
2489
- path__default["default"].isAbsolute(nameOrPath)
2490
- );
2491
- }
2492
-
2493
- /**
2494
- * Convenience wrapper for synchronously reading file contents.
2495
- * @param {string} filePath The filename to read.
2496
- * @returns {string} The file contents, with the BOM removed.
2497
- * @private
2498
- */
2499
- function readFile(filePath) {
2500
- return fs__default["default"].readFileSync(filePath, "utf8").replace(/^\ufeff/u, "");
2501
- }
2502
-
2503
- /**
2504
- * Loads a YAML configuration from a file.
2505
- * @param {string} filePath The filename to load.
2506
- * @returns {ConfigData} The configuration object from the file.
2507
- * @throws {Error} If the file cannot be read.
2508
- * @private
2509
- */
2510
- function loadYAMLConfigFile(filePath) {
2511
- debug$2(`Loading YAML config file: ${filePath}`);
2512
-
2513
- // lazy load YAML to improve performance when not used
2514
- const yaml = require$1("js-yaml");
2515
-
2516
- try {
2517
-
2518
- // empty YAML file can be null, so always use
2519
- return yaml.load(readFile(filePath)) || {};
2520
- } catch (e) {
2521
- debug$2(`Error reading YAML file: ${filePath}`);
2522
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
2523
- throw e;
2524
- }
2525
- }
2526
-
2527
- /**
2528
- * Loads a JSON configuration from a file.
2529
- * @param {string} filePath The filename to load.
2530
- * @returns {ConfigData} The configuration object from the file.
2531
- * @throws {Error} If the file cannot be read.
2532
- * @private
2533
- */
2534
- function loadJSONConfigFile(filePath) {
2535
- debug$2(`Loading JSON config file: ${filePath}`);
2536
-
2537
- try {
2538
- return JSON.parse(stripComments__default["default"](readFile(filePath)));
2539
- } catch (e) {
2540
- debug$2(`Error reading JSON file: ${filePath}`);
2541
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
2542
- e.messageTemplate = "failed-to-read-json";
2543
- e.messageData = {
2544
- path: filePath,
2545
- message: e.message
2546
- };
2547
- throw e;
2548
- }
2549
- }
2550
-
2551
- /**
2552
- * Loads a legacy (.eslintrc) configuration from a file.
2553
- * @param {string} filePath The filename to load.
2554
- * @returns {ConfigData} The configuration object from the file.
2555
- * @throws {Error} If the file cannot be read.
2556
- * @private
2557
- */
2558
- function loadLegacyConfigFile(filePath) {
2559
- debug$2(`Loading legacy config file: ${filePath}`);
2560
-
2561
- // lazy load YAML to improve performance when not used
2562
- const yaml = require$1("js-yaml");
2563
-
2564
- try {
2565
- return yaml.load(stripComments__default["default"](readFile(filePath))) || /* istanbul ignore next */ {};
2566
- } catch (e) {
2567
- debug$2("Error reading YAML file: %s\n%o", filePath, e);
2568
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
2569
- throw e;
2570
- }
2571
- }
2572
-
2573
- /**
2574
- * Loads a JavaScript configuration from a file.
2575
- * @param {string} filePath The filename to load.
2576
- * @returns {ConfigData} The configuration object from the file.
2577
- * @throws {Error} If the file cannot be read.
2578
- * @private
2579
- */
2580
- function loadJSConfigFile(filePath) {
2581
- debug$2(`Loading JS config file: ${filePath}`);
2582
- try {
2583
- return importFresh__default["default"](filePath);
2584
- } catch (e) {
2585
- debug$2(`Error reading JavaScript file: ${filePath}`);
2586
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
2587
- throw e;
2588
- }
2589
- }
2590
-
2591
- /**
2592
- * Loads a configuration from a package.json file.
2593
- * @param {string} filePath The filename to load.
2594
- * @returns {ConfigData} The configuration object from the file.
2595
- * @throws {Error} If the file cannot be read.
2596
- * @private
2597
- */
2598
- function loadPackageJSONConfigFile(filePath) {
2599
- debug$2(`Loading package.json config file: ${filePath}`);
2600
- try {
2601
- const packageData = loadJSONConfigFile(filePath);
2602
-
2603
- if (!Object.hasOwnProperty.call(packageData, "eslintConfig")) {
2604
- throw Object.assign(
2605
- new Error("package.json file doesn't have 'eslintConfig' field."),
2606
- { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" }
2607
- );
2608
- }
2609
-
2610
- return packageData.eslintConfig;
2611
- } catch (e) {
2612
- debug$2(`Error reading package.json file: ${filePath}`);
2613
- e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
2614
- throw e;
2615
- }
2616
- }
2617
-
2618
- /**
2619
- * Loads a `.eslintignore` from a file.
2620
- * @param {string} filePath The filename to load.
2621
- * @returns {string[]} The ignore patterns from the file.
2622
- * @private
2623
- */
2624
- function loadESLintIgnoreFile(filePath) {
2625
- debug$2(`Loading .eslintignore file: ${filePath}`);
2626
-
2627
- try {
2628
- return readFile(filePath)
2629
- .split(/\r?\n/gu)
2630
- .filter(line => line.trim() !== "" && !line.startsWith("#"));
2631
- } catch (e) {
2632
- debug$2(`Error reading .eslintignore file: ${filePath}`);
2633
- e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`;
2634
- throw e;
2635
- }
2636
- }
2637
-
2638
- /**
2639
- * Creates an error to notify about a missing config to extend from.
2640
- * @param {string} configName The name of the missing config.
2641
- * @param {string} importerName The name of the config that imported the missing config
2642
- * @param {string} messageTemplate The text template to source error strings from.
2643
- * @returns {Error} The error object to throw
2644
- * @private
2645
- */
2646
- function configInvalidError(configName, importerName, messageTemplate) {
2647
- return Object.assign(
2648
- new Error(`Failed to load config "${configName}" to extend from.`),
2649
- {
2650
- messageTemplate,
2651
- messageData: { configName, importerName }
2652
- }
2653
- );
2654
- }
2655
-
2656
- /**
2657
- * Loads a configuration file regardless of the source. Inspects the file path
2658
- * to determine the correctly way to load the config file.
2659
- * @param {string} filePath The path to the configuration.
2660
- * @returns {ConfigData|null} The configuration information.
2661
- * @private
2662
- */
2663
- function loadConfigFile(filePath) {
2664
- switch (path__default["default"].extname(filePath)) {
2665
- case ".js":
2666
- case ".cjs":
2667
- return loadJSConfigFile(filePath);
2668
-
2669
- case ".json":
2670
- if (path__default["default"].basename(filePath) === "package.json") {
2671
- return loadPackageJSONConfigFile(filePath);
2672
- }
2673
- return loadJSONConfigFile(filePath);
2674
-
2675
- case ".yaml":
2676
- case ".yml":
2677
- return loadYAMLConfigFile(filePath);
2678
-
2679
- default:
2680
- return loadLegacyConfigFile(filePath);
2681
- }
2682
- }
2683
-
2684
- /**
2685
- * Write debug log.
2686
- * @param {string} request The requested module name.
2687
- * @param {string} relativeTo The file path to resolve the request relative to.
2688
- * @param {string} filePath The resolved file path.
2689
- * @returns {void}
2690
- */
2691
- function writeDebugLogForLoading(request, relativeTo, filePath) {
2692
- /* istanbul ignore next */
2693
- if (debug$2.enabled) {
2694
- let nameAndVersion = null;
2695
-
2696
- try {
2697
- const packageJsonPath = resolve(
2698
- `${request}/package.json`,
2699
- relativeTo
2700
- );
2701
- const { version = "unknown" } = require$1(packageJsonPath);
2702
-
2703
- nameAndVersion = `${request}@${version}`;
2704
- } catch (error) {
2705
- debug$2("package.json was not found:", error.message);
2706
- nameAndVersion = request;
2707
- }
2708
-
2709
- debug$2("Loaded: %s (%s)", nameAndVersion, filePath);
2710
- }
2711
- }
2712
-
2713
- /**
2714
- * Create a new context with default values.
2715
- * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.
2716
- * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`.
2717
- * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.
2718
- * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.
2719
- * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.
2720
- * @returns {ConfigArrayFactoryLoadingContext} The created context.
2721
- */
2722
- function createContext(
2723
- { cwd, resolvePluginsRelativeTo },
2724
- providedType,
2725
- providedName,
2726
- providedFilePath,
2727
- providedMatchBasePath
2728
- ) {
2729
- const filePath = providedFilePath
2730
- ? path__default["default"].resolve(cwd, providedFilePath)
2731
- : "";
2732
- const matchBasePath =
2733
- (providedMatchBasePath && path__default["default"].resolve(cwd, providedMatchBasePath)) ||
2734
- (filePath && path__default["default"].dirname(filePath)) ||
2735
- cwd;
2736
- const name =
2737
- providedName ||
2738
- (filePath && path__default["default"].relative(cwd, filePath)) ||
2739
- "";
2740
- const pluginBasePath =
2741
- resolvePluginsRelativeTo ||
2742
- (filePath && path__default["default"].dirname(filePath)) ||
2743
- cwd;
2744
- const type = providedType || "config";
2745
-
2746
- return { filePath, matchBasePath, name, pluginBasePath, type };
2747
- }
2748
-
2749
- /**
2750
- * Normalize a given plugin.
2751
- * - Ensure the object to have four properties: configs, environments, processors, and rules.
2752
- * - Ensure the object to not have other properties.
2753
- * @param {Plugin} plugin The plugin to normalize.
2754
- * @returns {Plugin} The normalized plugin.
2755
- */
2756
- function normalizePlugin(plugin) {
2757
-
2758
- // first check the cache
2759
- let normalizedPlugin = normalizedPlugins.get(plugin);
2760
-
2761
- if (normalizedPlugin) {
2762
- return normalizedPlugin;
2763
- }
2764
-
2765
- normalizedPlugin = {
2766
- configs: plugin.configs || {},
2767
- environments: plugin.environments || {},
2768
- processors: plugin.processors || {},
2769
- rules: plugin.rules || {}
2770
- };
2771
-
2772
- // save the reference for later
2773
- normalizedPlugins.set(plugin, normalizedPlugin);
2774
-
2775
- return normalizedPlugin;
2776
- }
2777
-
2778
- //------------------------------------------------------------------------------
2779
- // Public Interface
2780
- //------------------------------------------------------------------------------
2781
-
2782
- /**
2783
- * The factory of `ConfigArray` objects.
2784
- */
2785
- class ConfigArrayFactory {
2786
-
2787
- /**
2788
- * Initialize this instance.
2789
- * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.
2790
- */
2791
- constructor({
2792
- additionalPluginPool = new Map(),
2793
- cwd = process.cwd(),
2794
- resolvePluginsRelativeTo,
2795
- builtInRules,
2796
- resolver = ModuleResolver,
2797
- eslintAllPath,
2798
- getEslintAllConfig,
2799
- eslintRecommendedPath,
2800
- getEslintRecommendedConfig
2801
- } = {}) {
2802
- internalSlotsMap$1.set(this, {
2803
- additionalPluginPool,
2804
- cwd,
2805
- resolvePluginsRelativeTo:
2806
- resolvePluginsRelativeTo &&
2807
- path__default["default"].resolve(cwd, resolvePluginsRelativeTo),
2808
- builtInRules,
2809
- resolver,
2810
- eslintAllPath,
2811
- getEslintAllConfig,
2812
- eslintRecommendedPath,
2813
- getEslintRecommendedConfig
2814
- });
2815
- }
2816
-
2817
- /**
2818
- * Create `ConfigArray` instance from a config data.
2819
- * @param {ConfigData|null} configData The config data to create.
2820
- * @param {Object} [options] The options.
2821
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
2822
- * @param {string} [options.filePath] The path to this config data.
2823
- * @param {string} [options.name] The config name.
2824
- * @returns {ConfigArray} Loaded config.
2825
- */
2826
- create(configData, { basePath, filePath, name } = {}) {
2827
- if (!configData) {
2828
- return new ConfigArray();
2829
- }
2830
-
2831
- const slots = internalSlotsMap$1.get(this);
2832
- const ctx = createContext(slots, "config", name, filePath, basePath);
2833
- const elements = this._normalizeConfigData(configData, ctx);
2834
-
2835
- return new ConfigArray(...elements);
2836
- }
2837
-
2838
- /**
2839
- * Load a config file.
2840
- * @param {string} filePath The path to a config file.
2841
- * @param {Object} [options] The options.
2842
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
2843
- * @param {string} [options.name] The config name.
2844
- * @returns {ConfigArray} Loaded config.
2845
- */
2846
- loadFile(filePath, { basePath, name } = {}) {
2847
- const slots = internalSlotsMap$1.get(this);
2848
- const ctx = createContext(slots, "config", name, filePath, basePath);
2849
-
2850
- return new ConfigArray(...this._loadConfigData(ctx));
2851
- }
2852
-
2853
- /**
2854
- * Load the config file on a given directory if exists.
2855
- * @param {string} directoryPath The path to a directory.
2856
- * @param {Object} [options] The options.
2857
- * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
2858
- * @param {string} [options.name] The config name.
2859
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
2860
- */
2861
- loadInDirectory(directoryPath, { basePath, name } = {}) {
2862
- const slots = internalSlotsMap$1.get(this);
2863
-
2864
- for (const filename of configFilenames) {
2865
- const ctx = createContext(
2866
- slots,
2867
- "config",
2868
- name,
2869
- path__default["default"].join(directoryPath, filename),
2870
- basePath
2871
- );
2872
-
2873
- if (fs__default["default"].existsSync(ctx.filePath) && fs__default["default"].statSync(ctx.filePath).isFile()) {
2874
- let configData;
2875
-
2876
- try {
2877
- configData = loadConfigFile(ctx.filePath);
2878
- } catch (error) {
2879
- if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") {
2880
- throw error;
2881
- }
2882
- }
2883
-
2884
- if (configData) {
2885
- debug$2(`Config file found: ${ctx.filePath}`);
2886
- return new ConfigArray(
2887
- ...this._normalizeConfigData(configData, ctx)
2888
- );
2889
- }
2890
- }
2891
- }
2892
-
2893
- debug$2(`Config file not found on ${directoryPath}`);
2894
- return new ConfigArray();
2895
- }
2896
-
2897
- /**
2898
- * Check if a config file on a given directory exists or not.
2899
- * @param {string} directoryPath The path to a directory.
2900
- * @returns {string | null} The path to the found config file. If not found then null.
2901
- */
2902
- static getPathToConfigFileInDirectory(directoryPath) {
2903
- for (const filename of configFilenames) {
2904
- const filePath = path__default["default"].join(directoryPath, filename);
2905
-
2906
- if (fs__default["default"].existsSync(filePath)) {
2907
- if (filename === "package.json") {
2908
- try {
2909
- loadPackageJSONConfigFile(filePath);
2910
- return filePath;
2911
- } catch { /* ignore */ }
2912
- } else {
2913
- return filePath;
2914
- }
2915
- }
2916
- }
2917
- return null;
2918
- }
2919
-
2920
- /**
2921
- * Load `.eslintignore` file.
2922
- * @param {string} filePath The path to a `.eslintignore` file to load.
2923
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
2924
- */
2925
- loadESLintIgnore(filePath) {
2926
- const slots = internalSlotsMap$1.get(this);
2927
- const ctx = createContext(
2928
- slots,
2929
- "ignore",
2930
- void 0,
2931
- filePath,
2932
- slots.cwd
2933
- );
2934
- const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);
2935
-
2936
- return new ConfigArray(
2937
- ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)
2938
- );
2939
- }
2940
-
2941
- /**
2942
- * Load `.eslintignore` file in the current working directory.
2943
- * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
2944
- */
2945
- loadDefaultESLintIgnore() {
2946
- const slots = internalSlotsMap$1.get(this);
2947
- const eslintIgnorePath = path__default["default"].resolve(slots.cwd, ".eslintignore");
2948
- const packageJsonPath = path__default["default"].resolve(slots.cwd, "package.json");
2949
-
2950
- if (fs__default["default"].existsSync(eslintIgnorePath)) {
2951
- return this.loadESLintIgnore(eslintIgnorePath);
2952
- }
2953
- if (fs__default["default"].existsSync(packageJsonPath)) {
2954
- const data = loadJSONConfigFile(packageJsonPath);
2955
-
2956
- if (Object.hasOwnProperty.call(data, "eslintIgnore")) {
2957
- if (!Array.isArray(data.eslintIgnore)) {
2958
- throw new Error("Package.json eslintIgnore property requires an array of paths");
2959
- }
2960
- const ctx = createContext(
2961
- slots,
2962
- "ignore",
2963
- "eslintIgnore in package.json",
2964
- packageJsonPath,
2965
- slots.cwd
2966
- );
2967
-
2968
- return new ConfigArray(
2969
- ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)
2970
- );
2971
- }
2972
- }
2973
-
2974
- return new ConfigArray();
2975
- }
2976
-
2977
- /**
2978
- * Load a given config file.
2979
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
2980
- * @returns {IterableIterator<ConfigArrayElement>} Loaded config.
2981
- * @private
2982
- */
2983
- _loadConfigData(ctx) {
2984
- return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);
2985
- }
2986
-
2987
- /**
2988
- * Normalize a given `.eslintignore` data to config array elements.
2989
- * @param {string[]} ignorePatterns The patterns to ignore files.
2990
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
2991
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
2992
- * @private
2993
- */
2994
- *_normalizeESLintIgnoreData(ignorePatterns, ctx) {
2995
- const elements = this._normalizeObjectConfigData(
2996
- { ignorePatterns },
2997
- ctx
2998
- );
2999
-
3000
- // Set `ignorePattern.loose` flag for backward compatibility.
3001
- for (const element of elements) {
3002
- if (element.ignorePattern) {
3003
- element.ignorePattern.loose = true;
3004
- }
3005
- yield element;
3006
- }
3007
- }
3008
-
3009
- /**
3010
- * Normalize a given config to an array.
3011
- * @param {ConfigData} configData The config data to normalize.
3012
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3013
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3014
- * @private
3015
- */
3016
- _normalizeConfigData(configData, ctx) {
3017
- const validator = new ConfigValidator();
3018
-
3019
- validator.validateConfigSchema(configData, ctx.name || ctx.filePath);
3020
- return this._normalizeObjectConfigData(configData, ctx);
3021
- }
3022
-
3023
- /**
3024
- * Normalize a given config to an array.
3025
- * @param {ConfigData|OverrideConfigData} configData The config data to normalize.
3026
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3027
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3028
- * @private
3029
- */
3030
- *_normalizeObjectConfigData(configData, ctx) {
3031
- const { files, excludedFiles, ...configBody } = configData;
3032
- const criteria = OverrideTester.create(
3033
- files,
3034
- excludedFiles,
3035
- ctx.matchBasePath
3036
- );
3037
- const elements = this._normalizeObjectConfigDataBody(configBody, ctx);
3038
-
3039
- // Apply the criteria to every element.
3040
- for (const element of elements) {
3041
-
3042
- /*
3043
- * Merge the criteria.
3044
- * This is for the `overrides` entries that came from the
3045
- * configurations of `overrides[].extends`.
3046
- */
3047
- element.criteria = OverrideTester.and(criteria, element.criteria);
3048
-
3049
- /*
3050
- * Remove `root` property to ignore `root` settings which came from
3051
- * `extends` in `overrides`.
3052
- */
3053
- if (element.criteria) {
3054
- element.root = void 0;
3055
- }
3056
-
3057
- yield element;
3058
- }
3059
- }
3060
-
3061
- /**
3062
- * Normalize a given config to an array.
3063
- * @param {ConfigData} configData The config data to normalize.
3064
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3065
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3066
- * @private
3067
- */
3068
- *_normalizeObjectConfigDataBody(
3069
- {
3070
- env,
3071
- extends: extend,
3072
- globals,
3073
- ignorePatterns,
3074
- noInlineConfig,
3075
- parser: parserName,
3076
- parserOptions,
3077
- plugins: pluginList,
3078
- processor,
3079
- reportUnusedDisableDirectives,
3080
- root,
3081
- rules,
3082
- settings,
3083
- overrides: overrideList = []
3084
- },
3085
- ctx
3086
- ) {
3087
- const extendList = Array.isArray(extend) ? extend : [extend];
3088
- const ignorePattern = ignorePatterns && new IgnorePattern(
3089
- Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],
3090
- ctx.matchBasePath
3091
- );
3092
-
3093
- // Flatten `extends`.
3094
- for (const extendName of extendList.filter(Boolean)) {
3095
- yield* this._loadExtends(extendName, ctx);
3096
- }
3097
-
3098
- // Load parser & plugins.
3099
- const parser = parserName && this._loadParser(parserName, ctx);
3100
- const plugins = pluginList && this._loadPlugins(pluginList, ctx);
3101
-
3102
- // Yield pseudo config data for file extension processors.
3103
- if (plugins) {
3104
- yield* this._takeFileExtensionProcessors(plugins, ctx);
3105
- }
3106
-
3107
- // Yield the config data except `extends` and `overrides`.
3108
- yield {
3109
-
3110
- // Debug information.
3111
- type: ctx.type,
3112
- name: ctx.name,
3113
- filePath: ctx.filePath,
3114
-
3115
- // Config data.
3116
- criteria: null,
3117
- env,
3118
- globals,
3119
- ignorePattern,
3120
- noInlineConfig,
3121
- parser,
3122
- parserOptions,
3123
- plugins,
3124
- processor,
3125
- reportUnusedDisableDirectives,
3126
- root,
3127
- rules,
3128
- settings
3129
- };
3130
-
3131
- // Flatten `overries`.
3132
- for (let i = 0; i < overrideList.length; ++i) {
3133
- yield* this._normalizeObjectConfigData(
3134
- overrideList[i],
3135
- { ...ctx, name: `${ctx.name}#overrides[${i}]` }
3136
- );
3137
- }
3138
- }
3139
-
3140
- /**
3141
- * Load configs of an element in `extends`.
3142
- * @param {string} extendName The name of a base config.
3143
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3144
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3145
- * @private
3146
- */
3147
- _loadExtends(extendName, ctx) {
3148
- debug$2("Loading {extends:%j} relative to %s", extendName, ctx.filePath);
3149
- try {
3150
- if (extendName.startsWith("eslint:")) {
3151
- return this._loadExtendedBuiltInConfig(extendName, ctx);
3152
- }
3153
- if (extendName.startsWith("plugin:")) {
3154
- return this._loadExtendedPluginConfig(extendName, ctx);
3155
- }
3156
- return this._loadExtendedShareableConfig(extendName, ctx);
3157
- } catch (error) {
3158
- error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`;
3159
- throw error;
3160
- }
3161
- }
3162
-
3163
- /**
3164
- * Load configs of an element in `extends`.
3165
- * @param {string} extendName The name of a base config.
3166
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3167
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3168
- * @private
3169
- */
3170
- _loadExtendedBuiltInConfig(extendName, ctx) {
3171
- const {
3172
- eslintAllPath,
3173
- getEslintAllConfig,
3174
- eslintRecommendedPath,
3175
- getEslintRecommendedConfig
3176
- } = internalSlotsMap$1.get(this);
3177
-
3178
- if (extendName === "eslint:recommended") {
3179
- const name = `${ctx.name} » ${extendName}`;
3180
-
3181
- if (getEslintRecommendedConfig) {
3182
- if (typeof getEslintRecommendedConfig !== "function") {
3183
- throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);
3184
- }
3185
- return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" });
3186
- }
3187
- return this._loadConfigData({
3188
- ...ctx,
3189
- name,
3190
- filePath: eslintRecommendedPath
3191
- });
3192
- }
3193
- if (extendName === "eslint:all") {
3194
- const name = `${ctx.name} » ${extendName}`;
3195
-
3196
- if (getEslintAllConfig) {
3197
- if (typeof getEslintAllConfig !== "function") {
3198
- throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);
3199
- }
3200
- return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" });
3201
- }
3202
- return this._loadConfigData({
3203
- ...ctx,
3204
- name,
3205
- filePath: eslintAllPath
3206
- });
3207
- }
3208
-
3209
- throw configInvalidError(extendName, ctx.name, "extend-config-missing");
3210
- }
3211
-
3212
- /**
3213
- * Load configs of an element in `extends`.
3214
- * @param {string} extendName The name of a base config.
3215
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3216
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3217
- * @private
3218
- */
3219
- _loadExtendedPluginConfig(extendName, ctx) {
3220
- const slashIndex = extendName.lastIndexOf("/");
3221
-
3222
- if (slashIndex === -1) {
3223
- throw configInvalidError(extendName, ctx.filePath, "plugin-invalid");
3224
- }
3225
-
3226
- const pluginName = extendName.slice("plugin:".length, slashIndex);
3227
- const configName = extendName.slice(slashIndex + 1);
3228
-
3229
- if (isFilePath(pluginName)) {
3230
- throw new Error("'extends' cannot use a file path for plugins.");
3231
- }
3232
-
3233
- const plugin = this._loadPlugin(pluginName, ctx);
3234
- const configData =
3235
- plugin.definition &&
3236
- plugin.definition.configs[configName];
3237
-
3238
- if (configData) {
3239
- return this._normalizeConfigData(configData, {
3240
- ...ctx,
3241
- filePath: plugin.filePath || ctx.filePath,
3242
- name: `${ctx.name} » plugin:${plugin.id}/${configName}`
3243
- });
3244
- }
3245
-
3246
- throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing");
3247
- }
3248
-
3249
- /**
3250
- * Load configs of an element in `extends`.
3251
- * @param {string} extendName The name of a base config.
3252
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3253
- * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
3254
- * @private
3255
- */
3256
- _loadExtendedShareableConfig(extendName, ctx) {
3257
- const { cwd, resolver } = internalSlotsMap$1.get(this);
3258
- const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js");
3259
- let request;
3260
-
3261
- if (isFilePath(extendName)) {
3262
- request = extendName;
3263
- } else if (extendName.startsWith(".")) {
3264
- request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.
3265
- } else {
3266
- request = normalizePackageName(
3267
- extendName,
3268
- "eslint-config"
3269
- );
3270
- }
3271
-
3272
- let filePath;
3273
-
3274
- try {
3275
- filePath = resolver.resolve(request, relativeTo);
3276
- } catch (error) {
3277
- /* istanbul ignore else */
3278
- if (error && error.code === "MODULE_NOT_FOUND") {
3279
- throw configInvalidError(extendName, ctx.filePath, "extend-config-missing");
3280
- }
3281
- throw error;
3282
- }
3283
-
3284
- writeDebugLogForLoading(request, relativeTo, filePath);
3285
- return this._loadConfigData({
3286
- ...ctx,
3287
- filePath,
3288
- name: `${ctx.name} » ${request}`
3289
- });
3290
- }
3291
-
3292
- /**
3293
- * Load given plugins.
3294
- * @param {string[]} names The plugin names to load.
3295
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3296
- * @returns {Record<string,DependentPlugin>} The loaded parser.
3297
- * @private
3298
- */
3299
- _loadPlugins(names, ctx) {
3300
- return names.reduce((map, name) => {
3301
- if (isFilePath(name)) {
3302
- throw new Error("Plugins array cannot includes file paths.");
3303
- }
3304
- const plugin = this._loadPlugin(name, ctx);
3305
-
3306
- map[plugin.id] = plugin;
3307
-
3308
- return map;
3309
- }, {});
3310
- }
3311
-
3312
- /**
3313
- * Load a given parser.
3314
- * @param {string} nameOrPath The package name or the path to a parser file.
3315
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3316
- * @returns {DependentParser} The loaded parser.
3317
- */
3318
- _loadParser(nameOrPath, ctx) {
3319
- debug$2("Loading parser %j from %s", nameOrPath, ctx.filePath);
3320
-
3321
- const { cwd, resolver } = internalSlotsMap$1.get(this);
3322
- const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js");
3323
-
3324
- try {
3325
- const filePath = resolver.resolve(nameOrPath, relativeTo);
3326
-
3327
- writeDebugLogForLoading(nameOrPath, relativeTo, filePath);
3328
-
3329
- return new ConfigDependency({
3330
- definition: require$1(filePath),
3331
- filePath,
3332
- id: nameOrPath,
3333
- importerName: ctx.name,
3334
- importerPath: ctx.filePath
3335
- });
3336
- } catch (error) {
3337
-
3338
- // If the parser name is "espree", load the espree of ESLint.
3339
- if (nameOrPath === "espree") {
3340
- debug$2("Fallback espree.");
3341
- return new ConfigDependency({
3342
- definition: require$1("espree"),
3343
- filePath: require$1.resolve("espree"),
3344
- id: nameOrPath,
3345
- importerName: ctx.name,
3346
- importerPath: ctx.filePath
3347
- });
3348
- }
3349
-
3350
- debug$2("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name);
3351
- error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;
3352
-
3353
- return new ConfigDependency({
3354
- error,
3355
- id: nameOrPath,
3356
- importerName: ctx.name,
3357
- importerPath: ctx.filePath
3358
- });
3359
- }
3360
- }
3361
-
3362
- /**
3363
- * Load a given plugin.
3364
- * @param {string} name The plugin name to load.
3365
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3366
- * @returns {DependentPlugin} The loaded plugin.
3367
- * @private
3368
- */
3369
- _loadPlugin(name, ctx) {
3370
- debug$2("Loading plugin %j from %s", name, ctx.filePath);
3371
-
3372
- const { additionalPluginPool, resolver } = internalSlotsMap$1.get(this);
3373
- const request = normalizePackageName(name, "eslint-plugin");
3374
- const id = getShorthandName(request, "eslint-plugin");
3375
- const relativeTo = path__default["default"].join(ctx.pluginBasePath, "__placeholder__.js");
3376
-
3377
- if (name.match(/\s+/u)) {
3378
- const error = Object.assign(
3379
- new Error(`Whitespace found in plugin name '${name}'`),
3380
- {
3381
- messageTemplate: "whitespace-found",
3382
- messageData: { pluginName: request }
3383
- }
3384
- );
3385
-
3386
- return new ConfigDependency({
3387
- error,
3388
- id,
3389
- importerName: ctx.name,
3390
- importerPath: ctx.filePath
3391
- });
3392
- }
3393
-
3394
- // Check for additional pool.
3395
- const plugin =
3396
- additionalPluginPool.get(request) ||
3397
- additionalPluginPool.get(id);
3398
-
3399
- if (plugin) {
3400
- return new ConfigDependency({
3401
- definition: normalizePlugin(plugin),
3402
- original: plugin,
3403
- filePath: "", // It's unknown where the plugin came from.
3404
- id,
3405
- importerName: ctx.name,
3406
- importerPath: ctx.filePath
3407
- });
3408
- }
3409
-
3410
- let filePath;
3411
- let error;
3412
-
3413
- try {
3414
- filePath = resolver.resolve(request, relativeTo);
3415
- } catch (resolveError) {
3416
- error = resolveError;
3417
- /* istanbul ignore else */
3418
- if (error && error.code === "MODULE_NOT_FOUND") {
3419
- error.messageTemplate = "plugin-missing";
3420
- error.messageData = {
3421
- pluginName: request,
3422
- resolvePluginsRelativeTo: ctx.pluginBasePath,
3423
- importerName: ctx.name
3424
- };
3425
- }
3426
- }
3427
-
3428
- if (filePath) {
3429
- try {
3430
- writeDebugLogForLoading(request, relativeTo, filePath);
3431
-
3432
- const startTime = Date.now();
3433
- const pluginDefinition = require$1(filePath);
3434
-
3435
- debug$2(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);
3436
-
3437
- return new ConfigDependency({
3438
- definition: normalizePlugin(pluginDefinition),
3439
- original: pluginDefinition,
3440
- filePath,
3441
- id,
3442
- importerName: ctx.name,
3443
- importerPath: ctx.filePath
3444
- });
3445
- } catch (loadError) {
3446
- error = loadError;
3447
- }
3448
- }
3449
-
3450
- debug$2("Failed to load plugin '%s' declared in '%s'.", name, ctx.name);
3451
- error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;
3452
- return new ConfigDependency({
3453
- error,
3454
- id,
3455
- importerName: ctx.name,
3456
- importerPath: ctx.filePath
3457
- });
3458
- }
3459
-
3460
- /**
3461
- * Take file expression processors as config array elements.
3462
- * @param {Record<string,DependentPlugin>} plugins The plugin definitions.
3463
- * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
3464
- * @returns {IterableIterator<ConfigArrayElement>} The config array elements of file expression processors.
3465
- * @private
3466
- */
3467
- *_takeFileExtensionProcessors(plugins, ctx) {
3468
- for (const pluginId of Object.keys(plugins)) {
3469
- const processors =
3470
- plugins[pluginId] &&
3471
- plugins[pluginId].definition &&
3472
- plugins[pluginId].definition.processors;
3473
-
3474
- if (!processors) {
3475
- continue;
3476
- }
3477
-
3478
- for (const processorId of Object.keys(processors)) {
3479
- if (processorId.startsWith(".")) {
3480
- yield* this._normalizeObjectConfigData(
3481
- {
3482
- files: [`*${processorId}`],
3483
- processor: `${pluginId}/${processorId}`
3484
- },
3485
- {
3486
- ...ctx,
3487
- type: "implicit-processor",
3488
- name: `${ctx.name}#processors["${pluginId}/${processorId}"]`
3489
- }
3490
- );
3491
- }
3492
- }
3493
- }
3494
- }
3495
- }
3496
-
3497
- /**
3498
- * @fileoverview `CascadingConfigArrayFactory` class.
3499
- *
3500
- * `CascadingConfigArrayFactory` class has a responsibility:
3501
- *
3502
- * 1. Handles cascading of config files.
3503
- *
3504
- * It provides two methods:
3505
- *
3506
- * - `getConfigArrayForFile(filePath)`
3507
- * Get the corresponded configuration of a given file. This method doesn't
3508
- * throw even if the given file didn't exist.
3509
- * - `clearCache()`
3510
- * Clear the internal cache. You have to call this method when
3511
- * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends
3512
- * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)
3513
- *
3514
- * @author Toru Nagashima <https://github.com/mysticatea>
3515
- */
3516
-
3517
- const debug$1 = debugOrig__default["default"]("eslintrc:cascading-config-array-factory");
3518
-
3519
- //------------------------------------------------------------------------------
3520
- // Helpers
3521
- //------------------------------------------------------------------------------
3522
-
3523
- // Define types for VSCode IntelliSense.
3524
- /** @typedef {import("./shared/types").ConfigData} ConfigData */
3525
- /** @typedef {import("./shared/types").Parser} Parser */
3526
- /** @typedef {import("./shared/types").Plugin} Plugin */
3527
- /** @typedef {import("./shared/types").Rule} Rule */
3528
- /** @typedef {ReturnType<ConfigArrayFactory["create"]>} ConfigArray */
3529
-
3530
- /**
3531
- * @typedef {Object} CascadingConfigArrayFactoryOptions
3532
- * @property {Map<string,Plugin>} [additionalPluginPool] The map for additional plugins.
3533
- * @property {ConfigData} [baseConfig] The config by `baseConfig` option.
3534
- * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.
3535
- * @property {string} [cwd] The base directory to start lookup.
3536
- * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
3537
- * @property {string[]} [rulePaths] The value of `--rulesdir` option.
3538
- * @property {string} [specificConfigPath] The value of `--config` option.
3539
- * @property {boolean} [useEslintrc] if `false` then it doesn't load config files.
3540
- * @property {Function} loadRules The function to use to load rules.
3541
- * @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
3542
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
3543
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
3544
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
3545
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
3546
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
3547
- */
3548
-
3549
- /**
3550
- * @typedef {Object} CascadingConfigArrayFactoryInternalSlots
3551
- * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.
3552
- * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.
3553
- * @property {ConfigArray} cliConfigArray The config array of CLI options.
3554
- * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.
3555
- * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.
3556
- * @property {Map<string, ConfigArray>} configCache The cache from directory paths to config arrays.
3557
- * @property {string} cwd The base directory to start lookup.
3558
- * @property {WeakMap<ConfigArray, ConfigArray>} finalizeCache The cache from config arrays to finalized config arrays.
3559
- * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
3560
- * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.
3561
- * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.
3562
- * @property {boolean} useEslintrc if `false` then it doesn't load config files.
3563
- * @property {Function} loadRules The function to use to load rules.
3564
- * @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
3565
- * @property {Object} [resolver=ModuleResolver] The module resolver object.
3566
- * @property {string} eslintAllPath The path to the definitions for eslint:all.
3567
- * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
3568
- * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
3569
- * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
3570
- */
3571
-
3572
- /** @type {WeakMap<CascadingConfigArrayFactory, CascadingConfigArrayFactoryInternalSlots>} */
3573
- const internalSlotsMap = new WeakMap();
3574
-
3575
- /**
3576
- * Create the config array from `baseConfig` and `rulePaths`.
3577
- * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
3578
- * @returns {ConfigArray} The config array of the base configs.
3579
- */
3580
- function createBaseConfigArray({
3581
- configArrayFactory,
3582
- baseConfigData,
3583
- rulePaths,
3584
- cwd,
3585
- loadRules
3586
- }) {
3587
- const baseConfigArray = configArrayFactory.create(
3588
- baseConfigData,
3589
- { name: "BaseConfig" }
3590
- );
3591
-
3592
- /*
3593
- * Create the config array element for the default ignore patterns.
3594
- * This element has `ignorePattern` property that ignores the default
3595
- * patterns in the current working directory.
3596
- */
3597
- baseConfigArray.unshift(configArrayFactory.create(
3598
- { ignorePatterns: IgnorePattern.DefaultPatterns },
3599
- { name: "DefaultIgnorePattern" }
3600
- )[0]);
3601
-
3602
- /*
3603
- * Load rules `--rulesdir` option as a pseudo plugin.
3604
- * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate
3605
- * the rule's options with only information in the config array.
3606
- */
3607
- if (rulePaths && rulePaths.length > 0) {
3608
- baseConfigArray.push({
3609
- type: "config",
3610
- name: "--rulesdir",
3611
- filePath: "",
3612
- plugins: {
3613
- "": new ConfigDependency({
3614
- definition: {
3615
- rules: rulePaths.reduce(
3616
- (map, rulesPath) => Object.assign(
3617
- map,
3618
- loadRules(rulesPath, cwd)
3619
- ),
3620
- {}
3621
- )
3622
- },
3623
- filePath: "",
3624
- id: "",
3625
- importerName: "--rulesdir",
3626
- importerPath: ""
3627
- })
3628
- }
3629
- });
3630
- }
3631
-
3632
- return baseConfigArray;
3633
- }
3634
-
3635
- /**
3636
- * Create the config array from CLI options.
3637
- * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
3638
- * @returns {ConfigArray} The config array of the base configs.
3639
- */
3640
- function createCLIConfigArray({
3641
- cliConfigData,
3642
- configArrayFactory,
3643
- cwd,
3644
- ignorePath,
3645
- specificConfigPath
3646
- }) {
3647
- const cliConfigArray = configArrayFactory.create(
3648
- cliConfigData,
3649
- { name: "CLIOptions" }
3650
- );
3651
-
3652
- cliConfigArray.unshift(
3653
- ...(ignorePath
3654
- ? configArrayFactory.loadESLintIgnore(ignorePath)
3655
- : configArrayFactory.loadDefaultESLintIgnore())
3656
- );
3657
-
3658
- if (specificConfigPath) {
3659
- cliConfigArray.unshift(
3660
- ...configArrayFactory.loadFile(
3661
- specificConfigPath,
3662
- { name: "--config", basePath: cwd }
3663
- )
3664
- );
3665
- }
3666
-
3667
- return cliConfigArray;
3668
- }
3669
-
3670
- /**
3671
- * The error type when there are files matched by a glob, but all of them have been ignored.
3672
- */
3673
- class ConfigurationNotFoundError extends Error {
3674
-
3675
- // eslint-disable-next-line jsdoc/require-description
3676
- /**
3677
- * @param {string} directoryPath The directory path.
3678
- */
3679
- constructor(directoryPath) {
3680
- super(`No ESLint configuration found in ${directoryPath}.`);
3681
- this.messageTemplate = "no-config-found";
3682
- this.messageData = { directoryPath };
3683
- }
3684
- }
3685
-
3686
- /**
3687
- * This class provides the functionality that enumerates every file which is
3688
- * matched by given glob patterns and that configuration.
3689
- */
3690
- class CascadingConfigArrayFactory {
3691
-
3692
- /**
3693
- * Initialize this enumerator.
3694
- * @param {CascadingConfigArrayFactoryOptions} options The options.
3695
- */
3696
- constructor({
3697
- additionalPluginPool = new Map(),
3698
- baseConfig: baseConfigData = null,
3699
- cliConfig: cliConfigData = null,
3700
- cwd = process.cwd(),
3701
- ignorePath,
3702
- resolvePluginsRelativeTo,
3703
- rulePaths = [],
3704
- specificConfigPath = null,
3705
- useEslintrc = true,
3706
- builtInRules = new Map(),
3707
- loadRules,
3708
- resolver,
3709
- eslintRecommendedPath,
3710
- getEslintRecommendedConfig,
3711
- eslintAllPath,
3712
- getEslintAllConfig
3713
- } = {}) {
3714
- const configArrayFactory = new ConfigArrayFactory({
3715
- additionalPluginPool,
3716
- cwd,
3717
- resolvePluginsRelativeTo,
3718
- builtInRules,
3719
- resolver,
3720
- eslintRecommendedPath,
3721
- getEslintRecommendedConfig,
3722
- eslintAllPath,
3723
- getEslintAllConfig
3724
- });
3725
-
3726
- internalSlotsMap.set(this, {
3727
- baseConfigArray: createBaseConfigArray({
3728
- baseConfigData,
3729
- configArrayFactory,
3730
- cwd,
3731
- rulePaths,
3732
- loadRules
3733
- }),
3734
- baseConfigData,
3735
- cliConfigArray: createCLIConfigArray({
3736
- cliConfigData,
3737
- configArrayFactory,
3738
- cwd,
3739
- ignorePath,
3740
- specificConfigPath
3741
- }),
3742
- cliConfigData,
3743
- configArrayFactory,
3744
- configCache: new Map(),
3745
- cwd,
3746
- finalizeCache: new WeakMap(),
3747
- ignorePath,
3748
- rulePaths,
3749
- specificConfigPath,
3750
- useEslintrc,
3751
- builtInRules,
3752
- loadRules
3753
- });
3754
- }
3755
-
3756
- /**
3757
- * The path to the current working directory.
3758
- * This is used by tests.
3759
- * @type {string}
3760
- */
3761
- get cwd() {
3762
- const { cwd } = internalSlotsMap.get(this);
3763
-
3764
- return cwd;
3765
- }
3766
-
3767
- /**
3768
- * Get the config array of a given file.
3769
- * If `filePath` was not given, it returns the config which contains only
3770
- * `baseConfigData` and `cliConfigData`.
3771
- * @param {string} [filePath] The file path to a file.
3772
- * @param {Object} [options] The options.
3773
- * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.
3774
- * @returns {ConfigArray} The config array of the file.
3775
- */
3776
- getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {
3777
- const {
3778
- baseConfigArray,
3779
- cliConfigArray,
3780
- cwd
3781
- } = internalSlotsMap.get(this);
3782
-
3783
- if (!filePath) {
3784
- return new ConfigArray(...baseConfigArray, ...cliConfigArray);
3785
- }
3786
-
3787
- const directoryPath = path__default["default"].dirname(path__default["default"].resolve(cwd, filePath));
3788
-
3789
- debug$1(`Load config files for ${directoryPath}.`);
3790
-
3791
- return this._finalizeConfigArray(
3792
- this._loadConfigInAncestors(directoryPath),
3793
- directoryPath,
3794
- ignoreNotFoundError
3795
- );
3796
- }
3797
-
3798
- /**
3799
- * Set the config data to override all configs.
3800
- * Require to call `clearCache()` method after this method is called.
3801
- * @param {ConfigData} configData The config data to override all configs.
3802
- * @returns {void}
3803
- */
3804
- setOverrideConfig(configData) {
3805
- const slots = internalSlotsMap.get(this);
3806
-
3807
- slots.cliConfigData = configData;
3808
- }
3809
-
3810
- /**
3811
- * Clear config cache.
3812
- * @returns {void}
3813
- */
3814
- clearCache() {
3815
- const slots = internalSlotsMap.get(this);
3816
-
3817
- slots.baseConfigArray = createBaseConfigArray(slots);
3818
- slots.cliConfigArray = createCLIConfigArray(slots);
3819
- slots.configCache.clear();
3820
- }
3821
-
3822
- /**
3823
- * Load and normalize config files from the ancestor directories.
3824
- * @param {string} directoryPath The path to a leaf directory.
3825
- * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.
3826
- * @returns {ConfigArray} The loaded config.
3827
- * @private
3828
- */
3829
- _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {
3830
- const {
3831
- baseConfigArray,
3832
- configArrayFactory,
3833
- configCache,
3834
- cwd,
3835
- useEslintrc
3836
- } = internalSlotsMap.get(this);
3837
-
3838
- if (!useEslintrc) {
3839
- return baseConfigArray;
3840
- }
3841
-
3842
- let configArray = configCache.get(directoryPath);
3843
-
3844
- // Hit cache.
3845
- if (configArray) {
3846
- debug$1(`Cache hit: ${directoryPath}.`);
3847
- return configArray;
3848
- }
3849
- debug$1(`No cache found: ${directoryPath}.`);
3850
-
3851
- const homePath = os__default["default"].homedir();
3852
-
3853
- // Consider this is root.
3854
- if (directoryPath === homePath && cwd !== homePath) {
3855
- debug$1("Stop traversing because of considered root.");
3856
- if (configsExistInSubdirs) {
3857
- const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);
3858
-
3859
- if (filePath) {
3860
- emitDeprecationWarning(
3861
- filePath,
3862
- "ESLINT_PERSONAL_CONFIG_SUPPRESS"
3863
- );
3864
- }
3865
- }
3866
- return this._cacheConfig(directoryPath, baseConfigArray);
3867
- }
3868
-
3869
- // Load the config on this directory.
3870
- try {
3871
- configArray = configArrayFactory.loadInDirectory(directoryPath);
3872
- } catch (error) {
3873
- /* istanbul ignore next */
3874
- if (error.code === "EACCES") {
3875
- debug$1("Stop traversing because of 'EACCES' error.");
3876
- return this._cacheConfig(directoryPath, baseConfigArray);
3877
- }
3878
- throw error;
3879
- }
3880
-
3881
- if (configArray.length > 0 && configArray.isRoot()) {
3882
- debug$1("Stop traversing because of 'root:true'.");
3883
- configArray.unshift(...baseConfigArray);
3884
- return this._cacheConfig(directoryPath, configArray);
3885
- }
3886
-
3887
- // Load from the ancestors and merge it.
3888
- const parentPath = path__default["default"].dirname(directoryPath);
3889
- const parentConfigArray = parentPath && parentPath !== directoryPath
3890
- ? this._loadConfigInAncestors(
3891
- parentPath,
3892
- configsExistInSubdirs || configArray.length > 0
3893
- )
3894
- : baseConfigArray;
3895
-
3896
- if (configArray.length > 0) {
3897
- configArray.unshift(...parentConfigArray);
3898
- } else {
3899
- configArray = parentConfigArray;
3900
- }
3901
-
3902
- // Cache and return.
3903
- return this._cacheConfig(directoryPath, configArray);
3904
- }
3905
-
3906
- /**
3907
- * Freeze and cache a given config.
3908
- * @param {string} directoryPath The path to a directory as a cache key.
3909
- * @param {ConfigArray} configArray The config array as a cache value.
3910
- * @returns {ConfigArray} The `configArray` (frozen).
3911
- */
3912
- _cacheConfig(directoryPath, configArray) {
3913
- const { configCache } = internalSlotsMap.get(this);
3914
-
3915
- Object.freeze(configArray);
3916
- configCache.set(directoryPath, configArray);
3917
-
3918
- return configArray;
3919
- }
3920
-
3921
- /**
3922
- * Finalize a given config array.
3923
- * Concatenate `--config` and other CLI options.
3924
- * @param {ConfigArray} configArray The parent config array.
3925
- * @param {string} directoryPath The path to the leaf directory to find config files.
3926
- * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.
3927
- * @returns {ConfigArray} The loaded config.
3928
- * @private
3929
- */
3930
- _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {
3931
- const {
3932
- cliConfigArray,
3933
- configArrayFactory,
3934
- finalizeCache,
3935
- useEslintrc,
3936
- builtInRules
3937
- } = internalSlotsMap.get(this);
3938
-
3939
- let finalConfigArray = finalizeCache.get(configArray);
3940
-
3941
- if (!finalConfigArray) {
3942
- finalConfigArray = configArray;
3943
-
3944
- // Load the personal config if there are no regular config files.
3945
- if (
3946
- useEslintrc &&
3947
- configArray.every(c => !c.filePath) &&
3948
- cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.
3949
- ) {
3950
- const homePath = os__default["default"].homedir();
3951
-
3952
- debug$1("Loading the config file of the home directory:", homePath);
3953
-
3954
- const personalConfigArray = configArrayFactory.loadInDirectory(
3955
- homePath,
3956
- { name: "PersonalConfig" }
3957
- );
3958
-
3959
- if (
3960
- personalConfigArray.length > 0 &&
3961
- !directoryPath.startsWith(homePath)
3962
- ) {
3963
- const lastElement =
3964
- personalConfigArray[personalConfigArray.length - 1];
3965
-
3966
- emitDeprecationWarning(
3967
- lastElement.filePath,
3968
- "ESLINT_PERSONAL_CONFIG_LOAD"
3969
- );
3970
- }
3971
-
3972
- finalConfigArray = finalConfigArray.concat(personalConfigArray);
3973
- }
3974
-
3975
- // Apply CLI options.
3976
- if (cliConfigArray.length > 0) {
3977
- finalConfigArray = finalConfigArray.concat(cliConfigArray);
3978
- }
3979
-
3980
- // Validate rule settings and environments.
3981
- const validator = new ConfigValidator({
3982
- builtInRules
3983
- });
3984
-
3985
- validator.validateConfigArray(finalConfigArray);
3986
-
3987
- // Cache it.
3988
- Object.freeze(finalConfigArray);
3989
- finalizeCache.set(configArray, finalConfigArray);
3990
-
3991
- debug$1(
3992
- "Configuration was determined: %o on %s",
3993
- finalConfigArray,
3994
- directoryPath
3995
- );
3996
- }
3997
-
3998
- // At least one element (the default ignore patterns) exists.
3999
- if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {
4000
- throw new ConfigurationNotFoundError(directoryPath);
4001
- }
4002
-
4003
- return finalConfigArray;
4004
- }
4005
- }
4006
-
4007
- /**
4008
- * @fileoverview Compatibility class for flat config.
4009
- * @author Nicholas C. Zakas
4010
- */
4011
-
4012
- //-----------------------------------------------------------------------------
4013
- // Helpers
4014
- //-----------------------------------------------------------------------------
4015
-
4016
- /** @typedef {import("../../shared/types").Environment} Environment */
4017
- /** @typedef {import("../../shared/types").Processor} Processor */
4018
-
4019
- const debug = debugOrig__default["default"]("eslintrc:flat-compat");
4020
- const cafactory = Symbol("cafactory");
4021
-
4022
- /**
4023
- * Translates an ESLintRC-style config object into a flag-config-style config
4024
- * object.
4025
- * @param {Object} eslintrcConfig An ESLintRC-style config object.
4026
- * @param {Object} options Options to help translate the config.
4027
- * @param {string} options.resolveConfigRelativeTo To the directory to resolve
4028
- * configs from.
4029
- * @param {string} options.resolvePluginsRelativeTo The directory to resolve
4030
- * plugins from.
4031
- * @param {ReadOnlyMap<string,Environment>} options.pluginEnvironments A map of plugin environment
4032
- * names to objects.
4033
- * @param {ReadOnlyMap<string,Processor>} options.pluginProcessors A map of plugin processor
4034
- * names to objects.
4035
- * @returns {Object} A flag-config-style config object.
4036
- */
4037
- function translateESLintRC(eslintrcConfig, {
4038
- resolveConfigRelativeTo,
4039
- resolvePluginsRelativeTo,
4040
- pluginEnvironments,
4041
- pluginProcessors
4042
- }) {
4043
-
4044
- const flatConfig = {};
4045
- const configs = [];
4046
- const languageOptions = {};
4047
- const linterOptions = {};
4048
- const keysToCopy = ["settings", "rules", "processor"];
4049
- const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"];
4050
- const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"];
4051
-
4052
- // copy over simple translations
4053
- for (const key of keysToCopy) {
4054
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
4055
- flatConfig[key] = eslintrcConfig[key];
4056
- }
4057
- }
4058
-
4059
- // copy over languageOptions
4060
- for (const key of languageOptionsKeysToCopy) {
4061
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
4062
-
4063
- // create the languageOptions key in the flat config
4064
- flatConfig.languageOptions = languageOptions;
4065
-
4066
- if (key === "parser") {
4067
- debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`);
4068
-
4069
- if (eslintrcConfig[key].error) {
4070
- throw eslintrcConfig[key].error;
4071
- }
4072
-
4073
- languageOptions[key] = eslintrcConfig[key].definition;
4074
- continue;
4075
- }
4076
-
4077
- // clone any object values that are in the eslintrc config
4078
- if (eslintrcConfig[key] && typeof eslintrcConfig[key] === "object") {
4079
- languageOptions[key] = {
4080
- ...eslintrcConfig[key]
4081
- };
4082
- } else {
4083
- languageOptions[key] = eslintrcConfig[key];
4084
- }
4085
- }
4086
- }
4087
-
4088
- // copy over linterOptions
4089
- for (const key of linterOptionsKeysToCopy) {
4090
- if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") {
4091
- flatConfig.linterOptions = linterOptions;
4092
- linterOptions[key] = eslintrcConfig[key];
4093
- }
4094
- }
4095
-
4096
- // move ecmaVersion a level up
4097
- if (languageOptions.parserOptions) {
4098
-
4099
- if ("ecmaVersion" in languageOptions.parserOptions) {
4100
- languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion;
4101
- delete languageOptions.parserOptions.ecmaVersion;
4102
- }
4103
-
4104
- if ("sourceType" in languageOptions.parserOptions) {
4105
- languageOptions.sourceType = languageOptions.parserOptions.sourceType;
4106
- delete languageOptions.parserOptions.sourceType;
4107
- }
4108
-
4109
- // check to see if we even need parserOptions anymore and remove it if not
4110
- if (Object.keys(languageOptions.parserOptions).length === 0) {
4111
- delete languageOptions.parserOptions;
4112
- }
4113
- }
4114
-
4115
- // overrides
4116
- if (eslintrcConfig.criteria) {
4117
- flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)];
4118
- }
4119
-
4120
- // translate plugins
4121
- if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === "object") {
4122
- debug(`Translating plugins: ${eslintrcConfig.plugins}`);
4123
-
4124
- flatConfig.plugins = {};
4125
-
4126
- for (const pluginName of Object.keys(eslintrcConfig.plugins)) {
4127
-
4128
- debug(`Translating plugin: ${pluginName}`);
4129
- debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`);
4130
-
4131
- const { original: plugin, error } = eslintrcConfig.plugins[pluginName];
4132
-
4133
- if (error) {
4134
- throw error;
4135
- }
4136
-
4137
- flatConfig.plugins[pluginName] = plugin;
4138
-
4139
- // create a config for any processors
4140
- if (plugin.processors) {
4141
- for (const processorName of Object.keys(plugin.processors)) {
4142
- if (processorName.startsWith(".")) {
4143
- debug(`Assigning processor: ${pluginName}/${processorName}`);
4144
-
4145
- configs.unshift({
4146
- files: [`**/*${processorName}`],
4147
- processor: pluginProcessors.get(`${pluginName}/${processorName}`)
4148
- });
4149
- }
4150
-
4151
- }
4152
- }
4153
- }
4154
- }
4155
-
4156
- // translate env - must come after plugins
4157
- if (eslintrcConfig.env && typeof eslintrcConfig.env === "object") {
4158
- for (const envName of Object.keys(eslintrcConfig.env)) {
4159
-
4160
- // only add environments that are true
4161
- if (eslintrcConfig.env[envName]) {
4162
- debug(`Translating environment: ${envName}`);
4163
-
4164
- if (environments.has(envName)) {
4165
-
4166
- // built-in environments should be defined first
4167
- configs.unshift(...translateESLintRC({
4168
- criteria: eslintrcConfig.criteria,
4169
- ...environments.get(envName)
4170
- }, {
4171
- resolveConfigRelativeTo,
4172
- resolvePluginsRelativeTo
4173
- }));
4174
- } else if (pluginEnvironments.has(envName)) {
4175
-
4176
- // if the environment comes from a plugin, it should come after the plugin config
4177
- configs.push(...translateESLintRC({
4178
- criteria: eslintrcConfig.criteria,
4179
- ...pluginEnvironments.get(envName)
4180
- }, {
4181
- resolveConfigRelativeTo,
4182
- resolvePluginsRelativeTo
4183
- }));
4184
- }
4185
- }
4186
- }
4187
- }
4188
-
4189
- // only add if there are actually keys in the config
4190
- if (Object.keys(flatConfig).length > 0) {
4191
- configs.push(flatConfig);
4192
- }
4193
-
4194
- return configs;
4195
- }
4196
-
4197
-
4198
- //-----------------------------------------------------------------------------
4199
- // Exports
4200
- //-----------------------------------------------------------------------------
4201
-
4202
- /**
4203
- * A compatibility class for working with configs.
4204
- */
4205
- class FlatCompat {
4206
-
4207
- constructor({
4208
- baseDirectory = process.cwd(),
4209
- resolvePluginsRelativeTo = baseDirectory,
4210
- recommendedConfig,
4211
- allConfig
4212
- } = {}) {
4213
- this.baseDirectory = baseDirectory;
4214
- this.resolvePluginsRelativeTo = resolvePluginsRelativeTo;
4215
- this[cafactory] = new ConfigArrayFactory({
4216
- cwd: baseDirectory,
4217
- resolvePluginsRelativeTo,
4218
- getEslintAllConfig: () => {
4219
-
4220
- if (!allConfig) {
4221
- throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor.");
4222
- }
4223
-
4224
- return allConfig;
4225
- },
4226
- getEslintRecommendedConfig: () => {
4227
-
4228
- if (!recommendedConfig) {
4229
- throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor.");
4230
- }
4231
-
4232
- return recommendedConfig;
4233
- }
4234
- });
4235
- }
4236
-
4237
- /**
4238
- * Translates an ESLintRC-style config into a flag-config-style config.
4239
- * @param {Object} eslintrcConfig The ESLintRC-style config object.
4240
- * @returns {Object} A flag-config-style config object.
4241
- */
4242
- config(eslintrcConfig) {
4243
- const eslintrcArray = this[cafactory].create(eslintrcConfig, {
4244
- basePath: this.baseDirectory
4245
- });
4246
-
4247
- const flatArray = [];
4248
- let hasIgnorePatterns = false;
4249
-
4250
- eslintrcArray.forEach(configData => {
4251
- if (configData.type === "config") {
4252
- hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern;
4253
- flatArray.push(...translateESLintRC(configData, {
4254
- resolveConfigRelativeTo: path__default["default"].join(this.baseDirectory, "__placeholder.js"),
4255
- resolvePluginsRelativeTo: path__default["default"].join(this.resolvePluginsRelativeTo, "__placeholder.js"),
4256
- pluginEnvironments: eslintrcArray.pluginEnvironments,
4257
- pluginProcessors: eslintrcArray.pluginProcessors
4258
- }));
4259
- }
4260
- });
4261
-
4262
- // combine ignorePatterns to emulate ESLintRC behavior better
4263
- if (hasIgnorePatterns) {
4264
- flatArray.unshift({
4265
- ignores: [filePath => {
4266
-
4267
- // Compute the final config for this file.
4268
- // This filters config array elements by `files`/`excludedFiles` then merges the elements.
4269
- const finalConfig = eslintrcArray.extractConfig(filePath);
4270
-
4271
- // Test the `ignorePattern` properties of the final config.
4272
- return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath);
4273
- }]
4274
- });
4275
- }
4276
-
4277
- return flatArray;
4278
- }
4279
-
4280
- /**
4281
- * Translates the `env` section of an ESLintRC-style config.
4282
- * @param {Object} envConfig The `env` section of an ESLintRC config.
4283
- * @returns {Object[]} An array of flag-config objects representing the environments.
4284
- */
4285
- env(envConfig) {
4286
- return this.config({
4287
- env: envConfig
4288
- });
4289
- }
4290
-
4291
- /**
4292
- * Translates the `extends` section of an ESLintRC-style config.
4293
- * @param {...string} configsToExtend The names of the configs to load.
4294
- * @returns {Object[]} An array of flag-config objects representing the config.
4295
- */
4296
- extends(...configsToExtend) {
4297
- return this.config({
4298
- extends: configsToExtend
4299
- });
4300
- }
4301
-
4302
- /**
4303
- * Translates the `plugins` section of an ESLintRC-style config.
4304
- * @param {...string} plugins The names of the plugins to load.
4305
- * @returns {Object[]} An array of flag-config objects representing the plugins.
4306
- */
4307
- plugins(...plugins) {
4308
- return this.config({
4309
- plugins
4310
- });
4311
- }
4312
- }
4313
-
4314
- /**
4315
- * @fileoverview Package exports for @eslint/eslintrc
4316
- * @author Nicholas C. Zakas
4317
- */
4318
-
4319
- //-----------------------------------------------------------------------------
4320
- // Exports
4321
- //-----------------------------------------------------------------------------
4322
-
4323
- const Legacy = {
4324
- ConfigArray,
4325
- createConfigArrayFactoryContext: createContext,
4326
- CascadingConfigArrayFactory,
4327
- ConfigArrayFactory,
4328
- ConfigDependency,
4329
- ExtractedConfig,
4330
- IgnorePattern,
4331
- OverrideTester,
4332
- getUsedExtractedConfigs,
4333
- environments,
4334
-
4335
- // shared
4336
- ConfigOps,
4337
- ConfigValidator,
4338
- ModuleResolver,
4339
- naming
4340
- };
4341
-
4342
- exports.FlatCompat = FlatCompat;
4343
- exports.Legacy = Legacy;
4344
- //# sourceMappingURL=eslintrc.cjs.map