@alexlit/lint-kit 175.0.0 → 176.0.1

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 (948) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/node_modules/@eslint/core/README.md +29 -0
  3. package/packages/config-eslint/node_modules/@eslint/core/dist/cjs/types.d.cts +1179 -0
  4. package/packages/config-eslint/node_modules/@eslint/core/dist/esm/types.d.ts +1179 -0
  5. package/packages/config-eslint/node_modules/@eslint/core/package.json +49 -0
  6. package/packages/config-eslint/node_modules/@eslint/plugin-kit/README.md +10 -10
  7. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs +1 -12
  8. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts +3 -4
  9. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/types.cts +0 -74
  10. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts +3 -4
  11. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/index.js +1 -12
  12. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts +0 -40
  13. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/types.ts +0 -74
  14. package/packages/config-eslint/node_modules/@eslint/plugin-kit/package.json +4 -5
  15. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/configs/flat-config-base.js +9 -0
  16. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/index.d.ts +17 -0
  17. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/index.js +91 -0
  18. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/license +9 -0
  19. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/globals.json +3345 -0
  20. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/index.d.ts +3452 -0
  21. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/index.js +2 -0
  22. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/license +9 -0
  23. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/package.json +117 -0
  24. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/readme.md +42 -0
  25. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/package.json +128 -0
  26. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/readme.md +261 -0
  27. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/call-or-new-expression.js +120 -0
  28. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/function-types.js +7 -0
  29. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/index.js +30 -0
  30. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-arrow-function-body.js +3 -0
  31. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-directive.js +4 -0
  32. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-empty-array-expression.js +5 -0
  33. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-empty-node.js +17 -0
  34. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-expression-statement.js +7 -0
  35. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-function.js +5 -0
  36. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-member-expression.js +98 -0
  37. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-method-call.js +62 -0
  38. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-negative-one.js +8 -0
  39. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-reference-identifier.js +159 -0
  40. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-static-require.js +10 -0
  41. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-tagged-template-literal.js +24 -0
  42. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-undefined.js +3 -0
  43. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/literal.js +24 -0
  44. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/better-regex.js +146 -0
  45. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/catch-error-name.js +138 -0
  46. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-assert.js +98 -0
  47. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-date-clone.js +54 -0
  48. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-destructuring.js +168 -0
  49. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-empty-array-spread.js +127 -0
  50. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-existence-index-check.js +137 -0
  51. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-function-scoping.js +265 -0
  52. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/custom-error-definition.js +218 -0
  53. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/empty-brace-spaces.js +62 -0
  54. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/error-message.js +98 -0
  55. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/escape-case.js +86 -0
  56. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/expiring-todo-comments.js +584 -0
  57. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/explicit-length-check.js +236 -0
  58. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/filename-case.js +276 -0
  59. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/add-parenthesizes-to-return-or-throw-expression.js +29 -0
  60. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/append-argument.js +30 -0
  61. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/extend-fix-range.js +11 -0
  62. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/fix-space-around-keywords.js +43 -0
  63. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/index.js +23 -0
  64. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-argument.js +40 -0
  65. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-expression-statement.js +34 -0
  66. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-method-call.js +28 -0
  67. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-object-property.js +21 -0
  68. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-parentheses.js +19 -0
  69. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-spaces-after.js +22 -0
  70. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-specifier.js +59 -0
  71. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/rename-variable.js +8 -0
  72. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-argument.js +17 -0
  73. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-member-expression-property.js +25 -0
  74. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-node-or-token-and-spaces-before.js +31 -0
  75. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-reference-identifier.js +32 -0
  76. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-string-raw.js +12 -0
  77. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-template-element.js +10 -0
  78. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/switch-call-expression-to-new-expression.js +29 -0
  79. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/switch-new-expression-to-call-expression.js +42 -0
  80. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/import-style.js +375 -0
  81. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/index.js +143 -0
  82. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/new-for-builtins.js +112 -0
  83. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-abusive-eslint-disable.js +63 -0
  84. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-accessor-recursion.js +160 -0
  85. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-anonymous-default-export.js +210 -0
  86. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-callback-reference.js +285 -0
  87. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-for-each.js +496 -0
  88. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-method-this-argument.js +223 -0
  89. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-reduce.js +128 -0
  90. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-reverse.js +6 -0
  91. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-sort.js +6 -0
  92. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-await-expression-member.js +85 -0
  93. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-await-in-promise-methods.js +69 -0
  94. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-console-spaces.js +89 -0
  95. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-document-cookie.js +27 -0
  96. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-empty-file.js +58 -0
  97. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-for-loop.js +419 -0
  98. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-hex-escape.js +54 -0
  99. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-immediate-mutation.js +778 -0
  100. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-instanceof-builtins.js +216 -0
  101. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-invalid-fetch-options.js +112 -0
  102. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-invalid-remove-event-listener.js +61 -0
  103. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-keyword-prefix.js +202 -0
  104. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-lonely-if.js +155 -0
  105. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-magic-array-flat-depth.js +55 -0
  106. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-named-default.js +101 -0
  107. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-negated-condition.js +145 -0
  108. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-negation-in-equality-check.js +99 -0
  109. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-nested-ternary.js +60 -0
  110. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-new-array.js +106 -0
  111. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-new-buffer.js +100 -0
  112. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-null.js +153 -0
  113. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-object-as-default-parameter.js +52 -0
  114. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-process-exit.js +106 -0
  115. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-single-promise-in-promise-methods.js +179 -0
  116. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-static-only-class.js +226 -0
  117. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-thenable.js +194 -0
  118. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-this-assignment.js +40 -0
  119. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-typeof-undefined.js +146 -0
  120. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-array-flat-depth.js +49 -0
  121. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-array-splice-count.js +23 -0
  122. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-await.js +110 -0
  123. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-polyfills.js +174 -0
  124. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-slice-end.js +22 -0
  125. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unreadable-array-destructuring.js +85 -0
  126. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unreadable-iife.js +43 -0
  127. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unused-properties.js +240 -0
  128. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-collection-argument.js +101 -0
  129. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-error-capture-stack-trace.js +146 -0
  130. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-fallback-in-spread.js +66 -0
  131. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-length-check.js +150 -0
  132. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-promise-resolve-reject.js +210 -0
  133. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-spread.js +389 -0
  134. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-switch-case.js +59 -0
  135. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-undefined.js +275 -0
  136. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-zero-fractions.js +81 -0
  137. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/number-literal-case.js +82 -0
  138. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/numeric-separators-style.js +189 -0
  139. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-add-event-listener.js +191 -0
  140. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-find.js +458 -0
  141. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-flat-map.js +86 -0
  142. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-flat.js +279 -0
  143. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-index-of.js +34 -0
  144. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-some.js +219 -0
  145. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-at.js +380 -0
  146. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-bigint-literals.js +129 -0
  147. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-blob-reading-methods.js +47 -0
  148. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-class-fields.js +158 -0
  149. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-classlist-toggle.js +255 -0
  150. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-code-point.js +56 -0
  151. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-date-now.js +133 -0
  152. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-default-parameters.js +218 -0
  153. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-append.js +50 -0
  154. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-dataset.js +135 -0
  155. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-remove.js +124 -0
  156. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-text-content.js +77 -0
  157. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-event-target.js +119 -0
  158. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-export-from.js +367 -0
  159. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-global-this.js +222 -0
  160. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-import-meta-properties.js +320 -0
  161. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-includes.js +111 -0
  162. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-json-parse-buffer.js +161 -0
  163. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-keyboard-event-key.js +188 -0
  164. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-logical-operator-over-ternary.js +162 -0
  165. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-math-min-max.js +205 -0
  166. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-math-trunc.js +111 -0
  167. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-modern-dom-apis.js +145 -0
  168. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-modern-math-apis.js +210 -0
  169. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-module.js +377 -0
  170. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-native-coercion-functions.js +187 -0
  171. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-negative-index.js +211 -0
  172. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-node-protocol.js +86 -0
  173. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-number-properties.js +142 -0
  174. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-object-from-entries.js +256 -0
  175. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-optional-catch-binding.js +77 -0
  176. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-prototype-methods.js +162 -0
  177. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-query-selector.js +170 -0
  178. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-reflect-apply.js +99 -0
  179. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-regexp-test.js +155 -0
  180. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-response-static-json.js +85 -0
  181. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-set-has.js +181 -0
  182. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-set-size.js +106 -0
  183. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-single-call.js +188 -0
  184. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-spread.js +521 -0
  185. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-raw.js +149 -0
  186. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-replace-all.js +180 -0
  187. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-slice.js +180 -0
  188. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-starts-ends-with.js +201 -0
  189. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-trim-start-end.js +46 -0
  190. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-structured-clone.js +149 -0
  191. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-switch.js +357 -0
  192. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-ternary.js +288 -0
  193. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-top-level-await.js +154 -0
  194. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-type-error.js +169 -0
  195. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prevent-abbreviations.js +655 -0
  196. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/relative-url-style.js +171 -0
  197. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-array-join-separator.js +65 -0
  198. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-module-attributes.js +120 -0
  199. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-module-specifiers.js +158 -0
  200. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-number-to-fixed-digits-argument.js +55 -0
  201. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-post-message-target-origin.js +74 -0
  202. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/get-documentation-url.js +9 -0
  203. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/index.js +9 -0
  204. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-create.js +51 -0
  205. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-listener.js +40 -0
  206. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-problem.js +38 -0
  207. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-rule-fixer.js +49 -0
  208. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-rule.js +38 -0
  209. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-rules.js +13 -0
  210. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/unicorn-context.js +36 -0
  211. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/unicorn-listeners.js +65 -0
  212. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/utilities.js +27 -0
  213. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/abbreviations.js +270 -0
  214. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/builtin-errors.js +14 -0
  215. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/dom-events.js +275 -0
  216. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/event-keys.js +54 -0
  217. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/negative-index.js +52 -0
  218. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/no-array-mutate-rule.js +139 -0
  219. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/no-unnecessary-length-or-infinity-rule.js +80 -0
  220. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/package-json.js +42 -0
  221. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/simple-array-search-rule.js +126 -0
  222. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/typed-array.js +17 -0
  223. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/string-content.js +192 -0
  224. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/switch-case-braces.js +114 -0
  225. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/template-indent.js +219 -0
  226. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/text-encoding-identifier-case.js +130 -0
  227. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/throw-new-error.js +60 -0
  228. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/array-or-object-prototype-property.js +57 -0
  229. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/assert-token.js +29 -0
  230. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/boolean.js +88 -0
  231. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/builtins.js +30 -0
  232. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/cartesian-product-samples.js +22 -0
  233. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/create-deprecated-rules.js +29 -0
  234. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/escape-string.js +24 -0
  235. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/escape-template-element-raw.js +6 -0
  236. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-ancestor.js +15 -0
  237. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-available-variable-name.js +147 -0
  238. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-builtin-rule.js +5 -0
  239. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-call-expression-arguments-text.js +36 -0
  240. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-call-or-new-expression-tokens.js +67 -0
  241. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-class-head-location.js +22 -0
  242. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-documentation-url.js +9 -0
  243. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-indent-string.js +18 -0
  244. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-references.js +5 -0
  245. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-scopes.js +12 -0
  246. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-sibling-node.js +38 -0
  247. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-switch-case-head-location.js +22 -0
  248. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-token-store.js +24 -0
  249. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-variable-identifiers.js +7 -0
  250. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/global-reference-tracker.js +68 -0
  251. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/has-optional-chain-element.js +17 -0
  252. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/has-same-range.js +7 -0
  253. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/index.js +59 -0
  254. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-function-self-used-inside.js +39 -0
  255. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-left-hand-side.js +20 -0
  256. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-logical-expression.js +14 -0
  257. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-method-named.js +7 -0
  258. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-new-expression-with-parentheses.js +28 -0
  259. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-node-matches.js +58 -0
  260. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-node-value-not-dom-node.js +20 -0
  261. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-node-value-not-function.js +40 -0
  262. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-number.js +224 -0
  263. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-object-method.js +10 -0
  264. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-on-same-line.js +7 -0
  265. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-same-identifier.js +5 -0
  266. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-same-reference.js +170 -0
  267. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-export-local.js +8 -0
  268. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-import-local.js +8 -0
  269. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-property-assignment-pattern-left.js +8 -0
  270. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-property-value.js +6 -0
  271. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-unresolved-variable.js +14 -0
  272. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-value-not-usable.js +5 -0
  273. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/needs-semicolon.js +118 -0
  274. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/numeric.js +49 -0
  275. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/parentheses.js +71 -0
  276. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/resolve-variable-name.js +18 -0
  277. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/rule.js +27 -0
  278. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-await-expression-argument.js +17 -0
  279. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-call-expression-callee.js +18 -0
  280. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-conditional-expression-child.js +13 -0
  281. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-expression-statement-expression.js +22 -0
  282. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-logical-expression-child.js +43 -0
  283. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-member-expression-object.js +47 -0
  284. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-new-expression-callee.js +28 -0
  285. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-unary-expression.js +24 -0
  286. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/singular.js +16 -0
  287. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/string-cases.js +2 -0
  288. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/to-location.js +25 -0
  289. package/packages/config-eslint/package.json +4 -4
  290. package/packages/config-eslint/plugins/vue.js +6 -0
  291. package/packages/config-eslint/node_modules/@eslint/config-array/README.md +0 -368
  292. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/index.cjs +0 -1536
  293. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/index.d.cts +0 -144
  294. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs +0 -1336
  295. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs +0 -1678
  296. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/types.cts +0 -29
  297. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/index.d.ts +0 -144
  298. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/index.js +0 -1511
  299. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/std__path/posix.js +0 -1314
  300. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/std__path/windows.js +0 -1656
  301. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/types.d.ts +0 -23
  302. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/types.ts +0 -29
  303. package/packages/config-eslint/node_modules/@eslint/config-array/package.json +0 -65
  304. package/packages/config-eslint/node_modules/@eslint/config-helpers/LICENSE +0 -201
  305. package/packages/config-eslint/node_modules/@eslint/config-helpers/README.md +0 -97
  306. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/index.cjs +0 -588
  307. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts +0 -26
  308. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/types.cts +0 -29
  309. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/index.d.ts +0 -26
  310. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/index.js +0 -586
  311. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/types.d.ts +0 -23
  312. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/types.ts +0 -29
  313. package/packages/config-eslint/node_modules/@eslint/config-helpers/package.json +0 -60
  314. package/packages/config-eslint/node_modules/@eslint/js/LICENSE +0 -19
  315. package/packages/config-eslint/node_modules/@eslint/js/README.md +0 -103
  316. package/packages/config-eslint/node_modules/@eslint/js/package.json +0 -44
  317. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-all.js +0 -210
  318. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-recommended.js +0 -75
  319. package/packages/config-eslint/node_modules/@eslint/js/src/index.js +0 -23
  320. package/packages/config-eslint/node_modules/@eslint/js/types/index.d.ts +0 -14
  321. package/packages/config-eslint/node_modules/@eslint/object-schema/LICENSE +0 -201
  322. package/packages/config-eslint/node_modules/@eslint/object-schema/README.md +0 -243
  323. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/index.cjs +0 -459
  324. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/index.d.cts +0 -127
  325. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/types.cts +0 -57
  326. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/index.d.ts +0 -127
  327. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/index.js +0 -456
  328. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/types.d.ts +0 -40
  329. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/types.ts +0 -57
  330. package/packages/config-eslint/node_modules/@eslint/object-schema/package.json +0 -62
  331. package/packages/config-eslint/node_modules/ajv/.tonic_example.js +0 -20
  332. package/packages/config-eslint/node_modules/ajv/LICENSE +0 -22
  333. package/packages/config-eslint/node_modules/ajv/README.md +0 -1497
  334. package/packages/config-eslint/node_modules/ajv/dist/ajv.bundle.js +0 -7189
  335. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js +0 -3
  336. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js.map +0 -1
  337. package/packages/config-eslint/node_modules/ajv/lib/ajv.d.ts +0 -397
  338. package/packages/config-eslint/node_modules/ajv/lib/ajv.js +0 -506
  339. package/packages/config-eslint/node_modules/ajv/lib/cache.js +0 -26
  340. package/packages/config-eslint/node_modules/ajv/lib/compile/async.js +0 -90
  341. package/packages/config-eslint/node_modules/ajv/lib/compile/equal.js +0 -5
  342. package/packages/config-eslint/node_modules/ajv/lib/compile/error_classes.js +0 -34
  343. package/packages/config-eslint/node_modules/ajv/lib/compile/formats.js +0 -142
  344. package/packages/config-eslint/node_modules/ajv/lib/compile/index.js +0 -387
  345. package/packages/config-eslint/node_modules/ajv/lib/compile/resolve.js +0 -270
  346. package/packages/config-eslint/node_modules/ajv/lib/compile/rules.js +0 -66
  347. package/packages/config-eslint/node_modules/ajv/lib/compile/schema_obj.js +0 -9
  348. package/packages/config-eslint/node_modules/ajv/lib/compile/ucs2length.js +0 -20
  349. package/packages/config-eslint/node_modules/ajv/lib/compile/util.js +0 -239
  350. package/packages/config-eslint/node_modules/ajv/lib/data.js +0 -49
  351. package/packages/config-eslint/node_modules/ajv/lib/definition_schema.js +0 -37
  352. package/packages/config-eslint/node_modules/ajv/lib/dot/_limit.jst +0 -113
  353. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitItems.jst +0 -12
  354. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitLength.jst +0 -12
  355. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitProperties.jst +0 -12
  356. package/packages/config-eslint/node_modules/ajv/lib/dot/allOf.jst +0 -32
  357. package/packages/config-eslint/node_modules/ajv/lib/dot/anyOf.jst +0 -46
  358. package/packages/config-eslint/node_modules/ajv/lib/dot/coerce.def +0 -51
  359. package/packages/config-eslint/node_modules/ajv/lib/dot/comment.jst +0 -9
  360. package/packages/config-eslint/node_modules/ajv/lib/dot/const.jst +0 -11
  361. package/packages/config-eslint/node_modules/ajv/lib/dot/contains.jst +0 -55
  362. package/packages/config-eslint/node_modules/ajv/lib/dot/custom.jst +0 -191
  363. package/packages/config-eslint/node_modules/ajv/lib/dot/defaults.def +0 -47
  364. package/packages/config-eslint/node_modules/ajv/lib/dot/definitions.def +0 -203
  365. package/packages/config-eslint/node_modules/ajv/lib/dot/dependencies.jst +0 -79
  366. package/packages/config-eslint/node_modules/ajv/lib/dot/enum.jst +0 -30
  367. package/packages/config-eslint/node_modules/ajv/lib/dot/errors.def +0 -194
  368. package/packages/config-eslint/node_modules/ajv/lib/dot/format.jst +0 -106
  369. package/packages/config-eslint/node_modules/ajv/lib/dot/if.jst +0 -73
  370. package/packages/config-eslint/node_modules/ajv/lib/dot/items.jst +0 -98
  371. package/packages/config-eslint/node_modules/ajv/lib/dot/missing.def +0 -39
  372. package/packages/config-eslint/node_modules/ajv/lib/dot/multipleOf.jst +0 -22
  373. package/packages/config-eslint/node_modules/ajv/lib/dot/not.jst +0 -43
  374. package/packages/config-eslint/node_modules/ajv/lib/dot/oneOf.jst +0 -54
  375. package/packages/config-eslint/node_modules/ajv/lib/dot/pattern.jst +0 -14
  376. package/packages/config-eslint/node_modules/ajv/lib/dot/properties.jst +0 -245
  377. package/packages/config-eslint/node_modules/ajv/lib/dot/propertyNames.jst +0 -52
  378. package/packages/config-eslint/node_modules/ajv/lib/dot/ref.jst +0 -85
  379. package/packages/config-eslint/node_modules/ajv/lib/dot/required.jst +0 -108
  380. package/packages/config-eslint/node_modules/ajv/lib/dot/uniqueItems.jst +0 -62
  381. package/packages/config-eslint/node_modules/ajv/lib/dot/validate.jst +0 -276
  382. package/packages/config-eslint/node_modules/ajv/lib/dotjs/README.md +0 -3
  383. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limit.js +0 -163
  384. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitItems.js +0 -80
  385. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitLength.js +0 -85
  386. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitProperties.js +0 -80
  387. package/packages/config-eslint/node_modules/ajv/lib/dotjs/allOf.js +0 -42
  388. package/packages/config-eslint/node_modules/ajv/lib/dotjs/anyOf.js +0 -73
  389. package/packages/config-eslint/node_modules/ajv/lib/dotjs/comment.js +0 -14
  390. package/packages/config-eslint/node_modules/ajv/lib/dotjs/const.js +0 -56
  391. package/packages/config-eslint/node_modules/ajv/lib/dotjs/contains.js +0 -81
  392. package/packages/config-eslint/node_modules/ajv/lib/dotjs/custom.js +0 -228
  393. package/packages/config-eslint/node_modules/ajv/lib/dotjs/dependencies.js +0 -168
  394. package/packages/config-eslint/node_modules/ajv/lib/dotjs/enum.js +0 -66
  395. package/packages/config-eslint/node_modules/ajv/lib/dotjs/format.js +0 -150
  396. package/packages/config-eslint/node_modules/ajv/lib/dotjs/if.js +0 -103
  397. package/packages/config-eslint/node_modules/ajv/lib/dotjs/index.js +0 -33
  398. package/packages/config-eslint/node_modules/ajv/lib/dotjs/items.js +0 -140
  399. package/packages/config-eslint/node_modules/ajv/lib/dotjs/multipleOf.js +0 -80
  400. package/packages/config-eslint/node_modules/ajv/lib/dotjs/not.js +0 -84
  401. package/packages/config-eslint/node_modules/ajv/lib/dotjs/oneOf.js +0 -73
  402. package/packages/config-eslint/node_modules/ajv/lib/dotjs/pattern.js +0 -75
  403. package/packages/config-eslint/node_modules/ajv/lib/dotjs/properties.js +0 -335
  404. package/packages/config-eslint/node_modules/ajv/lib/dotjs/propertyNames.js +0 -81
  405. package/packages/config-eslint/node_modules/ajv/lib/dotjs/ref.js +0 -124
  406. package/packages/config-eslint/node_modules/ajv/lib/dotjs/required.js +0 -270
  407. package/packages/config-eslint/node_modules/ajv/lib/dotjs/uniqueItems.js +0 -86
  408. package/packages/config-eslint/node_modules/ajv/lib/dotjs/validate.js +0 -482
  409. package/packages/config-eslint/node_modules/ajv/lib/keyword.js +0 -146
  410. package/packages/config-eslint/node_modules/ajv/lib/refs/data.json +0 -17
  411. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json +0 -149
  412. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -154
  413. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -168
  414. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-secure.json +0 -94
  415. package/packages/config-eslint/node_modules/ajv/package.json +0 -106
  416. package/packages/config-eslint/node_modules/ajv/scripts/.eslintrc.yml +0 -3
  417. package/packages/config-eslint/node_modules/ajv/scripts/bundle.js +0 -61
  418. package/packages/config-eslint/node_modules/ajv/scripts/compile-dots.js +0 -73
  419. package/packages/config-eslint/node_modules/ajv/scripts/info +0 -10
  420. package/packages/config-eslint/node_modules/ajv/scripts/prepare-tests +0 -12
  421. package/packages/config-eslint/node_modules/ajv/scripts/publish-built-version +0 -32
  422. package/packages/config-eslint/node_modules/ajv/scripts/travis-gh-pages +0 -23
  423. package/packages/config-eslint/node_modules/eslint/LICENSE +0 -19
  424. package/packages/config-eslint/node_modules/eslint/README.md +0 -363
  425. package/packages/config-eslint/node_modules/eslint/bin/eslint.js +0 -195
  426. package/packages/config-eslint/node_modules/eslint/conf/ecma-version.js +0 -16
  427. package/packages/config-eslint/node_modules/eslint/conf/globals.js +0 -169
  428. package/packages/config-eslint/node_modules/eslint/conf/replacements.json +0 -26
  429. package/packages/config-eslint/node_modules/eslint/conf/rule-type-list.json +0 -91
  430. package/packages/config-eslint/node_modules/eslint/lib/api.js +0 -39
  431. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +0 -18
  432. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/html.js +0 -359
  433. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js +0 -16
  434. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json.js +0 -13
  435. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/stylish.js +0 -153
  436. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/hash.js +0 -35
  437. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/lint-result-cache.js +0 -220
  438. package/packages/config-eslint/node_modules/eslint/lib/cli.js +0 -521
  439. package/packages/config-eslint/node_modules/eslint/lib/config/config-loader.js +0 -668
  440. package/packages/config-eslint/node_modules/eslint/lib/config/config.js +0 -674
  441. package/packages/config-eslint/node_modules/eslint/lib/config/default-config.js +0 -78
  442. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-array.js +0 -217
  443. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-schema.js +0 -598
  444. package/packages/config-eslint/node_modules/eslint/lib/config-api.js +0 -12
  445. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint-helpers.js +0 -1462
  446. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint.js +0 -1364
  447. package/packages/config-eslint/node_modules/eslint/lib/eslint/index.js +0 -7
  448. package/packages/config-eslint/node_modules/eslint/lib/eslint/worker.js +0 -173
  449. package/packages/config-eslint/node_modules/eslint/lib/languages/js/index.js +0 -336
  450. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/index.js +0 -7
  451. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/source-code.js +0 -1178
  452. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-comment-cursor.js +0 -61
  453. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-cursor.js +0 -57
  454. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursor.js +0 -76
  455. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursors.js +0 -120
  456. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/decorative-cursor.js +0 -38
  457. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/filter-cursor.js +0 -42
  458. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-comment-cursor.js +0 -65
  459. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-cursor.js +0 -62
  460. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/index.js +0 -695
  461. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/limit-cursor.js +0 -39
  462. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/padded-token-cursor.js +0 -45
  463. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/skip-cursor.js +0 -41
  464. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/utils.js +0 -131
  465. package/packages/config-eslint/node_modules/eslint/lib/languages/js/validate-language-options.js +0 -196
  466. package/packages/config-eslint/node_modules/eslint/lib/linter/apply-disable-directives.js +0 -583
  467. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -828
  468. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +0 -262
  469. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js +0 -2370
  470. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +0 -332
  471. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +0 -223
  472. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +0 -374
  473. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js +0 -44
  474. package/packages/config-eslint/node_modules/eslint/lib/linter/esquery.js +0 -332
  475. package/packages/config-eslint/node_modules/eslint/lib/linter/file-context.js +0 -88
  476. package/packages/config-eslint/node_modules/eslint/lib/linter/file-report.js +0 -604
  477. package/packages/config-eslint/node_modules/eslint/lib/linter/index.js +0 -11
  478. package/packages/config-eslint/node_modules/eslint/lib/linter/interpolate.js +0 -50
  479. package/packages/config-eslint/node_modules/eslint/lib/linter/linter.js +0 -1614
  480. package/packages/config-eslint/node_modules/eslint/lib/linter/rule-fixer.js +0 -199
  481. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-fixer.js +0 -154
  482. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-traverser.js +0 -333
  483. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-visitor.js +0 -81
  484. package/packages/config-eslint/node_modules/eslint/lib/linter/timing.js +0 -209
  485. package/packages/config-eslint/node_modules/eslint/lib/linter/vfile.js +0 -115
  486. package/packages/config-eslint/node_modules/eslint/lib/options.js +0 -416
  487. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/index.js +0 -7
  488. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/rule-tester.js +0 -1996
  489. package/packages/config-eslint/node_modules/eslint/lib/rules/accessor-pairs.js +0 -420
  490. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-newline.js +0 -291
  491. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-spacing.js +0 -301
  492. package/packages/config-eslint/node_modules/eslint/lib/rules/array-callback-return.js +0 -510
  493. package/packages/config-eslint/node_modules/eslint/lib/rules/array-element-newline.js +0 -374
  494. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-body-style.js +0 -418
  495. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-parens.js +0 -237
  496. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-spacing.js +0 -188
  497. package/packages/config-eslint/node_modules/eslint/lib/rules/block-scoped-var.js +0 -137
  498. package/packages/config-eslint/node_modules/eslint/lib/rules/block-spacing.js +0 -202
  499. package/packages/config-eslint/node_modules/eslint/lib/rules/brace-style.js +0 -278
  500. package/packages/config-eslint/node_modules/eslint/lib/rules/callback-return.js +0 -216
  501. package/packages/config-eslint/node_modules/eslint/lib/rules/camelcase.js +0 -422
  502. package/packages/config-eslint/node_modules/eslint/lib/rules/capitalized-comments.js +0 -325
  503. package/packages/config-eslint/node_modules/eslint/lib/rules/class-methods-use-this.js +0 -250
  504. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-dangle.js +0 -424
  505. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-spacing.js +0 -205
  506. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-style.js +0 -391
  507. package/packages/config-eslint/node_modules/eslint/lib/rules/complexity.js +0 -201
  508. package/packages/config-eslint/node_modules/eslint/lib/rules/computed-property-spacing.js +0 -251
  509. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-return.js +0 -221
  510. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-this.js +0 -179
  511. package/packages/config-eslint/node_modules/eslint/lib/rules/constructor-super.js +0 -453
  512. package/packages/config-eslint/node_modules/eslint/lib/rules/curly.js +0 -425
  513. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case-last.js +0 -51
  514. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case.js +0 -103
  515. package/packages/config-eslint/node_modules/eslint/lib/rules/default-param-last.js +0 -78
  516. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-location.js +0 -138
  517. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-notation.js +0 -216
  518. package/packages/config-eslint/node_modules/eslint/lib/rules/eol-last.js +0 -135
  519. package/packages/config-eslint/node_modules/eslint/lib/rules/eqeqeq.js +0 -210
  520. package/packages/config-eslint/node_modules/eslint/lib/rules/for-direction.js +0 -168
  521. package/packages/config-eslint/node_modules/eslint/lib/rules/func-call-spacing.js +0 -281
  522. package/packages/config-eslint/node_modules/eslint/lib/rules/func-name-matching.js +0 -338
  523. package/packages/config-eslint/node_modules/eslint/lib/rules/func-names.js +0 -194
  524. package/packages/config-eslint/node_modules/eslint/lib/rules/func-style.js +0 -221
  525. package/packages/config-eslint/node_modules/eslint/lib/rules/function-call-argument-newline.js +0 -166
  526. package/packages/config-eslint/node_modules/eslint/lib/rules/function-paren-newline.js +0 -368
  527. package/packages/config-eslint/node_modules/eslint/lib/rules/generator-star-spacing.js +0 -246
  528. package/packages/config-eslint/node_modules/eslint/lib/rules/getter-return.js +0 -242
  529. package/packages/config-eslint/node_modules/eslint/lib/rules/global-require.js +0 -117
  530. package/packages/config-eslint/node_modules/eslint/lib/rules/grouped-accessor-pairs.js +0 -268
  531. package/packages/config-eslint/node_modules/eslint/lib/rules/guard-for-in.js +0 -85
  532. package/packages/config-eslint/node_modules/eslint/lib/rules/handle-callback-err.js +0 -122
  533. package/packages/config-eslint/node_modules/eslint/lib/rules/id-blacklist.js +0 -241
  534. package/packages/config-eslint/node_modules/eslint/lib/rules/id-denylist.js +0 -223
  535. package/packages/config-eslint/node_modules/eslint/lib/rules/id-length.js +0 -217
  536. package/packages/config-eslint/node_modules/eslint/lib/rules/id-match.js +0 -363
  537. package/packages/config-eslint/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +0 -125
  538. package/packages/config-eslint/node_modules/eslint/lib/rules/indent-legacy.js +0 -1369
  539. package/packages/config-eslint/node_modules/eslint/lib/rules/indent.js +0 -2334
  540. package/packages/config-eslint/node_modules/eslint/lib/rules/index.js +0 -332
  541. package/packages/config-eslint/node_modules/eslint/lib/rules/init-declarations.js +0 -172
  542. package/packages/config-eslint/node_modules/eslint/lib/rules/jsx-quotes.js +0 -128
  543. package/packages/config-eslint/node_modules/eslint/lib/rules/key-spacing.js +0 -822
  544. package/packages/config-eslint/node_modules/eslint/lib/rules/keyword-spacing.js +0 -701
  545. package/packages/config-eslint/node_modules/eslint/lib/rules/line-comment-position.js +0 -157
  546. package/packages/config-eslint/node_modules/eslint/lib/rules/linebreak-style.js +0 -135
  547. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-comment.js +0 -581
  548. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-directive.js +0 -249
  549. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-between-class-members.js +0 -358
  550. package/packages/config-eslint/node_modules/eslint/lib/rules/logical-assignment-operators.js +0 -688
  551. package/packages/config-eslint/node_modules/eslint/lib/rules/max-classes-per-file.js +0 -90
  552. package/packages/config-eslint/node_modules/eslint/lib/rules/max-depth.js +0 -159
  553. package/packages/config-eslint/node_modules/eslint/lib/rules/max-len.js +0 -497
  554. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines-per-function.js +0 -238
  555. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines.js +0 -189
  556. package/packages/config-eslint/node_modules/eslint/lib/rules/max-nested-callbacks.js +0 -115
  557. package/packages/config-eslint/node_modules/eslint/lib/rules/max-params.js +0 -148
  558. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements-per-line.js +0 -224
  559. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements.js +0 -188
  560. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-comment-style.js +0 -652
  561. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-ternary.js +0 -257
  562. package/packages/config-eslint/node_modules/eslint/lib/rules/new-cap.js +0 -277
  563. package/packages/config-eslint/node_modules/eslint/lib/rules/new-parens.js +0 -120
  564. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-after-var.js +0 -307
  565. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-before-return.js +0 -242
  566. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-per-chained-call.js +0 -159
  567. package/packages/config-eslint/node_modules/eslint/lib/rules/no-alert.js +0 -149
  568. package/packages/config-eslint/node_modules/eslint/lib/rules/no-array-constructor.js +0 -195
  569. package/packages/config-eslint/node_modules/eslint/lib/rules/no-async-promise-executor.js +0 -45
  570. package/packages/config-eslint/node_modules/eslint/lib/rules/no-await-in-loop.js +0 -115
  571. package/packages/config-eslint/node_modules/eslint/lib/rules/no-bitwise.js +0 -145
  572. package/packages/config-eslint/node_modules/eslint/lib/rules/no-buffer-constructor.js +0 -74
  573. package/packages/config-eslint/node_modules/eslint/lib/rules/no-caller.js +0 -52
  574. package/packages/config-eslint/node_modules/eslint/lib/rules/no-case-declarations.js +0 -80
  575. package/packages/config-eslint/node_modules/eslint/lib/rules/no-catch-shadow.js +0 -96
  576. package/packages/config-eslint/node_modules/eslint/lib/rules/no-class-assign.js +0 -66
  577. package/packages/config-eslint/node_modules/eslint/lib/rules/no-compare-neg-zero.js +0 -74
  578. package/packages/config-eslint/node_modules/eslint/lib/rules/no-cond-assign.js +0 -175
  579. package/packages/config-eslint/node_modules/eslint/lib/rules/no-confusing-arrow.js +0 -127
  580. package/packages/config-eslint/node_modules/eslint/lib/rules/no-console.js +0 -221
  581. package/packages/config-eslint/node_modules/eslint/lib/rules/no-const-assign.js +0 -73
  582. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-binary-expression.js +0 -603
  583. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-condition.js +0 -177
  584. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constructor-return.js +0 -62
  585. package/packages/config-eslint/node_modules/eslint/lib/rules/no-continue.js +0 -38
  586. package/packages/config-eslint/node_modules/eslint/lib/rules/no-control-regex.js +0 -142
  587. package/packages/config-eslint/node_modules/eslint/lib/rules/no-debugger.js +0 -41
  588. package/packages/config-eslint/node_modules/eslint/lib/rules/no-delete-var.js +0 -42
  589. package/packages/config-eslint/node_modules/eslint/lib/rules/no-div-regex.js +0 -60
  590. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-args.js +0 -92
  591. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-class-members.js +0 -117
  592. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-else-if.js +0 -145
  593. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-keys.js +0 -165
  594. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-case.js +0 -78
  595. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-imports.js +0 -368
  596. package/packages/config-eslint/node_modules/eslint/lib/rules/no-else-return.js +0 -450
  597. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-character-class.js +0 -83
  598. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-function.js +0 -236
  599. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-pattern.js +0 -85
  600. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-static-block.js +0 -73
  601. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty.js +0 -153
  602. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eq-null.js +0 -51
  603. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eval.js +0 -295
  604. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ex-assign.js +0 -57
  605. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extend-native.js +0 -180
  606. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-bind.js +0 -224
  607. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +0 -420
  608. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-label.js +0 -169
  609. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-parens.js +0 -1669
  610. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-semi.js +0 -167
  611. package/packages/config-eslint/node_modules/eslint/lib/rules/no-fallthrough.js +0 -260
  612. package/packages/config-eslint/node_modules/eslint/lib/rules/no-floating-decimal.js +0 -99
  613. package/packages/config-eslint/node_modules/eslint/lib/rules/no-func-assign.js +0 -77
  614. package/packages/config-eslint/node_modules/eslint/lib/rules/no-global-assign.js +0 -101
  615. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-coercion.js +0 -468
  616. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-globals.js +0 -187
  617. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implied-eval.js +0 -171
  618. package/packages/config-eslint/node_modules/eslint/lib/rules/no-import-assign.js +0 -227
  619. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inline-comments.js +0 -115
  620. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inner-declarations.js +0 -147
  621. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-regexp.js +0 -244
  622. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-this.js +0 -178
  623. package/packages/config-eslint/node_modules/eslint/lib/rules/no-irregular-whitespace.js +0 -292
  624. package/packages/config-eslint/node_modules/eslint/lib/rules/no-iterator.js +0 -48
  625. package/packages/config-eslint/node_modules/eslint/lib/rules/no-label-var.js +0 -78
  626. package/packages/config-eslint/node_modules/eslint/lib/rules/no-labels.js +0 -156
  627. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lone-blocks.js +0 -140
  628. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lonely-if.js +0 -126
  629. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loop-func.js +0 -267
  630. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loss-of-precision.js +0 -249
  631. package/packages/config-eslint/node_modules/eslint/lib/rules/no-magic-numbers.js +0 -365
  632. package/packages/config-eslint/node_modules/eslint/lib/rules/no-misleading-character-class.js +0 -595
  633. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-operators.js +0 -253
  634. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-requires.js +0 -267
  635. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +0 -148
  636. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-assign.js +0 -66
  637. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-spaces.js +0 -179
  638. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-str.js +0 -67
  639. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +0 -210
  640. package/packages/config-eslint/node_modules/eslint/lib/rules/no-native-reassign.js +0 -114
  641. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-condition.js +0 -100
  642. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-in-lhs.js +0 -59
  643. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nested-ternary.js +0 -46
  644. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-func.js +0 -96
  645. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +0 -70
  646. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-object.js +0 -76
  647. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-require.js +0 -67
  648. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-symbol.js +0 -74
  649. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-wrappers.js +0 -62
  650. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new.js +0 -42
  651. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js +0 -176
  652. package/packages/config-eslint/node_modules/eslint/lib/rules/no-obj-calls.js +0 -99
  653. package/packages/config-eslint/node_modules/eslint/lib/rules/no-object-constructor.js +0 -124
  654. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal-escape.js +0 -53
  655. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal.js +0 -42
  656. package/packages/config-eslint/node_modules/eslint/lib/rules/no-param-reassign.js +0 -248
  657. package/packages/config-eslint/node_modules/eslint/lib/rules/no-path-concat.js +0 -79
  658. package/packages/config-eslint/node_modules/eslint/lib/rules/no-plusplus.js +0 -102
  659. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-env.js +0 -68
  660. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-exit.js +0 -67
  661. package/packages/config-eslint/node_modules/eslint/lib/rules/no-promise-executor-return.js +0 -264
  662. package/packages/config-eslint/node_modules/eslint/lib/rules/no-proto.js +0 -45
  663. package/packages/config-eslint/node_modules/eslint/lib/rules/no-prototype-builtins.js +0 -181
  664. package/packages/config-eslint/node_modules/eslint/lib/rules/no-redeclare.js +0 -173
  665. package/packages/config-eslint/node_modules/eslint/lib/rules/no-regex-spaces.js +0 -219
  666. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-exports.js +0 -227
  667. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-globals.js +0 -266
  668. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-imports.js +0 -892
  669. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-modules.js +0 -249
  670. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-properties.js +0 -233
  671. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-syntax.js +0 -74
  672. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-assign.js +0 -87
  673. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-await.js +0 -162
  674. package/packages/config-eslint/node_modules/eslint/lib/rules/no-script-url.js +0 -68
  675. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-assign.js +0 -186
  676. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-compare.js +0 -77
  677. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sequences.js +0 -158
  678. package/packages/config-eslint/node_modules/eslint/lib/rules/no-setter-return.js +0 -224
  679. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +0 -113
  680. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow.js +0 -689
  681. package/packages/config-eslint/node_modules/eslint/lib/rules/no-spaced-func.js +0 -105
  682. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sparse-arrays.js +0 -68
  683. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sync.js +0 -81
  684. package/packages/config-eslint/node_modules/eslint/lib/rules/no-tabs.js +0 -110
  685. package/packages/config-eslint/node_modules/eslint/lib/rules/no-template-curly-in-string.js +0 -45
  686. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ternary.js +0 -38
  687. package/packages/config-eslint/node_modules/eslint/lib/rules/no-this-before-super.js +0 -365
  688. package/packages/config-eslint/node_modules/eslint/lib/rules/no-throw-literal.js +0 -46
  689. package/packages/config-eslint/node_modules/eslint/lib/rules/no-trailing-spaces.js +0 -227
  690. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unassigned-vars.js +0 -80
  691. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef-init.js +0 -101
  692. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef.js +0 -84
  693. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undefined.js +0 -85
  694. package/packages/config-eslint/node_modules/eslint/lib/rules/no-underscore-dangle.js +0 -383
  695. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unexpected-multiline.js +0 -130
  696. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +0 -360
  697. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unneeded-ternary.js +0 -232
  698. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable-loop.js +0 -190
  699. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable.js +0 -300
  700. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-finally.js +0 -119
  701. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-negation.js +0 -152
  702. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +0 -221
  703. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-expressions.js +0 -227
  704. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-labels.js +0 -158
  705. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-private-class-members.js +0 -219
  706. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-vars.js +0 -1739
  707. package/packages/config-eslint/node_modules/eslint/lib/rules/no-use-before-define.js +0 -446
  708. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-assignment.js +0 -657
  709. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-backreference.js +0 -263
  710. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-call.js +0 -95
  711. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-catch.js +0 -57
  712. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-computed-key.js +0 -204
  713. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-concat.js +0 -121
  714. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-constructor.js +0 -262
  715. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-escape.js +0 -406
  716. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-rename.js +0 -202
  717. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-return.js +0 -401
  718. package/packages/config-eslint/node_modules/eslint/lib/rules/no-var.js +0 -367
  719. package/packages/config-eslint/node_modules/eslint/lib/rules/no-void.js +0 -69
  720. package/packages/config-eslint/node_modules/eslint/lib/rules/no-warning-comments.js +0 -209
  721. package/packages/config-eslint/node_modules/eslint/lib/rules/no-whitespace-before-property.js +0 -150
  722. package/packages/config-eslint/node_modules/eslint/lib/rules/no-with.js +0 -37
  723. package/packages/config-eslint/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +0 -164
  724. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-newline.js +0 -383
  725. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-spacing.js +0 -369
  726. package/packages/config-eslint/node_modules/eslint/lib/rules/object-property-newline.js +0 -151
  727. package/packages/config-eslint/node_modules/eslint/lib/rules/object-shorthand.js +0 -652
  728. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +0 -117
  729. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var.js +0 -717
  730. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-assignment.js +0 -270
  731. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-linebreak.js +0 -315
  732. package/packages/config-eslint/node_modules/eslint/lib/rules/padded-blocks.js +0 -366
  733. package/packages/config-eslint/node_modules/eslint/lib/rules/padding-line-between-statements.js +0 -612
  734. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-arrow-callback.js +0 -437
  735. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-const.js +0 -546
  736. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-destructuring.js +0 -332
  737. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +0 -235
  738. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-named-capture-group.js +0 -197
  739. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-numeric-literals.js +0 -157
  740. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-has-own.js +0 -148
  741. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-spread.js +0 -319
  742. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +0 -154
  743. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-reflect.js +0 -150
  744. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-regex-literals.js +0 -605
  745. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-rest-params.js +0 -117
  746. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-spread.js +0 -91
  747. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-template.js +0 -347
  748. package/packages/config-eslint/node_modules/eslint/lib/rules/preserve-caught-error.js +0 -535
  749. package/packages/config-eslint/node_modules/eslint/lib/rules/quote-props.js +0 -394
  750. package/packages/config-eslint/node_modules/eslint/lib/rules/quotes.js +0 -416
  751. package/packages/config-eslint/node_modules/eslint/lib/rules/radix.js +0 -193
  752. package/packages/config-eslint/node_modules/eslint/lib/rules/require-atomic-updates.js +0 -365
  753. package/packages/config-eslint/node_modules/eslint/lib/rules/require-await.js +0 -184
  754. package/packages/config-eslint/node_modules/eslint/lib/rules/require-unicode-regexp.js +0 -317
  755. package/packages/config-eslint/node_modules/eslint/lib/rules/require-yield.js +0 -86
  756. package/packages/config-eslint/node_modules/eslint/lib/rules/rest-spread-spacing.js +0 -150
  757. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-spacing.js +0 -297
  758. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-style.js +0 -218
  759. package/packages/config-eslint/node_modules/eslint/lib/rules/semi.js +0 -476
  760. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-imports.js +0 -319
  761. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-keys.js +0 -268
  762. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-vars.js +0 -140
  763. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-blocks.js +0 -232
  764. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-function-paren.js +0 -202
  765. package/packages/config-eslint/node_modules/eslint/lib/rules/space-in-parens.js +0 -374
  766. package/packages/config-eslint/node_modules/eslint/lib/rules/space-infix-ops.js +0 -249
  767. package/packages/config-eslint/node_modules/eslint/lib/rules/space-unary-ops.js +0 -400
  768. package/packages/config-eslint/node_modules/eslint/lib/rules/spaced-comment.js +0 -447
  769. package/packages/config-eslint/node_modules/eslint/lib/rules/strict.js +0 -324
  770. package/packages/config-eslint/node_modules/eslint/lib/rules/switch-colon-spacing.js +0 -158
  771. package/packages/config-eslint/node_modules/eslint/lib/rules/symbol-description.js +0 -70
  772. package/packages/config-eslint/node_modules/eslint/lib/rules/template-curly-spacing.js +0 -168
  773. package/packages/config-eslint/node_modules/eslint/lib/rules/template-tag-spacing.js +0 -121
  774. package/packages/config-eslint/node_modules/eslint/lib/rules/unicode-bom.js +0 -73
  775. package/packages/config-eslint/node_modules/eslint/lib/rules/use-isnan.js +0 -268
  776. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/ast-utils.js +0 -2841
  777. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/char-source.js +0 -247
  778. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/fix-tracker.js +0 -125
  779. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/keywords.js +0 -67
  780. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +0 -118
  781. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/regular-expressions.js +0 -58
  782. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/index.js +0 -16
  783. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js +0 -13
  784. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js +0 -13
  785. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js +0 -13
  786. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js +0 -14
  787. package/packages/config-eslint/node_modules/eslint/lib/rules/valid-typeof.js +0 -171
  788. package/packages/config-eslint/node_modules/eslint/lib/rules/vars-on-top.js +0 -165
  789. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-iife.js +0 -238
  790. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-regex.js +0 -91
  791. package/packages/config-eslint/node_modules/eslint/lib/rules/yield-star-spacing.js +0 -158
  792. package/packages/config-eslint/node_modules/eslint/lib/rules/yoda.js +0 -362
  793. package/packages/config-eslint/node_modules/eslint/lib/services/parser-service.js +0 -64
  794. package/packages/config-eslint/node_modules/eslint/lib/services/processor-service.js +0 -100
  795. package/packages/config-eslint/node_modules/eslint/lib/services/suppressions-service.js +0 -302
  796. package/packages/config-eslint/node_modules/eslint/lib/services/warning-service.js +0 -87
  797. package/packages/config-eslint/node_modules/eslint/lib/shared/ajv.js +0 -34
  798. package/packages/config-eslint/node_modules/eslint/lib/shared/assert.js +0 -21
  799. package/packages/config-eslint/node_modules/eslint/lib/shared/ast-utils.js +0 -30
  800. package/packages/config-eslint/node_modules/eslint/lib/shared/deep-merge-arrays.js +0 -62
  801. package/packages/config-eslint/node_modules/eslint/lib/shared/directives.js +0 -16
  802. package/packages/config-eslint/node_modules/eslint/lib/shared/flags.js +0 -89
  803. package/packages/config-eslint/node_modules/eslint/lib/shared/logging.js +0 -38
  804. package/packages/config-eslint/node_modules/eslint/lib/shared/naming.js +0 -109
  805. package/packages/config-eslint/node_modules/eslint/lib/shared/option-utils.js +0 -63
  806. package/packages/config-eslint/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -28
  807. package/packages/config-eslint/node_modules/eslint/lib/shared/runtime-info.js +0 -177
  808. package/packages/config-eslint/node_modules/eslint/lib/shared/serialization.js +0 -78
  809. package/packages/config-eslint/node_modules/eslint/lib/shared/severity.js +0 -49
  810. package/packages/config-eslint/node_modules/eslint/lib/shared/stats.js +0 -30
  811. package/packages/config-eslint/node_modules/eslint/lib/shared/string-utils.js +0 -58
  812. package/packages/config-eslint/node_modules/eslint/lib/shared/text-table.js +0 -68
  813. package/packages/config-eslint/node_modules/eslint/lib/shared/translate-cli-options.js +0 -223
  814. package/packages/config-eslint/node_modules/eslint/lib/shared/traverser.js +0 -202
  815. package/packages/config-eslint/node_modules/eslint/lib/types/config-api.d.ts +0 -12
  816. package/packages/config-eslint/node_modules/eslint/lib/types/index.d.ts +0 -1475
  817. package/packages/config-eslint/node_modules/eslint/lib/types/rules.d.ts +0 -5603
  818. package/packages/config-eslint/node_modules/eslint/lib/types/universal.d.ts +0 -6
  819. package/packages/config-eslint/node_modules/eslint/lib/types/use-at-your-own-risk.d.ts +0 -34
  820. package/packages/config-eslint/node_modules/eslint/lib/universal.js +0 -10
  821. package/packages/config-eslint/node_modules/eslint/lib/unsupported-api.js +0 -21
  822. package/packages/config-eslint/node_modules/eslint/messages/all-files-ignored.js +0 -16
  823. package/packages/config-eslint/node_modules/eslint/messages/all-matched-files-ignored.js +0 -21
  824. package/packages/config-eslint/node_modules/eslint/messages/config-file-missing.js +0 -16
  825. package/packages/config-eslint/node_modules/eslint/messages/config-plugin-missing.js +0 -14
  826. package/packages/config-eslint/node_modules/eslint/messages/config-serialize-function.js +0 -30
  827. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-incompat.js +0 -117
  828. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-plugins.js +0 -27
  829. package/packages/config-eslint/node_modules/eslint/messages/extend-config-missing.js +0 -13
  830. package/packages/config-eslint/node_modules/eslint/messages/failed-to-read-json.js +0 -11
  831. package/packages/config-eslint/node_modules/eslint/messages/file-not-found.js +0 -10
  832. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-options.js +0 -17
  833. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-severity.js +0 -13
  834. package/packages/config-eslint/node_modules/eslint/messages/no-config-found.js +0 -15
  835. package/packages/config-eslint/node_modules/eslint/messages/plugin-conflict.js +0 -22
  836. package/packages/config-eslint/node_modules/eslint/messages/plugin-invalid.js +0 -16
  837. package/packages/config-eslint/node_modules/eslint/messages/plugin-missing.js +0 -19
  838. package/packages/config-eslint/node_modules/eslint/messages/print-config-with-directory-path.js +0 -8
  839. package/packages/config-eslint/node_modules/eslint/messages/shared.js +0 -23
  840. package/packages/config-eslint/node_modules/eslint/messages/whitespace-found.js +0 -11
  841. package/packages/config-eslint/node_modules/eslint/package.json +0 -220
  842. package/packages/config-eslint/node_modules/eslint-scope/LICENSE +0 -22
  843. package/packages/config-eslint/node_modules/eslint-scope/README.md +0 -206
  844. package/packages/config-eslint/node_modules/eslint-scope/dist/eslint-scope.cjs +0 -2420
  845. package/packages/config-eslint/node_modules/eslint-scope/lib/assert.js +0 -17
  846. package/packages/config-eslint/node_modules/eslint-scope/lib/definition.js +0 -89
  847. package/packages/config-eslint/node_modules/eslint-scope/lib/index.d.cts +0 -1069
  848. package/packages/config-eslint/node_modules/eslint-scope/lib/index.d.ts +0 -6
  849. package/packages/config-eslint/node_modules/eslint-scope/lib/index.js +0 -170
  850. package/packages/config-eslint/node_modules/eslint-scope/lib/pattern-visitor.js +0 -157
  851. package/packages/config-eslint/node_modules/eslint-scope/lib/reference.js +0 -165
  852. package/packages/config-eslint/node_modules/eslint-scope/lib/referencer.js +0 -712
  853. package/packages/config-eslint/node_modules/eslint-scope/lib/scope-manager.js +0 -271
  854. package/packages/config-eslint/node_modules/eslint-scope/lib/scope.js +0 -839
  855. package/packages/config-eslint/node_modules/eslint-scope/lib/variable.js +0 -91
  856. package/packages/config-eslint/node_modules/eslint-scope/package.json +0 -69
  857. package/packages/config-eslint/node_modules/eslint-visitor-keys/LICENSE +0 -201
  858. package/packages/config-eslint/node_modules/eslint-visitor-keys/README.md +0 -121
  859. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +0 -396
  860. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +0 -28
  861. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/index.d.ts +0 -16
  862. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +0 -12
  863. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/index.js +0 -67
  864. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.js +0 -327
  865. package/packages/config-eslint/node_modules/eslint-visitor-keys/package.json +0 -59
  866. package/packages/config-eslint/node_modules/espree/LICENSE +0 -25
  867. package/packages/config-eslint/node_modules/espree/README.md +0 -262
  868. package/packages/config-eslint/node_modules/espree/dist/espree.cjs +0 -1272
  869. package/packages/config-eslint/node_modules/espree/dist/espree.d.cts +0 -3
  870. package/packages/config-eslint/node_modules/espree/dist/espree.d.cts.map +0 -1
  871. package/packages/config-eslint/node_modules/espree/dist/espree.d.ts +0 -71
  872. package/packages/config-eslint/node_modules/espree/dist/espree.d.ts.map +0 -1
  873. package/packages/config-eslint/node_modules/espree/espree.js +0 -291
  874. package/packages/config-eslint/node_modules/espree/lib/espree.js +0 -482
  875. package/packages/config-eslint/node_modules/espree/lib/features.js +0 -21
  876. package/packages/config-eslint/node_modules/espree/lib/options.js +0 -164
  877. package/packages/config-eslint/node_modules/espree/lib/token-translator.js +0 -306
  878. package/packages/config-eslint/node_modules/espree/lib/types.js +0 -118
  879. package/packages/config-eslint/node_modules/espree/package.json +0 -72
  880. package/packages/config-eslint/node_modules/ignore/LICENSE-MIT +0 -21
  881. package/packages/config-eslint/node_modules/ignore/README.md +0 -412
  882. package/packages/config-eslint/node_modules/ignore/index.d.ts +0 -61
  883. package/packages/config-eslint/node_modules/ignore/index.js +0 -636
  884. package/packages/config-eslint/node_modules/ignore/legacy.js +0 -559
  885. package/packages/config-eslint/node_modules/ignore/package.json +0 -74
  886. package/packages/config-eslint/node_modules/json-schema-traverse/.eslintrc.yml +0 -27
  887. package/packages/config-eslint/node_modules/json-schema-traverse/.travis.yml +0 -8
  888. package/packages/config-eslint/node_modules/json-schema-traverse/LICENSE +0 -21
  889. package/packages/config-eslint/node_modules/json-schema-traverse/README.md +0 -83
  890. package/packages/config-eslint/node_modules/json-schema-traverse/index.js +0 -89
  891. package/packages/config-eslint/node_modules/json-schema-traverse/package.json +0 -43
  892. package/packages/config-eslint/node_modules/json-schema-traverse/spec/.eslintrc.yml +0 -6
  893. package/packages/config-eslint/node_modules/json-schema-traverse/spec/fixtures/schema.js +0 -125
  894. package/packages/config-eslint/node_modules/json-schema-traverse/spec/index.spec.js +0 -171
  895. package/packages/config-eslint/node_modules/minimatch/LICENSE.md +0 -55
  896. package/packages/config-eslint/node_modules/minimatch/README.md +0 -453
  897. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +0 -2
  898. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +0 -1
  899. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +0 -14
  900. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +0 -1
  901. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -20
  902. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
  903. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.js +0 -591
  904. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
  905. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
  906. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
  907. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -152
  908. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
  909. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.d.ts +0 -15
  910. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.d.ts.map +0 -1
  911. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.js +0 -30
  912. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.js.map +0 -1
  913. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.d.ts +0 -94
  914. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.d.ts.map +0 -1
  915. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.js +0 -1029
  916. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.js.map +0 -1
  917. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/package.json +0 -3
  918. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.d.ts +0 -22
  919. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +0 -1
  920. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.js +0 -38
  921. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.js.map +0 -1
  922. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +0 -2
  923. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +0 -1
  924. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -10
  925. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +0 -1
  926. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.d.ts +0 -20
  927. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
  928. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.js +0 -587
  929. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.js.map +0 -1
  930. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
  931. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
  932. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.js +0 -148
  933. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
  934. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.d.ts +0 -15
  935. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.d.ts.map +0 -1
  936. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.js +0 -26
  937. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.js.map +0 -1
  938. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.d.ts +0 -94
  939. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.d.ts.map +0 -1
  940. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.js +0 -1016
  941. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.js.map +0 -1
  942. package/packages/config-eslint/node_modules/minimatch/dist/esm/package.json +0 -3
  943. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.d.ts +0 -22
  944. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.d.ts.map +0 -1
  945. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.js +0 -34
  946. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.js.map +0 -1
  947. package/packages/config-eslint/node_modules/minimatch/package.json +0 -67
  948. /package/packages/config-eslint/node_modules/@eslint/{config-array → core}/LICENSE +0 -0
@@ -1,2420 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var estraverse = require('estraverse');
6
- var esrecurse = require('esrecurse');
7
-
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- var estraverse__default = /*#__PURE__*/_interopDefaultLegacy(estraverse);
11
- var esrecurse__default = /*#__PURE__*/_interopDefaultLegacy(esrecurse);
12
-
13
- /**
14
- * @fileoverview Assertion utilities.
15
- * @author Nicholas C. Zakas
16
- */
17
-
18
- /**
19
- * Throws an error if the given condition is not truthy.
20
- * @param {boolean} condition The condition to check.
21
- * @param {string} message The message to include with the error.
22
- * @returns {void}
23
- * @throws {Error} When the condition is not truthy.
24
- */
25
- function assert(condition, message = "Assertion failed.") {
26
- if (!condition) {
27
- throw new Error(message);
28
- }
29
- }
30
-
31
- /*
32
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
33
-
34
- Redistribution and use in source and binary forms, with or without
35
- modification, are permitted provided that the following conditions are met:
36
-
37
- * Redistributions of source code must retain the above copyright
38
- notice, this list of conditions and the following disclaimer.
39
- * Redistributions in binary form must reproduce the above copyright
40
- notice, this list of conditions and the following disclaimer in the
41
- documentation and/or other materials provided with the distribution.
42
-
43
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
44
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
47
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
48
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
49
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
50
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
52
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53
- */
54
-
55
- /** @import * as types from "eslint-scope" */
56
-
57
- const READ = 0x1;
58
- const WRITE = 0x2;
59
- const RW = READ | WRITE;
60
-
61
- /**
62
- * A Reference represents a single occurrence of an identifier in code.
63
- * @constructor Reference
64
- * @implements {types.Reference}
65
- */
66
- class Reference {
67
- constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) {
68
-
69
- /**
70
- * Identifier syntax node.
71
- * @member {espreeIdentifier} Reference#identifier
72
- */
73
- this.identifier = ident;
74
-
75
- /**
76
- * Reference to the enclosing Scope.
77
- * @member {Scope} Reference#from
78
- */
79
- this.from = scope;
80
-
81
- /**
82
- * Whether the reference comes from a dynamic scope (such as 'eval',
83
- * 'with', etc.), and may be trapped by dynamic scopes.
84
- * @member {boolean} Reference#tainted
85
- */
86
- this.tainted = false;
87
-
88
- /**
89
- * The variable this reference is resolved with.
90
- * @member {Variable} Reference#resolved
91
- */
92
- this.resolved = null;
93
-
94
- /**
95
- * The read-write mode of the reference. (Value is one of {@link
96
- * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}).
97
- * @member {number} Reference#flag
98
- */
99
- this.flag = flag;
100
- if (this.isWrite()) {
101
-
102
- /**
103
- * If reference is writeable, this is the tree being written to it.
104
- * @member {espreeNode} Reference#writeExpr
105
- */
106
- this.writeExpr = writeExpr;
107
-
108
- /**
109
- * Whether the Reference might refer to a partial value of writeExpr.
110
- * @member {boolean} Reference#partial
111
- */
112
- this.partial = partial;
113
-
114
- /**
115
- * Whether the Reference is to write of initialization.
116
- * @member {boolean} Reference#init
117
- */
118
- this.init = init;
119
- }
120
- this.__maybeImplicitGlobal = maybeImplicitGlobal;
121
- }
122
-
123
- /**
124
- * Whether the reference is static.
125
- * @function Reference#isStatic
126
- * @returns {boolean} static
127
- */
128
- isStatic() {
129
- return !this.tainted && !!this.resolved && this.resolved.scope.isStatic();
130
- }
131
-
132
- /**
133
- * Whether the reference is writeable.
134
- * @function Reference#isWrite
135
- * @returns {boolean} write
136
- */
137
- isWrite() {
138
- return !!(this.flag & Reference.WRITE);
139
- }
140
-
141
- /**
142
- * Whether the reference is readable.
143
- * @function Reference#isRead
144
- * @returns {boolean} read
145
- */
146
- isRead() {
147
- return !!(this.flag & Reference.READ);
148
- }
149
-
150
- /**
151
- * Whether the reference is read-only.
152
- * @function Reference#isReadOnly
153
- * @returns {boolean} read only
154
- */
155
- isReadOnly() {
156
- return this.flag === Reference.READ;
157
- }
158
-
159
- /**
160
- * Whether the reference is write-only.
161
- * @function Reference#isWriteOnly
162
- * @returns {boolean} write only
163
- */
164
- isWriteOnly() {
165
- return this.flag === Reference.WRITE;
166
- }
167
-
168
- /**
169
- * Whether the reference is read-write.
170
- * @function Reference#isReadWrite
171
- * @returns {boolean} read write
172
- */
173
- isReadWrite() {
174
- return this.flag === Reference.RW;
175
- }
176
- }
177
-
178
- /**
179
- * @constant Reference.READ
180
- */
181
- Reference.READ = READ;
182
-
183
- /**
184
- * @constant Reference.WRITE
185
- */
186
- Reference.WRITE = WRITE;
187
-
188
- /**
189
- * @constant Reference.RW
190
- */
191
- Reference.RW = RW;
192
-
193
- /* vim: set sw=4 ts=4 et tw=80 : */
194
-
195
- /*
196
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
197
-
198
- Redistribution and use in source and binary forms, with or without
199
- modification, are permitted provided that the following conditions are met:
200
-
201
- * Redistributions of source code must retain the above copyright
202
- notice, this list of conditions and the following disclaimer.
203
- * Redistributions in binary form must reproduce the above copyright
204
- notice, this list of conditions and the following disclaimer in the
205
- documentation and/or other materials provided with the distribution.
206
-
207
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
208
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
209
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
210
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
211
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
212
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
213
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
214
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
215
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
216
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
217
- */
218
-
219
- /** @import * as types from "eslint-scope" */
220
- /** @import Reference from "./reference.js" */
221
-
222
- /**
223
- * A Variable represents a locally scoped identifier. These include arguments to
224
- * functions.
225
- * @constructor Variable
226
- * @implements {types.Variable}
227
- */
228
- class Variable {
229
- constructor(name, scope) {
230
-
231
- /**
232
- * The variable name, as given in the source code.
233
- * @member {string} Variable#name
234
- */
235
- this.name = name;
236
-
237
- /**
238
- * List of defining occurrences of this variable (like in 'var ...'
239
- * statements or as parameter), as AST nodes.
240
- * @member {espree.Identifier[]} Variable#identifiers
241
- */
242
- this.identifiers = [];
243
-
244
- /**
245
- * List of {@link Reference|references} of this variable (excluding parameter entries)
246
- * in its defining scope and all nested scopes. For defining
247
- * occurrences only see {@link Variable#defs}.
248
- * @member {Reference[]} Variable#references
249
- */
250
- this.references = [];
251
-
252
- /**
253
- * List of defining occurrences of this variable (like in 'var ...'
254
- * statements or as parameter), as custom objects.
255
- * @member {Definition[]} Variable#defs
256
- */
257
- this.defs = [];
258
-
259
- this.tainted = false;
260
-
261
- /**
262
- * Whether this is a stack variable.
263
- * @member {boolean} Variable#stack
264
- */
265
- this.stack = true;
266
-
267
- /**
268
- * Reference to the enclosing Scope.
269
- * @member {Scope} Variable#scope
270
- */
271
- this.scope = scope;
272
- }
273
- }
274
-
275
- Variable.CatchClause = "CatchClause";
276
- Variable.Parameter = "Parameter";
277
- Variable.FunctionName = "FunctionName";
278
- Variable.ClassName = "ClassName";
279
- Variable.Variable = "Variable";
280
- Variable.ImportBinding = "ImportBinding";
281
- Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable";
282
-
283
- /* vim: set sw=4 ts=4 et tw=80 : */
284
-
285
- /*
286
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
287
-
288
- Redistribution and use in source and binary forms, with or without
289
- modification, are permitted provided that the following conditions are met:
290
-
291
- * Redistributions of source code must retain the above copyright
292
- notice, this list of conditions and the following disclaimer.
293
- * Redistributions in binary form must reproduce the above copyright
294
- notice, this list of conditions and the following disclaimer in the
295
- documentation and/or other materials provided with the distribution.
296
-
297
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
298
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
299
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
300
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
301
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
302
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
303
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
304
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
305
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
306
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
307
- */
308
-
309
- /** @import * as types from "eslint-scope" */
310
-
311
- // Cannot implement `types.Definition` directly because it contains a union.
312
- /**
313
- * @constructor Definition
314
- * @implements {Omit<types.Definition, never>}
315
- */
316
- class Definition {
317
- constructor(type, name, node, parent, index, kind) {
318
-
319
- /**
320
- * @member {string} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...).
321
- */
322
- this.type = type;
323
-
324
- /**
325
- * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence.
326
- */
327
- this.name = name;
328
-
329
- /**
330
- * @member {espree.Node} Definition#node - the enclosing node of the identifier.
331
- */
332
- this.node = node;
333
-
334
- /**
335
- * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier.
336
- */
337
- this.parent = parent;
338
-
339
- /**
340
- * @member {number?} Definition#index - the index in the declaration statement.
341
- */
342
- this.index = index;
343
-
344
- /**
345
- * @member {string?} Definition#kind - the kind of the declaration statement.
346
- */
347
- this.kind = kind;
348
- }
349
- }
350
-
351
- /**
352
- * @constructor ParameterDefinition
353
- */
354
- class ParameterDefinition extends Definition {
355
- constructor(name, node, index, rest) {
356
- super(Variable.Parameter, name, node, null, index, null);
357
-
358
- /**
359
- * Whether the parameter definition is a part of a rest parameter.
360
- * @member {boolean} ParameterDefinition#rest
361
- */
362
- this.rest = rest;
363
- }
364
- }
365
-
366
- /* vim: set sw=4 ts=4 et tw=80 : */
367
-
368
- /*
369
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
370
-
371
- Redistribution and use in source and binary forms, with or without
372
- modification, are permitted provided that the following conditions are met:
373
-
374
- * Redistributions of source code must retain the above copyright
375
- notice, this list of conditions and the following disclaimer.
376
- * Redistributions in binary form must reproduce the above copyright
377
- notice, this list of conditions and the following disclaimer in the
378
- documentation and/or other materials provided with the distribution.
379
-
380
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
381
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
382
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
383
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
384
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
385
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
386
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
387
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
388
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
389
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
390
- */
391
-
392
- /** @import * as types from "eslint-scope" */
393
- /** @import ESTree from "estree" */
394
- /** @import ScopeManager from "./scope-manager.js" */
395
- /** @typedef {ESTree.Function | ESTree.Program | ESTree.StaticBlock} Block */
396
- /** @typedef {{pattern: unknown, node: unknown}} MaybeImplicitGlobal */
397
-
398
- const { Syntax: Syntax$2 } = estraverse__default["default"];
399
-
400
- /**
401
- * Test if scope is struct
402
- * @param {Scope} scope scope
403
- * @param {Block} block block
404
- * @param {boolean} isMethodDefinition is method definition
405
- * @returns {boolean} is strict scope
406
- */
407
- function isStrictScope(scope, block, isMethodDefinition) {
408
- let body;
409
-
410
- // When upper scope is exists and strict, inner scope is also strict.
411
- if (scope.upper && scope.upper.isStrict) {
412
- return true;
413
- }
414
-
415
- if (isMethodDefinition) {
416
- return true;
417
- }
418
-
419
- if (scope.type === "class" || scope.type === "module") {
420
- return true;
421
- }
422
-
423
- if (scope.type === "block" || scope.type === "switch") {
424
- return false;
425
- }
426
-
427
- if (scope.type === "function") {
428
-
429
- // @ts-ignore -- when block is ArrowFunctionExpression
430
- if (block.type === Syntax$2.ArrowFunctionExpression && block.body.type !== Syntax$2.BlockStatement) {
431
- return false;
432
- }
433
-
434
- if (block.type === Syntax$2.Program) {
435
- body = block;
436
- } else {
437
- body = block.body;
438
- }
439
-
440
- if (!body) {
441
- return false;
442
- }
443
- } else if (scope.type === "global") {
444
- body = block;
445
- } else {
446
- return false;
447
- }
448
-
449
- // Search for a 'use strict' directive.
450
- // @ts-ignore -- body is a function body
451
- for (let i = 0, iz = body.body.length; i < iz; ++i) {
452
-
453
- // @ts-ignore -- body is a function body
454
- const stmt = body.body[i];
455
-
456
- /*
457
- * Check if the current statement is a directive.
458
- * If it isn't, then we're past the directive prologue
459
- * so stop the search because directives cannot
460
- * appear after this point.
461
- *
462
- * Some parsers set `directive:null` on non-directive
463
- * statements, so the `typeof` check is safer than
464
- * checking for property existence.
465
- */
466
- if (typeof stmt.directive !== "string") {
467
- break;
468
- }
469
-
470
- if (stmt.directive === "use strict") {
471
- return true;
472
- }
473
- }
474
-
475
- return false;
476
- }
477
-
478
- /**
479
- * Register scope
480
- * @param {ScopeManager} scopeManager scope manager
481
- * @param {Scope} scope scope
482
- * @returns {void}
483
- */
484
- function registerScope(scopeManager, scope) {
485
- scopeManager.scopes.push(scope);
486
-
487
- const scopes = scopeManager.__nodeToScope.get(scope.block);
488
-
489
- if (scopes) {
490
- scopes.push(scope);
491
- } else {
492
- scopeManager.__nodeToScope.set(scope.block, [scope]);
493
- }
494
- }
495
-
496
- /**
497
- * @constructor Scope
498
- * @implements {types.Scope}
499
- */
500
- class Scope {
501
- constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
502
-
503
- /**
504
- * One of "global", "module", "function", "function-expression-name", "block", "switch", "catch", "with", "for",
505
- * "class", "class-field-initializer", "class-static-block".
506
- * @member {string} Scope#type
507
- */
508
- this.type = type;
509
-
510
- /**
511
- * The scoped {@link Variable}s of this scope, as <code>{ Variable.name
512
- * : Variable }</code>.
513
- * @member {Map} Scope#set
514
- */
515
- this.set = new Map();
516
-
517
- /**
518
- * The tainted variables of this scope, as <code>{ Variable.name :
519
- * boolean }</code>.
520
- * @member {Map} Scope#taints
521
- */
522
- this.taints = new Map();
523
-
524
- /**
525
- * Generally, through the lexical scoping of JS you can always know
526
- * which variable an identifier in the source code refers to. There are
527
- * a few exceptions to this rule. With 'global' and 'with' scopes you
528
- * can only decide at runtime which variable a reference refers to.
529
- * Moreover, if 'eval()' is used in a scope, it might introduce new
530
- * bindings in this or its parent scopes.
531
- * All those scopes are considered 'dynamic'.
532
- * @member {boolean} Scope#dynamic
533
- */
534
- this.dynamic = this.type === "global" || this.type === "with";
535
-
536
- /**
537
- * A reference to the scope-defining syntax node.
538
- * @member {espree.Node} Scope#block
539
- */
540
- this.block = block;
541
-
542
- /**
543
- * The {@link Reference|references} that are not resolved with this scope.
544
- * @member {Reference[]} Scope#through
545
- */
546
- this.through = [];
547
-
548
- /**
549
- * The scoped {@link Variable}s of this scope. In the case of a
550
- * 'function' scope this includes the automatic argument <em>arguments</em> as
551
- * its first element, as well as all further formal arguments.
552
- * @member {Variable[]} Scope#variables
553
- */
554
- this.variables = [];
555
-
556
- /**
557
- * Any variable {@link Reference|reference} found in this scope. This
558
- * includes occurrences of local variables as well as variables from
559
- * parent scopes (including the global scope). For local variables
560
- * this also includes defining occurrences (like in a 'var' statement).
561
- * In a 'function' scope this does not include the occurrences of the
562
- * formal parameter in the parameter list.
563
- * @member {Reference[]} Scope#references
564
- */
565
- this.references = [];
566
-
567
- /**
568
- * For 'global' and 'function' scopes, this is a self-reference. For
569
- * other scope types this is the <em>variableScope</em> value of the
570
- * parent scope.
571
- * @member {Scope} Scope#variableScope
572
- */
573
- this.variableScope =
574
- this.type === "global" ||
575
- this.type === "module" ||
576
- this.type === "function" ||
577
- this.type === "class-field-initializer" ||
578
- this.type === "class-static-block"
579
- ? this
580
- : upperScope.variableScope;
581
-
582
- /**
583
- * Whether this scope is created by a FunctionExpression.
584
- * @member {boolean} Scope#functionExpressionScope
585
- */
586
- this.functionExpressionScope = /** @type {any} */ (false);
587
-
588
- /**
589
- * Whether this is a scope that contains an 'eval()' invocation.
590
- * @member {boolean} Scope#directCallToEvalScope
591
- */
592
- this.directCallToEvalScope = false;
593
-
594
- /**
595
- * @member {boolean} Scope#thisFound
596
- */
597
- this.thisFound = false;
598
-
599
- /** @type {?Reference[]} */
600
- this.__left = [];
601
-
602
- /**
603
- * Reference to the parent {@link Scope|scope}.
604
- * @member {Scope} Scope#upper
605
- */
606
- this.upper = upperScope;
607
-
608
- /**
609
- * Whether 'use strict' is in effect in this scope.
610
- * @member {boolean} Scope#isStrict
611
- */
612
- this.isStrict = scopeManager.isStrictModeSupported()
613
- ? isStrictScope(this, block, isMethodDefinition)
614
- : false;
615
-
616
- /**
617
- * List of nested {@link Scope}s.
618
- * @member {Scope[]} Scope#childScopes
619
- */
620
- this.childScopes = [];
621
- if (this.upper) {
622
- this.upper.childScopes.push(this);
623
- }
624
-
625
- this.__declaredVariables = scopeManager.__declaredVariables;
626
-
627
- registerScope(scopeManager, this);
628
- }
629
-
630
- __shouldStaticallyClose(scopeManager) {
631
- return (!this.dynamic || scopeManager.__isOptimistic() || this.type === "global");
632
- }
633
-
634
- __staticCloseRef(ref) {
635
- if (!this.__resolve(ref)) {
636
- this.__delegateToUpperScope(ref);
637
- }
638
- }
639
-
640
- __dynamicCloseRef(ref) {
641
-
642
- // notify all names are through to global
643
- let current = this;
644
-
645
- do {
646
- current.through.push(ref);
647
- current = current.upper;
648
- } while (current);
649
- }
650
-
651
- __close(scopeManager) {
652
- let closeRef;
653
-
654
- if (this.__shouldStaticallyClose(scopeManager)) {
655
- closeRef = this.__staticCloseRef;
656
- } else {
657
- closeRef = this.__dynamicCloseRef;
658
- }
659
-
660
- // Try Resolving all references in this scope.
661
- // @ts-ignore -- __left should be an array here
662
- for (let i = 0, iz = this.__left.length; i < iz; ++i) {
663
-
664
- // @ts-ignore -- __left should be an array here
665
- const ref = this.__left[i];
666
-
667
- closeRef.call(this, ref);
668
- }
669
- this.__left = null;
670
-
671
- return this.upper;
672
- }
673
-
674
- // To override by function scopes.
675
- // References in default parameters isn't resolved to variables which are in their function body.
676
- __isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars -- Desired as instance method with signature
677
- return true;
678
- }
679
-
680
- __resolve(ref) {
681
- const name = ref.identifier.name;
682
-
683
- if (!this.set.has(name)) {
684
- return false;
685
- }
686
- const variable = this.set.get(name);
687
-
688
- if (!this.__isValidResolution(ref, variable)) {
689
- return false;
690
- }
691
- variable.references.push(ref);
692
- variable.stack = variable.stack && ref.from.variableScope === this.variableScope;
693
- if (ref.tainted) {
694
- variable.tainted = true;
695
- this.taints.set(variable.name, true);
696
- }
697
- ref.resolved = variable;
698
-
699
- return true;
700
- }
701
-
702
- __delegateToUpperScope(ref) {
703
- if (this.upper) {
704
- this.upper.__left.push(ref);
705
- }
706
- this.through.push(ref);
707
- }
708
-
709
- __addDeclaredVariablesOfNode(variable, node) {
710
- if (node === null || node === void 0) {
711
- return;
712
- }
713
-
714
- let variables = this.__declaredVariables.get(node);
715
-
716
- if (variables === null || variables === void 0) {
717
- variables = [];
718
- this.__declaredVariables.set(node, variables);
719
- }
720
- if (!variables.includes(variable)) {
721
- variables.push(variable);
722
- }
723
- }
724
-
725
- __defineGeneric(name, set, variables, node, def) {
726
- let variable;
727
-
728
- variable = set.get(name);
729
- if (!variable) {
730
- variable = new Variable(name, this);
731
- set.set(name, variable);
732
- variables.push(variable);
733
- }
734
-
735
- if (def) {
736
- variable.defs.push(def);
737
- this.__addDeclaredVariablesOfNode(variable, def.node);
738
- this.__addDeclaredVariablesOfNode(variable, def.parent);
739
- }
740
- if (node) {
741
- variable.identifiers.push(node);
742
- }
743
- }
744
-
745
- __define(node, def) {
746
- if (node && node.type === Syntax$2.Identifier) {
747
- this.__defineGeneric(
748
- node.name,
749
- this.set,
750
- this.variables,
751
- node,
752
- def
753
- );
754
- }
755
- }
756
-
757
- __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) {
758
-
759
- // because Array element may be null
760
- if (!node || (node.type !== Syntax$2.Identifier && node.type !== "JSXIdentifier")) {
761
- return;
762
- }
763
-
764
- // Specially handle like `this`.
765
- if (node.name === "super") {
766
- return;
767
- }
768
-
769
- const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init);
770
-
771
- this.references.push(ref);
772
-
773
- // @ts-ignore -- __left should be an array here
774
- this.__left.push(ref);
775
- }
776
-
777
- __detectEval() {
778
- let current = this;
779
-
780
- this.directCallToEvalScope = true;
781
- do {
782
- current.dynamic = true;
783
- current = current.upper;
784
- } while (current);
785
- }
786
-
787
- __detectThis() {
788
- this.thisFound = true;
789
- }
790
-
791
- __isClosed() {
792
- return this.__left === null;
793
- }
794
-
795
- /**
796
- * returns resolved {Reference}
797
- * @function Scope#resolve
798
- * @param {ESTree.Identifier} ident identifier to be resolved.
799
- * @returns {?Reference} reference
800
- */
801
- resolve(ident) {
802
- let ref, i, iz;
803
-
804
- assert(this.__isClosed(), "Scope should be closed.");
805
- assert(ident.type === Syntax$2.Identifier, "Target should be identifier.");
806
- for (i = 0, iz = this.references.length; i < iz; ++i) {
807
- ref = this.references[i];
808
- if (ref.identifier === ident) {
809
- return ref;
810
- }
811
- }
812
- return null;
813
- }
814
-
815
- /**
816
- * returns this scope is static
817
- * @function Scope#isStatic
818
- * @returns {boolean} static
819
- */
820
- isStatic() {
821
- return !this.dynamic;
822
- }
823
-
824
- /**
825
- * returns this scope has materialized arguments
826
- * @function Scope#isArgumentsMaterialized
827
- * @returns {any} arguments materialized
828
- */
829
- isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method
830
- return true;
831
- }
832
-
833
- /**
834
- * returns this scope has materialized `this` reference
835
- * @function Scope#isThisMaterialized
836
- * @returns {any} this materialized
837
- */
838
- isThisMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method
839
- return true;
840
- }
841
-
842
- isUsedName(name) {
843
- if (this.set.has(name)) {
844
- return true;
845
- }
846
- for (let i = 0, iz = this.through.length; i < iz; ++i) {
847
- if (this.through[i].identifier.name === name) {
848
- return true;
849
- }
850
- }
851
- return false;
852
- }
853
- }
854
-
855
- /**
856
- * Global scope.
857
- * @implements {types.GlobalScope}
858
- */
859
- class GlobalScope extends Scope {
860
- constructor(scopeManager, block) {
861
- super(scopeManager, "global", null, block, false);
862
- this.implicit = {
863
- set: new Map(),
864
-
865
- /** @type {Variable[]} */
866
- variables: [],
867
-
868
- /**
869
- * List of {@link Reference}s that are left to be resolved (i.e. which
870
- * need to be linked to the variable they refer to).
871
- * @member {Reference[]} Scope#implicit#left
872
- * @type {Reference[]}
873
- */
874
- left: []
875
- };
876
- }
877
-
878
- __close(scopeManager) {
879
- const implicit = [];
880
-
881
- // @ts-ignore -- __left should be an array here
882
- for (let i = 0, iz = this.__left.length; i < iz; ++i) {
883
-
884
- // @ts-ignore -- __left should be an array here
885
- const ref = this.__left[i];
886
-
887
- if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
888
- implicit.push(ref.__maybeImplicitGlobal);
889
- }
890
- }
891
-
892
- // create an implicit global variable from assignment expression
893
- for (let i = 0, iz = implicit.length; i < iz; ++i) {
894
- const info = implicit[i];
895
-
896
- this.__defineImplicit(info.pattern,
897
- new Definition(
898
- Variable.ImplicitGlobalVariable,
899
- info.pattern,
900
- info.node,
901
- null,
902
- null,
903
- null
904
- ));
905
-
906
- }
907
-
908
- super.__close(scopeManager);
909
-
910
- this.implicit.left = [...this.through];
911
-
912
- return null;
913
- }
914
-
915
- __defineImplicit(node, def) {
916
- if (node && node.type === Syntax$2.Identifier) {
917
- this.__defineGeneric(
918
- node.name,
919
- this.implicit.set,
920
- this.implicit.variables,
921
- node,
922
- def
923
- );
924
- }
925
- }
926
-
927
- __addVariables(names) {
928
- for (const name of names) {
929
- this.__defineGeneric(
930
- name,
931
- this.set,
932
- this.variables,
933
- null,
934
- null
935
- );
936
- }
937
-
938
- const namesSet = new Set(names);
939
-
940
- this.through = this.through.filter(reference => {
941
- const name = reference.identifier.name;
942
-
943
- if (namesSet.has(name)) {
944
- const variable = this.set.get(name);
945
-
946
- reference.resolved = variable;
947
- variable.references.push(reference);
948
-
949
- return false;
950
- }
951
-
952
- return true;
953
- });
954
-
955
- this.implicit.variables = this.implicit.variables.filter(variable => {
956
- const name = variable.name;
957
-
958
- if (namesSet.has(name)) {
959
- this.implicit.set.delete(name);
960
-
961
- return false;
962
- }
963
-
964
- return true;
965
- });
966
-
967
- this.implicit.left = this.implicit.left.filter(
968
- reference => !namesSet.has(reference.identifier.name)
969
- );
970
- }
971
- }
972
-
973
- /**
974
- * Module scope.
975
- * @implements {types.ModuleScope}
976
- */
977
- class ModuleScope extends Scope {
978
- constructor(scopeManager, upperScope, block) {
979
- super(scopeManager, "module", upperScope, block, false);
980
- }
981
- }
982
-
983
- /**
984
- * Function expression name scope.
985
- * @implements {types.FunctionExpressionNameScope}
986
- */
987
- class FunctionExpressionNameScope extends Scope {
988
- constructor(scopeManager, upperScope, block) {
989
- super(scopeManager, "function-expression-name", upperScope, block, false);
990
- this.__define(block.id,
991
- new Definition(
992
- Variable.FunctionName,
993
- block.id,
994
- block,
995
- null,
996
- null,
997
- null
998
- ));
999
- this.functionExpressionScope = /** @type {const} */ (true);
1000
- }
1001
- }
1002
-
1003
- /**
1004
- * Catch scope.
1005
- * @implements {types.CatchScope}
1006
- */
1007
- class CatchScope extends Scope {
1008
- constructor(scopeManager, upperScope, block) {
1009
- super(scopeManager, "catch", upperScope, block, false);
1010
- }
1011
- }
1012
-
1013
- /**
1014
- * With statement scope.
1015
- * @implements {types.WithScope}
1016
- */
1017
- class WithScope extends Scope {
1018
- constructor(scopeManager, upperScope, block) {
1019
- super(scopeManager, "with", upperScope, block, false);
1020
- }
1021
-
1022
- __close(scopeManager) {
1023
- if (this.__shouldStaticallyClose(scopeManager)) {
1024
- return super.__close(scopeManager);
1025
- }
1026
-
1027
- // @ts-ignore -- __left should be an array here
1028
- for (let i = 0, iz = this.__left.length; i < iz; ++i) {
1029
-
1030
- // @ts-ignore -- __left should be an array here
1031
- const ref = this.__left[i];
1032
-
1033
- ref.tainted = true;
1034
- this.__delegateToUpperScope(ref);
1035
- }
1036
- this.__left = null;
1037
-
1038
- return this.upper;
1039
- }
1040
- }
1041
-
1042
- /**
1043
- * Block scope.
1044
- * @implements {types.BlockScope}
1045
- */
1046
- class BlockScope extends Scope {
1047
- constructor(scopeManager, upperScope, block) {
1048
- super(scopeManager, "block", upperScope, block, false);
1049
- }
1050
- }
1051
-
1052
- /**
1053
- * Switch scope.
1054
- * @implements {types.SwitchScope}
1055
- */
1056
- class SwitchScope extends Scope {
1057
- constructor(scopeManager, upperScope, block) {
1058
- super(scopeManager, "switch", upperScope, block, false);
1059
- }
1060
- }
1061
-
1062
- /**
1063
- * Function scope.
1064
- * @implements {types.FunctionScope}
1065
- */
1066
- class FunctionScope extends Scope {
1067
- constructor(scopeManager, upperScope, block, isMethodDefinition) {
1068
- super(scopeManager, "function", upperScope, block, isMethodDefinition);
1069
-
1070
- // section 9.2.13, FunctionDeclarationInstantiation.
1071
- // NOTE Arrow functions never have an arguments objects.
1072
- if (this.block.type !== Syntax$2.ArrowFunctionExpression) {
1073
- this.__defineArguments();
1074
- }
1075
- }
1076
-
1077
- isArgumentsMaterialized() {
1078
-
1079
- // TODO(Constellation)
1080
- // We can more aggressive on this condition like this.
1081
- //
1082
- // function t() {
1083
- // // arguments of t is always hidden.
1084
- // function arguments() {
1085
- // }
1086
- // }
1087
- if (this.block.type === Syntax$2.ArrowFunctionExpression) {
1088
- return false;
1089
- }
1090
-
1091
- if (!this.isStatic()) {
1092
- return true;
1093
- }
1094
-
1095
- const variable = this.set.get("arguments");
1096
-
1097
- assert(variable, "Always have arguments variable.");
1098
- return variable.tainted || variable.references.length !== 0;
1099
- }
1100
-
1101
- isThisMaterialized() {
1102
- if (!this.isStatic()) {
1103
- return true;
1104
- }
1105
- return this.thisFound;
1106
- }
1107
-
1108
- __defineArguments() {
1109
- this.__defineGeneric(
1110
- "arguments",
1111
- this.set,
1112
- this.variables,
1113
- null,
1114
- null
1115
- );
1116
- this.taints.set("arguments", true);
1117
- }
1118
-
1119
- // References in default parameters isn't resolved to variables which are in their function body.
1120
- // const x = 1
1121
- // function f(a = x) { // This `x` is resolved to the `x` in the outer scope.
1122
- // const x = 2
1123
- // console.log(a)
1124
- // }
1125
- __isValidResolution(ref, variable) {
1126
-
1127
- // If `options.nodejsScope` is true, `this.block` becomes a Program node.
1128
- if (this.block.type === "Program") {
1129
- return true;
1130
- }
1131
-
1132
- const bodyStart = this.block.body.range[0];
1133
-
1134
- // It's invalid resolution in the following case:
1135
- return !(
1136
- variable.scope === this &&
1137
- ref.identifier.range[0] < bodyStart && // the reference is in the parameter part.
1138
- variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body.
1139
- );
1140
- }
1141
- }
1142
-
1143
- /**
1144
- * Scope of for, for-in, and for-of statements.
1145
- * @implements {types.ForScope}
1146
- */
1147
- class ForScope extends Scope {
1148
- constructor(scopeManager, upperScope, block) {
1149
- super(scopeManager, "for", upperScope, block, false);
1150
- }
1151
- }
1152
-
1153
- /**
1154
- * Class scope.
1155
- * @implements {types.ClassScope}
1156
- */
1157
- class ClassScope extends Scope {
1158
- constructor(scopeManager, upperScope, block) {
1159
- super(scopeManager, "class", upperScope, block, false);
1160
- }
1161
- }
1162
-
1163
- /**
1164
- * Class field initializer scope.
1165
- * @implements {types.ClassFieldInitializerScope}
1166
- */
1167
- class ClassFieldInitializerScope extends Scope {
1168
- constructor(scopeManager, upperScope, block) {
1169
- super(scopeManager, "class-field-initializer", upperScope, block, true);
1170
- }
1171
- }
1172
-
1173
- /**
1174
- * Class static block scope.
1175
- * @implements {types.ClassStaticBlockScope}
1176
- */
1177
- class ClassStaticBlockScope extends Scope {
1178
- constructor(scopeManager, upperScope, block) {
1179
- super(scopeManager, "class-static-block", upperScope, block, true);
1180
- }
1181
- }
1182
-
1183
- /* vim: set sw=4 ts=4 et tw=80 : */
1184
-
1185
- /*
1186
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
1187
-
1188
- Redistribution and use in source and binary forms, with or without
1189
- modification, are permitted provided that the following conditions are met:
1190
-
1191
- * Redistributions of source code must retain the above copyright
1192
- notice, this list of conditions and the following disclaimer.
1193
- * Redistributions in binary form must reproduce the above copyright
1194
- notice, this list of conditions and the following disclaimer in the
1195
- documentation and/or other materials provided with the distribution.
1196
-
1197
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1198
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1199
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1200
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
1201
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1202
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1203
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1204
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1205
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1206
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1207
- */
1208
-
1209
- /** @import * as types from "eslint-scope" */
1210
- /** @import ESTree from "estree" */
1211
- /** @import { Scope } from "./scope.js" */
1212
- /** @import Variable from "./variable.js" */
1213
-
1214
- /**
1215
- * @constructor ScopeManager
1216
- * @implements {types.ScopeManager}
1217
- */
1218
- class ScopeManager {
1219
- constructor(options) {
1220
- this.scopes = [];
1221
- this.globalScope = null;
1222
- this.__nodeToScope = new WeakMap();
1223
- this.__currentScope = null;
1224
- this.__options = options;
1225
- this.__declaredVariables = new WeakMap();
1226
- }
1227
-
1228
- __isOptimistic() {
1229
- return this.__options.optimistic;
1230
- }
1231
-
1232
- __ignoreEval() {
1233
- return this.__options.ignoreEval;
1234
- }
1235
-
1236
- __isJSXEnabled() {
1237
- return this.__options.jsx === true;
1238
- }
1239
-
1240
- isGlobalReturn() {
1241
- return this.__options.nodejsScope || this.__options.sourceType === "commonjs";
1242
- }
1243
-
1244
- isModule() {
1245
- return this.__options.sourceType === "module";
1246
- }
1247
-
1248
- isImpliedStrict() {
1249
- return !!this.__options.impliedStrict;
1250
- }
1251
-
1252
- isStrictModeSupported() {
1253
- return this.__options.ecmaVersion >= 5;
1254
- }
1255
-
1256
- // Returns appropriate scope for this node.
1257
- __get(node) {
1258
- return this.__nodeToScope.get(node);
1259
- }
1260
-
1261
- /**
1262
- * Get variables that are declared by the node.
1263
- *
1264
- * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
1265
- * If the node declares nothing, this method returns an empty array.
1266
- * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
1267
- * @param {ESTree.Node} node a node to get.
1268
- * @returns {Variable[]} variables that declared by the node.
1269
- */
1270
- getDeclaredVariables(node) {
1271
- return this.__declaredVariables.get(node) || [];
1272
- }
1273
-
1274
- /**
1275
- * acquire scope from node.
1276
- * @function ScopeManager#acquire
1277
- * @param {ESTree.Node} node node for the acquired scope.
1278
- * @param {?boolean} [inner=false] look up the most inner scope, default value is false.
1279
- * @returns {Scope?} Scope from node
1280
- */
1281
- acquire(node, inner) {
1282
-
1283
- /**
1284
- * predicate
1285
- * @param {Scope} testScope scope to test
1286
- * @returns {boolean} predicate
1287
- */
1288
- function predicate(testScope) {
1289
- if (testScope.type === "function" && testScope.functionExpressionScope) {
1290
- return false;
1291
- }
1292
- return true;
1293
- }
1294
-
1295
- const scopes = this.__get(node);
1296
-
1297
- if (!scopes || scopes.length === 0) {
1298
- return null;
1299
- }
1300
-
1301
- // Heuristic selection from all scopes.
1302
- // If you would like to get all scopes, please use ScopeManager#acquireAll.
1303
- if (scopes.length === 1) {
1304
- return scopes[0];
1305
- }
1306
-
1307
- if (inner) {
1308
- for (let i = scopes.length - 1; i >= 0; --i) {
1309
- const scope = scopes[i];
1310
-
1311
- if (predicate(scope)) {
1312
- return scope;
1313
- }
1314
- }
1315
- } else {
1316
- for (let i = 0, iz = scopes.length; i < iz; ++i) {
1317
- const scope = scopes[i];
1318
-
1319
- if (predicate(scope)) {
1320
- return scope;
1321
- }
1322
- }
1323
- }
1324
-
1325
- return null;
1326
- }
1327
-
1328
- /**
1329
- * acquire all scopes from node.
1330
- * @function ScopeManager#acquireAll
1331
- * @param {ESTree.Node} node node for the acquired scope.
1332
- * @returns {Scope[]?} Scope array
1333
- */
1334
- acquireAll(node) {
1335
- return this.__get(node);
1336
- }
1337
-
1338
- /**
1339
- * release the node.
1340
- * @function ScopeManager#release
1341
- * @param {ESTree.Node} node releasing node.
1342
- * @param {?boolean} [inner=false] look up the most inner scope, default value is false.
1343
- * @returns {Scope?} upper scope for the node.
1344
- */
1345
- release(node, inner) {
1346
- const scopes = this.__get(node);
1347
-
1348
- if (scopes && scopes.length) {
1349
- const scope = scopes[0].upper;
1350
-
1351
- if (!scope) {
1352
- return null;
1353
- }
1354
- return this.acquire(scope.block, inner);
1355
- }
1356
- return null;
1357
- }
1358
-
1359
- /**
1360
- * Add global variables and resolve their references.
1361
- * @function ScopeManager#addGlobals
1362
- * @param {string[]} names Names of global variables to add.
1363
- * @returns {void}
1364
- */
1365
- addGlobals(names) {
1366
-
1367
- // @ts-ignore -- globalScope must be set before this method is called.
1368
- this.globalScope.__addVariables(names);
1369
- }
1370
-
1371
- attach() { } // eslint-disable-line class-methods-use-this -- Desired as instance method
1372
-
1373
- detach() { } // eslint-disable-line class-methods-use-this -- Desired as instance method
1374
-
1375
- __nestScope(scope) {
1376
- if (scope instanceof GlobalScope) {
1377
- assert(this.__currentScope === null);
1378
- this.globalScope = scope;
1379
- }
1380
- this.__currentScope = scope;
1381
- return scope;
1382
- }
1383
-
1384
- __nestGlobalScope(node) {
1385
- return this.__nestScope(new GlobalScope(this, node));
1386
- }
1387
-
1388
- __nestBlockScope(node) {
1389
- return this.__nestScope(new BlockScope(this, this.__currentScope, node));
1390
- }
1391
-
1392
- __nestFunctionScope(node, isMethodDefinition) {
1393
- return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition));
1394
- }
1395
-
1396
- __nestForScope(node) {
1397
- return this.__nestScope(new ForScope(this, this.__currentScope, node));
1398
- }
1399
-
1400
- __nestCatchScope(node) {
1401
- return this.__nestScope(new CatchScope(this, this.__currentScope, node));
1402
- }
1403
-
1404
- __nestWithScope(node) {
1405
- return this.__nestScope(new WithScope(this, this.__currentScope, node));
1406
- }
1407
-
1408
- __nestClassScope(node) {
1409
- return this.__nestScope(new ClassScope(this, this.__currentScope, node));
1410
- }
1411
-
1412
- __nestClassFieldInitializerScope(node) {
1413
- return this.__nestScope(new ClassFieldInitializerScope(this, this.__currentScope, node));
1414
- }
1415
-
1416
- __nestClassStaticBlockScope(node) {
1417
- return this.__nestScope(new ClassStaticBlockScope(this, this.__currentScope, node));
1418
- }
1419
-
1420
- __nestSwitchScope(node) {
1421
- return this.__nestScope(new SwitchScope(this, this.__currentScope, node));
1422
- }
1423
-
1424
- __nestModuleScope(node) {
1425
- return this.__nestScope(new ModuleScope(this, this.__currentScope, node));
1426
- }
1427
-
1428
- __nestFunctionExpressionNameScope(node) {
1429
- return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node));
1430
- }
1431
-
1432
- __isES6() {
1433
- return this.__options.ecmaVersion >= 6;
1434
- }
1435
- }
1436
-
1437
- /* vim: set sw=4 ts=4 et tw=80 : */
1438
-
1439
- /*
1440
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
1441
-
1442
- Redistribution and use in source and binary forms, with or without
1443
- modification, are permitted provided that the following conditions are met:
1444
-
1445
- * Redistributions of source code must retain the above copyright
1446
- notice, this list of conditions and the following disclaimer.
1447
- * Redistributions in binary form must reproduce the above copyright
1448
- notice, this list of conditions and the following disclaimer in the
1449
- documentation and/or other materials provided with the distribution.
1450
-
1451
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1452
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1453
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1454
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
1455
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1456
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1457
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1458
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1459
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1460
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1461
- */
1462
-
1463
- /** @import * as types from "eslint-scope" */
1464
-
1465
- const { Syntax: Syntax$1 } = estraverse__default["default"];
1466
-
1467
- /**
1468
- * Get last array element
1469
- * @param {Array} xs array
1470
- * @returns {any} Last elment
1471
- */
1472
- function getLast(xs) {
1473
- return xs.at(-1) || null;
1474
- }
1475
-
1476
- /**
1477
- * Visitor for destructuring patterns.
1478
- * @implements {types.PatternVisitor}
1479
- */
1480
- class PatternVisitor extends esrecurse__default["default"].Visitor {
1481
- static isPattern(node) {
1482
- const nodeType = node.type;
1483
-
1484
- return (
1485
- nodeType === Syntax$1.Identifier ||
1486
- nodeType === Syntax$1.ObjectPattern ||
1487
- nodeType === Syntax$1.ArrayPattern ||
1488
- nodeType === Syntax$1.SpreadElement ||
1489
- nodeType === Syntax$1.RestElement ||
1490
- nodeType === Syntax$1.AssignmentPattern
1491
- );
1492
- }
1493
-
1494
- constructor(options, rootPattern, callback) {
1495
- super(null, options);
1496
- this.rootPattern = rootPattern;
1497
- this.callback = callback;
1498
- this.assignments = [];
1499
- this.rightHandNodes = [];
1500
- this.restElements = [];
1501
- }
1502
-
1503
- Identifier(pattern) {
1504
- const lastRestElement = getLast(this.restElements);
1505
-
1506
- this.callback(pattern, {
1507
- topLevel: pattern === this.rootPattern,
1508
- rest: lastRestElement !== null && lastRestElement !== void 0 && lastRestElement.argument === pattern,
1509
- assignments: this.assignments
1510
- });
1511
- }
1512
-
1513
- Property(property) {
1514
-
1515
- // Computed property's key is a right hand node.
1516
- if (property.computed) {
1517
- this.rightHandNodes.push(property.key);
1518
- }
1519
-
1520
- // If it's shorthand, its key is same as its value.
1521
- // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
1522
- // If it's not shorthand, the name of new variable is its value's.
1523
- this.visit(property.value);
1524
- }
1525
-
1526
- ArrayPattern(pattern) {
1527
- for (let i = 0, iz = pattern.elements.length; i < iz; ++i) {
1528
- const element = pattern.elements[i];
1529
-
1530
- this.visit(element);
1531
- }
1532
- }
1533
-
1534
- AssignmentPattern(pattern) {
1535
- this.assignments.push(pattern);
1536
- this.visit(pattern.left);
1537
- this.rightHandNodes.push(pattern.right);
1538
- this.assignments.pop();
1539
- }
1540
-
1541
- RestElement(pattern) {
1542
- this.restElements.push(pattern);
1543
- this.visit(pattern.argument);
1544
- this.restElements.pop();
1545
- }
1546
-
1547
- MemberExpression(node) {
1548
-
1549
- // Computed property's key is a right hand node.
1550
- if (node.computed) {
1551
- this.rightHandNodes.push(node.property);
1552
- }
1553
-
1554
- // the object is only read, write to its property.
1555
- this.rightHandNodes.push(node.object);
1556
- }
1557
-
1558
- //
1559
- // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
1560
- // By spec, LeftHandSideExpression is Pattern or MemberExpression.
1561
- // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
1562
- // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc...
1563
- //
1564
-
1565
- SpreadElement(node) {
1566
- this.visit(node.argument);
1567
- }
1568
-
1569
- ArrayExpression(node) {
1570
- node.elements.forEach(this.visit, this);
1571
- }
1572
-
1573
- AssignmentExpression(node) {
1574
- this.assignments.push(node);
1575
- this.visit(node.left);
1576
- this.rightHandNodes.push(node.right);
1577
- this.assignments.pop();
1578
- }
1579
-
1580
- CallExpression(node) {
1581
-
1582
- // arguments are right hand nodes.
1583
- node.arguments.forEach(a => {
1584
- this.rightHandNodes.push(a);
1585
- });
1586
- this.visit(node.callee);
1587
- }
1588
- }
1589
-
1590
- /* vim: set sw=4 ts=4 et tw=80 : */
1591
-
1592
- /*
1593
- Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
1594
-
1595
- Redistribution and use in source and binary forms, with or without
1596
- modification, are permitted provided that the following conditions are met:
1597
-
1598
- * Redistributions of source code must retain the above copyright
1599
- notice, this list of conditions and the following disclaimer.
1600
- * Redistributions in binary form must reproduce the above copyright
1601
- notice, this list of conditions and the following disclaimer in the
1602
- documentation and/or other materials provided with the distribution.
1603
-
1604
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1605
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1606
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1607
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
1608
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1609
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1610
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1611
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1612
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1613
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1614
- */
1615
-
1616
- /** @import * as types from "eslint-scope" */
1617
- /** @import ESTree from "estree" */
1618
-
1619
- const { Syntax } = estraverse__default["default"];
1620
-
1621
- /**
1622
- * Traverse identifier in pattern
1623
- * @param {Object} options options
1624
- * @param {ESTree.Pattern} rootPattern root pattern
1625
- * @param {?Referencer} referencer referencer
1626
- * @param {types.PatternVisitorCallback} callback callback
1627
- * @returns {void}
1628
- */
1629
- function traverseIdentifierInPattern(options, rootPattern, referencer, callback) {
1630
-
1631
- // Call the callback at left hand identifier nodes, and Collect right hand nodes.
1632
- const visitor = new PatternVisitor(options, rootPattern, callback);
1633
-
1634
- visitor.visit(rootPattern);
1635
-
1636
- // Process the right hand nodes recursively.
1637
- if (referencer !== null && referencer !== void 0) {
1638
- visitor.rightHandNodes.forEach(referencer.visit, referencer);
1639
- }
1640
- }
1641
-
1642
- // Importing ImportDeclaration.
1643
- // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation
1644
- // https://github.com/estree/estree/blob/master/es6.md#importdeclaration
1645
- // FIXME: Now, we don't create module environment, because the context is
1646
- // implementation dependent.
1647
-
1648
- /**
1649
- * Visitor for import specifiers.
1650
- */
1651
- class Importer extends esrecurse__default["default"].Visitor {
1652
- constructor(declaration, referencer) {
1653
- super(null, referencer.options);
1654
- this.declaration = declaration;
1655
- this.referencer = referencer;
1656
- }
1657
-
1658
- visitImport(id, specifier) {
1659
- this.referencer.visitPattern(id, pattern => {
1660
- this.referencer.currentScope().__define(pattern,
1661
- new Definition(
1662
- Variable.ImportBinding,
1663
- pattern,
1664
- specifier,
1665
- this.declaration,
1666
- null,
1667
- null
1668
- ));
1669
- });
1670
- }
1671
-
1672
- ImportNamespaceSpecifier(node) {
1673
- const local = (node.local || node.id);
1674
-
1675
- if (local) {
1676
- this.visitImport(local, node);
1677
- }
1678
- }
1679
-
1680
- ImportDefaultSpecifier(node) {
1681
- const local = (node.local || node.id);
1682
-
1683
- this.visitImport(local, node);
1684
- }
1685
-
1686
- ImportSpecifier(node) {
1687
- const local = (node.local || node.id);
1688
-
1689
- if (node.name) {
1690
- this.visitImport(node.name, node);
1691
- } else {
1692
- this.visitImport(local, node);
1693
- }
1694
- }
1695
- }
1696
-
1697
- /**
1698
- * Referencing variables and creating bindings.
1699
- * @implements {types.Referencer}
1700
- */
1701
- class Referencer extends esrecurse__default["default"].Visitor {
1702
- constructor(options, scopeManager) {
1703
- super(null, options);
1704
- this.options = options;
1705
- this.scopeManager = scopeManager;
1706
- this.parent = null;
1707
- this.isInnerMethodDefinition = false;
1708
- }
1709
-
1710
- currentScope() {
1711
- return this.scopeManager.__currentScope;
1712
- }
1713
-
1714
- close(node) {
1715
- while (this.currentScope() && node === this.currentScope().block) {
1716
- this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager);
1717
- }
1718
- }
1719
-
1720
- pushInnerMethodDefinition(isInnerMethodDefinition) {
1721
- const previous = this.isInnerMethodDefinition;
1722
-
1723
- this.isInnerMethodDefinition = isInnerMethodDefinition;
1724
- return previous;
1725
- }
1726
-
1727
- popInnerMethodDefinition(isInnerMethodDefinition) {
1728
- this.isInnerMethodDefinition = isInnerMethodDefinition;
1729
- }
1730
-
1731
- referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
1732
- const scope = this.currentScope();
1733
-
1734
- assignments.forEach(assignment => {
1735
- scope.__referencing(
1736
- pattern,
1737
- Reference.WRITE,
1738
- assignment.right,
1739
- maybeImplicitGlobal,
1740
- pattern !== assignment.left,
1741
- init
1742
- );
1743
- });
1744
- }
1745
-
1746
- visitPattern(node, options, callback) {
1747
- let visitPatternOptions = options;
1748
- let visitPatternCallback = callback;
1749
-
1750
- if (typeof options === "function") {
1751
- visitPatternCallback = options;
1752
- visitPatternOptions = { processRightHandNodes: false };
1753
- }
1754
-
1755
- traverseIdentifierInPattern(
1756
- this.options,
1757
- node,
1758
- visitPatternOptions.processRightHandNodes ? this : null,
1759
- visitPatternCallback
1760
- );
1761
- }
1762
-
1763
- visitFunction(node) {
1764
- let i, iz;
1765
-
1766
- // FunctionDeclaration name is defined in upper scope
1767
- // NOTE: Not referring variableScope. It is intended.
1768
- // Since
1769
- // in ES5, FunctionDeclaration should be in FunctionBody.
1770
- // in ES6, FunctionDeclaration should be block scoped.
1771
-
1772
- if (node.type === Syntax.FunctionDeclaration) {
1773
-
1774
- // id is defined in upper scope
1775
- this.currentScope().__define(node.id,
1776
- new Definition(
1777
- Variable.FunctionName,
1778
- node.id,
1779
- node,
1780
- null,
1781
- null,
1782
- null
1783
- ));
1784
- }
1785
-
1786
- // FunctionExpression with name creates its special scope;
1787
- // FunctionExpressionNameScope.
1788
- if (node.type === Syntax.FunctionExpression && node.id) {
1789
- this.scopeManager.__nestFunctionExpressionNameScope(node);
1790
- }
1791
-
1792
- // Consider this function is in the MethodDefinition.
1793
- this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition);
1794
-
1795
- const that = this;
1796
-
1797
- /**
1798
- * Visit pattern callback
1799
- * @param {ESTree.Pattern} pattern pattern
1800
- * @param {Object} info info
1801
- * @returns {void}
1802
- */
1803
- function visitPatternCallback(pattern, info) {
1804
- that.currentScope().__define(pattern,
1805
- new ParameterDefinition(
1806
- pattern,
1807
- node,
1808
- i,
1809
- info.rest
1810
- ));
1811
-
1812
- that.referencingDefaultValue(pattern, info.assignments, null, true);
1813
- }
1814
-
1815
- // Process parameter declarations.
1816
- for (i = 0, iz = node.params.length; i < iz; ++i) {
1817
- this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback);
1818
- }
1819
-
1820
- // if there's a rest argument, add that
1821
- if (node.rest) {
1822
- this.visitPattern({
1823
- type: "RestElement",
1824
- argument: node.rest
1825
- }, pattern => {
1826
- this.currentScope().__define(pattern,
1827
- new ParameterDefinition(
1828
- pattern,
1829
- node,
1830
- node.params.length,
1831
- true
1832
- ));
1833
- });
1834
- }
1835
-
1836
- // In TypeScript there are a number of function-like constructs which have no body,
1837
- // so check it exists before traversing
1838
- if (node.body) {
1839
-
1840
- // Skip BlockStatement to prevent creating BlockStatement scope.
1841
- if (node.body.type === Syntax.BlockStatement) {
1842
- this.visitChildren(node.body);
1843
- } else {
1844
- this.visit(node.body);
1845
- }
1846
- }
1847
-
1848
- this.close(node);
1849
- }
1850
-
1851
- visitClass(node) {
1852
- if (node.type === Syntax.ClassDeclaration) {
1853
- this.currentScope().__define(node.id,
1854
- new Definition(
1855
- Variable.ClassName,
1856
- node.id,
1857
- node,
1858
- null,
1859
- null,
1860
- null
1861
- ));
1862
- }
1863
-
1864
- this.scopeManager.__nestClassScope(node);
1865
-
1866
- if (node.id) {
1867
- this.currentScope().__define(node.id,
1868
- new Definition(
1869
- Variable.ClassName,
1870
- node.id,
1871
- node
1872
- ));
1873
- }
1874
-
1875
- this.visit(node.superClass);
1876
- this.visit(node.body);
1877
-
1878
- this.close(node);
1879
- }
1880
-
1881
- visitProperty(node) {
1882
- let previous;
1883
-
1884
- if (node.computed) {
1885
- this.visit(node.key);
1886
- }
1887
-
1888
- const isMethodDefinition = node.type === Syntax.MethodDefinition;
1889
-
1890
- if (isMethodDefinition) {
1891
- previous = this.pushInnerMethodDefinition(true);
1892
- }
1893
- this.visit(node.value);
1894
- if (isMethodDefinition) {
1895
- this.popInnerMethodDefinition(previous);
1896
- }
1897
- }
1898
-
1899
- visitForIn(node) {
1900
- if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") {
1901
- this.scopeManager.__nestForScope(node);
1902
- }
1903
-
1904
- if (node.left.type === Syntax.VariableDeclaration) {
1905
- this.visit(node.left);
1906
- this.visitPattern(node.left.declarations[0].id, pattern => {
1907
- this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true);
1908
- });
1909
- } else {
1910
- this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
1911
- let maybeImplicitGlobal = null;
1912
-
1913
- if (!this.currentScope().isStrict) {
1914
- maybeImplicitGlobal = {
1915
- pattern,
1916
- node
1917
- };
1918
- }
1919
- this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
1920
- this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false);
1921
- });
1922
- }
1923
- this.visit(node.right);
1924
- this.visit(node.body);
1925
-
1926
- this.close(node);
1927
- }
1928
-
1929
- visitVariableDeclaration(variableTargetScope, type, node, index) {
1930
-
1931
- const decl = node.declarations[index];
1932
- const init = decl.init;
1933
-
1934
- this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => {
1935
- variableTargetScope.__define(
1936
- pattern,
1937
- new Definition(
1938
- type,
1939
- pattern,
1940
- decl,
1941
- node,
1942
- index,
1943
- node.kind
1944
- )
1945
- );
1946
-
1947
- this.referencingDefaultValue(pattern, info.assignments, null, true);
1948
- if (init) {
1949
- this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true);
1950
- }
1951
- });
1952
- }
1953
-
1954
- AssignmentExpression(node) {
1955
- if (PatternVisitor.isPattern(node.left)) {
1956
- if (node.operator === "=") {
1957
- this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
1958
- let maybeImplicitGlobal = null;
1959
-
1960
- if (!this.currentScope().isStrict) {
1961
- maybeImplicitGlobal = {
1962
- pattern,
1963
- node
1964
- };
1965
- }
1966
- this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
1967
- this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false);
1968
- });
1969
- } else {
1970
- this.currentScope().__referencing(node.left, Reference.RW, node.right);
1971
- }
1972
- } else {
1973
- this.visit(node.left);
1974
- }
1975
- this.visit(node.right);
1976
- }
1977
-
1978
- CatchClause(node) {
1979
- this.scopeManager.__nestCatchScope(node);
1980
-
1981
- this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => {
1982
- this.currentScope().__define(pattern,
1983
- new Definition(
1984
- Variable.CatchClause,
1985
- pattern,
1986
- node,
1987
- null,
1988
- null,
1989
- null
1990
- ));
1991
- this.referencingDefaultValue(pattern, info.assignments, null, true);
1992
- });
1993
- this.visit(node.body);
1994
-
1995
- this.close(node);
1996
- }
1997
-
1998
- Program(node) {
1999
- this.scopeManager.__nestGlobalScope(node);
2000
-
2001
- if (this.scopeManager.isGlobalReturn()) {
2002
-
2003
- // Force strictness of GlobalScope to false when using node.js scope.
2004
- this.currentScope().isStrict = false;
2005
- this.scopeManager.__nestFunctionScope(node, false);
2006
- }
2007
-
2008
- if (this.scopeManager.__isES6() && this.scopeManager.isModule()) {
2009
- this.scopeManager.__nestModuleScope(node);
2010
- }
2011
-
2012
- if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) {
2013
- this.currentScope().isStrict = true;
2014
- }
2015
-
2016
- this.visitChildren(node);
2017
- this.close(node);
2018
- }
2019
-
2020
- Identifier(node) {
2021
- this.currentScope().__referencing(node);
2022
- }
2023
-
2024
- // eslint-disable-next-line class-methods-use-this -- Desired as instance method
2025
- PrivateIdentifier() {
2026
-
2027
- // Do nothing.
2028
- }
2029
-
2030
- UpdateExpression(node) {
2031
- if (PatternVisitor.isPattern(node.argument)) {
2032
- this.currentScope().__referencing(node.argument, Reference.RW, null);
2033
- } else {
2034
- this.visitChildren(node);
2035
- }
2036
- }
2037
-
2038
- MemberExpression(node) {
2039
- this.visit(node.object);
2040
- if (node.computed) {
2041
- this.visit(node.property);
2042
- }
2043
- }
2044
-
2045
- Property(node) {
2046
- this.visitProperty(node);
2047
- }
2048
-
2049
- PropertyDefinition(node) {
2050
- const { computed, key, value } = node;
2051
-
2052
- if (computed) {
2053
- this.visit(key);
2054
- }
2055
- if (value) {
2056
- this.scopeManager.__nestClassFieldInitializerScope(value);
2057
- this.visit(value);
2058
- this.close(value);
2059
- }
2060
- }
2061
-
2062
- StaticBlock(node) {
2063
- this.scopeManager.__nestClassStaticBlockScope(node);
2064
-
2065
- this.visitChildren(node);
2066
-
2067
- this.close(node);
2068
- }
2069
-
2070
- MethodDefinition(node) {
2071
- this.visitProperty(node);
2072
- }
2073
-
2074
- BreakStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method
2075
-
2076
- ContinueStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method
2077
-
2078
- LabeledStatement(node) {
2079
- this.visit(node.body);
2080
- }
2081
-
2082
- ForStatement(node) {
2083
-
2084
- // Create ForStatement declaration.
2085
- // NOTE: In ES6, ForStatement dynamically generates
2086
- // per iteration environment. However, escope is
2087
- // a static analyzer, we only generate one scope for ForStatement.
2088
- if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") {
2089
- this.scopeManager.__nestForScope(node);
2090
- }
2091
-
2092
- this.visitChildren(node);
2093
-
2094
- this.close(node);
2095
- }
2096
-
2097
- ClassExpression(node) {
2098
- this.visitClass(node);
2099
- }
2100
-
2101
- ClassDeclaration(node) {
2102
- this.visitClass(node);
2103
- }
2104
-
2105
- CallExpression(node) {
2106
-
2107
- // Check this is direct call to eval
2108
- if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") {
2109
-
2110
- // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and
2111
- // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment.
2112
- this.currentScope().variableScope.__detectEval();
2113
- }
2114
- this.visitChildren(node);
2115
- }
2116
-
2117
- BlockStatement(node) {
2118
- if (this.scopeManager.__isES6()) {
2119
- this.scopeManager.__nestBlockScope(node);
2120
- }
2121
-
2122
- this.visitChildren(node);
2123
-
2124
- this.close(node);
2125
- }
2126
-
2127
- ThisExpression() {
2128
- this.currentScope().variableScope.__detectThis();
2129
- }
2130
-
2131
- WithStatement(node) {
2132
- this.visit(node.object);
2133
-
2134
- // Then nest scope for WithStatement.
2135
- this.scopeManager.__nestWithScope(node);
2136
-
2137
- this.visit(node.body);
2138
-
2139
- this.close(node);
2140
- }
2141
-
2142
- VariableDeclaration(node) {
2143
- const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope();
2144
-
2145
- for (let i = 0, iz = node.declarations.length; i < iz; ++i) {
2146
- const decl = node.declarations[i];
2147
-
2148
- this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i);
2149
- if (decl.init) {
2150
- this.visit(decl.init);
2151
- }
2152
- }
2153
- }
2154
-
2155
- // sec 13.11.8
2156
- SwitchStatement(node) {
2157
- this.visit(node.discriminant);
2158
-
2159
- if (this.scopeManager.__isES6()) {
2160
- this.scopeManager.__nestSwitchScope(node);
2161
- }
2162
-
2163
- for (let i = 0, iz = node.cases.length; i < iz; ++i) {
2164
- this.visit(node.cases[i]);
2165
- }
2166
-
2167
- this.close(node);
2168
- }
2169
-
2170
- FunctionDeclaration(node) {
2171
- this.visitFunction(node);
2172
- }
2173
-
2174
- FunctionExpression(node) {
2175
- this.visitFunction(node);
2176
- }
2177
-
2178
- ForOfStatement(node) {
2179
- this.visitForIn(node);
2180
- }
2181
-
2182
- ForInStatement(node) {
2183
- this.visitForIn(node);
2184
- }
2185
-
2186
- ArrowFunctionExpression(node) {
2187
- this.visitFunction(node);
2188
- }
2189
-
2190
- ImportDeclaration(node) {
2191
- assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context.");
2192
-
2193
- const importer = new Importer(node, this);
2194
-
2195
- importer.visit(node);
2196
- }
2197
-
2198
- visitExportDeclaration(node) {
2199
- if (node.source) {
2200
- return;
2201
- }
2202
- if (node.declaration) {
2203
- this.visit(node.declaration);
2204
- return;
2205
- }
2206
-
2207
- this.visitChildren(node);
2208
- }
2209
-
2210
- // TODO: ExportDeclaration doesn't exist. for bc?
2211
- ExportDeclaration(node) {
2212
- this.visitExportDeclaration(node);
2213
- }
2214
-
2215
- ExportAllDeclaration(node) {
2216
- this.visitExportDeclaration(node);
2217
- }
2218
-
2219
- ExportDefaultDeclaration(node) {
2220
- this.visitExportDeclaration(node);
2221
- }
2222
-
2223
- ExportNamedDeclaration(node) {
2224
- this.visitExportDeclaration(node);
2225
- }
2226
-
2227
- ExportSpecifier(node) {
2228
-
2229
- // TODO: `node.id` doesn't exist. for bc?
2230
- const local = (node.id || node.local);
2231
-
2232
- this.visit(local);
2233
- }
2234
-
2235
- MetaProperty() { // eslint-disable-line class-methods-use-this -- Desired as instance method
2236
-
2237
- // do nothing.
2238
- }
2239
-
2240
- JSXIdentifier(node) {
2241
-
2242
- // Special case: "this" should not count as a reference
2243
- if (this.scopeManager.__isJSXEnabled() && node.name !== "this") {
2244
- this.currentScope().__referencing(node);
2245
- }
2246
- }
2247
-
2248
- JSXMemberExpression(node) {
2249
- this.visit(node.object);
2250
- }
2251
-
2252
- JSXElement(node) {
2253
- if (this.scopeManager.__isJSXEnabled()) {
2254
- this.visit(node.openingElement);
2255
- node.children.forEach(this.visit, this);
2256
- } else {
2257
- this.visitChildren(node);
2258
- }
2259
- }
2260
-
2261
- JSXOpeningElement(node) {
2262
- if (this.scopeManager.__isJSXEnabled()) {
2263
-
2264
- const nameNode = node.name;
2265
- const isComponentName = nameNode.type === "JSXIdentifier" && nameNode.name[0].toUpperCase() === nameNode.name[0];
2266
- const isComponent = isComponentName || nameNode.type === "JSXMemberExpression";
2267
-
2268
- // we only want to visit JSXIdentifier nodes if they are capitalized
2269
- if (isComponent) {
2270
- this.visit(nameNode);
2271
- }
2272
- }
2273
-
2274
- node.attributes.forEach(this.visit, this);
2275
- }
2276
-
2277
- JSXAttribute(node) {
2278
- if (node.value) {
2279
- this.visit(node.value);
2280
- }
2281
- }
2282
-
2283
- JSXExpressionContainer(node) {
2284
- this.visit(node.expression);
2285
- }
2286
-
2287
- JSXNamespacedName(node) {
2288
- this.visit(node.namespace);
2289
- this.visit(node.name);
2290
- }
2291
- }
2292
-
2293
- /* vim: set sw=4 ts=4 et tw=80 : */
2294
-
2295
- /*
2296
- Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
2297
- Copyright (C) 2013 Alex Seville <hi@alexanderseville.com>
2298
- Copyright (C) 2014 Thiago de Arruda <tpadilha84@gmail.com>
2299
-
2300
- Redistribution and use in source and binary forms, with or without
2301
- modification, are permitted provided that the following conditions are met:
2302
-
2303
- * Redistributions of source code must retain the above copyright
2304
- notice, this list of conditions and the following disclaimer.
2305
- * Redistributions in binary form must reproduce the above copyright
2306
- notice, this list of conditions and the following disclaimer in the
2307
- documentation and/or other materials provided with the distribution.
2308
-
2309
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2310
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2311
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2312
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
2313
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2314
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2315
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2316
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2317
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2318
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2319
- */
2320
-
2321
- /** @import ESTree from "estree" */
2322
-
2323
- /**
2324
- * Set the default options
2325
- * @returns {Object} options
2326
- */
2327
- function defaultOptions() {
2328
- return {
2329
- optimistic: false,
2330
- nodejsScope: false,
2331
- impliedStrict: false,
2332
- sourceType: "script", // one of ['script', 'module', 'commonjs']
2333
- ecmaVersion: 5,
2334
- childVisitorKeys: null,
2335
- fallback: "iteration"
2336
- };
2337
- }
2338
-
2339
- /**
2340
- * Preform deep update on option object
2341
- * @param {Record<string, unknown>} target Options
2342
- * @param {Record<string, unknown>} override Updates
2343
- * @returns {Record<string, unknown>} Updated options
2344
- */
2345
- function updateDeeply(target, override) {
2346
-
2347
- /**
2348
- * Is hash object
2349
- * @param {Object} value Test value
2350
- * @returns {value is Record<string, unknown>} Result
2351
- */
2352
- function isHashObject(value) {
2353
- return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp);
2354
- }
2355
-
2356
- for (const key in override) {
2357
- if (Object.hasOwn(override, key)) {
2358
- const val = override[key];
2359
-
2360
- if (isHashObject(val)) {
2361
- if (isHashObject(target[key])) {
2362
- updateDeeply(target[key], val);
2363
- } else {
2364
- target[key] = updateDeeply({}, val);
2365
- }
2366
- } else {
2367
- target[key] = val;
2368
- }
2369
- }
2370
- }
2371
- return target;
2372
- }
2373
-
2374
- /**
2375
- * Main interface function. Takes an Espree syntax tree and returns the
2376
- * analyzed scopes.
2377
- * @function analyze
2378
- * @param {ESTree.Program} tree Abstract Syntax Tree
2379
- * @param {Object} providedOptions Options that tailor the scope analysis
2380
- * @param {boolean} [providedOptions.optimistic=false] the optimistic flag
2381
- * @param {boolean} [providedOptions.ignoreEval=false] whether to check 'eval()' calls
2382
- * @param {boolean} [providedOptions.nodejsScope=false] whether the whole
2383
- * script is executed under node.js environment. When enabled, escope adds
2384
- * a function scope immediately following the global scope.
2385
- * @param {boolean} [providedOptions.impliedStrict=false] implied strict mode
2386
- * (if ecmaVersion >= 5).
2387
- * @param {string} [providedOptions.sourceType='script'] the source type of the script. one of 'script', 'module', and 'commonjs'
2388
- * @param {number} [providedOptions.ecmaVersion=5] which ECMAScript version is considered
2389
- * @param {boolean} [providedOptions.jsx=false] support JSX references
2390
- * @param {Object} [providedOptions.childVisitorKeys=null] Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option.
2391
- * @param {string} [providedOptions.fallback='iteration'] A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option.
2392
- * @returns {ScopeManager} ScopeManager
2393
- */
2394
- function analyze(tree, providedOptions) {
2395
- const options = updateDeeply(defaultOptions(), providedOptions);
2396
- const scopeManager = new ScopeManager(options);
2397
- const referencer = new Referencer(options, scopeManager);
2398
-
2399
- referencer.visit(tree);
2400
-
2401
- assert(scopeManager.__currentScope === null, "currentScope should be null.");
2402
-
2403
- return scopeManager;
2404
- }
2405
-
2406
- /** @name module:escope.version */
2407
- const version = "9.1.0"; // x-release-please-version
2408
-
2409
- /* vim: set sw=4 ts=4 et tw=80 : */
2410
-
2411
- exports.Definition = Definition;
2412
- exports.PatternVisitor = PatternVisitor;
2413
- exports.Reference = Reference;
2414
- exports.Referencer = Referencer;
2415
- exports.Scope = Scope;
2416
- exports.ScopeManager = ScopeManager;
2417
- exports.Variable = Variable;
2418
- exports.analyze = analyze;
2419
- exports.version = version;
2420
- //# sourceMappingURL=eslint-scope.cjs.map