immosquare-cleaner 0.1.32 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/node_modules/@eslint/eslintrc/README.md +15 -4
  4. data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +57 -18
  5. data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -1
  6. data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +60 -34
  7. data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -1
  8. data/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +3 -16
  9. data/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +63 -18
  10. data/node_modules/@eslint/eslintrc/package.json +4 -4
  11. data/node_modules/@eslint/js/package.json +2 -2
  12. data/node_modules/@eslint/js/src/configs/eslint-all.js +9 -1
  13. data/node_modules/@eslint/js/src/configs/eslint-recommended.js +12 -5
  14. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +201 -0
  15. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md +105 -0
  16. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +384 -0
  17. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +27 -0
  18. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
  19. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
  20. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +65 -0
  21. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js +315 -0
  22. data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json +74 -0
  23. data/node_modules/@humanwhocodes/config-array/api.js +114 -16
  24. data/node_modules/@humanwhocodes/config-array/package.json +5 -3
  25. data/node_modules/@humanwhocodes/object-schema/CHANGELOG.md +7 -0
  26. data/node_modules/@humanwhocodes/object-schema/package.json +6 -1
  27. data/node_modules/@humanwhocodes/retry/LICENSE +201 -0
  28. data/node_modules/@humanwhocodes/retry/README.md +122 -0
  29. data/node_modules/@humanwhocodes/retry/dist/retrier.cjs +267 -0
  30. data/node_modules/@humanwhocodes/retry/dist/retrier.d.ts +24 -0
  31. data/node_modules/@humanwhocodes/retry/dist/retrier.js +265 -0
  32. data/node_modules/@humanwhocodes/retry/dist/retrier.min.js +1 -0
  33. data/node_modules/@humanwhocodes/retry/dist/retrier.mjs +265 -0
  34. data/node_modules/@humanwhocodes/retry/package.json +74 -0
  35. data/node_modules/@types/semver-utils/LICENSE +21 -0
  36. data/node_modules/@types/semver-utils/README.md +34 -0
  37. data/node_modules/@types/semver-utils/index.d.ts +15 -0
  38. data/node_modules/@types/semver-utils/package.json +25 -0
  39. data/node_modules/acorn/CHANGELOG.md +36 -0
  40. data/node_modules/acorn/README.md +8 -3
  41. data/node_modules/acorn/dist/acorn.d.mts +857 -26
  42. data/node_modules/acorn/dist/acorn.d.ts +833 -268
  43. data/node_modules/acorn/dist/acorn.js +33 -21
  44. data/node_modules/acorn/dist/acorn.mjs +33 -21
  45. data/node_modules/acorn/package.json +1 -1
  46. data/node_modules/cacheable-request/node_modules/keyv/README.md +429 -0
  47. data/node_modules/cacheable-request/node_modules/keyv/package.json +57 -0
  48. data/node_modules/cacheable-request/node_modules/keyv/src/index.d.ts +112 -0
  49. data/node_modules/cacheable-request/node_modules/keyv/src/index.js +264 -0
  50. data/node_modules/doctrine/CHANGELOG.md +0 -7
  51. data/node_modules/doctrine/lib/doctrine.js +1 -0
  52. data/node_modules/doctrine/package.json +8 -9
  53. data/node_modules/eslint/README.md +31 -28
  54. data/node_modules/eslint/bin/eslint.js +4 -3
  55. data/node_modules/eslint/conf/ecma-version.js +16 -0
  56. data/node_modules/eslint/conf/globals.js +1 -0
  57. data/node_modules/eslint/conf/rule-type-list.json +3 -1
  58. data/node_modules/eslint/lib/api.js +7 -11
  59. data/node_modules/eslint/lib/cli-engine/cli-engine.js +14 -3
  60. data/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +1 -29
  61. data/node_modules/eslint/lib/cli-engine/lint-result-cache.js +2 -2
  62. data/node_modules/eslint/lib/cli.js +115 -36
  63. data/node_modules/eslint/lib/config/default-config.js +3 -0
  64. data/node_modules/eslint/lib/config/flat-config-array.js +110 -24
  65. data/node_modules/eslint/lib/config/flat-config-helpers.js +41 -20
  66. data/node_modules/eslint/lib/config/flat-config-schema.js +1 -7
  67. data/node_modules/eslint/lib/config/rule-validator.js +42 -6
  68. data/node_modules/eslint/lib/eslint/eslint-helpers.js +116 -58
  69. data/node_modules/eslint/lib/eslint/eslint.js +892 -377
  70. data/node_modules/eslint/lib/eslint/index.js +2 -2
  71. data/node_modules/eslint/lib/eslint/legacy-eslint.js +728 -0
  72. data/node_modules/eslint/lib/linter/apply-disable-directives.js +59 -31
  73. data/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -1
  74. data/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +32 -30
  75. data/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +1 -1
  76. data/node_modules/eslint/lib/linter/config-comment-parser.js +8 -11
  77. data/node_modules/eslint/lib/linter/index.js +1 -3
  78. data/node_modules/eslint/lib/linter/interpolate.js +24 -2
  79. data/node_modules/eslint/lib/linter/linter.js +428 -207
  80. data/node_modules/eslint/lib/linter/report-translator.js +3 -3
  81. data/node_modules/eslint/lib/linter/rules.js +6 -15
  82. data/node_modules/eslint/lib/linter/source-code-fixer.js +1 -1
  83. data/node_modules/eslint/lib/linter/timing.js +16 -8
  84. data/node_modules/eslint/lib/options.js +35 -3
  85. data/node_modules/eslint/lib/rule-tester/index.js +3 -1
  86. data/node_modules/eslint/lib/rule-tester/rule-tester.js +424 -347
  87. data/node_modules/eslint/lib/rules/array-bracket-newline.js +1 -1
  88. data/node_modules/eslint/lib/rules/array-bracket-spacing.js +1 -1
  89. data/node_modules/eslint/lib/rules/block-scoped-var.js +1 -1
  90. data/node_modules/eslint/lib/rules/callback-return.js +2 -2
  91. data/node_modules/eslint/lib/rules/camelcase.js +3 -5
  92. data/node_modules/eslint/lib/rules/capitalized-comments.js +10 -7
  93. data/node_modules/eslint/lib/rules/comma-dangle.js +1 -1
  94. data/node_modules/eslint/lib/rules/comma-style.js +2 -2
  95. data/node_modules/eslint/lib/rules/complexity.js +14 -1
  96. data/node_modules/eslint/lib/rules/constructor-super.js +99 -100
  97. data/node_modules/eslint/lib/rules/default-case.js +1 -1
  98. data/node_modules/eslint/lib/rules/eol-last.js +2 -2
  99. data/node_modules/eslint/lib/rules/function-paren-newline.js +2 -2
  100. data/node_modules/eslint/lib/rules/indent-legacy.js +5 -5
  101. data/node_modules/eslint/lib/rules/indent.js +5 -5
  102. data/node_modules/eslint/lib/rules/index.js +1 -2
  103. data/node_modules/eslint/lib/rules/key-spacing.js +2 -2
  104. data/node_modules/eslint/lib/rules/line-comment-position.js +1 -1
  105. data/node_modules/eslint/lib/rules/lines-around-directive.js +2 -2
  106. data/node_modules/eslint/lib/rules/max-depth.js +1 -1
  107. data/node_modules/eslint/lib/rules/max-len.js +3 -3
  108. data/node_modules/eslint/lib/rules/max-lines.js +3 -3
  109. data/node_modules/eslint/lib/rules/max-nested-callbacks.js +1 -1
  110. data/node_modules/eslint/lib/rules/max-params.js +1 -1
  111. data/node_modules/eslint/lib/rules/max-statements.js +1 -1
  112. data/node_modules/eslint/lib/rules/multiline-comment-style.js +7 -7
  113. data/node_modules/eslint/lib/rules/new-cap.js +1 -1
  114. data/node_modules/eslint/lib/rules/newline-after-var.js +1 -1
  115. data/node_modules/eslint/lib/rules/newline-before-return.js +1 -1
  116. data/node_modules/eslint/lib/rules/no-case-declarations.js +13 -1
  117. data/node_modules/eslint/lib/rules/no-constant-binary-expression.js +7 -8
  118. data/node_modules/eslint/lib/rules/no-constant-condition.js +18 -7
  119. data/node_modules/eslint/lib/rules/no-constructor-return.js +2 -2
  120. data/node_modules/eslint/lib/rules/no-dupe-class-members.js +2 -2
  121. data/node_modules/eslint/lib/rules/no-else-return.js +1 -1
  122. data/node_modules/eslint/lib/rules/no-empty-function.js +2 -2
  123. data/node_modules/eslint/lib/rules/no-empty-static-block.js +1 -1
  124. data/node_modules/eslint/lib/rules/no-extend-native.js +1 -2
  125. data/node_modules/eslint/lib/rules/no-extra-semi.js +1 -1
  126. data/node_modules/eslint/lib/rules/no-fallthrough.js +41 -16
  127. data/node_modules/eslint/lib/rules/no-implicit-coercion.js +66 -24
  128. data/node_modules/eslint/lib/rules/no-inner-declarations.js +23 -2
  129. data/node_modules/eslint/lib/rules/no-invalid-regexp.js +1 -1
  130. data/node_modules/eslint/lib/rules/no-invalid-this.js +1 -1
  131. data/node_modules/eslint/lib/rules/no-lone-blocks.js +3 -3
  132. data/node_modules/eslint/lib/rules/no-loss-of-precision.js +1 -1
  133. data/node_modules/eslint/lib/rules/no-misleading-character-class.js +225 -69
  134. data/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +1 -1
  135. data/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +1 -1
  136. data/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +1 -1
  137. data/node_modules/eslint/lib/rules/no-new-symbol.js +8 -1
  138. data/node_modules/eslint/lib/rules/no-restricted-globals.js +1 -1
  139. data/node_modules/eslint/lib/rules/no-restricted-imports.js +186 -40
  140. data/node_modules/eslint/lib/rules/no-restricted-modules.js +2 -2
  141. data/node_modules/eslint/lib/rules/no-return-await.js +1 -1
  142. data/node_modules/eslint/lib/rules/no-sequences.js +1 -0
  143. data/node_modules/eslint/lib/rules/no-this-before-super.js +45 -13
  144. data/node_modules/eslint/lib/rules/no-trailing-spaces.js +2 -3
  145. data/node_modules/eslint/lib/rules/no-unneeded-ternary.js +1 -1
  146. data/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +1 -1
  147. data/node_modules/eslint/lib/rules/no-unused-private-class-members.js +1 -1
  148. data/node_modules/eslint/lib/rules/no-unused-vars.js +197 -36
  149. data/node_modules/eslint/lib/rules/no-useless-assignment.js +566 -0
  150. data/node_modules/eslint/lib/rules/no-useless-backreference.js +1 -1
  151. data/node_modules/eslint/lib/rules/no-useless-computed-key.js +2 -2
  152. data/node_modules/eslint/lib/rules/no-useless-return.js +7 -2
  153. data/node_modules/eslint/lib/rules/object-curly-spacing.js +3 -3
  154. data/node_modules/eslint/lib/rules/object-property-newline.js +1 -1
  155. data/node_modules/eslint/lib/rules/one-var.js +5 -5
  156. data/node_modules/eslint/lib/rules/padded-blocks.js +7 -7
  157. data/node_modules/eslint/lib/rules/prefer-arrow-callback.js +3 -3
  158. data/node_modules/eslint/lib/rules/prefer-reflect.js +1 -1
  159. data/node_modules/eslint/lib/rules/prefer-regex-literals.js +1 -1
  160. data/node_modules/eslint/lib/rules/prefer-template.js +1 -1
  161. data/node_modules/eslint/lib/rules/radix.js +2 -2
  162. data/node_modules/eslint/lib/rules/semi-style.js +1 -1
  163. data/node_modules/eslint/lib/rules/sort-imports.js +1 -1
  164. data/node_modules/eslint/lib/rules/sort-keys.js +1 -1
  165. data/node_modules/eslint/lib/rules/sort-vars.js +1 -1
  166. data/node_modules/eslint/lib/rules/space-unary-ops.js +1 -1
  167. data/node_modules/eslint/lib/rules/strict.js +1 -1
  168. data/node_modules/eslint/lib/rules/use-isnan.js +101 -7
  169. data/node_modules/eslint/lib/rules/utils/ast-utils.js +16 -7
  170. data/node_modules/eslint/lib/rules/utils/char-source.js +240 -0
  171. data/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +1 -1
  172. data/node_modules/eslint/lib/rules/utils/unicode/index.js +9 -4
  173. data/node_modules/eslint/lib/rules/yield-star-spacing.js +1 -1
  174. data/node_modules/eslint/lib/shared/runtime-info.js +1 -0
  175. data/node_modules/eslint/lib/shared/serialization.js +55 -0
  176. data/node_modules/eslint/lib/shared/stats.js +30 -0
  177. data/node_modules/eslint/lib/shared/string-utils.js +9 -11
  178. data/node_modules/eslint/lib/shared/types.js +35 -1
  179. data/node_modules/eslint/lib/source-code/index.js +3 -1
  180. data/node_modules/eslint/lib/source-code/source-code.js +299 -85
  181. data/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js +3 -3
  182. data/node_modules/eslint/lib/source-code/token-store/cursors.js +4 -2
  183. data/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js +3 -3
  184. data/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js +3 -3
  185. data/node_modules/eslint/lib/source-code/token-store/index.js +2 -2
  186. data/node_modules/eslint/lib/unsupported-api.js +3 -5
  187. data/node_modules/eslint/messages/no-config-found.js +1 -1
  188. data/node_modules/eslint/messages/plugin-conflict.js +1 -1
  189. data/node_modules/eslint/messages/plugin-invalid.js +1 -1
  190. data/node_modules/eslint/messages/plugin-missing.js +1 -1
  191. data/node_modules/eslint/package.json +32 -29
  192. data/node_modules/eslint-scope/README.md +23 -2
  193. data/node_modules/eslint-scope/dist/eslint-scope.cjs +84 -58
  194. data/node_modules/eslint-scope/lib/index.js +0 -3
  195. data/node_modules/eslint-scope/lib/pattern-visitor.js +4 -3
  196. data/node_modules/eslint-scope/lib/referencer.js +13 -11
  197. data/node_modules/eslint-scope/lib/scope-manager.js +2 -8
  198. data/node_modules/eslint-scope/lib/scope.js +64 -43
  199. data/node_modules/eslint-scope/lib/version.js +1 -1
  200. data/node_modules/eslint-scope/package.json +21 -19
  201. data/node_modules/eslint-visitor-keys/README.md +1 -1
  202. data/node_modules/eslint-visitor-keys/package.json +2 -2
  203. data/node_modules/espree/README.md +1 -1
  204. data/node_modules/espree/dist/espree.cjs +1 -1
  205. data/node_modules/espree/lib/version.js +1 -1
  206. data/node_modules/espree/package.json +18 -20
  207. data/node_modules/file-entry-cache/LICENSE +1 -1
  208. data/node_modules/file-entry-cache/README.md +6 -3
  209. data/node_modules/file-entry-cache/package.json +19 -43
  210. data/node_modules/flat-cache/README.md +8 -6
  211. data/node_modules/flat-cache/changelog.md +155 -205
  212. data/node_modules/flat-cache/package.json +16 -39
  213. data/node_modules/flat-cache/src/cache.js +22 -26
  214. data/node_modules/flat-cache/src/del.js +28 -11
  215. data/node_modules/flat-cache/src/utils.js +39 -41
  216. data/node_modules/globals/globals.json +25 -0
  217. data/node_modules/globals/index.d.ts +2074 -3
  218. data/node_modules/globals/package.json +10 -7
  219. data/node_modules/globals/readme.md +2 -14
  220. data/node_modules/keyv/package.json +4 -4
  221. data/node_modules/keyv/src/index.js +6 -11
  222. data/node_modules/npm-check-updates/build/cli.js +22 -21
  223. data/node_modules/npm-check-updates/build/cli.js.map +1 -1
  224. data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +66 -0
  225. data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +1 -0
  226. data/node_modules/npm-check-updates/build/index-BmUFwMVL.js +6 -0
  227. data/node_modules/npm-check-updates/build/index-BmUFwMVL.js.map +1 -0
  228. data/node_modules/npm-check-updates/build/index.d.ts +5 -2
  229. data/node_modules/npm-check-updates/build/index.js +560 -1
  230. data/node_modules/npm-check-updates/build/index.js.map +1 -1
  231. data/node_modules/npm-check-updates/build/package.json +4 -3
  232. data/node_modules/npm-check-updates/build/src/index.js +1 -1
  233. data/node_modules/npm-check-updates/build/src/index.js.map +1 -1
  234. data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +2 -2
  235. data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +1 -1
  236. data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -6
  237. data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +1 -1
  238. data/node_modules/npm-check-updates/package.json +4 -3
  239. data/node_modules/type-fest/index.d.ts +95 -2
  240. data/node_modules/type-fest/package.json +12 -18
  241. data/node_modules/type-fest/readme.md +299 -52
  242. data/node_modules/type-fest/source/async-return-type.d.ts +4 -2
  243. data/node_modules/type-fest/source/asyncify.d.ts +5 -3
  244. data/node_modules/type-fest/source/basic.d.ts +21 -43
  245. data/node_modules/type-fest/{ts41 → source}/camel-case.d.ts +18 -17
  246. data/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
  247. data/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
  248. data/node_modules/type-fest/source/conditional-except.d.ts +6 -4
  249. data/node_modules/type-fest/source/conditional-keys.d.ts +5 -1
  250. data/node_modules/type-fest/source/conditional-pick.d.ts +5 -3
  251. data/node_modules/type-fest/{ts41 → source}/delimiter-case.d.ts +16 -8
  252. data/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
  253. data/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
  254. data/node_modules/type-fest/source/entries.d.ts +8 -3
  255. data/node_modules/type-fest/source/entry.d.ts +8 -3
  256. data/node_modules/type-fest/source/exact.d.ts +73 -0
  257. data/node_modules/type-fest/source/except.d.ts +38 -3
  258. data/node_modules/type-fest/source/fixed-length-array.d.ts +6 -1
  259. data/node_modules/type-fest/source/get.d.ts +184 -0
  260. data/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
  261. data/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
  262. data/node_modules/type-fest/source/includes.d.ts +22 -0
  263. data/node_modules/type-fest/source/internal.d.ts +59 -0
  264. data/node_modules/type-fest/source/invariant-of.d.ts +76 -0
  265. data/node_modules/type-fest/source/iterable-element.d.ts +8 -0
  266. data/node_modules/type-fest/source/join.d.ts +30 -0
  267. data/node_modules/type-fest/source/jsonify.d.ts +90 -0
  268. data/node_modules/type-fest/{ts41 → source}/kebab-case.d.ts +7 -5
  269. data/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
  270. data/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
  271. data/node_modules/type-fest/source/last-array-element.d.ts +28 -0
  272. data/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
  273. data/node_modules/type-fest/source/literal-union.d.ts +7 -5
  274. data/node_modules/type-fest/source/merge-exclusive.d.ts +3 -1
  275. data/node_modules/type-fest/source/merge.d.ts +8 -3
  276. data/node_modules/type-fest/source/multidimensional-array.d.ts +43 -0
  277. data/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
  278. data/node_modules/type-fest/source/mutable.d.ts +4 -21
  279. data/node_modules/type-fest/source/numeric.d.ts +170 -0
  280. data/node_modules/type-fest/source/observable-like.d.ts +62 -0
  281. data/node_modules/type-fest/source/opaque.d.ts +45 -3
  282. data/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
  283. data/node_modules/type-fest/source/package-json.d.ts +64 -12
  284. data/node_modules/type-fest/source/partial-deep.d.ts +57 -16
  285. data/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
  286. data/node_modules/type-fest/{ts41 → source}/pascal-case.d.ts +6 -4
  287. data/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
  288. data/node_modules/type-fest/source/pascal-cased-properties.d.ts +34 -0
  289. data/node_modules/type-fest/source/primitive.d.ts +13 -0
  290. data/node_modules/type-fest/source/promisable.d.ts +5 -3
  291. data/node_modules/type-fest/source/promise-value.d.ts +9 -7
  292. data/node_modules/type-fest/source/readonly-deep.d.ts +33 -7
  293. data/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
  294. data/node_modules/type-fest/source/remove-index-signature.d.ts +104 -0
  295. data/node_modules/type-fest/source/replace.d.ts +67 -0
  296. data/node_modules/type-fest/source/require-all-or-none.d.ts +36 -0
  297. data/node_modules/type-fest/source/require-at-least-one.d.ts +5 -3
  298. data/node_modules/type-fest/source/require-exactly-one.d.ts +4 -5
  299. data/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
  300. data/node_modules/type-fest/source/schema.d.ts +72 -0
  301. data/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
  302. data/node_modules/type-fest/source/set-non-nullable.d.ts +35 -0
  303. data/node_modules/type-fest/source/set-optional.d.ts +12 -11
  304. data/node_modules/type-fest/source/set-required.d.ts +12 -11
  305. data/node_modules/type-fest/source/set-return-type.d.ts +3 -1
  306. data/node_modules/type-fest/source/simplify.d.ts +83 -0
  307. data/node_modules/type-fest/{ts41 → source}/snake-case.d.ts +7 -4
  308. data/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
  309. data/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
  310. data/node_modules/type-fest/source/split.d.ts +29 -0
  311. data/node_modules/type-fest/source/spread.d.ts +85 -0
  312. data/node_modules/type-fest/source/string-key-of.d.ts +25 -0
  313. data/node_modules/type-fest/source/stringified.d.ts +3 -1
  314. data/node_modules/type-fest/source/trim.d.ts +25 -0
  315. data/node_modules/type-fest/source/tsconfig-json.d.ts +316 -14
  316. data/node_modules/type-fest/source/typed-array.d.ts +17 -0
  317. data/node_modules/type-fest/source/union-to-intersection.d.ts +4 -2
  318. data/node_modules/type-fest/source/value-of.d.ts +3 -1
  319. data/node_modules/type-fest/source/writable.d.ts +40 -0
  320. data/package.json +2 -2
  321. metadata +86 -63
  322. data/linters/rubocop-2.7.6.yml +0 -86
  323. data/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js +0 -66
  324. data/node_modules/@humanwhocodes/object-schema/tests/object-schema.js +0 -659
  325. data/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js +0 -186
  326. data/node_modules/eslint/conf/config-schema.js +0 -93
  327. data/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js +0 -60
  328. data/node_modules/eslint/lib/cli-engine/formatters/compact.js +0 -60
  329. data/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js +0 -41
  330. data/node_modules/eslint/lib/cli-engine/formatters/junit.js +0 -82
  331. data/node_modules/eslint/lib/cli-engine/formatters/tap.js +0 -95
  332. data/node_modules/eslint/lib/cli-engine/formatters/unix.js +0 -58
  333. data/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js +0 -63
  334. data/node_modules/eslint/lib/cli-engine/xml-escape.js +0 -34
  335. data/node_modules/eslint/lib/eslint/flat-eslint.js +0 -1155
  336. data/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +0 -1131
  337. data/node_modules/eslint/lib/rules/require-jsdoc.js +0 -122
  338. data/node_modules/eslint/lib/rules/utils/patterns/letters.js +0 -36
  339. data/node_modules/eslint/lib/rules/valid-jsdoc.js +0 -516
  340. data/node_modules/eslint/lib/shared/config-validator.js +0 -347
  341. data/node_modules/eslint/lib/shared/deprecation-warnings.js +0 -58
  342. data/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -50
  343. data/node_modules/file-entry-cache/changelog.md +0 -163
  344. data/node_modules/flat-cache/node_modules/rimraf/CHANGELOG.md +0 -65
  345. data/node_modules/flat-cache/node_modules/rimraf/LICENSE +0 -15
  346. data/node_modules/flat-cache/node_modules/rimraf/README.md +0 -101
  347. data/node_modules/flat-cache/node_modules/rimraf/bin.js +0 -68
  348. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/LICENSE +0 -21
  349. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/README.md +0 -378
  350. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/common.js +0 -238
  351. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/glob.js +0 -790
  352. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
  353. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -230
  354. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -947
  355. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  356. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  357. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  358. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  359. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -33
  360. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/package.json +0 -55
  361. data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/sync.js +0 -486
  362. data/node_modules/flat-cache/node_modules/rimraf/package.json +0 -32
  363. data/node_modules/flat-cache/node_modules/rimraf/rimraf.js +0 -360
  364. data/node_modules/npm-check-updates/build/index-CI_x-D21.js +0 -593
  365. data/node_modules/npm-check-updates/build/index-CI_x-D21.js.map +0 -1
  366. data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js +0 -6
  367. data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js.map +0 -1
  368. data/node_modules/npm-check-updates/build/index-DgVn3Gax.js +0 -36
  369. data/node_modules/npm-check-updates/build/index-DgVn3Gax.js.map +0 -1
  370. data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.d.ts +0 -6
  371. data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js +0 -3
  372. data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js.map +0 -1
  373. data/node_modules/type-fest/base.d.ts +0 -38
  374. data/node_modules/type-fest/license +0 -9
  375. data/node_modules/type-fest/source/utilities.d.ts +0 -3
  376. data/node_modules/type-fest/ts41/index.d.ts +0 -9
@@ -74,7 +74,7 @@ module.exports = {
74
74
  function normalizeOptionValue(option) {
75
75
  let consistent = false;
76
76
  let multiline = false;
77
- let minItems = 0;
77
+ let minItems;
78
78
 
79
79
  if (option) {
80
80
  if (option === "consistent") {
@@ -199,7 +199,7 @@ module.exports = {
199
199
  : sourceCode.getLastToken(node),
200
200
  penultimate = sourceCode.getTokenBefore(last),
201
201
  firstElement = node.elements[0],
202
- lastElement = node.elements[node.elements.length - 1];
202
+ lastElement = node.elements.at(-1);
203
203
 
204
204
  const openingBracketMustBeSpaced =
205
205
  options.objectsInArraysException && isObjectType(firstElement) ||
@@ -79,7 +79,7 @@ module.exports = {
79
79
  }
80
80
 
81
81
  // Defines a predicate to check whether or not a given reference is outside of valid scope.
82
- const scopeRange = stack[stack.length - 1];
82
+ const scopeRange = stack.at(-1);
83
83
 
84
84
  /**
85
85
  * Check if a reference is out of scope
@@ -147,7 +147,7 @@ module.exports = {
147
147
  if (closestBlock.type === "BlockStatement") {
148
148
 
149
149
  // find the last item in the block
150
- const lastItem = closestBlock.body[closestBlock.body.length - 1];
150
+ const lastItem = closestBlock.body.at(-1);
151
151
 
152
152
  // if the callback is the last thing in a block that might be ok
153
153
  if (isCallbackExpression(node, lastItem)) {
@@ -168,7 +168,7 @@ module.exports = {
168
168
  if (lastItem.type === "ReturnStatement") {
169
169
 
170
170
  // but only if the callback is immediately before
171
- if (isCallbackExpression(node, closestBlock.body[closestBlock.body.length - 2])) {
171
+ if (isCallbackExpression(node, closestBlock.body.at(-2))) {
172
172
  return;
173
173
  }
174
174
  }
@@ -47,11 +47,9 @@ module.exports = {
47
47
  },
48
48
  allow: {
49
49
  type: "array",
50
- items: [
51
- {
52
- type: "string"
53
- }
54
- ],
50
+ items: {
51
+ type: "string"
52
+ },
55
53
  minItems: 0,
56
54
  uniqueItems: true
57
55
  }
@@ -8,7 +8,6 @@
8
8
  // Requirements
9
9
  //------------------------------------------------------------------------------
10
10
 
11
- const LETTER_PATTERN = require("./utils/patterns/letters");
12
11
  const astUtils = require("./utils/ast-utils");
13
12
 
14
13
  //------------------------------------------------------------------------------
@@ -17,7 +16,8 @@ const astUtils = require("./utils/ast-utils");
17
16
 
18
17
  const DEFAULT_IGNORE_PATTERN = astUtils.COMMENTS_IGNORE_PATTERN,
19
18
  WHITESPACE = /\s/gu,
20
- MAYBE_URL = /^\s*[^:/?#\s]+:\/\/[^?#]/u; // TODO: Combine w/ max-len pattern?
19
+ MAYBE_URL = /^\s*[^:/?#\s]+:\/\/[^?#]/u, // TODO: Combine w/ max-len pattern?
20
+ LETTER_PATTERN = /\p{L}/u;
21
21
 
22
22
  /*
23
23
  * Base schema body for defining the basic capitalization rule, ignorePattern,
@@ -233,7 +233,8 @@ module.exports = {
233
233
  return true;
234
234
  }
235
235
 
236
- const firstWordChar = commentWordCharsOnly[0];
236
+ // Get the first Unicode character (1 or 2 code units).
237
+ const [firstWordChar] = commentWordCharsOnly;
237
238
 
238
239
  if (!LETTER_PATTERN.test(firstWordChar)) {
239
240
  return true;
@@ -273,12 +274,14 @@ module.exports = {
273
274
  messageId,
274
275
  fix(fixer) {
275
276
  const match = comment.value.match(LETTER_PATTERN);
277
+ const char = match[0];
276
278
 
277
- return fixer.replaceTextRange(
279
+ // Offset match.index by 2 to account for the first 2 characters that start the comment (// or /*)
280
+ const charIndex = comment.range[0] + match.index + 2;
278
281
 
279
- // Offset match.index by 2 to account for the first 2 characters that start the comment (// or /*)
280
- [comment.range[0] + match.index + 2, comment.range[0] + match.index + 3],
281
- capitalize === "always" ? match[0].toLocaleUpperCase() : match[0].toLocaleLowerCase()
282
+ return fixer.replaceTextRange(
283
+ [charIndex, charIndex + char.length],
284
+ capitalize === "always" ? char.toLocaleUpperCase() : char.toLocaleLowerCase()
282
285
  );
283
286
  }
284
287
  });
@@ -154,7 +154,7 @@ module.exports = {
154
154
  * @returns {any} The last element
155
155
  */
156
156
  function last(array) {
157
- return array[array.length - 1];
157
+ return array.at(-1);
158
158
  }
159
159
 
160
160
  switch (node.type) {
@@ -66,7 +66,7 @@ module.exports = {
66
66
  NewExpression: true
67
67
  };
68
68
 
69
- if (context.options.length === 2 && Object.prototype.hasOwnProperty.call(context.options[1], "exceptions")) {
69
+ if (context.options.length === 2 && Object.hasOwn(context.options[1], "exceptions")) {
70
70
  const keys = Object.keys(context.options[1].exceptions);
71
71
 
72
72
  for (let i = 0; i < keys.length; i++) {
@@ -218,7 +218,7 @@ module.exports = {
218
218
 
219
219
  previousItemToken = tokenAfterItem
220
220
  ? sourceCode.getTokenBefore(tokenAfterItem)
221
- : sourceCode.ast.tokens[sourceCode.ast.tokens.length - 1];
221
+ : sourceCode.ast.tokens.at(-1);
222
222
  } else {
223
223
  previousItemToken = currentItemToken;
224
224
  }
@@ -64,7 +64,7 @@ module.exports = {
64
64
 
65
65
  if (
66
66
  typeof option === "object" &&
67
- (Object.prototype.hasOwnProperty.call(option, "maximum") || Object.prototype.hasOwnProperty.call(option, "max"))
67
+ (Object.hasOwn(option, "maximum") || Object.hasOwn(option, "max"))
68
68
  ) {
69
69
  THRESHOLD = option.maximum || option.max;
70
70
  } else if (typeof option === "number") {
@@ -109,6 +109,7 @@ module.exports = {
109
109
  IfStatement: increaseComplexity,
110
110
  WhileStatement: increaseComplexity,
111
111
  DoWhileStatement: increaseComplexity,
112
+ AssignmentPattern: increaseComplexity,
112
113
 
113
114
  // Avoid `default`
114
115
  "SwitchCase[test]": increaseComplexity,
@@ -120,6 +121,18 @@ module.exports = {
120
121
  }
121
122
  },
122
123
 
124
+ MemberExpression(node) {
125
+ if (node.optional === true) {
126
+ increaseComplexity();
127
+ }
128
+ },
129
+
130
+ CallExpression(node) {
131
+ if (node.optional === true) {
132
+ increaseComplexity();
133
+ }
134
+ },
135
+
123
136
  onCodePathEnd(codePath, node) {
124
137
  const complexity = complexities.pop();
125
138
 
@@ -9,22 +9,6 @@
9
9
  // Helpers
10
10
  //------------------------------------------------------------------------------
11
11
 
12
- /**
13
- * Checks all segments in a set and returns true if any are reachable.
14
- * @param {Set<CodePathSegment>} segments The segments to check.
15
- * @returns {boolean} True if any segment is reachable; false otherwise.
16
- */
17
- function isAnySegmentReachable(segments) {
18
-
19
- for (const segment of segments) {
20
- if (segment.reachable) {
21
- return true;
22
- }
23
- }
24
-
25
- return false;
26
- }
27
-
28
12
  /**
29
13
  * Checks whether or not a given node is a constructor.
30
14
  * @param {ASTNode} node A node to check. This node type is one of
@@ -109,7 +93,7 @@ function isPossibleConstructor(node) {
109
93
  );
110
94
 
111
95
  case "SequenceExpression": {
112
- const lastExpression = node.expressions[node.expressions.length - 1];
96
+ const lastExpression = node.expressions.at(-1);
113
97
 
114
98
  return isPossibleConstructor(lastExpression);
115
99
  }
@@ -119,6 +103,30 @@ function isPossibleConstructor(node) {
119
103
  }
120
104
  }
121
105
 
106
+ /**
107
+ * A class to store information about a code path segment.
108
+ */
109
+ class SegmentInfo {
110
+
111
+ /**
112
+ * Indicates if super() is called in all code paths.
113
+ * @type {boolean}
114
+ */
115
+ calledInEveryPaths = false;
116
+
117
+ /**
118
+ * Indicates if super() is called in any code paths.
119
+ * @type {boolean}
120
+ */
121
+ calledInSomePaths = false;
122
+
123
+ /**
124
+ * The nodes which have been validated and don't need to be reconsidered.
125
+ * @type {ASTNode[]}
126
+ */
127
+ validNodes = [];
128
+ }
129
+
122
130
  //------------------------------------------------------------------------------
123
131
  // Rule Definition
124
132
  //------------------------------------------------------------------------------
@@ -141,8 +149,7 @@ module.exports = {
141
149
  missingAll: "Expected to call 'super()'.",
142
150
 
143
151
  duplicate: "Unexpected duplicate 'super()'.",
144
- badSuper: "Unexpected 'super()' because 'super' is not a constructor.",
145
- unexpected: "Unexpected 'super()'."
152
+ badSuper: "Unexpected 'super()' because 'super' is not a constructor."
146
153
  }
147
154
  },
148
155
 
@@ -159,14 +166,10 @@ module.exports = {
159
166
  */
160
167
  let funcInfo = null;
161
168
 
162
- /*
163
- * {Map<string, {calledInSomePaths: boolean, calledInEveryPaths: boolean}>}
164
- * Information for each code path segment.
165
- * - calledInSomePaths: A flag of be called `super()` in some code paths.
166
- * - calledInEveryPaths: A flag of be called `super()` in all code paths.
167
- * - validNodes:
169
+ /**
170
+ * @type {Record<string, SegmentInfo>}
168
171
  */
169
- let segInfoMap = Object.create(null);
172
+ const segInfoMap = Object.create(null);
170
173
 
171
174
  /**
172
175
  * Gets the flag which shows `super()` is called in some paths.
@@ -177,23 +180,21 @@ module.exports = {
177
180
  return segment.reachable && segInfoMap[segment.id].calledInSomePaths;
178
181
  }
179
182
 
183
+ /**
184
+ * Determines if a segment has been seen in the traversal.
185
+ * @param {CodePathSegment} segment A code path segment to check.
186
+ * @returns {boolean} `true` if the segment has been seen.
187
+ */
188
+ function hasSegmentBeenSeen(segment) {
189
+ return !!segInfoMap[segment.id];
190
+ }
191
+
180
192
  /**
181
193
  * Gets the flag which shows `super()` is called in all paths.
182
194
  * @param {CodePathSegment} segment A code path segment to get.
183
195
  * @returns {boolean} The flag which shows `super()` is called in all paths.
184
196
  */
185
197
  function isCalledInEveryPath(segment) {
186
-
187
- /*
188
- * If specific segment is the looped segment of the current segment,
189
- * skip the segment.
190
- * If not skipped, this never becomes true after a loop.
191
- */
192
- if (segment.nextSegments.length === 1 &&
193
- segment.nextSegments[0].isLoopedPrevSegment(segment)
194
- ) {
195
- return true;
196
- }
197
198
  return segment.reachable && segInfoMap[segment.id].calledInEveryPaths;
198
199
  }
199
200
 
@@ -250,9 +251,9 @@ module.exports = {
250
251
  }
251
252
 
252
253
  // Reports if `super()` lacked.
253
- const segments = codePath.returnedSegments;
254
- const calledInEveryPaths = segments.every(isCalledInEveryPath);
255
- const calledInSomePaths = segments.some(isCalledInSomePath);
254
+ const returnedSegments = codePath.returnedSegments;
255
+ const calledInEveryPaths = returnedSegments.every(isCalledInEveryPath);
256
+ const calledInSomePaths = returnedSegments.some(isCalledInSomePath);
256
257
 
257
258
  if (!calledInEveryPaths) {
258
259
  context.report({
@@ -267,29 +268,37 @@ module.exports = {
267
268
  /**
268
269
  * Initialize information of a given code path segment.
269
270
  * @param {CodePathSegment} segment A code path segment to initialize.
271
+ * @param {CodePathSegment} node Node that starts the segment.
270
272
  * @returns {void}
271
273
  */
272
- onCodePathSegmentStart(segment) {
274
+ onCodePathSegmentStart(segment, node) {
273
275
 
274
276
  funcInfo.currentSegments.add(segment);
275
277
 
276
- if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
278
+ if (!(funcInfo.isConstructor && funcInfo.hasExtends)) {
277
279
  return;
278
280
  }
279
281
 
280
282
  // Initialize info.
281
- const info = segInfoMap[segment.id] = {
282
- calledInSomePaths: false,
283
- calledInEveryPaths: false,
284
- validNodes: []
285
- };
283
+ const info = segInfoMap[segment.id] = new SegmentInfo();
284
+
285
+ const seenPrevSegments = segment.prevSegments.filter(hasSegmentBeenSeen);
286
286
 
287
287
  // When there are previous segments, aggregates these.
288
- const prevSegments = segment.prevSegments;
288
+ if (seenPrevSegments.length > 0) {
289
+ info.calledInSomePaths = seenPrevSegments.some(isCalledInSomePath);
290
+ info.calledInEveryPaths = seenPrevSegments.every(isCalledInEveryPath);
291
+ }
289
292
 
290
- if (prevSegments.length > 0) {
291
- info.calledInSomePaths = prevSegments.some(isCalledInSomePath);
292
- info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath);
293
+ /*
294
+ * ForStatement > *.update segments are a special case as they are created in advance,
295
+ * without seen previous segments. Since they logically don't affect `calledInEveryPaths`
296
+ * calculations, and they can never be a lone previous segment of another one, we'll set
297
+ * their `calledInEveryPaths` to `true` to effectively ignore them in those calculations.
298
+ * .
299
+ */
300
+ if (node.parent && node.parent.type === "ForStatement" && node.parent.update === node) {
301
+ info.calledInEveryPaths = true;
293
302
  }
294
303
  },
295
304
 
@@ -316,25 +325,30 @@ module.exports = {
316
325
  * @returns {void}
317
326
  */
318
327
  onCodePathSegmentLoop(fromSegment, toSegment) {
319
- if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
328
+ if (!(funcInfo.isConstructor && funcInfo.hasExtends)) {
320
329
  return;
321
330
  }
322
331
 
323
- // Update information inside of the loop.
324
- const isRealLoop = toSegment.prevSegments.length >= 2;
325
-
326
332
  funcInfo.codePath.traverseSegments(
327
333
  { first: toSegment, last: fromSegment },
328
- segment => {
334
+ (segment, controller) => {
329
335
  const info = segInfoMap[segment.id];
330
- const prevSegments = segment.prevSegments;
331
336
 
332
- // Updates flags.
333
- info.calledInSomePaths = prevSegments.some(isCalledInSomePath);
334
- info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath);
337
+ // skip segments after the loop
338
+ if (!info) {
339
+ controller.skip();
340
+ return;
341
+ }
342
+
343
+ const seenPrevSegments = segment.prevSegments.filter(hasSegmentBeenSeen);
344
+ const calledInSomePreviousPaths = seenPrevSegments.some(isCalledInSomePath);
345
+ const calledInEveryPreviousPaths = seenPrevSegments.every(isCalledInEveryPath);
346
+
347
+ info.calledInSomePaths ||= calledInSomePreviousPaths;
348
+ info.calledInEveryPaths ||= calledInEveryPreviousPaths;
335
349
 
336
350
  // If flags become true anew, reports the valid nodes.
337
- if (info.calledInSomePaths || isRealLoop) {
351
+ if (calledInSomePreviousPaths) {
338
352
  const nodes = info.validNodes;
339
353
 
340
354
  info.validNodes = [];
@@ -358,7 +372,7 @@ module.exports = {
358
372
  * @returns {void}
359
373
  */
360
374
  "CallExpression:exit"(node) {
361
- if (!(funcInfo && funcInfo.isConstructor)) {
375
+ if (!(funcInfo.isConstructor && funcInfo.hasExtends)) {
362
376
  return;
363
377
  }
364
378
 
@@ -368,41 +382,34 @@ module.exports = {
368
382
  }
369
383
 
370
384
  // Reports if needed.
371
- if (funcInfo.hasExtends) {
372
- const segments = funcInfo.currentSegments;
373
- let duplicate = false;
374
- let info = null;
385
+ const segments = funcInfo.currentSegments;
386
+ let duplicate = false;
387
+ let info = null;
375
388
 
376
- for (const segment of segments) {
389
+ for (const segment of segments) {
377
390
 
378
- if (segment.reachable) {
379
- info = segInfoMap[segment.id];
391
+ if (segment.reachable) {
392
+ info = segInfoMap[segment.id];
380
393
 
381
- duplicate = duplicate || info.calledInSomePaths;
382
- info.calledInSomePaths = info.calledInEveryPaths = true;
383
- }
394
+ duplicate = duplicate || info.calledInSomePaths;
395
+ info.calledInSomePaths = info.calledInEveryPaths = true;
384
396
  }
397
+ }
385
398
 
386
- if (info) {
387
- if (duplicate) {
388
- context.report({
389
- messageId: "duplicate",
390
- node
391
- });
392
- } else if (!funcInfo.superIsConstructor) {
393
- context.report({
394
- messageId: "badSuper",
395
- node
396
- });
397
- } else {
398
- info.validNodes.push(node);
399
- }
399
+ if (info) {
400
+ if (duplicate) {
401
+ context.report({
402
+ messageId: "duplicate",
403
+ node
404
+ });
405
+ } else if (!funcInfo.superIsConstructor) {
406
+ context.report({
407
+ messageId: "badSuper",
408
+ node
409
+ });
410
+ } else {
411
+ info.validNodes.push(node);
400
412
  }
401
- } else if (isAnySegmentReachable(funcInfo.currentSegments)) {
402
- context.report({
403
- messageId: "unexpected",
404
- node
405
- });
406
413
  }
407
414
  },
408
415
 
@@ -412,7 +419,7 @@ module.exports = {
412
419
  * @returns {void}
413
420
  */
414
421
  ReturnStatement(node) {
415
- if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) {
422
+ if (!(funcInfo.isConstructor && funcInfo.hasExtends)) {
416
423
  return;
417
424
  }
418
425
 
@@ -432,14 +439,6 @@ module.exports = {
432
439
  info.calledInSomePaths = info.calledInEveryPaths = true;
433
440
  }
434
441
  }
435
- },
436
-
437
- /**
438
- * Resets state.
439
- * @returns {void}
440
- */
441
- "Program:exit"() {
442
- segInfoMap = Object.create(null);
443
442
  }
444
443
  };
445
444
  }
@@ -54,7 +54,7 @@ module.exports = {
54
54
  * @returns {any} Last element
55
55
  */
56
56
  function last(collection) {
57
- return collection[collection.length - 1];
57
+ return collection.at(-1);
58
58
  }
59
59
 
60
60
  //--------------------------------------------------------------------------
@@ -45,7 +45,7 @@ module.exports = {
45
45
  Program: function checkBadEOF(node) {
46
46
  const sourceCode = context.sourceCode,
47
47
  src = sourceCode.getText(),
48
- lastLine = sourceCode.lines[sourceCode.lines.length - 1],
48
+ lastLine = sourceCode.lines.at(-1),
49
49
  location = {
50
50
  column: lastLine.length,
51
51
  line: sourceCode.lines.length
@@ -89,7 +89,7 @@ module.exports = {
89
89
  });
90
90
  } else if (mode === "never" && endsWithNewline) {
91
91
 
92
- const secondLastLine = sourceCode.lines[sourceCode.lines.length - 2];
92
+ const secondLastLine = sourceCode.lines.at(-2);
93
93
 
94
94
  // File is newline-terminated, but shouldn't be
95
95
  context.report({
@@ -218,7 +218,7 @@ module.exports = {
218
218
  case "FunctionExpression": {
219
219
  const leftParen = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
220
220
  const rightParen = node.params.length
221
- ? sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isClosingParenToken)
221
+ ? sourceCode.getTokenAfter(node.params.at(-1), astUtils.isClosingParenToken)
222
222
  : sourceCode.getTokenAfter(leftParen);
223
223
 
224
224
  return { leftParen, rightParen };
@@ -234,7 +234,7 @@ module.exports = {
234
234
  }
235
235
 
236
236
  const rightParen = node.params.length
237
- ? sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isClosingParenToken)
237
+ ? sourceCode.getTokenAfter(node.params.at(-1), astUtils.isClosingParenToken)
238
238
  : sourceCode.getTokenAfter(firstToken);
239
239
 
240
240
  return {
@@ -789,7 +789,7 @@ module.exports = {
789
789
  if (elements.length > 0) {
790
790
 
791
791
  // Skip last block line check if last item in same line
792
- if (elements[elements.length - 1].loc.end.line === node.loc.end.line) {
792
+ if (elements.at(-1).loc.end.line === node.loc.end.line) {
793
793
  return;
794
794
  }
795
795
  }
@@ -830,7 +830,7 @@ module.exports = {
830
830
  }
831
831
 
832
832
  let indent;
833
- let nodesToCheck = [];
833
+ let nodesToCheck;
834
834
 
835
835
  /*
836
836
  * For this statements we should check indent from statement beginning,
@@ -873,7 +873,7 @@ module.exports = {
873
873
  */
874
874
  function filterOutSameLineVars(node) {
875
875
  return node.declarations.reduce((finalCollection, elem) => {
876
- const lastElem = finalCollection[finalCollection.length - 1];
876
+ const lastElem = finalCollection.at(-1);
877
877
 
878
878
  if ((elem.loc.start.line !== node.loc.start.line && !lastElem) ||
879
879
  (lastElem && lastElem.loc.start.line !== elem.loc.start.line)) {
@@ -892,7 +892,7 @@ module.exports = {
892
892
  function checkIndentInVariableDeclarations(node) {
893
893
  const elements = filterOutSameLineVars(node);
894
894
  const nodeIndent = getNodeIndent(node).goodChar;
895
- const lastElement = elements[elements.length - 1];
895
+ const lastElement = elements.at(-1);
896
896
 
897
897
  const elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind];
898
898
 
@@ -999,7 +999,7 @@ module.exports = {
999
999
  },
1000
1000
 
1001
1001
  VariableDeclaration(node) {
1002
- if (node.declarations[node.declarations.length - 1].loc.start.line > node.declarations[0].loc.start.line) {
1002
+ if (node.declarations.at(-1).loc.start.line > node.declarations[0].loc.start.line) {
1003
1003
  checkIndentInVariableDeclarations(node);
1004
1004
  }
1005
1005
  },
@@ -1077,7 +1077,7 @@ module.exports = {
1077
1077
  "ObjectExpression, ObjectPattern"(node) {
1078
1078
  const openingCurly = sourceCode.getFirstToken(node);
1079
1079
  const closingCurly = sourceCode.getTokenAfter(
1080
- node.properties.length ? node.properties[node.properties.length - 1] : openingCurly,
1080
+ node.properties.length ? node.properties.at(-1) : openingCurly,
1081
1081
  astUtils.isClosingBraceToken
1082
1082
  );
1083
1083
 
@@ -1407,7 +1407,7 @@ module.exports = {
1407
1407
  PropertyDefinition(node) {
1408
1408
  const firstToken = sourceCode.getFirstToken(node);
1409
1409
  const maybeSemicolonToken = sourceCode.getLastToken(node);
1410
- let keyLastToken = null;
1410
+ let keyLastToken;
1411
1411
 
1412
1412
  // Indent key.
1413
1413
  if (node.computed) {
@@ -1458,7 +1458,7 @@ module.exports = {
1458
1458
 
1459
1459
  if (node.cases.length) {
1460
1460
  sourceCode.getTokensBetween(
1461
- node.cases[node.cases.length - 1],
1461
+ node.cases.at(-1),
1462
1462
  closingCurly,
1463
1463
  { includeComments: true, filter: astUtils.isCommentToken }
1464
1464
  ).forEach(token => offsets.ignoreToken(token));
@@ -1488,7 +1488,7 @@ module.exports = {
1488
1488
  },
1489
1489
 
1490
1490
  VariableDeclaration(node) {
1491
- let variableIndent = Object.prototype.hasOwnProperty.call(options.VariableDeclarator, node.kind)
1491
+ let variableIndent = Object.hasOwn(options.VariableDeclarator, node.kind)
1492
1492
  ? options.VariableDeclarator[node.kind]
1493
1493
  : DEFAULT_VARIABLE_INDENT;
1494
1494
 
@@ -1509,7 +1509,7 @@ module.exports = {
1509
1509
  variableIndent = DEFAULT_VARIABLE_INDENT;
1510
1510
  }
1511
1511
 
1512
- if (node.declarations[node.declarations.length - 1].loc.start.line > node.loc.start.line) {
1512
+ if (node.declarations.at(-1).loc.start.line > node.loc.start.line) {
1513
1513
 
1514
1514
  /*
1515
1515
  * VariableDeclarator indentation is a bit different from other forms of indentation, in that the
@@ -229,6 +229,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({
229
229
  "no-unused-private-class-members": () => require("./no-unused-private-class-members"),
230
230
  "no-unused-vars": () => require("./no-unused-vars"),
231
231
  "no-use-before-define": () => require("./no-use-before-define"),
232
+ "no-useless-assignment": () => require("./no-useless-assignment"),
232
233
  "no-useless-backreference": () => require("./no-useless-backreference"),
233
234
  "no-useless-call": () => require("./no-useless-call"),
234
235
  "no-useless-catch": () => require("./no-useless-catch"),
@@ -273,7 +274,6 @@ module.exports = new LazyLoadingRuleMap(Object.entries({
273
274
  radix: () => require("./radix"),
274
275
  "require-atomic-updates": () => require("./require-atomic-updates"),
275
276
  "require-await": () => require("./require-await"),
276
- "require-jsdoc": () => require("./require-jsdoc"),
277
277
  "require-unicode-regexp": () => require("./require-unicode-regexp"),
278
278
  "require-yield": () => require("./require-yield"),
279
279
  "rest-spread-spacing": () => require("./rest-spread-spacing"),
@@ -296,7 +296,6 @@ module.exports = new LazyLoadingRuleMap(Object.entries({
296
296
  "template-tag-spacing": () => require("./template-tag-spacing"),
297
297
  "unicode-bom": () => require("./unicode-bom"),
298
298
  "use-isnan": () => require("./use-isnan"),
299
- "valid-jsdoc": () => require("./valid-jsdoc"),
300
299
  "valid-typeof": () => require("./valid-typeof"),
301
300
  "vars-on-top": () => require("./vars-on-top"),
302
301
  "wrap-iife": () => require("./wrap-iife"),