decidim 0.26.2 → 0.26.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

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