eslint-interactive 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/LICENSE +25 -0
  2. package/README.md +147 -0
  3. package/bin/eslint-interactive.js +10 -0
  4. package/dist/action/apply-suggestions.d.ts +6 -0
  5. package/dist/action/apply-suggestions.d.ts.map +1 -0
  6. package/dist/action/apply-suggestions.js +28 -0
  7. package/dist/action/apply-suggestions.js.map +1 -0
  8. package/dist/action/disable-per-file.d.ts +6 -0
  9. package/dist/action/disable-per-file.d.ts.map +1 -0
  10. package/dist/action/disable-per-file.js +8 -0
  11. package/dist/action/disable-per-file.js.map +1 -0
  12. package/dist/action/disable-per-line.d.ts +6 -0
  13. package/dist/action/disable-per-line.d.ts.map +1 -0
  14. package/dist/action/disable-per-line.js +8 -0
  15. package/dist/action/disable-per-line.js.map +1 -0
  16. package/dist/action/fix.d.ts +6 -0
  17. package/dist/action/fix.d.ts.map +1 -0
  18. package/dist/action/fix.js +6 -0
  19. package/dist/action/fix.js.map +1 -0
  20. package/dist/action/index.d.ts +7 -0
  21. package/dist/action/index.d.ts.map +1 -0
  22. package/dist/action/index.js +7 -0
  23. package/dist/action/index.js.map +1 -0
  24. package/dist/action/make-fixable-and-fix.d.ts +6 -0
  25. package/dist/action/make-fixable-and-fix.d.ts.map +1 -0
  26. package/dist/action/make-fixable-and-fix.js +28 -0
  27. package/dist/action/make-fixable-and-fix.js.map +1 -0
  28. package/dist/action/print-result-details.d.ts +5 -0
  29. package/dist/action/print-result-details.d.ts.map +1 -0
  30. package/dist/action/print-result-details.js +12 -0
  31. package/dist/action/print-result-details.js.map +1 -0
  32. package/dist/cli/log.d.ts +6 -0
  33. package/dist/cli/log.d.ts.map +1 -0
  34. package/dist/cli/log.js +9 -0
  35. package/dist/cli/log.js.map +1 -0
  36. package/dist/cli/ora.d.ts +4 -0
  37. package/dist/cli/ora.d.ts.map +1 -0
  38. package/dist/cli/ora.js +23 -0
  39. package/dist/cli/ora.js.map +1 -0
  40. package/dist/cli/package.d.ts +2 -0
  41. package/dist/cli/package.d.ts.map +1 -0
  42. package/dist/cli/package.js +6 -0
  43. package/dist/cli/package.js.map +1 -0
  44. package/dist/cli/parse-argv.d.ts +4 -0
  45. package/dist/cli/parse-argv.d.ts.map +1 -0
  46. package/dist/cli/parse-argv.js +50 -0
  47. package/dist/cli/parse-argv.js.map +1 -0
  48. package/dist/cli/prompt.d.ts +53 -0
  49. package/dist/cli/prompt.d.ts.map +1 -0
  50. package/dist/cli/prompt.js +154 -0
  51. package/dist/cli/prompt.js.map +1 -0
  52. package/dist/cli/run.d.ts +8 -0
  53. package/dist/cli/run.d.ts.map +1 -0
  54. package/dist/cli/run.js +46 -0
  55. package/dist/cli/run.js.map +1 -0
  56. package/dist/core-worker.d.ts +21 -0
  57. package/dist/core-worker.d.ts.map +1 -0
  58. package/dist/core-worker.js +52 -0
  59. package/dist/core-worker.js.map +1 -0
  60. package/dist/core.d.ts +84 -0
  61. package/dist/core.d.ts.map +1 -0
  62. package/dist/core.js +196 -0
  63. package/dist/core.js.map +1 -0
  64. package/dist/formatter/colors.d.ts +4 -0
  65. package/dist/formatter/colors.d.ts.map +1 -0
  66. package/dist/formatter/colors.js +5 -0
  67. package/dist/formatter/colors.js.map +1 -0
  68. package/dist/formatter/format-by-files.d.ts +3 -0
  69. package/dist/formatter/format-by-files.d.ts.map +1 -0
  70. package/dist/formatter/format-by-files.js +41 -0
  71. package/dist/formatter/format-by-files.js.map +1 -0
  72. package/dist/formatter/format-by-rules.d.ts +3 -0
  73. package/dist/formatter/format-by-rules.d.ts.map +1 -0
  74. package/dist/formatter/format-by-rules.js +34 -0
  75. package/dist/formatter/format-by-rules.js.map +1 -0
  76. package/dist/formatter/index.d.ts +4 -0
  77. package/dist/formatter/index.d.ts.map +1 -0
  78. package/dist/formatter/index.js +7 -0
  79. package/dist/formatter/index.js.map +1 -0
  80. package/dist/formatter/take-rule-statistics.d.ts +18 -0
  81. package/dist/formatter/take-rule-statistics.d.ts.map +1 -0
  82. package/dist/formatter/take-rule-statistics.js +51 -0
  83. package/dist/formatter/take-rule-statistics.js.map +1 -0
  84. package/dist/index.d.ts +5 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +4 -0
  87. package/dist/index.js.map +1 -0
  88. package/dist/plugin/fix/apply-auto-fixes.d.ts +8 -0
  89. package/dist/plugin/fix/apply-auto-fixes.d.ts.map +1 -0
  90. package/dist/plugin/fix/apply-auto-fixes.js +8 -0
  91. package/dist/plugin/fix/apply-auto-fixes.js.map +1 -0
  92. package/dist/plugin/fix/apply-suggestions.d.ts +11 -0
  93. package/dist/plugin/fix/apply-suggestions.d.ts.map +1 -0
  94. package/dist/plugin/fix/apply-suggestions.js +25 -0
  95. package/dist/plugin/fix/apply-suggestions.js.map +1 -0
  96. package/dist/plugin/fix/disable-per-file.d.ts +10 -0
  97. package/dist/plugin/fix/disable-per-file.d.ts.map +1 -0
  98. package/dist/plugin/fix/disable-per-file.js +39 -0
  99. package/dist/plugin/fix/disable-per-file.js.map +1 -0
  100. package/dist/plugin/fix/disable-per-line.d.ts +10 -0
  101. package/dist/plugin/fix/disable-per-line.d.ts.map +1 -0
  102. package/dist/plugin/fix/disable-per-line.js +54 -0
  103. package/dist/plugin/fix/disable-per-line.js.map +1 -0
  104. package/dist/plugin/fix/index.d.ts +6 -0
  105. package/dist/plugin/fix/index.d.ts.map +1 -0
  106. package/dist/plugin/fix/index.js +6 -0
  107. package/dist/plugin/fix/index.js.map +1 -0
  108. package/dist/plugin/fix/make-fixable-and-fix.d.ts +12 -0
  109. package/dist/plugin/fix/make-fixable-and-fix.d.ts.map +1 -0
  110. package/dist/plugin/fix/make-fixable-and-fix.js +61 -0
  111. package/dist/plugin/fix/make-fixable-and-fix.js.map +1 -0
  112. package/dist/plugin/fix-rule.d.ts +10 -0
  113. package/dist/plugin/fix-rule.d.ts.map +1 -0
  114. package/dist/plugin/fix-rule.js +124 -0
  115. package/dist/plugin/fix-rule.js.map +1 -0
  116. package/dist/plugin/index.d.ts +49 -0
  117. package/dist/plugin/index.d.ts.map +1 -0
  118. package/dist/plugin/index.js +11 -0
  119. package/dist/plugin/index.js.map +1 -0
  120. package/dist/plugin/prefer-addition-shorthand-rule.d.ts +7 -0
  121. package/dist/plugin/prefer-addition-shorthand-rule.d.ts.map +1 -0
  122. package/dist/plugin/prefer-addition-shorthand-rule.js +54 -0
  123. package/dist/plugin/prefer-addition-shorthand-rule.js.map +1 -0
  124. package/dist/plugin/rule-fixer.d.ts +80 -0
  125. package/dist/plugin/rule-fixer.d.ts.map +1 -0
  126. package/dist/plugin/rule-fixer.js +118 -0
  127. package/dist/plugin/rule-fixer.js.map +1 -0
  128. package/dist/scene/check-results.d.ts +21 -0
  129. package/dist/scene/check-results.d.ts.map +1 -0
  130. package/dist/scene/check-results.js +22 -0
  131. package/dist/scene/check-results.js.map +1 -0
  132. package/dist/scene/index.d.ts +25 -0
  133. package/dist/scene/index.d.ts.map +1 -0
  134. package/dist/scene/index.js +6 -0
  135. package/dist/scene/index.js.map +1 -0
  136. package/dist/scene/lint.d.ts +8 -0
  137. package/dist/scene/lint.d.ts.map +1 -0
  138. package/dist/scene/lint.js +31 -0
  139. package/dist/scene/lint.js.map +1 -0
  140. package/dist/scene/select-action.d.ts +20 -0
  141. package/dist/scene/select-action.d.ts.map +1 -0
  142. package/dist/scene/select-action.js +46 -0
  143. package/dist/scene/select-action.js.map +1 -0
  144. package/dist/scene/select-rule-ids.d.ts +15 -0
  145. package/dist/scene/select-rule-ids.d.ts.map +1 -0
  146. package/dist/scene/select-rule-ids.js +10 -0
  147. package/dist/scene/select-rule-ids.js.map +1 -0
  148. package/dist/tsconfig.src.tsbuildinfo +1 -0
  149. package/dist/util/array.d.ts +3 -0
  150. package/dist/util/array.d.ts.map +1 -0
  151. package/dist/util/array.js +14 -0
  152. package/dist/util/array.js.map +1 -0
  153. package/dist/util/cache.d.ts +5 -0
  154. package/dist/util/cache.d.ts.map +1 -0
  155. package/dist/util/cache.js +13 -0
  156. package/dist/util/cache.js.map +1 -0
  157. package/dist/util/eslint.d.ts +68 -0
  158. package/dist/util/eslint.d.ts.map +1 -0
  159. package/dist/util/eslint.js +147 -0
  160. package/dist/util/eslint.js.map +1 -0
  161. package/dist/util/filter-script.d.ts +6 -0
  162. package/dist/util/filter-script.d.ts.map +1 -0
  163. package/dist/util/filter-script.js +39 -0
  164. package/dist/util/filter-script.js.map +1 -0
  165. package/dist/util/type-check.d.ts +3 -0
  166. package/dist/util/type-check.d.ts.map +1 -0
  167. package/dist/util/type-check.js +8 -0
  168. package/dist/util/type-check.js.map +1 -0
  169. package/package.json +93 -0
  170. package/src/action/apply-suggestions.ts +40 -0
  171. package/src/action/disable-per-file.ts +16 -0
  172. package/src/action/disable-per-line.ts +16 -0
  173. package/src/action/fix.ts +14 -0
  174. package/src/action/index.ts +6 -0
  175. package/src/action/make-fixable-and-fix.ts +40 -0
  176. package/src/action/print-result-details.ts +18 -0
  177. package/src/cli/log.ts +11 -0
  178. package/src/cli/ora.ts +25 -0
  179. package/src/cli/package.ts +9 -0
  180. package/src/cli/parse-argv.ts +52 -0
  181. package/src/cli/prompt.ts +205 -0
  182. package/src/cli/run.ts +50 -0
  183. package/src/core-worker.ts +66 -0
  184. package/src/core.ts +240 -0
  185. package/src/formatter/colors.ts +5 -0
  186. package/src/formatter/format-by-files.ts +48 -0
  187. package/src/formatter/format-by-rules.ts +37 -0
  188. package/src/formatter/index.ts +9 -0
  189. package/src/formatter/take-rule-statistics.ts +66 -0
  190. package/src/index.ts +4 -0
  191. package/src/plugin/fix/apply-auto-fixes.ts +13 -0
  192. package/src/plugin/fix/apply-suggestions.ts +44 -0
  193. package/src/plugin/fix/disable-per-file.ts +53 -0
  194. package/src/plugin/fix/disable-per-line.ts +65 -0
  195. package/src/plugin/fix/index.ts +13 -0
  196. package/src/plugin/fix/make-fixable-and-fix.ts +77 -0
  197. package/src/plugin/fix-rule.ts +142 -0
  198. package/src/plugin/index.ts +66 -0
  199. package/src/plugin/prefer-addition-shorthand-rule.ts +56 -0
  200. package/src/plugin/rule-fixer.ts +147 -0
  201. package/src/scene/check-results.ts +43 -0
  202. package/src/scene/index.ts +18 -0
  203. package/src/scene/lint.ts +41 -0
  204. package/src/scene/select-action.ts +70 -0
  205. package/src/scene/select-rule-ids.ts +24 -0
  206. package/src/typings/cachedir.d.ts +5 -0
  207. package/src/typings/node-pager.d.ts +4 -0
  208. package/src/util/array.ts +16 -0
  209. package/src/util/cache.ts +11 -0
  210. package/src/util/eslint.ts +162 -0
  211. package/src/util/filter-script.ts +45 -0
  212. package/src/util/type-check.ts +8 -0
  213. package/static/example-filter-script.js +49 -0
  214. package/static/example-fixable-maker-script.js +47 -0
@@ -0,0 +1,20 @@
1
+ import { Remote } from 'comlink';
2
+ import { ESLint } from 'eslint';
3
+ import { Action } from '../cli/prompt.js';
4
+ import { SerializableCore } from '../core-worker.js';
5
+ import { NextScene } from './index.js';
6
+ export declare type SelectActionArgs = {
7
+ /** The lint results of the project */
8
+ results: ESLint.LintResult[];
9
+ /** The rule ids that are in the `results`. */
10
+ ruleIdsInResults: string[];
11
+ /** The rule ids to perform the action. */
12
+ selectedRuleIds: string[];
13
+ /** The action to be initially selected. */
14
+ initialAction?: Action;
15
+ };
16
+ /**
17
+ * Run the scene where a user select the action to be performed for the problems of selected rules.
18
+ */
19
+ export declare function selectAction(core: Remote<SerializableCore>, { results, ruleIdsInResults, selectedRuleIds, initialAction }: SelectActionArgs): Promise<NextScene>;
20
+ //# sourceMappingURL=select-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-action.d.ts","sourceRoot":"","sources":["../../src/scene/select-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAShC,OAAO,EAAE,MAAM,EAAuB,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,oBAAY,gBAAgB,GAAG;IAC7B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,0CAA0C;IAC1C,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,EAAE,gBAAgB,GAC9E,OAAO,CAAC,SAAS,CAAC,CAoCpB"}
@@ -0,0 +1,46 @@
1
+ import { doApplySuggestionsAction, doDisablePerFileAction, doDisablePerLineAction, doFixAction, doMakeFixableAndFixAction, doPrintResultDetailsAction, } from '../action/index.js';
2
+ import { promptToInputAction } from '../cli/prompt.js';
3
+ import { unreachable } from '../util/type-check.js';
4
+ /**
5
+ * Run the scene where a user select the action to be performed for the problems of selected rules.
6
+ */
7
+ export async function selectAction(core, { results, ruleIdsInResults, selectedRuleIds, initialAction }) {
8
+ const selectedAction = await promptToInputAction(results, selectedRuleIds, initialAction);
9
+ const selectRuleIdsScene = { name: 'selectRuleIds', args: { results, ruleIdsInResults } };
10
+ const selectActionScene = { name: 'selectAction', args: { results, ruleIdsInResults, selectedRuleIds } };
11
+ function createCheckResultsScene(undo) {
12
+ return {
13
+ name: 'checkResults',
14
+ args: { results, ruleIdsInResults, selectedRuleIds, undo, selectedAction },
15
+ };
16
+ }
17
+ if (selectedAction === 'reselectRules')
18
+ return selectRuleIdsScene;
19
+ if (selectedAction === 'printResultDetails') {
20
+ await doPrintResultDetailsAction(core, results, selectedRuleIds);
21
+ return selectActionScene;
22
+ }
23
+ else if (selectedAction === 'applyAutoFixes') {
24
+ const undo = await doFixAction(core, results, selectedRuleIds);
25
+ return createCheckResultsScene(undo);
26
+ }
27
+ else if (selectedAction === 'disablePerLine') {
28
+ const undo = await doDisablePerLineAction(core, results, selectedRuleIds);
29
+ return createCheckResultsScene(undo);
30
+ }
31
+ else if (selectedAction === 'disablePerFile') {
32
+ const undo = await doDisablePerFileAction(core, results, selectedRuleIds);
33
+ return createCheckResultsScene(undo);
34
+ }
35
+ else if (selectedAction === 'applySuggestions') {
36
+ const undo = await doApplySuggestionsAction(core, results, selectedRuleIds);
37
+ return createCheckResultsScene(undo);
38
+ }
39
+ else if (selectedAction === 'makeFixableAndFix') {
40
+ const undo = await doMakeFixableAndFixAction(core, results, selectedRuleIds);
41
+ return createCheckResultsScene(undo);
42
+ }
43
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
44
+ return unreachable(`unknown action: ${selectedAction}`);
45
+ }
46
+ //# sourceMappingURL=select-action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-action.js","sourceRoot":"","sources":["../../src/scene/select-action.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAU,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAcpD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAA8B,EAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAoB;IAE/E,MAAM,cAAc,GAAG,MAAM,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;IAE1F,MAAM,kBAAkB,GAAc,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,EAA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I,CAAC,CAAC;KACtC;SAAM,IAAI,cAAc,KAAK,mBAAmB,EAAE;QACjD,MAAM,IAAI,GAAG,MAAM,yBAAyB,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;QAC7E,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;KACtC;IACD,4EAA4E;IAC5E,OAAO,WAAW,CAAC,mBAAmB,cAAc,EAAE,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Remote } from 'comlink';
2
+ import { ESLint } from 'eslint';
3
+ import { SerializableCore } from '../core-worker.js';
4
+ import { NextScene } from './index.js';
5
+ export declare type SelectRuleIdsArgs = {
6
+ /** The lint results of the project */
7
+ results: ESLint.LintResult[];
8
+ /** The rule ids that are in the `results`. */
9
+ ruleIdsInResults: string[];
10
+ };
11
+ /**
12
+ * Run the scene where a user select rule ids.
13
+ */
14
+ export declare function selectRuleIds(core: Remote<SerializableCore>, { results, ruleIdsInResults }: SelectRuleIdsArgs): Promise<NextScene>;
15
+ //# sourceMappingURL=select-rule-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-rule-ids.d.ts","sourceRoot":"","sources":["../../src/scene/select-rule-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,oBAAY,iBAAiB,GAAG;IAC9B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,iBAAiB,GAC/C,OAAO,CAAC,SAAS,CAAC,CAGpB"}
@@ -0,0 +1,10 @@
1
+ import { promptToInputRuleIds } from '../cli/prompt.js';
2
+ import { selectAction } from './select-action.js';
3
+ /**
4
+ * Run the scene where a user select rule ids.
5
+ */
6
+ export async function selectRuleIds(core, { results, ruleIdsInResults }) {
7
+ const selectedRuleIds = await promptToInputRuleIds(ruleIdsInResults);
8
+ return await selectAction(core, { results, ruleIdsInResults, selectedRuleIds });
9
+ }
10
+ //# sourceMappingURL=select-rule-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-rule-ids.js","sourceRoot":"","sources":["../../src/scene/select-rule-ids.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAUlD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,IAA8B,EAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAqB;IAEhD,MAAM,eAAe,GAAG,MAAM,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACrE,OAAO,MAAM,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC,CAAC;AAClF,CAAC"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/comlink/dist/umd/protocol.d.ts","../node_modules/comlink/dist/umd/comlink.d.ts","../node_modules/comlink/dist/esm/protocol.d.ts","../node_modules/comlink/dist/esm/node-adapter.d.ts","../node_modules/@types/eslint/helpers.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/eslint/index.d.ts","../node_modules/is-installed-globally/index.d.ts","../node_modules/chalk/source/vendor/supports-color/index.d.ts","../node_modules/chalk/source/index.d.ts","../src/formatter/colors.ts","../src/formatter/format-by-files.ts","../node_modules/@types/cli-table/index.d.ts","../src/util/array.ts","../src/formatter/take-rule-statistics.ts","../src/formatter/format-by-rules.ts","../src/formatter/index.ts","../src/plugin/fix/apply-suggestions.ts","../src/util/type-check.ts","../src/plugin/fix/apply-auto-fixes.ts","../src/util/eslint.ts","../src/plugin/fix/disable-per-file.ts","../src/plugin/fix/disable-per-line.ts","../node_modules/@types/estraverse/index.d.ts","../src/plugin/fix/make-fixable-and-fix.ts","../src/plugin/fix/index.ts","../src/plugin/rule-fixer.ts","../src/plugin/fix-rule.ts","../src/plugin/prefer-addition-shorthand-rule.ts","../src/plugin/index.ts","../src/cli/package.ts","../src/util/cache.ts","../src/core.ts","../src/core-worker.ts","../node_modules/boxen/node_modules/type-fest/source/primitive.d.ts","../node_modules/boxen/node_modules/type-fest/source/typed-array.d.ts","../node_modules/boxen/node_modules/type-fest/source/basic.d.ts","../node_modules/boxen/node_modules/type-fest/source/observable-like.d.ts","../node_modules/boxen/node_modules/type-fest/source/internal.d.ts","../node_modules/boxen/node_modules/type-fest/source/except.d.ts","../node_modules/boxen/node_modules/type-fest/source/simplify.d.ts","../node_modules/boxen/node_modules/type-fest/source/mutable.d.ts","../node_modules/boxen/node_modules/type-fest/source/merge.d.ts","../node_modules/boxen/node_modules/type-fest/source/merge-exclusive.d.ts","../node_modules/boxen/node_modules/type-fest/source/require-at-least-one.d.ts","../node_modules/boxen/node_modules/type-fest/source/require-exactly-one.d.ts","../node_modules/boxen/node_modules/type-fest/source/require-all-or-none.d.ts","../node_modules/boxen/node_modules/type-fest/source/partial-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/readonly-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/literal-union.d.ts","../node_modules/boxen/node_modules/type-fest/source/promisable.d.ts","../node_modules/boxen/node_modules/type-fest/source/opaque.d.ts","../node_modules/boxen/node_modules/type-fest/source/set-optional.d.ts","../node_modules/boxen/node_modules/type-fest/source/set-required.d.ts","../node_modules/boxen/node_modules/type-fest/source/value-of.d.ts","../node_modules/boxen/node_modules/type-fest/source/promise-value.d.ts","../node_modules/boxen/node_modules/type-fest/source/async-return-type.d.ts","../node_modules/boxen/node_modules/type-fest/source/conditional-keys.d.ts","../node_modules/boxen/node_modules/type-fest/source/conditional-except.d.ts","../node_modules/boxen/node_modules/type-fest/source/conditional-pick.d.ts","../node_modules/boxen/node_modules/type-fest/source/union-to-intersection.d.ts","../node_modules/boxen/node_modules/type-fest/source/stringified.d.ts","../node_modules/boxen/node_modules/type-fest/source/fixed-length-array.d.ts","../node_modules/boxen/node_modules/type-fest/source/multidimensional-array.d.ts","../node_modules/boxen/node_modules/type-fest/source/multidimensional-readonly-array.d.ts","../node_modules/boxen/node_modules/type-fest/source/iterable-element.d.ts","../node_modules/boxen/node_modules/type-fest/source/entry.d.ts","../node_modules/boxen/node_modules/type-fest/source/entries.d.ts","../node_modules/boxen/node_modules/type-fest/source/set-return-type.d.ts","../node_modules/boxen/node_modules/type-fest/source/asyncify.d.ts","../node_modules/boxen/node_modules/type-fest/source/jsonify.d.ts","../node_modules/boxen/node_modules/type-fest/source/numeric.d.ts","../node_modules/boxen/node_modules/type-fest/source/utilities.d.ts","../node_modules/boxen/node_modules/type-fest/source/split.d.ts","../node_modules/boxen/node_modules/type-fest/source/camel-case.d.ts","../node_modules/boxen/node_modules/type-fest/source/camel-cased-properties.d.ts","../node_modules/boxen/node_modules/type-fest/source/camel-cased-properties-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/delimiter-case.d.ts","../node_modules/boxen/node_modules/type-fest/source/kebab-case.d.ts","../node_modules/boxen/node_modules/type-fest/source/delimiter-cased-properties.d.ts","../node_modules/boxen/node_modules/type-fest/source/kebab-cased-properties.d.ts","../node_modules/boxen/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/pascal-case.d.ts","../node_modules/boxen/node_modules/type-fest/source/pascal-cased-properties.d.ts","../node_modules/boxen/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/snake-case.d.ts","../node_modules/boxen/node_modules/type-fest/source/snake-cased-properties.d.ts","../node_modules/boxen/node_modules/type-fest/source/snake-cased-properties-deep.d.ts","../node_modules/boxen/node_modules/type-fest/source/includes.d.ts","../node_modules/boxen/node_modules/type-fest/source/screaming-snake-case.d.ts","../node_modules/boxen/node_modules/type-fest/source/join.d.ts","../node_modules/boxen/node_modules/type-fest/source/trim.d.ts","../node_modules/boxen/node_modules/type-fest/source/get.d.ts","../node_modules/boxen/node_modules/type-fest/source/last-array-element.d.ts","../node_modules/boxen/node_modules/type-fest/source/package-json.d.ts","../node_modules/boxen/node_modules/type-fest/source/tsconfig-json.d.ts","../node_modules/boxen/node_modules/type-fest/index.d.ts","../node_modules/boxen/index.d.ts","../src/cli/log.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts","../src/cli/parse-argv.ts","../node_modules/ora/index.d.ts","../src/cli/ora.ts","../node_modules/enquirer/index.d.ts","../src/cli/prompt.ts","../src/scene/check-results.ts","../src/util/filter-script.ts","../src/action/apply-suggestions.ts","../src/action/disable-per-file.ts","../src/action/disable-per-line.ts","../src/action/fix.ts","../src/action/make-fixable-and-fix.ts","../src/action/print-result-details.ts","../src/action/index.ts","../src/scene/select-action.ts","../src/scene/select-rule-ids.ts","../src/scene/lint.ts","../src/scene/index.ts","../src/cli/run.ts","../src/index.ts","../src/typings/cachedir.d.ts","../src/typings/node-pager.d.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/ts3.4/base.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/jest-diff/build/cleanupsemantic.d.ts","../node_modules/pretty-format/build/types.d.ts","../node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/types.d.ts","../node_modules/jest-diff/build/difflines.d.ts","../node_modules/jest-diff/build/printdiffs.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/json5/index.d.ts","../node_modules/@types/prettier/index.d.ts","../node_modules/@types/stack-utils/index.d.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true,"impliedFormat":1},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84",{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true,"impliedFormat":1},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true,"impliedFormat":1},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true,"impliedFormat":1},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true,"impliedFormat":1},"3b44127abca445f776ed1f0909a4d140b4a4eafcfab8261cb120605ddbf68a73","da74ef1d2d1a28d2bb10b891ce9a8a81cc8bf5650be58f3402c9a924b8a77a6f","3b44127abca445f776ed1f0909a4d140b4a4eafcfab8261cb120605ddbf68a73","f1a15d8bc6fad2eb1382208aa06bf92bdf229ba18ea70cd6dce135a6e9e1b02b",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","7d7c8ef7d48a035142c07dae60545ecc0e4af4c337742760cb09726f2f8e31db","8566fa84085caa46340393b1704ecd368491918fb45bd688d6e89736aec73a2f","75c3544a7502e33145b1e0b93cb42037a41c82e76699a455b056af7f8f9bc69d","46d2f1f89f283e9dcba0526080efb84c1cfb4aac779e41cdef07ced9d75a2e39","c1fffa8e392fc4e56ac745b741f22c048037cc14e7be64339539a10ce9a0c12f","3e0c5cbf79542c9611b4bb869b371c8277e77545d15736777bff4900f3fe5c8e","dde873bfd95649d295dbdf4448f5539e9305fcbda2bb4a6cb3080448584ebaa1","9f54de22096034ffa8a6df64b4de7a806b7bc2d150309b76cb4aff3fff227c4d","28ebac56529ac4844bd291a5ae2a68f86818531620452a8c20f63aceedf76623","f0228c3a709b5a881f8b7acf3494f76b9a9f656c91cea56f5ca0c3d9e088ae87","69e8d0da0ff2cad7c4ed4835e9a30c23f7832a79dde35df837573f7790a9adcd","acb65b5cf3ddaba33fd135663e2e6393be2970ea55bdea5473a05a83281b8b34","2889a7cdcbbe72b390cd5961f73bf804202a26333ba0722c899f42b9c0070fbf","d262176d1ee4d4e472d37ec3659c231a14115f4c864ba910c28aec68ea3577ca","78906d552b7dda06a5eb3607f5c561d3ac568a50fa26273c6933b622cbad2422","dadb8b1f3a4d2b4d3066c59237dd99c00340efdb7641c9d756d125fd7cb09e67","4794f38210c7361aecca6399ae0339699661759202034644513ce587b4657c49","37014264ee370773d16877f1907330faa78b46a4e89340ce365805402789b1ed","92801ce9352be094da89d7ac61346b0174917e29fc3d653c8af345b444ff452a","8defcf424fed630f340e22ea81209d3bc3f02827b04c2cedebcc194dd4b794ee","09388fbc86cfdf5da8588f54e900fcd26c52f8fcd9400f1f38c1c47dc057af38","5ff74e55d3cbc1647dc7f6e758daafad8ac4459ac6b640ceeaadadadbc738aea","695e98fb6b60d5f9c12f79ae5c2a22cec09515a18c80f6e1e080bb3893026017","35d3013c92396d985fea24c674c0861d9bec507f801b1cc3a97c72e4742717ed","e88cbf9982f298bf44b0708067a76d59353b94b3bbbe6beacc0431a07c1eb618","4050e40d16c335376301a881df6f929296a53c132a45138910a9fb973c17b863","b1f78fc50db1c128dd74dd802a68dda2e952dc221c12311e122ca723a368e036","bea0ec4f9b482146ed56501f295a46183c89955624087099ab8234993d909404","e6ffb244c8385cedbf9ffaa43a9ef57362e4f920488596185f0b2ec361611a1d","cd51ceafea7762ad639afb3ca5b68e1e4ffeaacaa402d7ef2cae17016e29e098","1b8357b3fef5be61b5de6d6a4805a534d68fe3e040c11f1944e27d4aec85936a","4a15fc59b27b65b9894952048be2afc561865ec37606cd0f5e929ee4a102233b",{"version":"744e7c636288493667d553c8f8ebd666ccbc0e715df445a4a7c4a48812f20544","affectsGlobalScope":true,"impliedFormat":1},"78eee56f71980c6a7f5fe44514f9916302f222b933782952c8af0a1770be1f73","af4e1dce65c1820f6fe21bdf2c3931209c539cb498da760f05ab709f2033f2b3","73ab4f2d7964bbad113751c4d13dac7b834407ef4570b50ff67b3b765c07d312","d70d12830ae15bd5967b2b38cb7e24b3ba43bff853e305b33ed519253055ce08","c0618e33d0191171349412c9c7b983bc05081c29c635da9003a6cf7bc5d81746","c974e1ad2639f94de0b566947273e3f3b2dad004c9383bf0ea8df7cf96b1afea","5ab8773f7671da7bafa0f95a5530425a3e8374b8de4f352e64f6dd48c65681ed","bcaa4b2494b205265de37f2b4d5def521055753e8ac8aaabdfb53fd514e2bfb4","2c04fbe9e9b0ca02a0e6a549d21274b72424f3b091416fd63229114c6ac255b7","1843b3ce7b3607930f659f985db48b47a2c2070e8b18d4d88026be148fbcc3c9","e3a1ee6a8427882fa15b2157497f7c039f63e1ea7c3c763b8572237057c1f49b","f8f78fbf04fafd10d408f5d91142629fdb087e25fef5ffb9171ca99d1b46bc5a","094501dd2107ce40723bbcf30fbc0012631031c3337cbcc2dad153d8d550d7bc","bc1ed67a1d1491918740d86502e5b86369f4b7d6af10ca86340e6df9218ed9c9","c5efedb8f1bd29ca1fd7720a45087344e14d1ea66378ac470450ea00d0f63975","161156b76821d27d22affa815f02d96706aa0861751aece957b5740dd33139ca","4023372ecd33decd9e17cd21272a86403ad60a4a913ccde6b01982a8535db442","d62e0155e4e6eb3d7a799e1fb555bb24ed6ecbebd158f87fc31e98ec6b5fcf73","c38b9f9179364943113b3eb1dd1d86d580dd1b56b68203ced15a013e9e317f29","e157c542921a03c19bafc06a1ae6bfc377359b0d88d8995591a8cdc66d7bf027","491357771c3101332dbd241a58b3733c194a1ed1ca92e371361e702c8849afe2","d1406b0eee2a415d31130b6e8771b6d0eddf70658efbafe9723aad38f58dc63c","b05b738e0e28dfa84e59a038c8287335b6ca9f16c858bd95ed930de0845f18af","dff0fdb7dc8f8ed00db44b493f77b921312ce9ed8493cda4cc82a92e48914756","338aeec8241a5d326cf4afd96408f6ff36b20ff461ee35597bf84a8f707a2745","13b6d7b987a6c306c0f7d27d77136797edc88ac47fd5893c93b8ed51f9912be9","cfa6b71c0cb889d2a210dac350ef928d532cadb26f4035bc405ef03f80b4ce17","4de53c71c9fc54d7fa8870b95b44092ff53eb6fddcfd402e360ac421318f1ca8","1c6c29857deb02e33ec045a67c375eb210a3ea4bc61b5e8078d2fab2ebf7831e","8f36a2e511f634b14983b31199a813b6d91e9f5c8ca1a81c446cfcbe3a8cda45","7e7bf5e592f90ac5784005a7d10f9960d6ff02edebdc18ab87f8cb154d5c16ab","e1b74834e5baec5460bd44dd7c5e389337ebe9eb7903743d1a9dd5b75702ac73","b6e9f67e2bc6bf5777fd72409da064f4f60914466e088f0e533e902629fae59b","a47240f5153913c434c66cd660bbcbb01c97f6717756a14c2f59ac7feb49a134","679a500b60fdb879af3ff20dab0bc5937098dd1ea5b75f786c672fde09faaeef","4372b912f51cbf9f0da164599e0934031bff3f5135af1cd6425bd9e384167e0b","5a988bc94b1937ee835a83ae7bb7555a21b8bbcdfd4c8c705d1789d7a8244bc2","0eda42cf7a88e5186bbab20c42eef4cc3a7377da80c71a7bae01f224223f667c","3b2f213b50c0a3abc9ee877b3af6cb7d42bd7939c00801bfc39cb44fb9a4ac05","b484c72c73b4ae0cdee6bfb85f0ae6152b4435b59169fb460044305ef18429cf","d9df799b7d4d7d9a24b201ddffc575b1840e25f1a273650de6eef40f384b6239","ca89e452207fee3233d2cb45c28ad0a4a7e30ddf40b9ac69891dd2242859c6f9","dac79ace008b4b9147644e4d8834b4a62378990e1a1730843ac488fdf6ff5f32","447ff7298da1481a3390a13cae828de4da1efce374ab5b9ad7b8d3390e42118a","48fc89daea2775641083563b0671d541dfa464f4aed9ecd6d1e1f61647e759d1","55eb179223f788fcb055cba854b63effc973f7d51cf130ab866fc161c30dd918","03107dc521b6273cf190f0be264b6f69cb43355c24320cc9e760c9ab6a7fdb22","d7df3008b859983da981a569fb74428cbfeb079d342dd3c1f828c74b0b62f557","1a9958339bc9d1092c53a7f13c08d29eac812534c3f61c7c7a2157ef558131a1","30137eda48ba9ccce5dfd6fa79dea587739cddfab6e280fc85f019d21488b393","e6c5a9682cb3328d41eb7f25fa231075f29307319a9d7ac679e52a7b74b6539c","0617c0c6bc0e35226b6000ef3e47fc45697348d33c305e61484b7d264f4737da","73a5569de4e23f58160c68e74b48587950b118d0105f9d71b86ae40fa5c258c4","16d7f5de02bfb62a7a69ef9497c790ed4a8119ce159b14cb763f2432298286e8","c79b44c1518bd3d1ad75aa82f2e54be1bde86cd7663624874c4047a8fc97f833","d5be3acf796cfce68c23ab1c874817adbcd7c15849b053ce23228f42ab0e90ca","1ccd27d6127a24d5abe36413f68b5e928c9e6f2cbab9825898379ecf18108dc2","7ce044ddf0e2f6da414622c01e2c8e3f6ca53abc046c6c24d6c8c133b3e77fa5","c0b8f2f3a9bcd9cb66b3b0ba87f43b523cef3c6486232a818b7a7f4609270097","32d2682c0793965181127aeb7962c4cb101b6bfd04d156004254de32431889ef","8ed46a4cb9cdc53173ca51f0cfb1e3cf7785da8613b881d849fbd55faf4d429b","9a50956d27e66a47a888abf153ae6768a6cdd96ab87148629bfc2301b5baeb57","fdfbe321c556c39a2ecf791d537b999591d0849e971dd938d88f460fea0186f6","6ba73232c9d3267ca36ddb83e335d474d2c0e167481e3dec416c782894e11438","8a89b47b2f7650103a812aa19829a672c5e783174f64e8d9fbc6105939d52a99","27df299c6fcdd0deef05d99bc2c0d946cf8629936b268a2c22fbd312d3c8f500","7781a1891ea9f5c5cdb290207803dfd9149875c9b096fca1ac782d9652269b82","9d7ab67e9d5745e744001d6740df0318af32aa1d35e9bfc4cb43e9dbc54fd060","24ab502e0b8da32db70f86f19d21da520464842cc990f9f9792be860d66ec1fa","08469ace9b65dee9a5b37438a559f29ae030ec810caa81dc15f4af2883efe260","d4174a38ff9847d7f697949fffd2ce8156d2ed6c4635938366351efed195de34","1dfe40dd64a7c77eaade8e81fb10760f3c1584a1dfa2e81926c1e5ff7f26313d","4a4cb7693c7b504498a5164e05180732385082845132c491e8a0334698aad37e","a0f87ede8e4523169bbc7822eb483537b3691a7bca99ff1004fe143c28271a36","85ea3e1257fec68ea14303803db54ba50acd60796873d241d341aa5041b6e607","58cfae85e234f8eb7fb3b8d1d932cb031fe972e5a35c7d74958f4c131eedf477","6ba52e994926950564ba37d0e980f12cd9903ab93b2ce2e8b2f812a3ee3ec56b","90ea650b2f0c371d8c99d51d82e5fee983da2abcc03432a90191e228bb498e4b","bfbd49d5c03d4aed45e30c92199e76a5adebd4d44006c6a909cb31ab44cb8ff8","12867d69380416b94fa4170a2cc3930240205d9d785174dd1f121c3840508ad4","c508bf91e15370da5aa0591a26faa2e08fbeea1615d62abfb1e87e9bf79f10c8","67929b22f38a5dbb59aeca22c9e36b853949fb5da86c573f9d76d52ddcb9e669","fa792654450e53a8629deb4955f6b01ee34e6d50180514e409138dd2c07cad89","cc261e49ced6f7070bce6546a1c202dca9366e2732df29f8f86fc6bc191e6a87","9108d6aac2b1ee6fdfd0a5376d57cbe4a5d87e768bd1b6a6a5fd32fd8e741a6f","9ea3bbda09afe5b70afeb075eb7bd2108230abf1e6cb0ed35fce48efff2e8a99","d5d7b68f5369a210c235cd65458369888f8b839192d088c964f21cab3ac954db","b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e","64b867c61effed7b5bc0cc06b3d8eac23b067a3fba581fc7d3c292fa593e6a45","3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed","8a278bfba7b081cd849434c1130655046639ae90617a682436ed6954e2b57403","71c56bdaa82d7ce75a72d3c06c04fe10becec09bd9c4ef21776a2a055d3f428e",{"version":"215d8d9a2c480fd460127edc048d68d9931d3b27f95132253a6e71975f060bb1","affectsGlobalScope":true,"impliedFormat":1},"c438b413e94ff76dfa20ae005f33a1c84f2480d1d66e0fd687501020d0de9b50","bc6a78961535181265845bf9b9e8a147ffd0ca275097ceb670a9b92afa825152","987249e7b75023387c5fd9dc2f959ee777cb8989b7900f5a9eb4a67d290f2cba","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803",{"version":"eb5197aade83cb0e360ac407289c53a8009e8fdae7939892a0240d30444496b6","affectsGlobalScope":true,"impliedFormat":1},"90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","75d76be86ffc40ae985ebace0cbd2c79b1e10c224c925d91f4df5a2705cc3f76","7e050b767ed10c7ffbc01f314defbf420bf0b5d54ce666e1c87507c035dfc191","7db7569fbb3e2b01ba8751c761cdd3f0debd104170d5665b7dc20a11630df3a9",{"version":"cde4d7f6274468180fa39847b183aec22626e8212ff885d535c53f4cd7c225fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"365e8358843a23944be84b810b1f774ea0223adfccc085f30fd7f4c13dc8a09f","affectsGlobalScope":true,"impliedFormat":1},"f87f95c015900102a5c0edcdebb17596de1382510e6cc17ab79f375d3505bb12","05b5679a897598ebe556ee93415b3af1f456e674ea82e4d7afcd716bfe43aa98","35fe02b2c10616cc7ac3db9c15778df7ed9c99276889efdd9be31f342841cfcd","f15f1f1104aaf47d25124de81949375416e3f8ee704e3d221bea339e35421edb","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947","bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665","8de97668870cfb20fc9d355d2ef379e897bdd8a98c889c7d8a6de40ee408ad52","ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","4982d94cb6427263c8839d8d6324a8bbe129e931deb61a7380f8fad17ba2cfc0",{"version":"ae4bc1dd4d9de7bbea6ce419db45af82a81358e6014c9e1235b5d252e06f8ab8","affectsGlobalScope":true,"impliedFormat":1},"3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c","884560fda6c3868f925f022adc3a1289fe6507bbb45adb10fa1bbcc73a941bb0","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","acbed967a379b3e9f73237ba9473f8b337eeea14b7dc64d445430b5d695751da","272a46cc8f494677af587d17939e61e7db2b1925633e4da0c186ba17f6732521","d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","c52eb62e3388a01b966c57bd14ca0ee9d5f6e656d6a18f6ce6b7cdece63734a3","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","80ffc1786a5dab91b4aa59a72720f02f25df8b7c76b593e04d5e381aec284ccb","f28704c27e1bd58068052f5407541a3306f0ffc77f068e2891f46527a4569e25","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","baf0b82ffc5d2616f44a6fb1f81e8d798545bebf0c30f5d8b003a1dba1acfb3f","c6a5b34f1e725019445754f1e733585f113e0dced75f137bd3c4af5853d3f6ab","15fbe50526244954eb2f933546bca6cdcf0db16c9428d099b3b386c1db5799ab","d44028ae0127eb3e9fcfa5f55a8b81d64775ce15aca1020fe25c511bbb055834",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true,"impliedFormat":1},"4e0a4d84b15692ea8669fe4f3d05a4f204567906b1347da7a58b75f45bae48d3","ad1ae5ae98eceb9af99061e83e867b9897d267aebc8f3b938c9424deabadf4bb","6fbe72eed85e363ad83b763e03be824558c6ea7456c7259a48bcf0afdeb9d7e4","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","5825520e2099309182c6e2a2b3061b060d42a098c58f67d1754880a7e2cce99a","cb6cf0480ee1aa9f706db1f6f5add596a1aa10e8c4beb1817f2318384ba684dc","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190",{"version":"e9f2cdc4e98e73a606ff68c470a8cb4f23cd638c47649d71b90a2d9413102080","affectsGlobalScope":true,"impliedFormat":1},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","65455ea1b00bae7bd26d3c8c2401eb3d10401c09c55192d6f3b8b2275eda20c2","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57"],"options":{"declaration":true,"declarationMap":true,"esModuleInterop":false,"module":100,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[158],[158,159,160,161,162],[158,160],[37,38,39],[39],[176,210],[212],[213],[217,221],[207,208],[175,176,183,192],[167,175,183],[199],[171,176,184],[192],[173,175,183],[175],[175,177,192,198],[176],[183,192,198],[175,176,178,183,192,195,198],[175,178,195,198],[209],[198],[173,175,192],[165],[197],[175,192],[190,199,201],[171,173,183,192],[164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203],[204,205,206],[183],[189],[175,177,192,198,201],[134],[131],[68,69,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],[89],[89,102],[106,107],[108],[73,91],[91],[106],[111],[100],[72],[70],[115],[113],[68],[73,74],[83],[117],[73],[111,120,123],[42],[35],[33],[215,218],[215,218,219,220],[217],[216],[34,40,66,67,138,140,142,177,185],[34,40,66,67,138,140],[34,40,66,67,138],[143,144,145,146,147,148],[34,40,67,140,157],[132],[137],[176,185,198],[64,66,135],[40,50,139],[34,36,41,67,133,136,153,185,198,202],[34,36,40,63,66,202],[40,41,47,50,54,63,65,185,198],[40,43,44],[40,43,44,46,48],[40,45,48,49],[40,47],[50,63,66,154],[40,59,60,63],[40,52,63],[40,63],[39,40,47,52,54,63],[51,53,55,56,58],[39,40,52,57,63],[40,59,61,62],[40],[39,40],[40,66,138,140,153],[141,150,151,152],[34,47,52,67,133,138,153],[34,40,52,66,67,140,149,153],[34,40,67,140,150,153],[64,156,185],[39,40,47,52],[65,167,177,185,198,199]],"referencedMap":[[160,1],[163,2],[159,1],[161,3],[162,1],[40,4],[57,5],[211,6],[213,7],[214,8],[222,9],[209,10],[167,11],[168,12],[169,13],[170,14],[171,15],[172,16],[174,17],[176,18],[177,19],[178,20],[179,21],[180,22],[210,23],[181,17],[182,24],[183,25],[186,26],[187,27],[190,28],[191,29],[192,17],[195,30],[204,31],[207,32],[197,33],[198,34],[200,15],[202,35],[203,15],[135,36],[132,37],[131,38],[90,39],[103,40],[108,41],[110,42],[109,42],[92,43],[93,44],[111,45],[115,46],[113,46],[101,47],[73,48],[127,41],[123,48],[104,49],[112,46],[116,50],[114,51],[83,52],[76,53],[97,48],[98,48],[75,53],[129,54],[81,52],[117,42],[119,55],[118,55],[82,52],[78,56],[124,57],[86,53],[87,53],[120,46],[122,50],[121,51],[43,58],[36,59],[34,60],[139,17],[219,61],[221,62],[220,61],[218,63],[217,64],[143,65],[144,66],[145,66],[146,67],[149,68],[147,65],[148,69],[133,70],[138,71],[64,72],[136,73],[140,74],[154,75],[67,76],[66,77],[45,78],[49,79],[50,80],[48,81],[155,82],[61,83],[53,84],[51,85],[55,86],[56,86],[59,87],[58,88],[63,89],[62,90],[60,91],[141,92],[153,93],[152,94],[150,95],[151,96],[65,97],[54,98],[142,99]],"exportedModulesMap":[[160,1],[163,2],[159,1],[161,3],[162,1],[40,4],[57,5],[211,6],[213,7],[214,8],[222,9],[209,10],[167,11],[168,12],[169,13],[170,14],[171,15],[172,16],[174,17],[176,18],[177,19],[178,20],[179,21],[180,22],[210,23],[181,17],[182,24],[183,25],[186,26],[187,27],[190,28],[191,29],[192,17],[195,30],[204,31],[207,32],[197,33],[198,34],[200,15],[202,35],[203,15],[135,36],[132,37],[131,38],[90,39],[103,40],[108,41],[110,42],[109,42],[92,43],[93,44],[111,45],[115,46],[113,46],[101,47],[73,48],[127,41],[123,48],[104,49],[112,46],[116,50],[114,51],[83,52],[76,53],[97,48],[98,48],[75,53],[129,54],[81,52],[117,42],[119,55],[118,55],[82,52],[78,56],[124,57],[86,53],[87,53],[120,46],[122,50],[121,51],[43,58],[36,59],[34,60],[139,17],[219,61],[221,62],[220,61],[218,63],[217,64],[143,65],[144,66],[145,66],[146,67],[149,68],[147,65],[148,69],[133,70],[138,71],[64,72],[136,73],[140,74],[154,75],[67,76],[66,77],[45,78],[49,79],[50,80],[48,81],[155,82],[61,83],[53,84],[51,85],[55,86],[56,86],[59,87],[58,88],[63,89],[62,90],[60,91],[141,92],[153,93],[152,94],[150,95],[151,96],[65,97],[54,98],[142,99]],"semanticDiagnosticsPerFile":[160,158,163,159,161,162,46,37,40,57,39,211,212,213,214,222,38,223,208,165,209,166,167,168,169,170,171,172,173,174,175,176,177,164,205,178,179,180,210,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,204,207,197,198,199,200,201,206,202,203,224,225,134,135,132,131,90,103,70,108,110,109,92,91,93,111,115,113,101,100,73,96,127,123,72,99,125,104,112,116,114,128,83,77,76,97,98,75,105,71,85,129,81,117,119,118,68,84,89,82,80,78,79,124,86,87,102,74,120,122,121,107,95,126,130,69,94,106,88,43,42,36,35,34,33,139,41,215,219,221,220,218,137,217,216,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,6,28,29,30,31,1,32,143,144,145,146,149,147,148,133,138,64,136,140,154,67,66,44,45,49,50,48,155,61,53,51,55,56,59,58,63,62,60,141,153,152,150,151,156,157,47,65,54,142,52]},"version":"4.6.0-dev.20220210"}
@@ -0,0 +1,3 @@
1
+ export declare function unique<T>(array: T[]): T[];
2
+ export declare function groupBy<T, K>(array: T[], toKey: (item: T) => K): Map<K, T[]>;
3
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/util/array.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEzC;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAW5E"}
@@ -0,0 +1,14 @@
1
+ export function unique(array) {
2
+ return [...new Set(array)];
3
+ }
4
+ export function groupBy(array, toKey) {
5
+ const map = new Map();
6
+ for (const item of array) {
7
+ const key = toKey(item);
8
+ const oldValue = map.get(key);
9
+ const newValue = oldValue ? [...oldValue, item] : [item];
10
+ map.set(key, newValue);
11
+ }
12
+ return map;
13
+ }
14
+ //# sourceMappingURL=array.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/util/array.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAI,KAAU;IAClC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,OAAO,CAAO,KAAU,EAAE,KAAqB;IAC7D,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAE9B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QACxB,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACzD,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;KACxB;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Get the path of cache directory for eslint-interactive.
3
+ */
4
+ export declare function getCacheDir(): string;
5
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/util/cache.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC"}
@@ -0,0 +1,13 @@
1
+ import { createRequire as _createRequire } from "module";
2
+ const __require = _createRequire(import.meta.url);
3
+ import { join } from 'path';
4
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
5
+ const cachedir = __require("cachedir");
6
+ import { VERSION } from '../cli/package.js';
7
+ /**
8
+ * Get the path of cache directory for eslint-interactive.
9
+ */
10
+ export function getCacheDir() {
11
+ return join(cachedir('eslint-interactive'), VERSION);
12
+ }
13
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/util/cache.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,iEAAiE;AACjE,uCAAsC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { AST, ESLint } from 'eslint';
2
+ import type { Comment } from 'estree';
3
+ /** `results` 内で使われているプラグインの名前のリストを洗い出して返す */
4
+ export declare function scanUsedPluginsFromResults(results: ESLint.LintResult[]): string[];
5
+ export declare type DisableComment = {
6
+ type: 'Block' | 'Line';
7
+ scope: 'next-line' | 'file';
8
+ ruleIds: string[];
9
+ description?: string;
10
+ range: [number, number];
11
+ };
12
+ /**
13
+ * コメントを ESLint の disable comment としてパースする。
14
+ * disable comment としてパースできなかった場合は undefined を返す。
15
+ *
16
+ * ## 参考: disable comment の構造
17
+ * /* eslint-disable-next-line rule-a, rule-b, rule-c, rule-d -- I'm the rules.
18
+ * ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^
19
+ * | | | |
20
+ * header | | |
21
+ * ruleList | |
22
+ * descriptionHeader |
23
+ * description
24
+ */
25
+ export declare function parseDisableComment(comment: Comment): DisableComment | undefined;
26
+ /**
27
+ * Convert `DisableComment` to comment text.
28
+ */
29
+ export declare function toCommentText({ type, scope, ruleIds, description }: Omit<DisableComment, 'range'>): string;
30
+ /**
31
+ * Create the results with only messages with the specified rule ids.
32
+ * @param results The lint results.
33
+ * @param ruleIds The rule ids.
34
+ * @returns The results with only messages with the specified rule ids
35
+ */
36
+ export declare function filterResultsByRuleId(results: ESLint.LintResult[], ruleIds: (string | null)[]): ESLint.LintResult[];
37
+ /**
38
+ * push rule ids to the disable comment and return the new comment node.
39
+ * @param comment The comment node to be modified
40
+ * @param ruleIds The rule ids to be added
41
+ * @returns The new comment node
42
+ */
43
+ export declare function pushRuleIdsToDisableComment(comment: DisableComment, ruleIds: string[]): DisableComment;
44
+ /**
45
+ * Merge the ruleIds and description of the disable comments.
46
+ * @param a The ruleIds and description of first disable comment
47
+ * @param b The ruleIds and description of second disable comment
48
+ * @returns The ruleIds and description of merged disable comment
49
+ */
50
+ export declare function mergeRuleIdsAndDescription(a: {
51
+ ruleIds: string[];
52
+ description?: string;
53
+ }, b: {
54
+ ruleIds: string[];
55
+ description?: string;
56
+ }): {
57
+ ruleIds: string[];
58
+ description?: string;
59
+ };
60
+ /**
61
+ * Find shebang from the first line of the file.
62
+ * @param sourceCodeText The source code text of the file.
63
+ * @returns The information of shebang. If the file does not have shebang, return null.
64
+ */
65
+ export declare function findShebang(sourceCodeText: string): {
66
+ range: AST.Range;
67
+ } | null;
68
+ //# sourceMappingURL=eslint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../src/util/eslint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAStC,6CAA6C;AAC7C,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,MAAM,EAAE,CAcjF;AAED,oBAAY,cAAc,GAAG;IAC3B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CA4BhF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG,MAAM,CAgB1G;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE,CASnH;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,cAAc,CAKtG;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,CAAC,EAAE;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,CAAC,EAAE;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAY7C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAA;CAAE,GAAG,IAAI,CAI/E"}
@@ -0,0 +1,147 @@
1
+ import { unique } from './array.js';
2
+ import { notEmpty } from './type-check.js';
3
+ const COMMENT_RE = /^\s*(?<header>eslint-disable|eslint-disable-next-line)\s+(?<ruleList>[@a-z0-9\-_$/]*(?:\s*,\s*[@a-z0-9\-_$/]*)*(?:\s*,)?)(?:\s+--\s+(?<description>.*\S))?\s*$/u;
4
+ const SHEBANG_PATTERN = /^#!.+?\r?\n/u;
5
+ /** `results` 内で使われているプラグインの名前のリストを洗い出して返す */
6
+ export function scanUsedPluginsFromResults(results) {
7
+ const plugins = results
8
+ .flatMap((result) => result.messages) // messages: Linter.LintMessage[]
9
+ .map((message) => message.ruleId) // ruleIds: (string | undefined)[]
10
+ .filter(notEmpty) // ruleIds: string[]
11
+ .map((ruleId) => {
12
+ const parts = ruleId.split('/');
13
+ if (parts.length === 1)
14
+ return undefined; // ex: 'rule-a'
15
+ if (parts.length === 2)
16
+ return parts[0]; // ex: 'plugin/rule-a'
17
+ if (parts.length === 3)
18
+ return `${parts[0]}/${parts[1]}`; // ex: '@scoped/plugin/rule-a'
19
+ return undefined; // invalid ruleId
20
+ }) // plugins: string[]
21
+ .filter(notEmpty);
22
+ return unique(plugins);
23
+ }
24
+ /**
25
+ * コメントを ESLint の disable comment としてパースする。
26
+ * disable comment としてパースできなかった場合は undefined を返す。
27
+ *
28
+ * ## 参考: disable comment の構造
29
+ * /* eslint-disable-next-line rule-a, rule-b, rule-c, rule-d -- I'm the rules.
30
+ * ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^
31
+ * | | | |
32
+ * header | | |
33
+ * ruleList | |
34
+ * descriptionHeader |
35
+ * description
36
+ */
37
+ export function parseDisableComment(comment) {
38
+ // NOTE: コメントノードには必ず range があるはずだが、型上は optional なので、
39
+ // range がない場合はパースに失敗した扱いにする。
40
+ if (!comment.range)
41
+ return undefined;
42
+ const result = COMMENT_RE.exec(comment.value);
43
+ if (!result)
44
+ return undefined;
45
+ if (!result.groups)
46
+ return undefined;
47
+ const { header, ruleList, description } = result.groups;
48
+ const ruleIds = ruleList
49
+ .split(',')
50
+ .map((r) => r.trim())
51
+ // 空文字は除外しておく
52
+ .filter((ruleId) => ruleId !== '');
53
+ const scope = header === 'eslint-disable-next-line' ? 'next-line' : 'file';
54
+ // file scope comment must be block-style.
55
+ if (scope === 'file' && comment.type === 'Line')
56
+ return undefined;
57
+ return {
58
+ type: comment.type,
59
+ scope: header === 'eslint-disable-next-line' ? 'next-line' : 'file',
60
+ ruleIds: ruleIds,
61
+ // description is optional
62
+ ...(description === '' || description === undefined ? {} : { description }),
63
+ range: comment.range,
64
+ };
65
+ }
66
+ /**
67
+ * Convert `DisableComment` to comment text.
68
+ */
69
+ export function toCommentText({ type, scope, ruleIds, description }) {
70
+ const header = scope === 'next-line' ? 'eslint-disable-next-line' : 'eslint-disable';
71
+ const ruleList = unique(ruleIds).join(', ');
72
+ if (type === 'Line') {
73
+ if (description === undefined) {
74
+ return `// ${header} ${ruleList}`;
75
+ }
76
+ else {
77
+ return `// ${header} ${ruleList} -- ${description}`;
78
+ }
79
+ }
80
+ else {
81
+ if (description === undefined) {
82
+ return `/* ${header} ${ruleList} */`;
83
+ }
84
+ else {
85
+ return `/* ${header} ${ruleList} -- ${description} */`;
86
+ }
87
+ }
88
+ }
89
+ /**
90
+ * Create the results with only messages with the specified rule ids.
91
+ * @param results The lint results.
92
+ * @param ruleIds The rule ids.
93
+ * @returns The results with only messages with the specified rule ids
94
+ */
95
+ export function filterResultsByRuleId(results, ruleIds) {
96
+ return results
97
+ .map((result) => {
98
+ return {
99
+ ...result,
100
+ messages: result.messages.filter((message) => ruleIds.includes(message.ruleId)),
101
+ };
102
+ })
103
+ .filter((result) => result.messages.length > 0);
104
+ }
105
+ /**
106
+ * push rule ids to the disable comment and return the new comment node.
107
+ * @param comment The comment node to be modified
108
+ * @param ruleIds The rule ids to be added
109
+ * @returns The new comment node
110
+ */
111
+ export function pushRuleIdsToDisableComment(comment, ruleIds) {
112
+ return {
113
+ ...comment,
114
+ ruleIds: unique([...comment.ruleIds, ...ruleIds]),
115
+ };
116
+ }
117
+ /**
118
+ * Merge the ruleIds and description of the disable comments.
119
+ * @param a The ruleIds and description of first disable comment
120
+ * @param b The ruleIds and description of second disable comment
121
+ * @returns The ruleIds and description of merged disable comment
122
+ */
123
+ export function mergeRuleIdsAndDescription(a, b) {
124
+ const ruleIds = unique([...a.ruleIds, ...b.ruleIds]);
125
+ const description = a.description !== undefined && b.description !== undefined
126
+ ? `${a.description}, ${b.description}`
127
+ : a.description !== undefined && b.description === undefined
128
+ ? a.description
129
+ : a.description === undefined && b.description !== undefined
130
+ ? b.description
131
+ : undefined;
132
+ if (description === undefined)
133
+ return { ruleIds };
134
+ return { ruleIds, description };
135
+ }
136
+ /**
137
+ * Find shebang from the first line of the file.
138
+ * @param sourceCodeText The source code text of the file.
139
+ * @returns The information of shebang. If the file does not have shebang, return null.
140
+ */
141
+ export function findShebang(sourceCodeText) {
142
+ const result = SHEBANG_PATTERN.exec(sourceCodeText);
143
+ if (!result)
144
+ return null;
145
+ return { range: [0, result[0].length] };
146
+ }
147
+ //# sourceMappingURL=eslint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../../src/util/eslint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,UAAU,GACd,iKAAiK,CAAC;AAEpK,MAAM,eAAe,GAAG,cAAc,CAAC;AAEvC,6CAA6C;AAC7C,MAAM,UAAU,0BAA0B,CAAC,OAA4B;IACrE,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,iCAAiC;SACtE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,kCAAkC;SACnE,MAAM,CAAC,QAAQ,CAAC,CAAC,oBAAoB;SACrC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,eAAe;QACzD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB;QAC/D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,8BAA8B;QACxF,OAAO,SAAS,CAAC,CAAC,iBAAiB;IACrC,CAAC,CAAC,CAAC,oBAAoB;SACtB,MAAM,CAAC,QAAQ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>;
2
+ export declare function generateFilterScriptFilePath(ruleIds: string[]): string;
3
+ export declare function generateFixableMakerScriptFilePath(ruleIds: string[]): string;
4
+ export declare function generateExampleFilterScriptFilePath(): string;
5
+ export declare function generateExampleFixableMakerScriptFilePath(): string;
6
+ //# sourceMappingURL=filter-script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-script.d.ts","sourceRoot":"","sources":["../../src/util/filter-script.ts"],"names":[],"mappings":"AAeA,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS1E;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAItE;AAED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAI5E;AAED,wBAAgB,mCAAmC,IAAI,MAAM,CAE5D;AAED,wBAAgB,yCAAyC,IAAI,MAAM,CAElE"}
@@ -0,0 +1,39 @@
1
+ import { exec as execOriginal } from 'child_process';
2
+ import { mkdir, appendFile, readFile, access } from 'fs/promises';
3
+ import { dirname, join } from 'path';
4
+ import { fileURLToPath } from 'url';
5
+ import { promisify } from 'util';
6
+ import { getCacheDir } from './cache.js';
7
+ const exec = promisify(execOriginal);
8
+ const DEFAULT_EDITOR_COMMAND = 'vi';
9
+ function getEditorCommand() {
10
+ var _a;
11
+ return (_a = process.env.EDITOR) !== null && _a !== void 0 ? _a : DEFAULT_EDITOR_COMMAND;
12
+ }
13
+ export async function editFileWithEditor(filepath) {
14
+ const command = getEditorCommand();
15
+ await mkdir(dirname(filepath), { recursive: true });
16
+ await access(filepath).catch(async () => {
17
+ await appendFile(filepath, '', 'utf8');
18
+ });
19
+ await exec(`${command} ${filepath}`);
20
+ const newContent = await readFile(filepath, 'utf8');
21
+ return newContent;
22
+ }
23
+ export function generateFilterScriptFilePath(ruleIds) {
24
+ const basename = ruleIds.join('_').replace(/[^\w-]/g, '') + '.js';
25
+ const filepath = join(getCacheDir(), 'filter-script', basename);
26
+ return filepath;
27
+ }
28
+ export function generateFixableMakerScriptFilePath(ruleIds) {
29
+ const basename = ruleIds.join('_').replace(/[^\w-]/g, '') + '.js';
30
+ const filepath = join(getCacheDir(), 'fixable-maker-script', basename);
31
+ return filepath;
32
+ }
33
+ export function generateExampleFilterScriptFilePath() {
34
+ return join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'static', 'example-filter-script.js');
35
+ }
36
+ export function generateExampleFixableMakerScriptFilePath() {
37
+ return join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'static', 'example-fixable-maker-script.js');
38
+ }
39
+ //# sourceMappingURL=filter-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-script.js","sourceRoot":"","sources":["../../src/util/filter-script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAErC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAEpC,SAAS,gBAAgB;;IACvB,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,MAAM,mCAAI,sBAAsB,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,QAAgB;IACvD,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACnC,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE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,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,iCAAiC,CAAC,CAAC;AAChH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function unreachable(message?: string): never;
2
+ export declare function notEmpty<TValue>(value: TValue | null | undefined): value is TValue;
3
+ //# sourceMappingURL=type-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-check.d.ts","sourceRoot":"","sources":["../../src/util/type-check.ts"],"names":[],"mappings":"AACA,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAEnD;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAElF"}
@@ -0,0 +1,8 @@
1
+ /* istanbul ignore next */
2
+ export function unreachable(message) {
3
+ throw new Error(message !== null && message !== void 0 ? message : 'unreachable code');
4
+ }
5
+ export function notEmpty(value) {
6
+ return value !== null && value !== undefined;
7
+ }
8
+ //# sourceMappingURL=type-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-check.js","sourceRoot":"","sources":["../../src/util/type-check.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,IAAI,KAAK,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,kBAAkB,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAS,KAAgC;IAC/D,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}