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.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/node_modules/@eslint/eslintrc/README.md +15 -4
- data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +57 -18
- data/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -1
- data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +60 -34
- data/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -1
- data/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +3 -16
- data/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +63 -18
- data/node_modules/@eslint/eslintrc/package.json +4 -4
- data/node_modules/@eslint/js/package.json +2 -2
- data/node_modules/@eslint/js/src/configs/eslint-all.js +9 -1
- data/node_modules/@eslint/js/src/configs/eslint-recommended.js +12 -5
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +201 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md +105 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +384 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +27 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +65 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js +315 -0
- data/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json +74 -0
- data/node_modules/@humanwhocodes/config-array/api.js +114 -16
- data/node_modules/@humanwhocodes/config-array/package.json +5 -3
- data/node_modules/@humanwhocodes/object-schema/CHANGELOG.md +7 -0
- data/node_modules/@humanwhocodes/object-schema/package.json +6 -1
- data/node_modules/@humanwhocodes/retry/LICENSE +201 -0
- data/node_modules/@humanwhocodes/retry/README.md +122 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.cjs +267 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.d.ts +24 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.js +265 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.min.js +1 -0
- data/node_modules/@humanwhocodes/retry/dist/retrier.mjs +265 -0
- data/node_modules/@humanwhocodes/retry/package.json +74 -0
- data/node_modules/@types/semver-utils/LICENSE +21 -0
- data/node_modules/@types/semver-utils/README.md +34 -0
- data/node_modules/@types/semver-utils/index.d.ts +15 -0
- data/node_modules/@types/semver-utils/package.json +25 -0
- data/node_modules/acorn/CHANGELOG.md +36 -0
- data/node_modules/acorn/README.md +8 -3
- data/node_modules/acorn/dist/acorn.d.mts +857 -26
- data/node_modules/acorn/dist/acorn.d.ts +833 -268
- data/node_modules/acorn/dist/acorn.js +33 -21
- data/node_modules/acorn/dist/acorn.mjs +33 -21
- data/node_modules/acorn/package.json +1 -1
- data/node_modules/cacheable-request/node_modules/keyv/README.md +429 -0
- data/node_modules/cacheable-request/node_modules/keyv/package.json +57 -0
- data/node_modules/cacheable-request/node_modules/keyv/src/index.d.ts +112 -0
- data/node_modules/cacheable-request/node_modules/keyv/src/index.js +264 -0
- data/node_modules/doctrine/CHANGELOG.md +0 -7
- data/node_modules/doctrine/lib/doctrine.js +1 -0
- data/node_modules/doctrine/package.json +8 -9
- data/node_modules/eslint/README.md +31 -28
- data/node_modules/eslint/bin/eslint.js +4 -3
- data/node_modules/eslint/conf/ecma-version.js +16 -0
- data/node_modules/eslint/conf/globals.js +1 -0
- data/node_modules/eslint/conf/rule-type-list.json +3 -1
- data/node_modules/eslint/lib/api.js +7 -11
- data/node_modules/eslint/lib/cli-engine/cli-engine.js +14 -3
- data/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +1 -29
- data/node_modules/eslint/lib/cli-engine/lint-result-cache.js +2 -2
- data/node_modules/eslint/lib/cli.js +115 -36
- data/node_modules/eslint/lib/config/default-config.js +3 -0
- data/node_modules/eslint/lib/config/flat-config-array.js +110 -24
- data/node_modules/eslint/lib/config/flat-config-helpers.js +41 -20
- data/node_modules/eslint/lib/config/flat-config-schema.js +1 -7
- data/node_modules/eslint/lib/config/rule-validator.js +42 -6
- data/node_modules/eslint/lib/eslint/eslint-helpers.js +116 -58
- data/node_modules/eslint/lib/eslint/eslint.js +892 -377
- data/node_modules/eslint/lib/eslint/index.js +2 -2
- data/node_modules/eslint/lib/eslint/legacy-eslint.js +728 -0
- data/node_modules/eslint/lib/linter/apply-disable-directives.js +59 -31
- data/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +0 -1
- data/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +32 -30
- data/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +1 -1
- data/node_modules/eslint/lib/linter/config-comment-parser.js +8 -11
- data/node_modules/eslint/lib/linter/index.js +1 -3
- data/node_modules/eslint/lib/linter/interpolate.js +24 -2
- data/node_modules/eslint/lib/linter/linter.js +428 -207
- data/node_modules/eslint/lib/linter/report-translator.js +3 -3
- data/node_modules/eslint/lib/linter/rules.js +6 -15
- data/node_modules/eslint/lib/linter/source-code-fixer.js +1 -1
- data/node_modules/eslint/lib/linter/timing.js +16 -8
- data/node_modules/eslint/lib/options.js +35 -3
- data/node_modules/eslint/lib/rule-tester/index.js +3 -1
- data/node_modules/eslint/lib/rule-tester/rule-tester.js +424 -347
- data/node_modules/eslint/lib/rules/array-bracket-newline.js +1 -1
- data/node_modules/eslint/lib/rules/array-bracket-spacing.js +1 -1
- data/node_modules/eslint/lib/rules/block-scoped-var.js +1 -1
- data/node_modules/eslint/lib/rules/callback-return.js +2 -2
- data/node_modules/eslint/lib/rules/camelcase.js +3 -5
- data/node_modules/eslint/lib/rules/capitalized-comments.js +10 -7
- data/node_modules/eslint/lib/rules/comma-dangle.js +1 -1
- data/node_modules/eslint/lib/rules/comma-style.js +2 -2
- data/node_modules/eslint/lib/rules/complexity.js +14 -1
- data/node_modules/eslint/lib/rules/constructor-super.js +99 -100
- data/node_modules/eslint/lib/rules/default-case.js +1 -1
- data/node_modules/eslint/lib/rules/eol-last.js +2 -2
- data/node_modules/eslint/lib/rules/function-paren-newline.js +2 -2
- data/node_modules/eslint/lib/rules/indent-legacy.js +5 -5
- data/node_modules/eslint/lib/rules/indent.js +5 -5
- data/node_modules/eslint/lib/rules/index.js +1 -2
- data/node_modules/eslint/lib/rules/key-spacing.js +2 -2
- data/node_modules/eslint/lib/rules/line-comment-position.js +1 -1
- data/node_modules/eslint/lib/rules/lines-around-directive.js +2 -2
- data/node_modules/eslint/lib/rules/max-depth.js +1 -1
- data/node_modules/eslint/lib/rules/max-len.js +3 -3
- data/node_modules/eslint/lib/rules/max-lines.js +3 -3
- data/node_modules/eslint/lib/rules/max-nested-callbacks.js +1 -1
- data/node_modules/eslint/lib/rules/max-params.js +1 -1
- data/node_modules/eslint/lib/rules/max-statements.js +1 -1
- data/node_modules/eslint/lib/rules/multiline-comment-style.js +7 -7
- data/node_modules/eslint/lib/rules/new-cap.js +1 -1
- data/node_modules/eslint/lib/rules/newline-after-var.js +1 -1
- data/node_modules/eslint/lib/rules/newline-before-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-case-declarations.js +13 -1
- data/node_modules/eslint/lib/rules/no-constant-binary-expression.js +7 -8
- data/node_modules/eslint/lib/rules/no-constant-condition.js +18 -7
- data/node_modules/eslint/lib/rules/no-constructor-return.js +2 -2
- data/node_modules/eslint/lib/rules/no-dupe-class-members.js +2 -2
- data/node_modules/eslint/lib/rules/no-else-return.js +1 -1
- data/node_modules/eslint/lib/rules/no-empty-function.js +2 -2
- data/node_modules/eslint/lib/rules/no-empty-static-block.js +1 -1
- data/node_modules/eslint/lib/rules/no-extend-native.js +1 -2
- data/node_modules/eslint/lib/rules/no-extra-semi.js +1 -1
- data/node_modules/eslint/lib/rules/no-fallthrough.js +41 -16
- data/node_modules/eslint/lib/rules/no-implicit-coercion.js +66 -24
- data/node_modules/eslint/lib/rules/no-inner-declarations.js +23 -2
- data/node_modules/eslint/lib/rules/no-invalid-regexp.js +1 -1
- data/node_modules/eslint/lib/rules/no-invalid-this.js +1 -1
- data/node_modules/eslint/lib/rules/no-lone-blocks.js +3 -3
- data/node_modules/eslint/lib/rules/no-loss-of-precision.js +1 -1
- data/node_modules/eslint/lib/rules/no-misleading-character-class.js +225 -69
- data/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +1 -1
- data/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +1 -1
- data/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +1 -1
- data/node_modules/eslint/lib/rules/no-new-symbol.js +8 -1
- data/node_modules/eslint/lib/rules/no-restricted-globals.js +1 -1
- data/node_modules/eslint/lib/rules/no-restricted-imports.js +186 -40
- data/node_modules/eslint/lib/rules/no-restricted-modules.js +2 -2
- data/node_modules/eslint/lib/rules/no-return-await.js +1 -1
- data/node_modules/eslint/lib/rules/no-sequences.js +1 -0
- data/node_modules/eslint/lib/rules/no-this-before-super.js +45 -13
- data/node_modules/eslint/lib/rules/no-trailing-spaces.js +2 -3
- data/node_modules/eslint/lib/rules/no-unneeded-ternary.js +1 -1
- data/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +1 -1
- data/node_modules/eslint/lib/rules/no-unused-private-class-members.js +1 -1
- data/node_modules/eslint/lib/rules/no-unused-vars.js +197 -36
- data/node_modules/eslint/lib/rules/no-useless-assignment.js +566 -0
- data/node_modules/eslint/lib/rules/no-useless-backreference.js +1 -1
- data/node_modules/eslint/lib/rules/no-useless-computed-key.js +2 -2
- data/node_modules/eslint/lib/rules/no-useless-return.js +7 -2
- data/node_modules/eslint/lib/rules/object-curly-spacing.js +3 -3
- data/node_modules/eslint/lib/rules/object-property-newline.js +1 -1
- data/node_modules/eslint/lib/rules/one-var.js +5 -5
- data/node_modules/eslint/lib/rules/padded-blocks.js +7 -7
- data/node_modules/eslint/lib/rules/prefer-arrow-callback.js +3 -3
- data/node_modules/eslint/lib/rules/prefer-reflect.js +1 -1
- data/node_modules/eslint/lib/rules/prefer-regex-literals.js +1 -1
- data/node_modules/eslint/lib/rules/prefer-template.js +1 -1
- data/node_modules/eslint/lib/rules/radix.js +2 -2
- data/node_modules/eslint/lib/rules/semi-style.js +1 -1
- data/node_modules/eslint/lib/rules/sort-imports.js +1 -1
- data/node_modules/eslint/lib/rules/sort-keys.js +1 -1
- data/node_modules/eslint/lib/rules/sort-vars.js +1 -1
- data/node_modules/eslint/lib/rules/space-unary-ops.js +1 -1
- data/node_modules/eslint/lib/rules/strict.js +1 -1
- data/node_modules/eslint/lib/rules/use-isnan.js +101 -7
- data/node_modules/eslint/lib/rules/utils/ast-utils.js +16 -7
- data/node_modules/eslint/lib/rules/utils/char-source.js +240 -0
- data/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +1 -1
- data/node_modules/eslint/lib/rules/utils/unicode/index.js +9 -4
- data/node_modules/eslint/lib/rules/yield-star-spacing.js +1 -1
- data/node_modules/eslint/lib/shared/runtime-info.js +1 -0
- data/node_modules/eslint/lib/shared/serialization.js +55 -0
- data/node_modules/eslint/lib/shared/stats.js +30 -0
- data/node_modules/eslint/lib/shared/string-utils.js +9 -11
- data/node_modules/eslint/lib/shared/types.js +35 -1
- data/node_modules/eslint/lib/source-code/index.js +3 -1
- data/node_modules/eslint/lib/source-code/source-code.js +299 -85
- data/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/cursors.js +4 -2
- data/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js +3 -3
- data/node_modules/eslint/lib/source-code/token-store/index.js +2 -2
- data/node_modules/eslint/lib/unsupported-api.js +3 -5
- data/node_modules/eslint/messages/no-config-found.js +1 -1
- data/node_modules/eslint/messages/plugin-conflict.js +1 -1
- data/node_modules/eslint/messages/plugin-invalid.js +1 -1
- data/node_modules/eslint/messages/plugin-missing.js +1 -1
- data/node_modules/eslint/package.json +32 -29
- data/node_modules/eslint-scope/README.md +23 -2
- data/node_modules/eslint-scope/dist/eslint-scope.cjs +84 -58
- data/node_modules/eslint-scope/lib/index.js +0 -3
- data/node_modules/eslint-scope/lib/pattern-visitor.js +4 -3
- data/node_modules/eslint-scope/lib/referencer.js +13 -11
- data/node_modules/eslint-scope/lib/scope-manager.js +2 -8
- data/node_modules/eslint-scope/lib/scope.js +64 -43
- data/node_modules/eslint-scope/lib/version.js +1 -1
- data/node_modules/eslint-scope/package.json +21 -19
- data/node_modules/eslint-visitor-keys/README.md +1 -1
- data/node_modules/eslint-visitor-keys/package.json +2 -2
- data/node_modules/espree/README.md +1 -1
- data/node_modules/espree/dist/espree.cjs +1 -1
- data/node_modules/espree/lib/version.js +1 -1
- data/node_modules/espree/package.json +18 -20
- data/node_modules/file-entry-cache/LICENSE +1 -1
- data/node_modules/file-entry-cache/README.md +6 -3
- data/node_modules/file-entry-cache/package.json +19 -43
- data/node_modules/flat-cache/README.md +8 -6
- data/node_modules/flat-cache/changelog.md +155 -205
- data/node_modules/flat-cache/package.json +16 -39
- data/node_modules/flat-cache/src/cache.js +22 -26
- data/node_modules/flat-cache/src/del.js +28 -11
- data/node_modules/flat-cache/src/utils.js +39 -41
- data/node_modules/globals/globals.json +25 -0
- data/node_modules/globals/index.d.ts +2074 -3
- data/node_modules/globals/package.json +10 -7
- data/node_modules/globals/readme.md +2 -14
- data/node_modules/keyv/package.json +4 -4
- data/node_modules/keyv/src/index.js +6 -11
- data/node_modules/npm-check-updates/build/cli.js +22 -21
- data/node_modules/npm-check-updates/build/cli.js.map +1 -1
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js +66 -0
- data/node_modules/npm-check-updates/build/index-5sFb3Tvv.js.map +1 -0
- data/node_modules/npm-check-updates/build/index-BmUFwMVL.js +6 -0
- data/node_modules/npm-check-updates/build/index-BmUFwMVL.js.map +1 -0
- data/node_modules/npm-check-updates/build/index.d.ts +5 -2
- data/node_modules/npm-check-updates/build/index.js +560 -1
- data/node_modules/npm-check-updates/build/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/package.json +4 -3
- data/node_modules/npm-check-updates/build/src/index.js +1 -1
- data/node_modules/npm-check-updates/build/src/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js +2 -2
- data/node_modules/npm-check-updates/build/src/lib/libnpmconfig/index.js.map +1 -1
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js +0 -6
- data/node_modules/npm-check-updates/build/src/package-managers/bun.js.map +1 -1
- data/node_modules/npm-check-updates/package.json +4 -3
- data/node_modules/type-fest/index.d.ts +95 -2
- data/node_modules/type-fest/package.json +12 -18
- data/node_modules/type-fest/readme.md +299 -52
- data/node_modules/type-fest/source/async-return-type.d.ts +4 -2
- data/node_modules/type-fest/source/asyncify.d.ts +5 -3
- data/node_modules/type-fest/source/basic.d.ts +21 -43
- data/node_modules/type-fest/{ts41 → source}/camel-case.d.ts +18 -17
- data/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
- data/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
- data/node_modules/type-fest/source/conditional-except.d.ts +6 -4
- data/node_modules/type-fest/source/conditional-keys.d.ts +5 -1
- data/node_modules/type-fest/source/conditional-pick.d.ts +5 -3
- data/node_modules/type-fest/{ts41 → source}/delimiter-case.d.ts +16 -8
- data/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +60 -0
- data/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
- data/node_modules/type-fest/source/entries.d.ts +8 -3
- data/node_modules/type-fest/source/entry.d.ts +8 -3
- data/node_modules/type-fest/source/exact.d.ts +73 -0
- data/node_modules/type-fest/source/except.d.ts +38 -3
- data/node_modules/type-fest/source/fixed-length-array.d.ts +6 -1
- data/node_modules/type-fest/source/get.d.ts +184 -0
- data/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
- data/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
- data/node_modules/type-fest/source/includes.d.ts +22 -0
- data/node_modules/type-fest/source/internal.d.ts +59 -0
- data/node_modules/type-fest/source/invariant-of.d.ts +76 -0
- data/node_modules/type-fest/source/iterable-element.d.ts +8 -0
- data/node_modules/type-fest/source/join.d.ts +30 -0
- data/node_modules/type-fest/source/jsonify.d.ts +90 -0
- data/node_modules/type-fest/{ts41 → source}/kebab-case.d.ts +7 -5
- data/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
- data/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
- data/node_modules/type-fest/source/last-array-element.d.ts +28 -0
- data/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
- data/node_modules/type-fest/source/literal-union.d.ts +7 -5
- data/node_modules/type-fest/source/merge-exclusive.d.ts +3 -1
- data/node_modules/type-fest/source/merge.d.ts +8 -3
- data/node_modules/type-fest/source/multidimensional-array.d.ts +43 -0
- data/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +47 -0
- data/node_modules/type-fest/source/mutable.d.ts +4 -21
- data/node_modules/type-fest/source/numeric.d.ts +170 -0
- data/node_modules/type-fest/source/observable-like.d.ts +62 -0
- data/node_modules/type-fest/source/opaque.d.ts +45 -3
- data/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
- data/node_modules/type-fest/source/package-json.d.ts +64 -12
- data/node_modules/type-fest/source/partial-deep.d.ts +57 -16
- data/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +70 -0
- data/node_modules/type-fest/{ts41 → source}/pascal-case.d.ts +6 -4
- data/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +54 -0
- data/node_modules/type-fest/source/pascal-cased-properties.d.ts +34 -0
- data/node_modules/type-fest/source/primitive.d.ts +13 -0
- data/node_modules/type-fest/source/promisable.d.ts +5 -3
- data/node_modules/type-fest/source/promise-value.d.ts +9 -7
- data/node_modules/type-fest/source/readonly-deep.d.ts +33 -7
- data/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
- data/node_modules/type-fest/source/remove-index-signature.d.ts +104 -0
- data/node_modules/type-fest/source/replace.d.ts +67 -0
- data/node_modules/type-fest/source/require-all-or-none.d.ts +36 -0
- data/node_modules/type-fest/source/require-at-least-one.d.ts +5 -3
- data/node_modules/type-fest/source/require-exactly-one.d.ts +4 -5
- data/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
- data/node_modules/type-fest/source/schema.d.ts +72 -0
- data/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
- data/node_modules/type-fest/source/set-non-nullable.d.ts +35 -0
- data/node_modules/type-fest/source/set-optional.d.ts +12 -11
- data/node_modules/type-fest/source/set-required.d.ts +12 -11
- data/node_modules/type-fest/source/set-return-type.d.ts +3 -1
- data/node_modules/type-fest/source/simplify.d.ts +83 -0
- data/node_modules/type-fest/{ts41 → source}/snake-case.d.ts +7 -4
- data/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
- data/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
- data/node_modules/type-fest/source/split.d.ts +29 -0
- data/node_modules/type-fest/source/spread.d.ts +85 -0
- data/node_modules/type-fest/source/string-key-of.d.ts +25 -0
- data/node_modules/type-fest/source/stringified.d.ts +3 -1
- data/node_modules/type-fest/source/trim.d.ts +25 -0
- data/node_modules/type-fest/source/tsconfig-json.d.ts +316 -14
- data/node_modules/type-fest/source/typed-array.d.ts +17 -0
- data/node_modules/type-fest/source/union-to-intersection.d.ts +4 -2
- data/node_modules/type-fest/source/value-of.d.ts +3 -1
- data/node_modules/type-fest/source/writable.d.ts +40 -0
- data/package.json +2 -2
- metadata +86 -63
- data/linters/rubocop-2.7.6.yml +0 -86
- data/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js +0 -66
- data/node_modules/@humanwhocodes/object-schema/tests/object-schema.js +0 -659
- data/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js +0 -186
- data/node_modules/eslint/conf/config-schema.js +0 -93
- data/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js +0 -60
- data/node_modules/eslint/lib/cli-engine/formatters/compact.js +0 -60
- data/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js +0 -41
- data/node_modules/eslint/lib/cli-engine/formatters/junit.js +0 -82
- data/node_modules/eslint/lib/cli-engine/formatters/tap.js +0 -95
- data/node_modules/eslint/lib/cli-engine/formatters/unix.js +0 -58
- data/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js +0 -63
- data/node_modules/eslint/lib/cli-engine/xml-escape.js +0 -34
- data/node_modules/eslint/lib/eslint/flat-eslint.js +0 -1155
- data/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +0 -1131
- data/node_modules/eslint/lib/rules/require-jsdoc.js +0 -122
- data/node_modules/eslint/lib/rules/utils/patterns/letters.js +0 -36
- data/node_modules/eslint/lib/rules/valid-jsdoc.js +0 -516
- data/node_modules/eslint/lib/shared/config-validator.js +0 -347
- data/node_modules/eslint/lib/shared/deprecation-warnings.js +0 -58
- data/node_modules/eslint/lib/shared/relative-module-resolver.js +0 -50
- data/node_modules/file-entry-cache/changelog.md +0 -163
- data/node_modules/flat-cache/node_modules/rimraf/CHANGELOG.md +0 -65
- data/node_modules/flat-cache/node_modules/rimraf/LICENSE +0 -15
- data/node_modules/flat-cache/node_modules/rimraf/README.md +0 -101
- data/node_modules/flat-cache/node_modules/rimraf/bin.js +0 -68
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/LICENSE +0 -21
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/README.md +0 -378
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/common.js +0 -238
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/glob.js +0 -790
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -230
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -33
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/package.json +0 -55
- data/node_modules/flat-cache/node_modules/rimraf/node_modules/glob/sync.js +0 -486
- data/node_modules/flat-cache/node_modules/rimraf/package.json +0 -32
- data/node_modules/flat-cache/node_modules/rimraf/rimraf.js +0 -360
- data/node_modules/npm-check-updates/build/index-CI_x-D21.js +0 -593
- data/node_modules/npm-check-updates/build/index-CI_x-D21.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js +0 -6
- data/node_modules/npm-check-updates/build/index-Ci8A2QXv.js.map +0 -1
- data/node_modules/npm-check-updates/build/index-DgVn3Gax.js +0 -36
- data/node_modules/npm-check-updates/build/index-DgVn3Gax.js.map +0 -1
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.d.ts +0 -6
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js +0 -3
- data/node_modules/npm-check-updates/build/src/types/SpawnPleaseOptions.js.map +0 -1
- data/node_modules/type-fest/base.d.ts +0 -38
- data/node_modules/type-fest/license +0 -9
- data/node_modules/type-fest/source/utilities.d.ts +0 -3
- data/node_modules/type-fest/ts41/index.d.ts +0 -9
@@ -109,12 +109,12 @@ module.exports = {
|
|
109
109
|
options.var = { uninitialized: mode.var, initialized: mode.var };
|
110
110
|
options.let = { uninitialized: mode.let, initialized: mode.let };
|
111
111
|
options.const = { uninitialized: mode.const, initialized: mode.const };
|
112
|
-
if (Object.
|
112
|
+
if (Object.hasOwn(mode, "uninitialized")) {
|
113
113
|
options.var.uninitialized = mode.uninitialized;
|
114
114
|
options.let.uninitialized = mode.uninitialized;
|
115
115
|
options.const.uninitialized = mode.uninitialized;
|
116
116
|
}
|
117
|
-
if (Object.
|
117
|
+
if (Object.hasOwn(mode, "initialized")) {
|
118
118
|
options.var.initialized = mode.initialized;
|
119
119
|
options.let.initialized = mode.initialized;
|
120
120
|
options.const.initialized = mode.initialized;
|
@@ -216,11 +216,11 @@ module.exports = {
|
|
216
216
|
let currentScope;
|
217
217
|
|
218
218
|
if (statementType === "var") {
|
219
|
-
currentScope = functionStack
|
219
|
+
currentScope = functionStack.at(-1);
|
220
220
|
} else if (statementType === "let") {
|
221
|
-
currentScope = blockStack
|
221
|
+
currentScope = blockStack.at(-1).let;
|
222
222
|
} else if (statementType === "const") {
|
223
|
-
currentScope = blockStack
|
223
|
+
currentScope = blockStack.at(-1).const;
|
224
224
|
}
|
225
225
|
return currentScope;
|
226
226
|
}
|
@@ -84,18 +84,18 @@ module.exports = {
|
|
84
84
|
options.switches = shouldHavePadding;
|
85
85
|
options.classes = shouldHavePadding;
|
86
86
|
} else {
|
87
|
-
if (Object.
|
87
|
+
if (Object.hasOwn(typeOptions, "blocks")) {
|
88
88
|
options.blocks = typeOptions.blocks === "always";
|
89
89
|
}
|
90
|
-
if (Object.
|
90
|
+
if (Object.hasOwn(typeOptions, "switches")) {
|
91
91
|
options.switches = typeOptions.switches === "always";
|
92
92
|
}
|
93
|
-
if (Object.
|
93
|
+
if (Object.hasOwn(typeOptions, "classes")) {
|
94
94
|
options.classes = typeOptions.classes === "always";
|
95
95
|
}
|
96
96
|
}
|
97
97
|
|
98
|
-
if (Object.
|
98
|
+
if (Object.hasOwn(exceptOptions, "allowSingleLineBlocks")) {
|
99
99
|
options.allowSingleLineBlocks = exceptOptions.allowSingleLineBlocks === true;
|
100
100
|
}
|
101
101
|
|
@@ -277,7 +277,7 @@ module.exports = {
|
|
277
277
|
|
278
278
|
const rule = {};
|
279
279
|
|
280
|
-
if (Object.
|
280
|
+
if (Object.hasOwn(options, "switches")) {
|
281
281
|
rule.SwitchStatement = function(node) {
|
282
282
|
if (node.cases.length === 0) {
|
283
283
|
return;
|
@@ -286,7 +286,7 @@ module.exports = {
|
|
286
286
|
};
|
287
287
|
}
|
288
288
|
|
289
|
-
if (Object.
|
289
|
+
if (Object.hasOwn(options, "blocks")) {
|
290
290
|
rule.BlockStatement = function(node) {
|
291
291
|
if (node.body.length === 0) {
|
292
292
|
return;
|
@@ -296,7 +296,7 @@ module.exports = {
|
|
296
296
|
rule.StaticBlock = rule.BlockStatement;
|
297
297
|
}
|
298
298
|
|
299
|
-
if (Object.
|
299
|
+
if (Object.hasOwn(options, "classes")) {
|
300
300
|
rule.ClassBody = function(node) {
|
301
301
|
if (node.body.length === 0) {
|
302
302
|
return;
|
@@ -220,7 +220,7 @@ module.exports = {
|
|
220
220
|
|
221
221
|
// If there are below, it cannot replace with arrow functions merely.
|
222
222
|
ThisExpression() {
|
223
|
-
const info = stack
|
223
|
+
const info = stack.at(-1);
|
224
224
|
|
225
225
|
if (info) {
|
226
226
|
info.this = true;
|
@@ -228,7 +228,7 @@ module.exports = {
|
|
228
228
|
},
|
229
229
|
|
230
230
|
Super() {
|
231
|
-
const info = stack
|
231
|
+
const info = stack.at(-1);
|
232
232
|
|
233
233
|
if (info) {
|
234
234
|
info.super = true;
|
@@ -236,7 +236,7 @@ module.exports = {
|
|
236
236
|
},
|
237
237
|
|
238
238
|
MetaProperty(node) {
|
239
|
-
const info = stack
|
239
|
+
const info = stack.at(-1);
|
240
240
|
|
241
241
|
if (info && checkMetaProperty(node, "new", "target")) {
|
242
242
|
info.meta = true;
|
@@ -105,7 +105,7 @@ module.exports = {
|
|
105
105
|
CallExpression(node) {
|
106
106
|
const methodName = (node.callee.property || {}).name;
|
107
107
|
const isReflectCall = (node.callee.object || {}).name === "Reflect";
|
108
|
-
const hasReflectSubstitute = Object.
|
108
|
+
const hasReflectSubstitute = Object.hasOwn(reflectSubstitutes, methodName);
|
109
109
|
const userConfiguredException = exceptions.includes(methodName);
|
110
110
|
|
111
111
|
if (hasReflectSubstitute && !isReflectCall && !userConfiguredException) {
|
@@ -34,7 +34,7 @@ function isStringLiteral(node) {
|
|
34
34
|
* @returns {boolean} True if the node is a regex literal.
|
35
35
|
*/
|
36
36
|
function isRegexLiteral(node) {
|
37
|
-
return node.type === "Literal" && Object.
|
37
|
+
return node.type === "Literal" && Object.hasOwn(node, "regex");
|
38
38
|
}
|
39
39
|
|
40
40
|
const validPrecedingTokens = new Set([
|
@@ -113,7 +113,7 @@ function endsWithTemplateCurly(node) {
|
|
113
113
|
return startsWithTemplateCurly(node.right);
|
114
114
|
}
|
115
115
|
if (node.type === "TemplateLiteral") {
|
116
|
-
return node.expressions.length && node.quasis.length && node.quasis
|
116
|
+
return node.expressions.length && node.quasis.length && node.quasis.at(-1).range[0] === node.quasis.at(-1).range[1];
|
117
117
|
}
|
118
118
|
return node.type !== "Literal" || typeof node.value !== "string";
|
119
119
|
}
|
@@ -133,8 +133,8 @@ module.exports = {
|
|
133
133
|
messageId: "addRadixParameter10",
|
134
134
|
fix(fixer) {
|
135
135
|
const tokens = sourceCode.getTokens(node);
|
136
|
-
const lastToken = tokens
|
137
|
-
const secondToLastToken = tokens
|
136
|
+
const lastToken = tokens.at(-1); // Parenthesis.
|
137
|
+
const secondToLastToken = tokens.at(-2); // May or may not be a comma.
|
138
138
|
const hasTrailingComma = secondToLastToken.type === "Punctuator" && secondToLastToken.value === ",";
|
139
139
|
|
140
140
|
return fixer.insertTextBefore(lastToken, hasTrailingComma ? " 10," : ", 10");
|
@@ -65,7 +65,7 @@ function isLastChild(node) {
|
|
65
65
|
}
|
66
66
|
const nodeList = getChildren(node.parent);
|
67
67
|
|
68
|
-
return nodeList !== null && nodeList
|
68
|
+
return nodeList !== null && nodeList.at(-1) === node; // before `}` or etc.
|
69
69
|
}
|
70
70
|
|
71
71
|
/** @type {import('../shared/types').Rule} */
|
@@ -208,7 +208,7 @@ module.exports = {
|
|
208
208
|
}
|
209
209
|
|
210
210
|
return fixer.replaceTextRange(
|
211
|
-
[importSpecifiers[0].range[0], importSpecifiers
|
211
|
+
[importSpecifiers[0].range[0], importSpecifiers.at(-1).range[1]],
|
212
212
|
importSpecifiers
|
213
213
|
|
214
214
|
// Clone the importSpecifiers array to avoid mutating it
|
@@ -185,7 +185,7 @@ module.exports = {
|
|
185
185
|
});
|
186
186
|
|
187
187
|
// check blank line between the current node and the last token
|
188
|
-
if (!isBlankLineBetweenNodes && (node.loc.start.line - tokens
|
188
|
+
if (!isBlankLineBetweenNodes && (node.loc.start.line - tokens.at(-1).loc.end.line > 1)) {
|
189
189
|
isBlankLineBetweenNodes = true;
|
190
190
|
}
|
191
191
|
|
@@ -66,7 +66,7 @@ module.exports = {
|
|
66
66
|
return null;
|
67
67
|
}
|
68
68
|
return fixer.replaceTextRange(
|
69
|
-
[idDeclarations[0].range[0], idDeclarations
|
69
|
+
[idDeclarations[0].range[0], idDeclarations.at(-1).range[1]],
|
70
70
|
idDeclarations
|
71
71
|
|
72
72
|
// Clone the idDeclarations array to avoid mutating it
|
@@ -87,7 +87,7 @@ module.exports = {
|
|
87
87
|
* @returns {boolean} Whether or not an override has been provided for the operator
|
88
88
|
*/
|
89
89
|
function overrideExistsForOperator(operator) {
|
90
|
-
return options.overrides && Object.
|
90
|
+
return options.overrides && Object.hasOwn(options.overrides, operator);
|
91
91
|
}
|
92
92
|
|
93
93
|
/**
|
@@ -173,7 +173,7 @@ module.exports = {
|
|
173
173
|
function enterFunctionInFunctionMode(node, useStrictDirectives) {
|
174
174
|
const isInClass = classScopes.length > 0,
|
175
175
|
isParentGlobal = scopes.length === 0 && classScopes.length === 0,
|
176
|
-
isParentStrict = scopes.length > 0 && scopes
|
176
|
+
isParentStrict = scopes.length > 0 && scopes.at(-1),
|
177
177
|
isStrict = useStrictDirectives.length > 0;
|
178
178
|
|
179
179
|
if (isStrict) {
|
@@ -21,9 +21,17 @@ const astUtils = require("./utils/ast-utils");
|
|
21
21
|
* @returns {boolean} `true` if the node is 'NaN' identifier.
|
22
22
|
*/
|
23
23
|
function isNaNIdentifier(node) {
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
if (!node) {
|
25
|
+
return false;
|
26
|
+
}
|
27
|
+
|
28
|
+
const nodeToCheck = node.type === "SequenceExpression"
|
29
|
+
? node.expressions.at(-1)
|
30
|
+
: node;
|
31
|
+
|
32
|
+
return (
|
33
|
+
astUtils.isSpecificId(nodeToCheck, "NaN") ||
|
34
|
+
astUtils.isSpecificMemberAccess(nodeToCheck, "Number", "NaN")
|
27
35
|
);
|
28
36
|
}
|
29
37
|
|
@@ -34,6 +42,7 @@ function isNaNIdentifier(node) {
|
|
34
42
|
/** @type {import('../shared/types').Rule} */
|
35
43
|
module.exports = {
|
36
44
|
meta: {
|
45
|
+
hasSuggestions: true,
|
37
46
|
type: "problem",
|
38
47
|
|
39
48
|
docs: {
|
@@ -63,7 +72,10 @@ module.exports = {
|
|
63
72
|
comparisonWithNaN: "Use the isNaN function to compare with NaN.",
|
64
73
|
switchNaN: "'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",
|
65
74
|
caseNaN: "'case NaN' can never match. Use Number.isNaN before the switch.",
|
66
|
-
indexOfNaN: "Array prototype method '{{ methodName }}' cannot find NaN."
|
75
|
+
indexOfNaN: "Array prototype method '{{ methodName }}' cannot find NaN.",
|
76
|
+
replaceWithIsNaN: "Replace with Number.isNaN.",
|
77
|
+
replaceWithCastingAndIsNaN: "Replace with Number.isNaN and cast to a Number.",
|
78
|
+
replaceWithFindIndex: "Replace with Array.prototype.{{ methodName }}."
|
67
79
|
}
|
68
80
|
},
|
69
81
|
|
@@ -71,6 +83,35 @@ module.exports = {
|
|
71
83
|
|
72
84
|
const enforceForSwitchCase = !context.options[0] || context.options[0].enforceForSwitchCase;
|
73
85
|
const enforceForIndexOf = context.options[0] && context.options[0].enforceForIndexOf;
|
86
|
+
const sourceCode = context.sourceCode;
|
87
|
+
|
88
|
+
const fixableOperators = new Set(["==", "===", "!=", "!=="]);
|
89
|
+
const castableOperators = new Set(["==", "!="]);
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Get a fixer for a binary expression that compares to NaN.
|
93
|
+
* @param {ASTNode} node The node to fix.
|
94
|
+
* @param {function(string): string} wrapValue A function that wraps the compared value with a fix.
|
95
|
+
* @returns {function(Fixer): Fix} The fixer function.
|
96
|
+
*/
|
97
|
+
function getBinaryExpressionFixer(node, wrapValue) {
|
98
|
+
return fixer => {
|
99
|
+
const comparedValue = isNaNIdentifier(node.left) ? node.right : node.left;
|
100
|
+
const shouldWrap = comparedValue.type === "SequenceExpression";
|
101
|
+
const shouldNegate = node.operator[0] === "!";
|
102
|
+
|
103
|
+
const negation = shouldNegate ? "!" : "";
|
104
|
+
let comparedValueText = sourceCode.getText(comparedValue);
|
105
|
+
|
106
|
+
if (shouldWrap) {
|
107
|
+
comparedValueText = `(${comparedValueText})`;
|
108
|
+
}
|
109
|
+
|
110
|
+
const fixedValue = wrapValue(comparedValueText);
|
111
|
+
|
112
|
+
return fixer.replaceText(node, `${negation}${fixedValue}`);
|
113
|
+
};
|
114
|
+
}
|
74
115
|
|
75
116
|
/**
|
76
117
|
* Checks the given `BinaryExpression` node for `foo === NaN` and other comparisons.
|
@@ -82,7 +123,32 @@ module.exports = {
|
|
82
123
|
/^(?:[<>]|[!=]=)=?$/u.test(node.operator) &&
|
83
124
|
(isNaNIdentifier(node.left) || isNaNIdentifier(node.right))
|
84
125
|
) {
|
85
|
-
|
126
|
+
const suggestedFixes = [];
|
127
|
+
const NaNNode = isNaNIdentifier(node.left) ? node.left : node.right;
|
128
|
+
|
129
|
+
const isSequenceExpression = NaNNode.type === "SequenceExpression";
|
130
|
+
const isSuggestable = fixableOperators.has(node.operator) && !isSequenceExpression;
|
131
|
+
const isCastable = castableOperators.has(node.operator);
|
132
|
+
|
133
|
+
if (isSuggestable) {
|
134
|
+
suggestedFixes.push({
|
135
|
+
messageId: "replaceWithIsNaN",
|
136
|
+
fix: getBinaryExpressionFixer(node, value => `Number.isNaN(${value})`)
|
137
|
+
});
|
138
|
+
|
139
|
+
if (isCastable) {
|
140
|
+
suggestedFixes.push({
|
141
|
+
messageId: "replaceWithCastingAndIsNaN",
|
142
|
+
fix: getBinaryExpressionFixer(node, value => `Number.isNaN(Number(${value}))`)
|
143
|
+
});
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
context.report({
|
148
|
+
node,
|
149
|
+
messageId: "comparisonWithNaN",
|
150
|
+
suggest: suggestedFixes
|
151
|
+
});
|
86
152
|
}
|
87
153
|
}
|
88
154
|
|
@@ -116,10 +182,38 @@ module.exports = {
|
|
116
182
|
|
117
183
|
if (
|
118
184
|
(methodName === "indexOf" || methodName === "lastIndexOf") &&
|
119
|
-
node.arguments.length
|
185
|
+
node.arguments.length <= 2 &&
|
120
186
|
isNaNIdentifier(node.arguments[0])
|
121
187
|
) {
|
122
|
-
|
188
|
+
|
189
|
+
/*
|
190
|
+
* To retain side effects, it's essential to address `NaN` beforehand, which
|
191
|
+
* is not possible with fixes like `arr.findIndex(Number.isNaN)`.
|
192
|
+
*/
|
193
|
+
const isSuggestable = node.arguments[0].type !== "SequenceExpression" && !node.arguments[1];
|
194
|
+
const suggestedFixes = [];
|
195
|
+
|
196
|
+
if (isSuggestable) {
|
197
|
+
const shouldWrap = callee.computed;
|
198
|
+
const findIndexMethod = methodName === "indexOf" ? "findIndex" : "findLastIndex";
|
199
|
+
const propertyName = shouldWrap ? `"${findIndexMethod}"` : findIndexMethod;
|
200
|
+
|
201
|
+
suggestedFixes.push({
|
202
|
+
messageId: "replaceWithFindIndex",
|
203
|
+
data: { methodName: findIndexMethod },
|
204
|
+
fix: fixer => [
|
205
|
+
fixer.replaceText(callee.property, propertyName),
|
206
|
+
fixer.replaceText(node.arguments[0], "Number.isNaN")
|
207
|
+
]
|
208
|
+
});
|
209
|
+
}
|
210
|
+
|
211
|
+
context.report({
|
212
|
+
node,
|
213
|
+
messageId: "indexOfNaN",
|
214
|
+
data: { methodName },
|
215
|
+
suggest: suggestedFixes
|
216
|
+
});
|
123
217
|
}
|
124
218
|
}
|
125
219
|
}
|
@@ -19,6 +19,8 @@ const {
|
|
19
19
|
lineBreakPattern,
|
20
20
|
shebangPattern
|
21
21
|
} = require("../../shared/ast-utils");
|
22
|
+
const globals = require("../../../conf/globals");
|
23
|
+
const { LATEST_ECMA_VERSION } = require("../../../conf/ecma-version");
|
22
24
|
|
23
25
|
//------------------------------------------------------------------------------
|
24
26
|
// Helpers
|
@@ -46,6 +48,12 @@ const OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN = /^(?:[^\\]|\\.)*\\(?:[1-9]|0[0
|
|
46
48
|
|
47
49
|
const LOGICAL_ASSIGNMENT_OPERATORS = new Set(["&&=", "||=", "??="]);
|
48
50
|
|
51
|
+
/**
|
52
|
+
* All builtin global variables defined in the latest ECMAScript specification.
|
53
|
+
* @type {Record<string,boolean>} Key is the name of the variable. Value is `true` if the variable is considered writable, `false` otherwise.
|
54
|
+
*/
|
55
|
+
const ECMASCRIPT_GLOBALS = globals[`es${LATEST_ECMA_VERSION}`];
|
56
|
+
|
49
57
|
/**
|
50
58
|
* Checks reference if is non initializer and writable.
|
51
59
|
* @param {Reference} reference A reference to check.
|
@@ -969,7 +977,7 @@ function isConstant(scope, node, inBooleanPosition) {
|
|
969
977
|
return false;
|
970
978
|
|
971
979
|
case "SequenceExpression":
|
972
|
-
return isConstant(scope, node.expressions
|
980
|
+
return isConstant(scope, node.expressions.at(-1), inBooleanPosition);
|
973
981
|
case "SpreadElement":
|
974
982
|
return isConstant(scope, node.argument, inBooleanPosition);
|
975
983
|
case "CallExpression":
|
@@ -1133,6 +1141,7 @@ module.exports = {
|
|
1133
1141
|
LINEBREAK_MATCHER: lineBreakPattern,
|
1134
1142
|
SHEBANG_MATCHER: shebangPattern,
|
1135
1143
|
STATEMENT_LIST_PARENTS,
|
1144
|
+
ECMASCRIPT_GLOBALS,
|
1136
1145
|
|
1137
1146
|
/**
|
1138
1147
|
* Determines whether two adjacent tokens are on the same line.
|
@@ -1231,7 +1240,7 @@ module.exports = {
|
|
1231
1240
|
* @private
|
1232
1241
|
*/
|
1233
1242
|
isSurroundedBy(val, character) {
|
1234
|
-
return val[0] === character && val
|
1243
|
+
return val[0] === character && val.at(-1) === character;
|
1235
1244
|
},
|
1236
1245
|
|
1237
1246
|
/**
|
@@ -1909,8 +1918,8 @@ module.exports = {
|
|
1909
1918
|
*/
|
1910
1919
|
getFunctionHeadLoc(node, sourceCode) {
|
1911
1920
|
const parent = node.parent;
|
1912
|
-
let start
|
1913
|
-
let end
|
1921
|
+
let start;
|
1922
|
+
let end;
|
1914
1923
|
|
1915
1924
|
if (parent.type === "Property" || parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") {
|
1916
1925
|
start = parent.loc.start;
|
@@ -2055,7 +2064,7 @@ module.exports = {
|
|
2055
2064
|
case "SequenceExpression": {
|
2056
2065
|
const exprs = node.expressions;
|
2057
2066
|
|
2058
|
-
return exprs.length !== 0 && module.exports.couldBeError(exprs
|
2067
|
+
return exprs.length !== 0 && module.exports.couldBeError(exprs.at(-1));
|
2059
2068
|
}
|
2060
2069
|
|
2061
2070
|
case "LogicalExpression":
|
@@ -2119,9 +2128,9 @@ module.exports = {
|
|
2119
2128
|
|
2120
2129
|
const comments = tokens.comments;
|
2121
2130
|
|
2122
|
-
leftToken = tokens
|
2131
|
+
leftToken = tokens.at(-1);
|
2123
2132
|
if (comments.length) {
|
2124
|
-
const lastComment = comments
|
2133
|
+
const lastComment = comments.at(-1);
|
2125
2134
|
|
2126
2135
|
if (!leftToken || lastComment.range[0] > leftToken.range[0]) {
|
2127
2136
|
leftToken = lastComment;
|