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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint",
|
3
|
-
"version": "
|
3
|
+
"version": "9.2.0",
|
4
4
|
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
5
5
|
"description": "An AST-based pattern checker for JavaScript.",
|
6
6
|
"bin": {
|
@@ -17,20 +17,24 @@
|
|
17
17
|
"build:site": "node Makefile.js gensite",
|
18
18
|
"build:webpack": "node Makefile.js webpack",
|
19
19
|
"build:readme": "node tools/update-readme.js",
|
20
|
+
"build:rules-index": "node Makefile.js generateRuleIndexPage",
|
20
21
|
"lint": "node Makefile.js lint",
|
21
22
|
"lint:docs:js": "node Makefile.js lintDocsJS",
|
22
23
|
"lint:docs:rule-examples": "node Makefile.js checkRuleExamples",
|
23
24
|
"lint:fix": "node Makefile.js lint -- fix",
|
24
25
|
"lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix",
|
26
|
+
"lint:unused": "knip",
|
25
27
|
"release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
|
26
28
|
"release:generate:beta": "node Makefile.js generatePrerelease -- beta",
|
27
29
|
"release:generate:latest": "node Makefile.js generateRelease",
|
28
30
|
"release:generate:rc": "node Makefile.js generatePrerelease -- rc",
|
29
31
|
"release:publish": "node Makefile.js publishRelease",
|
30
32
|
"test": "node Makefile.js test",
|
33
|
+
"test:browser": "node Makefile.js wdio",
|
31
34
|
"test:cli": "mocha",
|
32
35
|
"test:fuzz": "node Makefile.js fuzz",
|
33
|
-
"test:performance": "node Makefile.js perf"
|
36
|
+
"test:performance": "node Makefile.js perf",
|
37
|
+
"test:emfile": "node tools/check-emfile-handling.js"
|
34
38
|
},
|
35
39
|
"gitHooks": {
|
36
40
|
"pre-commit": "lint-staged"
|
@@ -47,7 +51,7 @@
|
|
47
51
|
"node tools/fetch-docs-links.js",
|
48
52
|
"git add docs/src/_data/further_reading_links.json"
|
49
53
|
],
|
50
|
-
"docs/**/*.svg": "npx svgo -r --multipass"
|
54
|
+
"docs/**/*.svg": "npx -y svgo -r --multipass"
|
51
55
|
},
|
52
56
|
"files": [
|
53
57
|
"LICENSE",
|
@@ -64,34 +68,30 @@
|
|
64
68
|
"dependencies": {
|
65
69
|
"@eslint-community/eslint-utils": "^4.2.0",
|
66
70
|
"@eslint-community/regexpp": "^4.6.1",
|
67
|
-
"@eslint/eslintrc": "^
|
68
|
-
"@eslint/js": "
|
69
|
-
"@humanwhocodes/config-array": "^0.
|
71
|
+
"@eslint/eslintrc": "^3.0.2",
|
72
|
+
"@eslint/js": "9.2.0",
|
73
|
+
"@humanwhocodes/config-array": "^0.13.0",
|
70
74
|
"@humanwhocodes/module-importer": "^1.0.1",
|
75
|
+
"@humanwhocodes/retry": "^0.2.3",
|
71
76
|
"@nodelib/fs.walk": "^1.2.8",
|
72
|
-
"@ungap/structured-clone": "^1.2.0",
|
73
77
|
"ajv": "^6.12.4",
|
74
78
|
"chalk": "^4.0.0",
|
75
79
|
"cross-spawn": "^7.0.2",
|
76
80
|
"debug": "^4.3.2",
|
77
|
-
"doctrine": "^3.0.0",
|
78
81
|
"escape-string-regexp": "^4.0.0",
|
79
|
-
"eslint-scope": "^
|
80
|
-
"eslint-visitor-keys": "^
|
81
|
-
"espree": "^
|
82
|
+
"eslint-scope": "^8.0.1",
|
83
|
+
"eslint-visitor-keys": "^4.0.0",
|
84
|
+
"espree": "^10.0.1",
|
82
85
|
"esquery": "^1.4.2",
|
83
86
|
"esutils": "^2.0.2",
|
84
87
|
"fast-deep-equal": "^3.1.3",
|
85
|
-
"file-entry-cache": "^
|
88
|
+
"file-entry-cache": "^8.0.0",
|
86
89
|
"find-up": "^5.0.0",
|
87
90
|
"glob-parent": "^6.0.2",
|
88
|
-
"globals": "^13.19.0",
|
89
|
-
"graphemer": "^1.4.0",
|
90
91
|
"ignore": "^5.2.0",
|
91
92
|
"imurmurhash": "^0.1.4",
|
92
93
|
"is-glob": "^4.0.0",
|
93
94
|
"is-path-inside": "^3.0.3",
|
94
|
-
"js-yaml": "^4.1.0",
|
95
95
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
96
96
|
"levn": "^0.4.1",
|
97
97
|
"lodash.merge": "^4.6.2",
|
@@ -104,6 +104,9 @@
|
|
104
104
|
"devDependencies": {
|
105
105
|
"@babel/core": "^7.4.3",
|
106
106
|
"@babel/preset-env": "^7.4.3",
|
107
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
108
|
+
"@types/estree": "^1.0.5",
|
109
|
+
"@types/node": "^20.11.5",
|
107
110
|
"@wdio/browser-runner": "^8.14.6",
|
108
111
|
"@wdio/cli": "^8.14.6",
|
109
112
|
"@wdio/concise-reporter": "^8.14.0",
|
@@ -118,28 +121,29 @@
|
|
118
121
|
"ejs": "^3.0.2",
|
119
122
|
"eslint": "file:.",
|
120
123
|
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
121
|
-
"eslint-plugin-eslint-
|
122
|
-
"eslint-plugin-eslint-plugin": "^5.2.1",
|
124
|
+
"eslint-plugin-eslint-plugin": "^6.0.0",
|
123
125
|
"eslint-plugin-internal-rules": "file:tools/internal-rules",
|
124
|
-
"eslint-plugin-jsdoc": "^
|
125
|
-
"eslint-plugin-n": "^
|
126
|
-
"eslint-plugin-unicorn": "^
|
127
|
-
"eslint-release": "^3.2.
|
126
|
+
"eslint-plugin-jsdoc": "^48.2.3",
|
127
|
+
"eslint-plugin-n": "^17.2.0",
|
128
|
+
"eslint-plugin-unicorn": "^52.0.0",
|
129
|
+
"eslint-release": "^3.2.2",
|
128
130
|
"eslump": "^3.0.0",
|
129
131
|
"esprima": "^4.0.1",
|
130
132
|
"fast-glob": "^3.2.11",
|
131
133
|
"fs-teardown": "^0.1.3",
|
132
|
-
"glob": "^
|
134
|
+
"glob": "^10.0.0",
|
135
|
+
"globals": "^15.0.0",
|
133
136
|
"got": "^11.8.3",
|
134
137
|
"gray-matter": "^4.0.3",
|
138
|
+
"js-yaml": "^4.1.0",
|
139
|
+
"knip": "^5.8.0",
|
135
140
|
"lint-staged": "^11.0.0",
|
136
141
|
"load-perf": "^0.2.0",
|
137
142
|
"markdown-it": "^12.2.0",
|
138
143
|
"markdown-it-container": "^3.0.0",
|
139
|
-
"markdownlint": "^0.
|
140
|
-
"markdownlint-cli": "^0.
|
144
|
+
"markdownlint": "^0.34.0",
|
145
|
+
"markdownlint-cli": "^0.39.0",
|
141
146
|
"marked": "^4.0.8",
|
142
|
-
"memfs": "^3.0.1",
|
143
147
|
"metascraper": "^5.25.7",
|
144
148
|
"metascraper-description": "^5.25.7",
|
145
149
|
"metascraper-image": "^5.29.3",
|
@@ -147,7 +151,6 @@
|
|
147
151
|
"metascraper-logo-favicon": "^5.25.7",
|
148
152
|
"metascraper-title": "^5.25.7",
|
149
153
|
"mocha": "^8.3.2",
|
150
|
-
"mocha-junit-reporter": "^2.0.0",
|
151
154
|
"node-polyfill-webpack-plugin": "^1.0.3",
|
152
155
|
"npm-license": "^0.3.3",
|
153
156
|
"pirates": "^4.0.5",
|
@@ -157,10 +160,10 @@
|
|
157
160
|
"regenerator-runtime": "^0.14.0",
|
158
161
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
159
162
|
"semver": "^7.5.3",
|
160
|
-
"shelljs": "^0.8.
|
163
|
+
"shelljs": "^0.8.5",
|
161
164
|
"sinon": "^11.0.0",
|
165
|
+
"typescript": "^5.3.3",
|
162
166
|
"vite-plugin-commonjs": "^0.10.0",
|
163
|
-
"webdriverio": "^8.14.6",
|
164
167
|
"webpack": "^5.23.0",
|
165
168
|
"webpack-cli": "^4.5.0",
|
166
169
|
"yorkie": "^2.0.0"
|
@@ -174,6 +177,6 @@
|
|
174
177
|
],
|
175
178
|
"license": "MIT",
|
176
179
|
"engines": {
|
177
|
-
"node": "^
|
180
|
+
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
178
181
|
}
|
179
182
|
}
|
@@ -26,6 +26,18 @@ To use in a CommonJS file:
|
|
26
26
|
const eslintScope = require('eslint-scope');
|
27
27
|
```
|
28
28
|
|
29
|
+
In order to analyze scope, you'll need to have an [ESTree](https://github.com/estree/estree) compliant AST structure to run it on. The primary method is `eslintScope.analyze()`, which takes two arguments:
|
30
|
+
|
31
|
+
1. `ast` - the ESTree-compliant AST structure to analyze.
|
32
|
+
2. `options` (optional) - Options to adjust how the scope is analyzed, including:
|
33
|
+
* `ignoreEval` (default: `false`) - Set to `true` to ignore all `eval()` calls (which would normally create scopes).
|
34
|
+
* `nodejsScope` (default: `false`) - Set to `true` to create a top-level function scope needed for CommonJS evaluation.
|
35
|
+
* `impliedStrict` (default: `false`) - Set to `true` to evaluate the code in strict mode even outside of modules and without `"use strict"`.
|
36
|
+
* `ecmaVersion` (default: `5`) - The version of ECMAScript to use to evaluate the code.
|
37
|
+
* `sourceType` (default: `"script"`) - The type of JavaScript file to evaluate. Change to `"module"` for ECMAScript module code.
|
38
|
+
* `childVisitorKeys` (default: `null`) - An object with visitor key information (like [`eslint-visitor-keys`](https://github.com/eslint/eslint-visitor-keys)). Without this, `eslint-scope` finds child nodes to visit algorithmically. Providing this option is a performance enhancement.
|
39
|
+
* `fallback` (default: `"iteration"`) - The strategy to use when `childVisitorKeys` is not specified. May be a function.
|
40
|
+
|
29
41
|
Example:
|
30
42
|
|
31
43
|
```js
|
@@ -33,8 +45,13 @@ import * as eslintScope from 'eslint-scope';
|
|
33
45
|
import * as espree from 'espree';
|
34
46
|
import estraverse from 'estraverse';
|
35
47
|
|
36
|
-
const
|
37
|
-
|
48
|
+
const options = {
|
49
|
+
ecmaVersion: 2022,
|
50
|
+
sourceType: "module"
|
51
|
+
};
|
52
|
+
|
53
|
+
const ast = espree.parse(code, { range: true, ...options });
|
54
|
+
const scopeManager = eslintScope.analyze(ast, options);
|
38
55
|
|
39
56
|
const currentScope = scopeManager.acquire(ast); // global scope
|
40
57
|
|
@@ -60,6 +77,10 @@ estraverse.traverse(ast, {
|
|
60
77
|
|
61
78
|
Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues).
|
62
79
|
|
80
|
+
## Security Policy
|
81
|
+
|
82
|
+
We work hard to ensure that ESLint Scope is safe for everyone and that security issues are addressed quickly and responsibly. Read the full [security policy](https://github.com/eslint/.github/blob/master/SECURITY.md).
|
83
|
+
|
63
84
|
## Build Commands
|
64
85
|
|
65
86
|
* `npm test` - run all linting and tests
|
@@ -373,10 +373,9 @@ const { Syntax: Syntax$2 } = estraverse__default["default"];
|
|
373
373
|
* @param {Scope} scope scope
|
374
374
|
* @param {Block} block block
|
375
375
|
* @param {boolean} isMethodDefinition is method definition
|
376
|
-
* @param {boolean} useDirective use directive
|
377
376
|
* @returns {boolean} is strict scope
|
378
377
|
*/
|
379
|
-
function isStrictScope(scope, block, isMethodDefinition
|
378
|
+
function isStrictScope(scope, block, isMethodDefinition) {
|
380
379
|
let body;
|
381
380
|
|
382
381
|
// When upper scope is exists and strict, inner scope is also strict.
|
@@ -416,41 +415,29 @@ function isStrictScope(scope, block, isMethodDefinition, useDirective) {
|
|
416
415
|
return false;
|
417
416
|
}
|
418
417
|
|
419
|
-
// Search 'use strict' directive.
|
420
|
-
|
421
|
-
|
422
|
-
const stmt = body.body[i];
|
418
|
+
// Search for a 'use strict' directive.
|
419
|
+
for (let i = 0, iz = body.body.length; i < iz; ++i) {
|
420
|
+
const stmt = body.body[i];
|
423
421
|
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
422
|
+
/*
|
423
|
+
* Check if the current statement is a directive.
|
424
|
+
* If it isn't, then we're past the directive prologue
|
425
|
+
* so stop the search because directives cannot
|
426
|
+
* appear after this point.
|
427
|
+
*
|
428
|
+
* Some parsers set `directive:null` on non-directive
|
429
|
+
* statements, so the `typeof` check is safer than
|
430
|
+
* checking for property existence.
|
431
|
+
*/
|
432
|
+
if (typeof stmt.directive !== "string") {
|
433
|
+
break;
|
430
434
|
}
|
431
|
-
} else {
|
432
|
-
for (let i = 0, iz = body.body.length; i < iz; ++i) {
|
433
|
-
const stmt = body.body[i];
|
434
|
-
|
435
|
-
if (stmt.type !== Syntax$2.ExpressionStatement) {
|
436
|
-
break;
|
437
|
-
}
|
438
|
-
const expr = stmt.expression;
|
439
435
|
|
440
|
-
|
441
|
-
|
442
|
-
}
|
443
|
-
if (expr.raw !== null && expr.raw !== undefined) {
|
444
|
-
if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") {
|
445
|
-
return true;
|
446
|
-
}
|
447
|
-
} else {
|
448
|
-
if (expr.value === "use strict") {
|
449
|
-
return true;
|
450
|
-
}
|
451
|
-
}
|
436
|
+
if (stmt.directive === "use strict") {
|
437
|
+
return true;
|
452
438
|
}
|
453
439
|
}
|
440
|
+
|
454
441
|
return false;
|
455
442
|
}
|
456
443
|
|
@@ -507,7 +494,8 @@ class Scope {
|
|
507
494
|
/**
|
508
495
|
* The tainted variables of this scope, as <code>{ Variable.name :
|
509
496
|
* boolean }</code>.
|
510
|
-
*
|
497
|
+
* @member {Map} Scope#taints
|
498
|
+
*/
|
511
499
|
this.taints = new Map();
|
512
500
|
|
513
501
|
/**
|
@@ -598,7 +586,7 @@ class Scope {
|
|
598
586
|
* @member {boolean} Scope#isStrict
|
599
587
|
*/
|
600
588
|
this.isStrict = scopeManager.isStrictModeSupported()
|
601
|
-
? isStrictScope(this, block, isMethodDefinition
|
589
|
+
? isStrictScope(this, block, isMethodDefinition)
|
602
590
|
: false;
|
603
591
|
|
604
592
|
/**
|
@@ -686,7 +674,7 @@ class Scope {
|
|
686
674
|
|
687
675
|
// To override by function scopes.
|
688
676
|
// References in default parameters isn't resolved to variables which are in their function body.
|
689
|
-
__isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars
|
677
|
+
__isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars -- Desired as instance method with signature
|
690
678
|
return true;
|
691
679
|
}
|
692
680
|
|
@@ -720,17 +708,17 @@ class Scope {
|
|
720
708
|
}
|
721
709
|
|
722
710
|
__addDeclaredVariablesOfNode(variable, node) {
|
723
|
-
if (node === null || node ===
|
711
|
+
if (node === null || node === void 0) {
|
724
712
|
return;
|
725
713
|
}
|
726
714
|
|
727
715
|
let variables = this.__declaredVariables.get(node);
|
728
716
|
|
729
|
-
if (variables === null || variables ===
|
717
|
+
if (variables === null || variables === void 0) {
|
730
718
|
variables = [];
|
731
719
|
this.__declaredVariables.set(node, variables);
|
732
720
|
}
|
733
|
-
if (variables.
|
721
|
+
if (!variables.includes(variable)) {
|
734
722
|
variables.push(variable);
|
735
723
|
}
|
736
724
|
}
|
@@ -837,7 +825,7 @@ class Scope {
|
|
837
825
|
* @function Scope#isArgumentsMaterialized
|
838
826
|
* @returns {boolean} arguemnts materialized
|
839
827
|
*/
|
840
|
-
isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this
|
828
|
+
isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method
|
841
829
|
return true;
|
842
830
|
}
|
843
831
|
|
@@ -846,7 +834,7 @@ class Scope {
|
|
846
834
|
* @function Scope#isThisMaterialized
|
847
835
|
* @returns {boolean} this materialized
|
848
836
|
*/
|
849
|
-
isThisMaterialized() { // eslint-disable-line class-methods-use-this
|
837
|
+
isThisMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method
|
850
838
|
return true;
|
851
839
|
}
|
852
840
|
|
@@ -863,6 +851,9 @@ class Scope {
|
|
863
851
|
}
|
864
852
|
}
|
865
853
|
|
854
|
+
/**
|
855
|
+
* Global scope.
|
856
|
+
*/
|
866
857
|
class GlobalScope extends Scope {
|
867
858
|
constructor(scopeManager, block) {
|
868
859
|
super(scopeManager, "global", null, block, false);
|
@@ -924,12 +915,18 @@ class GlobalScope extends Scope {
|
|
924
915
|
}
|
925
916
|
}
|
926
917
|
|
918
|
+
/**
|
919
|
+
* Module scope.
|
920
|
+
*/
|
927
921
|
class ModuleScope extends Scope {
|
928
922
|
constructor(scopeManager, upperScope, block) {
|
929
923
|
super(scopeManager, "module", upperScope, block, false);
|
930
924
|
}
|
931
925
|
}
|
932
926
|
|
927
|
+
/**
|
928
|
+
* Function expression name scope.
|
929
|
+
*/
|
933
930
|
class FunctionExpressionNameScope extends Scope {
|
934
931
|
constructor(scopeManager, upperScope, block) {
|
935
932
|
super(scopeManager, "function-expression-name", upperScope, block, false);
|
@@ -946,12 +943,18 @@ class FunctionExpressionNameScope extends Scope {
|
|
946
943
|
}
|
947
944
|
}
|
948
945
|
|
946
|
+
/**
|
947
|
+
* Catch scope.
|
948
|
+
*/
|
949
949
|
class CatchScope extends Scope {
|
950
950
|
constructor(scopeManager, upperScope, block) {
|
951
951
|
super(scopeManager, "catch", upperScope, block, false);
|
952
952
|
}
|
953
953
|
}
|
954
954
|
|
955
|
+
/**
|
956
|
+
* With statement scope.
|
957
|
+
*/
|
955
958
|
class WithScope extends Scope {
|
956
959
|
constructor(scopeManager, upperScope, block) {
|
957
960
|
super(scopeManager, "with", upperScope, block, false);
|
@@ -974,18 +977,27 @@ class WithScope extends Scope {
|
|
974
977
|
}
|
975
978
|
}
|
976
979
|
|
980
|
+
/**
|
981
|
+
* Block scope.
|
982
|
+
*/
|
977
983
|
class BlockScope extends Scope {
|
978
984
|
constructor(scopeManager, upperScope, block) {
|
979
985
|
super(scopeManager, "block", upperScope, block, false);
|
980
986
|
}
|
981
987
|
}
|
982
988
|
|
989
|
+
/**
|
990
|
+
* Switch scope.
|
991
|
+
*/
|
983
992
|
class SwitchScope extends Scope {
|
984
993
|
constructor(scopeManager, upperScope, block) {
|
985
994
|
super(scopeManager, "switch", upperScope, block, false);
|
986
995
|
}
|
987
996
|
}
|
988
997
|
|
998
|
+
/**
|
999
|
+
* Function scope.
|
1000
|
+
*/
|
989
1001
|
class FunctionScope extends Scope {
|
990
1002
|
constructor(scopeManager, upperScope, block, isMethodDefinition) {
|
991
1003
|
super(scopeManager, "function", upperScope, block, isMethodDefinition);
|
@@ -1063,24 +1075,36 @@ class FunctionScope extends Scope {
|
|
1063
1075
|
}
|
1064
1076
|
}
|
1065
1077
|
|
1078
|
+
/**
|
1079
|
+
* Scope of for, for-in, and for-of statements.
|
1080
|
+
*/
|
1066
1081
|
class ForScope extends Scope {
|
1067
1082
|
constructor(scopeManager, upperScope, block) {
|
1068
1083
|
super(scopeManager, "for", upperScope, block, false);
|
1069
1084
|
}
|
1070
1085
|
}
|
1071
1086
|
|
1087
|
+
/**
|
1088
|
+
* Class scope.
|
1089
|
+
*/
|
1072
1090
|
class ClassScope extends Scope {
|
1073
1091
|
constructor(scopeManager, upperScope, block) {
|
1074
1092
|
super(scopeManager, "class", upperScope, block, false);
|
1075
1093
|
}
|
1076
1094
|
}
|
1077
1095
|
|
1096
|
+
/**
|
1097
|
+
* Class field initializer scope.
|
1098
|
+
*/
|
1078
1099
|
class ClassFieldInitializerScope extends Scope {
|
1079
1100
|
constructor(scopeManager, upperScope, block) {
|
1080
1101
|
super(scopeManager, "class-field-initializer", upperScope, block, true);
|
1081
1102
|
}
|
1082
1103
|
}
|
1083
1104
|
|
1105
|
+
/**
|
1106
|
+
* Class static block scope.
|
1107
|
+
*/
|
1084
1108
|
class ClassStaticBlockScope extends Scope {
|
1085
1109
|
constructor(scopeManager, upperScope, block) {
|
1086
1110
|
super(scopeManager, "class-static-block", upperScope, block, true);
|
@@ -1126,10 +1150,6 @@ class ScopeManager {
|
|
1126
1150
|
this.__declaredVariables = new WeakMap();
|
1127
1151
|
}
|
1128
1152
|
|
1129
|
-
__useDirective() {
|
1130
|
-
return this.__options.directive;
|
1131
|
-
}
|
1132
|
-
|
1133
1153
|
__isOptimistic() {
|
1134
1154
|
return this.__options.optimistic;
|
1135
1155
|
}
|
@@ -1257,9 +1277,9 @@ class ScopeManager {
|
|
1257
1277
|
return null;
|
1258
1278
|
}
|
1259
1279
|
|
1260
|
-
attach() { } // eslint-disable-line class-methods-use-this
|
1280
|
+
attach() { } // eslint-disable-line class-methods-use-this -- Desired as instance method
|
1261
1281
|
|
1262
|
-
detach() { } // eslint-disable-line class-methods-use-this
|
1282
|
+
detach() { } // eslint-disable-line class-methods-use-this -- Desired as instance method
|
1263
1283
|
|
1264
1284
|
__nestScope(scope) {
|
1265
1285
|
if (scope instanceof GlobalScope) {
|
@@ -1360,6 +1380,9 @@ function getLast(xs) {
|
|
1360
1380
|
return xs[xs.length - 1] || null;
|
1361
1381
|
}
|
1362
1382
|
|
1383
|
+
/**
|
1384
|
+
* Visitor for destructuring patterns.
|
1385
|
+
*/
|
1363
1386
|
class PatternVisitor extends esrecurse__default["default"].Visitor {
|
1364
1387
|
static isPattern(node) {
|
1365
1388
|
const nodeType = node.type;
|
@@ -1388,7 +1411,7 @@ class PatternVisitor extends esrecurse__default["default"].Visitor {
|
|
1388
1411
|
|
1389
1412
|
this.callback(pattern, {
|
1390
1413
|
topLevel: pattern === this.rootPattern,
|
1391
|
-
rest: lastRestElement !== null && lastRestElement !==
|
1414
|
+
rest: lastRestElement !== null && lastRestElement !== void 0 && lastRestElement.argument === pattern,
|
1392
1415
|
assignments: this.assignments
|
1393
1416
|
});
|
1394
1417
|
}
|
@@ -1514,7 +1537,7 @@ function traverseIdentifierInPattern(options, rootPattern, referencer, callback)
|
|
1514
1537
|
visitor.visit(rootPattern);
|
1515
1538
|
|
1516
1539
|
// Process the right hand nodes recursively.
|
1517
|
-
if (referencer !== null && referencer !==
|
1540
|
+
if (referencer !== null && referencer !== void 0) {
|
1518
1541
|
visitor.rightHandNodes.forEach(referencer.visit, referencer);
|
1519
1542
|
}
|
1520
1543
|
}
|
@@ -1525,6 +1548,9 @@ function traverseIdentifierInPattern(options, rootPattern, referencer, callback)
|
|
1525
1548
|
// FIXME: Now, we don't create module environment, because the context is
|
1526
1549
|
// implementation dependent.
|
1527
1550
|
|
1551
|
+
/**
|
1552
|
+
* Visitor for import specifiers.
|
1553
|
+
*/
|
1528
1554
|
class Importer extends esrecurse__default["default"].Visitor {
|
1529
1555
|
constructor(declaration, referencer) {
|
1530
1556
|
super(null, referencer.options);
|
@@ -1571,7 +1597,9 @@ class Importer extends esrecurse__default["default"].Visitor {
|
|
1571
1597
|
}
|
1572
1598
|
}
|
1573
1599
|
|
1574
|
-
|
1600
|
+
/**
|
1601
|
+
* Referencing variables and creating bindings.
|
1602
|
+
*/
|
1575
1603
|
class Referencer extends esrecurse__default["default"].Visitor {
|
1576
1604
|
constructor(options, scopeManager) {
|
1577
1605
|
super(null, options);
|
@@ -1735,8 +1763,6 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
1735
1763
|
));
|
1736
1764
|
}
|
1737
1765
|
|
1738
|
-
this.visit(node.superClass);
|
1739
|
-
|
1740
1766
|
this.scopeManager.__nestClassScope(node);
|
1741
1767
|
|
1742
1768
|
if (node.id) {
|
@@ -1747,6 +1773,8 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
1747
1773
|
node
|
1748
1774
|
));
|
1749
1775
|
}
|
1776
|
+
|
1777
|
+
this.visit(node.superClass);
|
1750
1778
|
this.visit(node.body);
|
1751
1779
|
|
1752
1780
|
this.close(node);
|
@@ -1895,7 +1923,7 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
1895
1923
|
this.currentScope().__referencing(node);
|
1896
1924
|
}
|
1897
1925
|
|
1898
|
-
// eslint-disable-next-line class-methods-use-this
|
1926
|
+
// eslint-disable-next-line class-methods-use-this -- Desired as instance method
|
1899
1927
|
PrivateIdentifier() {
|
1900
1928
|
|
1901
1929
|
// Do nothing.
|
@@ -1945,9 +1973,9 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
1945
1973
|
this.visitProperty(node);
|
1946
1974
|
}
|
1947
1975
|
|
1948
|
-
BreakStatement() {} // eslint-disable-line class-methods-use-this
|
1976
|
+
BreakStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method
|
1949
1977
|
|
1950
|
-
ContinueStatement() {} // eslint-disable-line class-methods-use-this
|
1978
|
+
ContinueStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method
|
1951
1979
|
|
1952
1980
|
LabeledStatement(node) {
|
1953
1981
|
this.visit(node.body);
|
@@ -2106,7 +2134,7 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
2106
2134
|
this.visit(local);
|
2107
2135
|
}
|
2108
2136
|
|
2109
|
-
MetaProperty() { // eslint-disable-line class-methods-use-this
|
2137
|
+
MetaProperty() { // eslint-disable-line class-methods-use-this -- Desired as instance method
|
2110
2138
|
|
2111
2139
|
// do nothing.
|
2112
2140
|
}
|
@@ -2114,7 +2142,7 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
2114
2142
|
|
2115
2143
|
/* vim: set sw=4 ts=4 et tw=80 : */
|
2116
2144
|
|
2117
|
-
const version = "
|
2145
|
+
const version = "8.0.1";
|
2118
2146
|
|
2119
2147
|
/*
|
2120
2148
|
Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
@@ -2149,7 +2177,6 @@ const version = "7.2.2";
|
|
2149
2177
|
function defaultOptions() {
|
2150
2178
|
return {
|
2151
2179
|
optimistic: false,
|
2152
|
-
directive: false,
|
2153
2180
|
nodejsScope: false,
|
2154
2181
|
impliedStrict: false,
|
2155
2182
|
sourceType: "script", // one of ['script', 'module', 'commonjs']
|
@@ -2201,7 +2228,6 @@ function updateDeeply(target, override) {
|
|
2201
2228
|
* @param {espree.Tree} tree Abstract Syntax Tree
|
2202
2229
|
* @param {Object} providedOptions Options that tailor the scope analysis
|
2203
2230
|
* @param {boolean} [providedOptions.optimistic=false] the optimistic flag
|
2204
|
-
* @param {boolean} [providedOptions.directive=false] the directive flag
|
2205
2231
|
* @param {boolean} [providedOptions.ignoreEval=false] whether to check 'eval()' calls
|
2206
2232
|
* @param {boolean} [providedOptions.nodejsScope=false] whether the whole
|
2207
2233
|
* script is executed under node.js environment. When enabled, escope adds
|
@@ -45,7 +45,6 @@
|
|
45
45
|
* The main interface is the {@link analyze} function.
|
46
46
|
* @module escope
|
47
47
|
*/
|
48
|
-
/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */
|
49
48
|
|
50
49
|
import assert from "assert";
|
51
50
|
|
@@ -63,7 +62,6 @@ import eslintScopeVersion from "./version.js";
|
|
63
62
|
function defaultOptions() {
|
64
63
|
return {
|
65
64
|
optimistic: false,
|
66
|
-
directive: false,
|
67
65
|
nodejsScope: false,
|
68
66
|
impliedStrict: false,
|
69
67
|
sourceType: "script", // one of ['script', 'module', 'commonjs']
|
@@ -115,7 +113,6 @@ function updateDeeply(target, override) {
|
|
115
113
|
* @param {espree.Tree} tree Abstract Syntax Tree
|
116
114
|
* @param {Object} providedOptions Options that tailor the scope analysis
|
117
115
|
* @param {boolean} [providedOptions.optimistic=false] the optimistic flag
|
118
|
-
* @param {boolean} [providedOptions.directive=false] the directive flag
|
119
116
|
* @param {boolean} [providedOptions.ignoreEval=false] whether to check 'eval()' calls
|
120
117
|
* @param {boolean} [providedOptions.nodejsScope=false] whether the whole
|
121
118
|
* script is executed under node.js environment. When enabled, escope adds
|
@@ -22,8 +22,6 @@
|
|
22
22
|
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
23
23
|
*/
|
24
24
|
|
25
|
-
/* eslint-disable no-undefined */
|
26
|
-
|
27
25
|
import estraverse from "estraverse";
|
28
26
|
import esrecurse from "esrecurse";
|
29
27
|
|
@@ -38,6 +36,9 @@ function getLast(xs) {
|
|
38
36
|
return xs[xs.length - 1] || null;
|
39
37
|
}
|
40
38
|
|
39
|
+
/**
|
40
|
+
* Visitor for destructuring patterns.
|
41
|
+
*/
|
41
42
|
class PatternVisitor extends esrecurse.Visitor {
|
42
43
|
static isPattern(node) {
|
43
44
|
const nodeType = node.type;
|
@@ -66,7 +67,7 @@ class PatternVisitor extends esrecurse.Visitor {
|
|
66
67
|
|
67
68
|
this.callback(pattern, {
|
68
69
|
topLevel: pattern === this.rootPattern,
|
69
|
-
rest: lastRestElement !== null && lastRestElement !==
|
70
|
+
rest: lastRestElement !== null && lastRestElement !== void 0 && lastRestElement.argument === pattern,
|
70
71
|
assignments: this.assignments
|
71
72
|
});
|
72
73
|
}
|