xo 0.53.1 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/plugins.cjs +27 -4
- package/lib/options-manager.js +11 -58
- package/node_modules/@eslint-community/eslint-utils/README.md +37 -0
- package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/index.js +124 -12
- package/node_modules/@eslint-community/eslint-utils/index.js.map +1 -0
- package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/index.mjs +124 -11
- package/node_modules/@eslint-community/eslint-utils/index.mjs.map +1 -0
- package/node_modules/@eslint-community/eslint-utils/package.json +73 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/README.md +9 -10
- package/node_modules/@eslint-community/regexpp/index.d.ts +781 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/index.js +297 -262
- package/node_modules/@eslint-community/regexpp/index.js.map +1 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/index.mjs +297 -262
- package/node_modules/@eslint-community/regexpp/index.mjs.map +1 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/package.json +60 -64
- package/node_modules/@typescript-eslint/eslint-plugin/LICENSE +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/README.md +6 -92
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +10 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js +158 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +17 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +47 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +5 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +22 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js +351 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js +53 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js +384 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +205 -39
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +14 -13
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js +6 -6
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +231 -198
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js +158 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +19 -16
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +45 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js +79 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +15 -15
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js +196 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +6 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +21 -31
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +22 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +9 -9
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +3 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +19 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +47 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +7 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +46 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js +20 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +27 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +3 -8
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.md +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +52 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.md +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.md +37 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +181 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +7 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.md +61 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.md +75 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.md +88 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +21 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +18 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +7 -10
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +13 -9
- package/node_modules/@typescript-eslint/parser/LICENSE +5 -5
- package/node_modules/@typescript-eslint/parser/README.md +6 -300
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/index.js +5 -1
- package/node_modules/@typescript-eslint/parser/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.js +15 -17
- package/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/package.json +6 -6
- package/node_modules/@typescript-eslint/scope-manager/LICENSE +1 -1
- package/node_modules/@typescript-eslint/scope-manager/README.md +5 -117
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +10 -10
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +5 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +44 -10
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +3 -105
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +7 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +2 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +43 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +4 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +14 -6
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +10 -12
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +17 -17
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +5 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/package.json +12 -12
- package/node_modules/@typescript-eslint/type-utils/LICENSE +1 -1
- package/node_modules/@typescript-eslint/type-utils/README.md +7 -10
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +4 -2
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts +4 -2
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js +12 -6
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +2 -4
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +1 -0
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/package.json +6 -6
- package/node_modules/@typescript-eslint/types/LICENSE +1 -1
- package/node_modules/@typescript-eslint/types/README.md +6 -11
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +90 -16
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +9 -5
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +90 -16
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +3 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +9 -5
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +6 -6
- package/node_modules/@typescript-eslint/typescript-estree/LICENSE +5 -5
- package/node_modules/@typescript-eslint/typescript-estree/README.md +6 -379
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +8 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +8 -3
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +23 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +4 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +4 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +24 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +62 -16
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +7 -12
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +32 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.js → getWatchProgramsForProjects.js} +16 -20
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +8 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +15 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +3 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +2 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +18 -5
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +62 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +22 -48
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +70 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +8 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +103 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +23 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +4 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts +4 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -6
- package/node_modules/@typescript-eslint/utils/LICENSE +1 -1
- package/node_modules/@typescript-eslint/utils/README.md +6 -23
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +5 -5
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +60 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +13 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +5 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js +7 -7
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts +5 -5
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js +3 -3
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts +60 -6
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +13 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js +15 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js +40 -27
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +5 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/package.json +8 -8
- package/node_modules/@typescript-eslint/visitor-keys/LICENSE +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/README.md +6 -9
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +63 -48
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/package.json +4 -4
- package/node_modules/eslint-config-xo-typescript/index.js +8 -11
- package/node_modules/eslint-config-xo-typescript/package.json +5 -5
- package/node_modules/eslint-visitor-keys/README.md +1 -2
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +38 -36
- package/node_modules/eslint-visitor-keys/lib/visitor-keys.js +38 -35
- package/node_modules/eslint-visitor-keys/package.json +16 -6
- package/node_modules/fastq/README.md +1 -1
- package/node_modules/fastq/index.d.ts +1 -1
- package/node_modules/fastq/package.json +1 -1
- package/node_modules/fastq/queue.js +6 -0
- package/node_modules/fastq/test/promise.js +27 -0
- package/node_modules/grapheme-splitter/LICENSE +22 -0
- package/node_modules/grapheme-splitter/README.md +111 -0
- package/node_modules/grapheme-splitter/index.d.ts +24 -0
- package/node_modules/grapheme-splitter/index.js +1743 -0
- package/node_modules/grapheme-splitter/package.json +34 -0
- package/node_modules/grapheme-splitter/tests/GraphemeBreakTest.txt +850 -0
- package/node_modules/grapheme-splitter/tests/grapheme_splitter_tests.js +83 -0
- package/node_modules/ignore/README.md +3 -3
- package/node_modules/ignore/index.js +24 -9
- package/node_modules/ignore/legacy.js +176 -135
- package/node_modules/ignore/package.json +13 -11
- package/package.json +19 -19
- package/readme.md +1 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +0 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +0 -1
- package/node_modules/braces/CHANGELOG.md +0 -184
- package/node_modules/eslint-scope/CHANGELOG.md +0 -70
- package/node_modules/eslint-utils/README.md +0 -38
- package/node_modules/eslint-utils/index.js.map +0 -1
- package/node_modules/eslint-utils/index.mjs.map +0 -1
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md +0 -36
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +0 -201
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md +0 -98
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +0 -81
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json +0 -289
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json +0 -39
- package/node_modules/eslint-utils/package.json +0 -78
- package/node_modules/glob-parent/CHANGELOG.md +0 -110
- package/node_modules/picomatch/CHANGELOG.md +0 -136
- package/node_modules/regexpp/index.d.ts +0 -248
- package/node_modules/regexpp/index.js.map +0 -1
- package/node_modules/regexpp/index.mjs.map +0 -1
- /package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/LICENSE +0 -0
- /package/node_modules/{regexpp → @eslint-community/regexpp}/LICENSE +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/LICENSE +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/README.md +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/iterator.js +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/package.json +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/yallist.js +0 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
/*! @author Toru Nagashima <https://github.com/mysticatea> */
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
5
|
var ast = /*#__PURE__*/Object.freeze({
|
|
9
|
-
|
|
6
|
+
__proto__: null
|
|
10
7
|
});
|
|
11
8
|
|
|
12
9
|
let largeIdStartRanges = undefined;
|
|
@@ -40,17 +37,16 @@ function isIdContinue(cp) {
|
|
|
40
37
|
return isLargeIdStart(cp) || isLargeIdContinue(cp);
|
|
41
38
|
}
|
|
42
39
|
function isLargeIdStart(cp) {
|
|
43
|
-
return isInRange(cp, largeIdStartRanges
|
|
40
|
+
return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges()));
|
|
44
41
|
}
|
|
45
42
|
function isLargeIdContinue(cp) {
|
|
46
|
-
return isInRange(cp, largeIdContinueRanges
|
|
47
|
-
(largeIdContinueRanges = initLargeIdContinueRanges()));
|
|
43
|
+
return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges()));
|
|
48
44
|
}
|
|
49
45
|
function initLargeIdStartRanges() {
|
|
50
|
-
return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a
|
|
46
|
+
return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk 2e8 f1 15v 3t6 6 38f");
|
|
51
47
|
}
|
|
52
48
|
function initLargeIdContinueRanges() {
|
|
53
|
-
return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2
|
|
49
|
+
return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r g0 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 n7q 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 ji 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n");
|
|
54
50
|
}
|
|
55
51
|
function isInRange(cp, ranges) {
|
|
56
52
|
let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0;
|
|
@@ -72,34 +68,48 @@ function isInRange(cp, ranges) {
|
|
|
72
68
|
}
|
|
73
69
|
function restoreRanges(data) {
|
|
74
70
|
let last = 0;
|
|
75
|
-
return data.split(" ").map(s => (last += parseInt(s, 36) | 0));
|
|
71
|
+
return data.split(" ").map((s) => (last += parseInt(s, 36) | 0));
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
class DataSet {
|
|
79
|
-
constructor(raw2018, raw2019, raw2020, raw2021) {
|
|
75
|
+
constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023) {
|
|
80
76
|
this._raw2018 = raw2018;
|
|
81
77
|
this._raw2019 = raw2019;
|
|
82
78
|
this._raw2020 = raw2020;
|
|
83
79
|
this._raw2021 = raw2021;
|
|
80
|
+
this._raw2022 = raw2022;
|
|
81
|
+
this._raw2023 = raw2023;
|
|
84
82
|
}
|
|
85
83
|
get es2018() {
|
|
86
|
-
|
|
84
|
+
var _a;
|
|
85
|
+
return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" "))));
|
|
87
86
|
}
|
|
88
87
|
get es2019() {
|
|
89
|
-
|
|
88
|
+
var _a;
|
|
89
|
+
return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" "))));
|
|
90
90
|
}
|
|
91
91
|
get es2020() {
|
|
92
|
-
|
|
92
|
+
var _a;
|
|
93
|
+
return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" "))));
|
|
93
94
|
}
|
|
94
95
|
get es2021() {
|
|
95
|
-
|
|
96
|
+
var _a;
|
|
97
|
+
return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" "))));
|
|
98
|
+
}
|
|
99
|
+
get es2022() {
|
|
100
|
+
var _a;
|
|
101
|
+
return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" "))));
|
|
102
|
+
}
|
|
103
|
+
get es2023() {
|
|
104
|
+
var _a;
|
|
105
|
+
return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" "))));
|
|
96
106
|
}
|
|
97
107
|
}
|
|
98
108
|
const gcNameSet = new Set(["General_Category", "gc"]);
|
|
99
109
|
const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]);
|
|
100
|
-
const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "");
|
|
101
|
-
const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi");
|
|
102
|
-
const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict");
|
|
110
|
+
const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "");
|
|
111
|
+
const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz");
|
|
112
|
+
const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "");
|
|
103
113
|
function isValidUnicodeProperty(version, name, value) {
|
|
104
114
|
if (gcNameSet.has(name)) {
|
|
105
115
|
return version >= 2018 && gcValueSets.es2018.has(value);
|
|
@@ -108,7 +118,9 @@ function isValidUnicodeProperty(version, name, value) {
|
|
|
108
118
|
return ((version >= 2018 && scValueSets.es2018.has(value)) ||
|
|
109
119
|
(version >= 2019 && scValueSets.es2019.has(value)) ||
|
|
110
120
|
(version >= 2020 && scValueSets.es2020.has(value)) ||
|
|
111
|
-
(version >= 2021 && scValueSets.es2021.has(value))
|
|
121
|
+
(version >= 2021 && scValueSets.es2021.has(value)) ||
|
|
122
|
+
(version >= 2022 && scValueSets.es2022.has(value)) ||
|
|
123
|
+
(version >= 2023 && scValueSets.es2023.has(value)));
|
|
112
124
|
}
|
|
113
125
|
return false;
|
|
114
126
|
}
|
|
@@ -118,105 +130,105 @@ function isValidLoneUnicodeProperty(version, value) {
|
|
|
118
130
|
(version >= 2021 && binPropertySets.es2021.has(value)));
|
|
119
131
|
}
|
|
120
132
|
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const
|
|
133
|
+
const BACKSPACE = 0x08;
|
|
134
|
+
const CHARACTER_TABULATION = 0x09;
|
|
135
|
+
const LINE_FEED = 0x0a;
|
|
136
|
+
const LINE_TABULATION = 0x0b;
|
|
137
|
+
const FORM_FEED = 0x0c;
|
|
138
|
+
const CARRIAGE_RETURN = 0x0d;
|
|
139
|
+
const EXCLAMATION_MARK = 0x21;
|
|
140
|
+
const DOLLAR_SIGN = 0x24;
|
|
141
|
+
const LEFT_PARENTHESIS = 0x28;
|
|
142
|
+
const RIGHT_PARENTHESIS = 0x29;
|
|
143
|
+
const ASTERISK = 0x2a;
|
|
144
|
+
const PLUS_SIGN = 0x2b;
|
|
145
|
+
const COMMA = 0x2c;
|
|
146
|
+
const HYPHEN_MINUS = 0x2d;
|
|
147
|
+
const FULL_STOP = 0x2e;
|
|
148
|
+
const SOLIDUS = 0x2f;
|
|
149
|
+
const DIGIT_ZERO = 0x30;
|
|
150
|
+
const DIGIT_ONE = 0x31;
|
|
151
|
+
const DIGIT_SEVEN = 0x37;
|
|
152
|
+
const DIGIT_NINE = 0x39;
|
|
153
|
+
const COLON = 0x3a;
|
|
154
|
+
const LESS_THAN_SIGN = 0x3c;
|
|
155
|
+
const EQUALS_SIGN = 0x3d;
|
|
156
|
+
const GREATER_THAN_SIGN = 0x3e;
|
|
157
|
+
const QUESTION_MARK = 0x3f;
|
|
158
|
+
const LATIN_CAPITAL_LETTER_A = 0x41;
|
|
159
|
+
const LATIN_CAPITAL_LETTER_B = 0x42;
|
|
160
|
+
const LATIN_CAPITAL_LETTER_D = 0x44;
|
|
161
|
+
const LATIN_CAPITAL_LETTER_F = 0x46;
|
|
162
|
+
const LATIN_CAPITAL_LETTER_P = 0x50;
|
|
163
|
+
const LATIN_CAPITAL_LETTER_S = 0x53;
|
|
164
|
+
const LATIN_CAPITAL_LETTER_W = 0x57;
|
|
165
|
+
const LATIN_CAPITAL_LETTER_Z = 0x5a;
|
|
166
|
+
const LOW_LINE = 0x5f;
|
|
167
|
+
const LATIN_SMALL_LETTER_A = 0x61;
|
|
168
|
+
const LATIN_SMALL_LETTER_B = 0x62;
|
|
169
|
+
const LATIN_SMALL_LETTER_C = 0x63;
|
|
170
|
+
const LATIN_SMALL_LETTER_D = 0x64;
|
|
171
|
+
const LATIN_SMALL_LETTER_F = 0x66;
|
|
172
|
+
const LATIN_SMALL_LETTER_G = 0x67;
|
|
173
|
+
const LATIN_SMALL_LETTER_I = 0x69;
|
|
174
|
+
const LATIN_SMALL_LETTER_K = 0x6b;
|
|
175
|
+
const LATIN_SMALL_LETTER_M = 0x6d;
|
|
176
|
+
const LATIN_SMALL_LETTER_N = 0x6e;
|
|
177
|
+
const LATIN_SMALL_LETTER_P = 0x70;
|
|
178
|
+
const LATIN_SMALL_LETTER_R = 0x72;
|
|
179
|
+
const LATIN_SMALL_LETTER_S = 0x73;
|
|
180
|
+
const LATIN_SMALL_LETTER_T = 0x74;
|
|
181
|
+
const LATIN_SMALL_LETTER_U = 0x75;
|
|
182
|
+
const LATIN_SMALL_LETTER_V = 0x76;
|
|
183
|
+
const LATIN_SMALL_LETTER_W = 0x77;
|
|
184
|
+
const LATIN_SMALL_LETTER_X = 0x78;
|
|
185
|
+
const LATIN_SMALL_LETTER_Y = 0x79;
|
|
186
|
+
const LATIN_SMALL_LETTER_Z = 0x7a;
|
|
187
|
+
const LEFT_SQUARE_BRACKET = 0x5b;
|
|
188
|
+
const REVERSE_SOLIDUS = 0x5c;
|
|
189
|
+
const RIGHT_SQUARE_BRACKET = 0x5d;
|
|
190
|
+
const CIRCUMFLEX_ACCENT = 0x5e;
|
|
191
|
+
const LEFT_CURLY_BRACKET = 0x7b;
|
|
192
|
+
const VERTICAL_LINE = 0x7c;
|
|
193
|
+
const RIGHT_CURLY_BRACKET = 0x7d;
|
|
194
|
+
const ZERO_WIDTH_NON_JOINER = 0x200c;
|
|
195
|
+
const ZERO_WIDTH_JOINER = 0x200d;
|
|
196
|
+
const LINE_SEPARATOR = 0x2028;
|
|
197
|
+
const PARAGRAPH_SEPARATOR = 0x2029;
|
|
198
|
+
const MIN_CODE_POINT = 0x00;
|
|
199
|
+
const MAX_CODE_POINT = 0x10ffff;
|
|
188
200
|
function isLatinLetter(code) {
|
|
189
|
-
return ((code >=
|
|
190
|
-
(code >=
|
|
201
|
+
return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) ||
|
|
202
|
+
(code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z));
|
|
191
203
|
}
|
|
192
204
|
function isDecimalDigit(code) {
|
|
193
|
-
return code >=
|
|
205
|
+
return code >= DIGIT_ZERO && code <= DIGIT_NINE;
|
|
194
206
|
}
|
|
195
207
|
function isOctalDigit(code) {
|
|
196
|
-
return code >=
|
|
208
|
+
return code >= DIGIT_ZERO && code <= DIGIT_SEVEN;
|
|
197
209
|
}
|
|
198
210
|
function isHexDigit(code) {
|
|
199
|
-
return ((code >=
|
|
200
|
-
(code >=
|
|
201
|
-
(code >=
|
|
211
|
+
return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) ||
|
|
212
|
+
(code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) ||
|
|
213
|
+
(code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F));
|
|
202
214
|
}
|
|
203
215
|
function isLineTerminator(code) {
|
|
204
|
-
return (code ===
|
|
205
|
-
code ===
|
|
206
|
-
code ===
|
|
207
|
-
code ===
|
|
216
|
+
return (code === LINE_FEED ||
|
|
217
|
+
code === CARRIAGE_RETURN ||
|
|
218
|
+
code === LINE_SEPARATOR ||
|
|
219
|
+
code === PARAGRAPH_SEPARATOR);
|
|
208
220
|
}
|
|
209
221
|
function isValidUnicode(code) {
|
|
210
|
-
return code >=
|
|
222
|
+
return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT;
|
|
211
223
|
}
|
|
212
224
|
function digitToInt(code) {
|
|
213
|
-
if (code >=
|
|
214
|
-
return code -
|
|
225
|
+
if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) {
|
|
226
|
+
return code - LATIN_SMALL_LETTER_A + 10;
|
|
215
227
|
}
|
|
216
|
-
if (code >=
|
|
217
|
-
return code -
|
|
228
|
+
if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) {
|
|
229
|
+
return code - LATIN_CAPITAL_LETTER_A + 10;
|
|
218
230
|
}
|
|
219
|
-
return code -
|
|
231
|
+
return code - DIGIT_ZERO;
|
|
220
232
|
}
|
|
221
233
|
function isLeadSurrogate(code) {
|
|
222
234
|
return code >= 0xd800 && code <= 0xdbff;
|
|
@@ -346,33 +358,33 @@ class RegExpSyntaxError extends SyntaxError {
|
|
|
346
358
|
}
|
|
347
359
|
|
|
348
360
|
function isSyntaxCharacter(cp) {
|
|
349
|
-
return (cp ===
|
|
350
|
-
cp ===
|
|
351
|
-
cp ===
|
|
352
|
-
cp ===
|
|
353
|
-
cp ===
|
|
354
|
-
cp ===
|
|
355
|
-
cp ===
|
|
356
|
-
cp ===
|
|
357
|
-
cp ===
|
|
358
|
-
cp ===
|
|
359
|
-
cp ===
|
|
360
|
-
cp ===
|
|
361
|
-
cp ===
|
|
362
|
-
cp ===
|
|
361
|
+
return (cp === CIRCUMFLEX_ACCENT ||
|
|
362
|
+
cp === DOLLAR_SIGN ||
|
|
363
|
+
cp === REVERSE_SOLIDUS ||
|
|
364
|
+
cp === FULL_STOP ||
|
|
365
|
+
cp === ASTERISK ||
|
|
366
|
+
cp === PLUS_SIGN ||
|
|
367
|
+
cp === QUESTION_MARK ||
|
|
368
|
+
cp === LEFT_PARENTHESIS ||
|
|
369
|
+
cp === RIGHT_PARENTHESIS ||
|
|
370
|
+
cp === LEFT_SQUARE_BRACKET ||
|
|
371
|
+
cp === RIGHT_SQUARE_BRACKET ||
|
|
372
|
+
cp === LEFT_CURLY_BRACKET ||
|
|
373
|
+
cp === RIGHT_CURLY_BRACKET ||
|
|
374
|
+
cp === VERTICAL_LINE);
|
|
363
375
|
}
|
|
364
376
|
function isRegExpIdentifierStart(cp) {
|
|
365
|
-
return isIdStart(cp) || cp ===
|
|
377
|
+
return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE;
|
|
366
378
|
}
|
|
367
379
|
function isRegExpIdentifierPart(cp) {
|
|
368
380
|
return (isIdContinue(cp) ||
|
|
369
|
-
cp ===
|
|
370
|
-
cp ===
|
|
371
|
-
cp ===
|
|
372
|
-
cp ===
|
|
381
|
+
cp === DOLLAR_SIGN ||
|
|
382
|
+
cp === LOW_LINE ||
|
|
383
|
+
cp === ZERO_WIDTH_NON_JOINER ||
|
|
384
|
+
cp === ZERO_WIDTH_JOINER);
|
|
373
385
|
}
|
|
374
386
|
function isUnicodePropertyNameCharacter(cp) {
|
|
375
|
-
return isLatinLetter(cp) || cp ===
|
|
387
|
+
return isLatinLetter(cp) || cp === LOW_LINE;
|
|
376
388
|
}
|
|
377
389
|
function isUnicodePropertyValueCharacter(cp) {
|
|
378
390
|
return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp);
|
|
@@ -392,13 +404,13 @@ class RegExpValidator {
|
|
|
392
404
|
this._numCapturingParens = 0;
|
|
393
405
|
this._groupNames = new Set();
|
|
394
406
|
this._backreferenceNames = new Set();
|
|
395
|
-
this._options = options
|
|
407
|
+
this._options = options !== null && options !== void 0 ? options : {};
|
|
396
408
|
}
|
|
397
409
|
validateLiteral(source, start = 0, end = source.length) {
|
|
398
410
|
this._uFlag = this._nFlag = false;
|
|
399
411
|
this.reset(source, start, end);
|
|
400
412
|
this.onLiteralEnter(start);
|
|
401
|
-
if (this.eat(
|
|
413
|
+
if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) {
|
|
402
414
|
const flagStart = this.index;
|
|
403
415
|
const uFlag = source.includes("u", flagStart);
|
|
404
416
|
this.validateFlags(source, flagStart, end);
|
|
@@ -428,36 +440,50 @@ class RegExpValidator {
|
|
|
428
440
|
this.raise(`Duplicated flag '${source[i]}'`);
|
|
429
441
|
}
|
|
430
442
|
existingFlags.add(flag);
|
|
431
|
-
if (flag ===
|
|
443
|
+
if (flag === LATIN_SMALL_LETTER_G) {
|
|
432
444
|
global = true;
|
|
433
445
|
}
|
|
434
|
-
else if (flag ===
|
|
446
|
+
else if (flag === LATIN_SMALL_LETTER_I) {
|
|
435
447
|
ignoreCase = true;
|
|
436
448
|
}
|
|
437
|
-
else if (flag ===
|
|
449
|
+
else if (flag === LATIN_SMALL_LETTER_M) {
|
|
438
450
|
multiline = true;
|
|
439
451
|
}
|
|
440
|
-
else if (flag ===
|
|
452
|
+
else if (flag === LATIN_SMALL_LETTER_U &&
|
|
453
|
+
this.ecmaVersion >= 2015) {
|
|
441
454
|
unicode = true;
|
|
442
455
|
}
|
|
443
|
-
else if (flag ===
|
|
456
|
+
else if (flag === LATIN_SMALL_LETTER_Y &&
|
|
457
|
+
this.ecmaVersion >= 2015) {
|
|
444
458
|
sticky = true;
|
|
445
459
|
}
|
|
446
|
-
else if (flag ===
|
|
460
|
+
else if (flag === LATIN_SMALL_LETTER_S &&
|
|
461
|
+
this.ecmaVersion >= 2018) {
|
|
447
462
|
dotAll = true;
|
|
448
463
|
}
|
|
449
|
-
else if (flag ===
|
|
464
|
+
else if (flag === LATIN_SMALL_LETTER_D &&
|
|
465
|
+
this.ecmaVersion >= 2022) {
|
|
450
466
|
hasIndices = true;
|
|
451
467
|
}
|
|
452
468
|
else {
|
|
453
469
|
this.raise(`Invalid flag '${source[i]}'`);
|
|
454
470
|
}
|
|
455
471
|
}
|
|
456
|
-
this.
|
|
472
|
+
this.onRegExpFlags(start, end, {
|
|
473
|
+
global,
|
|
474
|
+
ignoreCase,
|
|
475
|
+
multiline,
|
|
476
|
+
unicode,
|
|
477
|
+
sticky,
|
|
478
|
+
dotAll,
|
|
479
|
+
hasIndices,
|
|
480
|
+
});
|
|
457
481
|
}
|
|
458
482
|
validatePattern(source, start = 0, end = source.length, uFlag = false) {
|
|
459
483
|
this._uFlag = uFlag && this.ecmaVersion >= 2015;
|
|
460
|
-
this._nFlag =
|
|
484
|
+
this._nFlag =
|
|
485
|
+
(uFlag && this.ecmaVersion >= 2018) ||
|
|
486
|
+
Boolean(this._options.strict && this.ecmaVersion >= 2023);
|
|
461
487
|
this.reset(source, start, end);
|
|
462
488
|
this.consumePattern();
|
|
463
489
|
if (!this._nFlag &&
|
|
@@ -469,10 +495,11 @@ class RegExpValidator {
|
|
|
469
495
|
}
|
|
470
496
|
}
|
|
471
497
|
get strict() {
|
|
472
|
-
return Boolean(this._options.strict || this._uFlag
|
|
498
|
+
return Boolean(this._options.strict) || this._uFlag;
|
|
473
499
|
}
|
|
474
500
|
get ecmaVersion() {
|
|
475
|
-
|
|
501
|
+
var _a;
|
|
502
|
+
return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : 2023;
|
|
476
503
|
}
|
|
477
504
|
onLiteralEnter(start) {
|
|
478
505
|
if (this._options.onLiteralEnter) {
|
|
@@ -484,9 +511,12 @@ class RegExpValidator {
|
|
|
484
511
|
this._options.onLiteralLeave(start, end);
|
|
485
512
|
}
|
|
486
513
|
}
|
|
487
|
-
|
|
514
|
+
onRegExpFlags(start, end, flags) {
|
|
515
|
+
if (this._options.onRegExpFlags) {
|
|
516
|
+
this._options.onRegExpFlags(start, end, flags);
|
|
517
|
+
}
|
|
488
518
|
if (this._options.onFlags) {
|
|
489
|
-
this._options.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices);
|
|
519
|
+
this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices);
|
|
490
520
|
}
|
|
491
521
|
}
|
|
492
522
|
onPatternEnter(start) {
|
|
@@ -656,17 +686,17 @@ class RegExpValidator {
|
|
|
656
686
|
if (escaped) {
|
|
657
687
|
escaped = false;
|
|
658
688
|
}
|
|
659
|
-
else if (cp ===
|
|
689
|
+
else if (cp === REVERSE_SOLIDUS) {
|
|
660
690
|
escaped = true;
|
|
661
691
|
}
|
|
662
|
-
else if (cp ===
|
|
692
|
+
else if (cp === LEFT_SQUARE_BRACKET) {
|
|
663
693
|
inClass = true;
|
|
664
694
|
}
|
|
665
|
-
else if (cp ===
|
|
695
|
+
else if (cp === RIGHT_SQUARE_BRACKET) {
|
|
666
696
|
inClass = false;
|
|
667
697
|
}
|
|
668
|
-
else if ((cp ===
|
|
669
|
-
(cp ===
|
|
698
|
+
else if ((cp === SOLIDUS && !inClass) ||
|
|
699
|
+
(cp === ASTERISK && this.index === start)) {
|
|
670
700
|
break;
|
|
671
701
|
}
|
|
672
702
|
this.advance();
|
|
@@ -682,13 +712,13 @@ class RegExpValidator {
|
|
|
682
712
|
this.consumeDisjunction();
|
|
683
713
|
const cp = this.currentCodePoint;
|
|
684
714
|
if (this.currentCodePoint !== -1) {
|
|
685
|
-
if (cp ===
|
|
715
|
+
if (cp === RIGHT_PARENTHESIS) {
|
|
686
716
|
this.raise("Unmatched ')'");
|
|
687
717
|
}
|
|
688
|
-
if (cp ===
|
|
718
|
+
if (cp === REVERSE_SOLIDUS) {
|
|
689
719
|
this.raise("\\ at end of pattern");
|
|
690
720
|
}
|
|
691
|
-
if (cp ===
|
|
721
|
+
if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) {
|
|
692
722
|
this.raise("Lone quantifier brackets");
|
|
693
723
|
}
|
|
694
724
|
const c = String.fromCodePoint(cp);
|
|
@@ -711,21 +741,21 @@ class RegExpValidator {
|
|
|
711
741
|
if (escaped) {
|
|
712
742
|
escaped = false;
|
|
713
743
|
}
|
|
714
|
-
else if (cp ===
|
|
744
|
+
else if (cp === REVERSE_SOLIDUS) {
|
|
715
745
|
escaped = true;
|
|
716
746
|
}
|
|
717
|
-
else if (cp ===
|
|
747
|
+
else if (cp === LEFT_SQUARE_BRACKET) {
|
|
718
748
|
inClass = true;
|
|
719
749
|
}
|
|
720
|
-
else if (cp ===
|
|
750
|
+
else if (cp === RIGHT_SQUARE_BRACKET) {
|
|
721
751
|
inClass = false;
|
|
722
752
|
}
|
|
723
|
-
else if (cp ===
|
|
753
|
+
else if (cp === LEFT_PARENTHESIS &&
|
|
724
754
|
!inClass &&
|
|
725
|
-
(this.nextCodePoint !==
|
|
726
|
-
(this.nextCodePoint2 ===
|
|
727
|
-
this.nextCodePoint3 !==
|
|
728
|
-
this.nextCodePoint3 !==
|
|
755
|
+
(this.nextCodePoint !== QUESTION_MARK ||
|
|
756
|
+
(this.nextCodePoint2 === LESS_THAN_SIGN &&
|
|
757
|
+
this.nextCodePoint3 !== EQUALS_SIGN &&
|
|
758
|
+
this.nextCodePoint3 !== EXCLAMATION_MARK))) {
|
|
729
759
|
count += 1;
|
|
730
760
|
}
|
|
731
761
|
this.advance();
|
|
@@ -739,11 +769,11 @@ class RegExpValidator {
|
|
|
739
769
|
this.onDisjunctionEnter(start);
|
|
740
770
|
do {
|
|
741
771
|
this.consumeAlternative(i++);
|
|
742
|
-
} while (this.eat(
|
|
772
|
+
} while (this.eat(VERTICAL_LINE));
|
|
743
773
|
if (this.consumeQuantifier(true)) {
|
|
744
774
|
this.raise("Nothing to repeat");
|
|
745
775
|
}
|
|
746
|
-
if (this.eat(
|
|
776
|
+
if (this.eat(LEFT_CURLY_BRACKET)) {
|
|
747
777
|
this.raise("Lone quantifier brackets");
|
|
748
778
|
}
|
|
749
779
|
this.onDisjunctionLeave(start, this.index);
|
|
@@ -772,30 +802,31 @@ class RegExpValidator {
|
|
|
772
802
|
consumeAssertion() {
|
|
773
803
|
const start = this.index;
|
|
774
804
|
this._lastAssertionIsQuantifiable = false;
|
|
775
|
-
if (this.eat(
|
|
805
|
+
if (this.eat(CIRCUMFLEX_ACCENT)) {
|
|
776
806
|
this.onEdgeAssertion(start, this.index, "start");
|
|
777
807
|
return true;
|
|
778
808
|
}
|
|
779
|
-
if (this.eat(
|
|
809
|
+
if (this.eat(DOLLAR_SIGN)) {
|
|
780
810
|
this.onEdgeAssertion(start, this.index, "end");
|
|
781
811
|
return true;
|
|
782
812
|
}
|
|
783
|
-
if (this.eat2(
|
|
813
|
+
if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) {
|
|
784
814
|
this.onWordBoundaryAssertion(start, this.index, "word", true);
|
|
785
815
|
return true;
|
|
786
816
|
}
|
|
787
|
-
if (this.eat2(
|
|
817
|
+
if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) {
|
|
788
818
|
this.onWordBoundaryAssertion(start, this.index, "word", false);
|
|
789
819
|
return true;
|
|
790
820
|
}
|
|
791
|
-
if (this.eat2(
|
|
792
|
-
const lookbehind = this.ecmaVersion >= 2018 && this.eat(
|
|
821
|
+
if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) {
|
|
822
|
+
const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN);
|
|
793
823
|
let negate = false;
|
|
794
|
-
if (this.eat(
|
|
824
|
+
if (this.eat(EQUALS_SIGN) ||
|
|
825
|
+
(negate = this.eat(EXCLAMATION_MARK))) {
|
|
795
826
|
const kind = lookbehind ? "lookbehind" : "lookahead";
|
|
796
827
|
this.onLookaroundAssertionEnter(start, kind, negate);
|
|
797
828
|
this.consumeDisjunction();
|
|
798
|
-
if (!this.eat(
|
|
829
|
+
if (!this.eat(RIGHT_PARENTHESIS)) {
|
|
799
830
|
this.raise("Unterminated group");
|
|
800
831
|
}
|
|
801
832
|
this._lastAssertionIsQuantifiable = !lookbehind && !this.strict;
|
|
@@ -811,15 +842,15 @@ class RegExpValidator {
|
|
|
811
842
|
let min = 0;
|
|
812
843
|
let max = 0;
|
|
813
844
|
let greedy = false;
|
|
814
|
-
if (this.eat(
|
|
845
|
+
if (this.eat(ASTERISK)) {
|
|
815
846
|
min = 0;
|
|
816
847
|
max = Number.POSITIVE_INFINITY;
|
|
817
848
|
}
|
|
818
|
-
else if (this.eat(
|
|
849
|
+
else if (this.eat(PLUS_SIGN)) {
|
|
819
850
|
min = 1;
|
|
820
851
|
max = Number.POSITIVE_INFINITY;
|
|
821
852
|
}
|
|
822
|
-
else if (this.eat(
|
|
853
|
+
else if (this.eat(QUESTION_MARK)) {
|
|
823
854
|
min = 0;
|
|
824
855
|
max = 1;
|
|
825
856
|
}
|
|
@@ -830,7 +861,7 @@ class RegExpValidator {
|
|
|
830
861
|
else {
|
|
831
862
|
return false;
|
|
832
863
|
}
|
|
833
|
-
greedy = !this.eat(
|
|
864
|
+
greedy = !this.eat(QUESTION_MARK);
|
|
834
865
|
if (!noConsume) {
|
|
835
866
|
this.onQuantifier(start, this.index, min, max, greedy);
|
|
836
867
|
}
|
|
@@ -838,17 +869,17 @@ class RegExpValidator {
|
|
|
838
869
|
}
|
|
839
870
|
eatBracedQuantifier(noError) {
|
|
840
871
|
const start = this.index;
|
|
841
|
-
if (this.eat(
|
|
872
|
+
if (this.eat(LEFT_CURLY_BRACKET)) {
|
|
842
873
|
this._lastMinValue = 0;
|
|
843
874
|
this._lastMaxValue = Number.POSITIVE_INFINITY;
|
|
844
875
|
if (this.eatDecimalDigits()) {
|
|
845
876
|
this._lastMinValue = this._lastMaxValue = this._lastIntValue;
|
|
846
|
-
if (this.eat(
|
|
877
|
+
if (this.eat(COMMA)) {
|
|
847
878
|
this._lastMaxValue = this.eatDecimalDigits()
|
|
848
879
|
? this._lastIntValue
|
|
849
880
|
: Number.POSITIVE_INFINITY;
|
|
850
881
|
}
|
|
851
|
-
if (this.eat(
|
|
882
|
+
if (this.eat(RIGHT_CURLY_BRACKET)) {
|
|
852
883
|
if (!noError && this._lastMaxValue < this._lastMinValue) {
|
|
853
884
|
this.raise("numbers out of order in {} quantifier");
|
|
854
885
|
}
|
|
@@ -871,7 +902,7 @@ class RegExpValidator {
|
|
|
871
902
|
this.consumeCapturingGroup());
|
|
872
903
|
}
|
|
873
904
|
consumeDot() {
|
|
874
|
-
if (this.eat(
|
|
905
|
+
if (this.eat(FULL_STOP)) {
|
|
875
906
|
this.onAnyCharacterSet(this.index - 1, this.index, "any");
|
|
876
907
|
return true;
|
|
877
908
|
}
|
|
@@ -879,7 +910,7 @@ class RegExpValidator {
|
|
|
879
910
|
}
|
|
880
911
|
consumeReverseSolidusAtomEscape() {
|
|
881
912
|
const start = this.index;
|
|
882
|
-
if (this.eat(
|
|
913
|
+
if (this.eat(REVERSE_SOLIDUS)) {
|
|
883
914
|
if (this.consumeAtomEscape()) {
|
|
884
915
|
return true;
|
|
885
916
|
}
|
|
@@ -889,10 +920,10 @@ class RegExpValidator {
|
|
|
889
920
|
}
|
|
890
921
|
consumeUncapturingGroup() {
|
|
891
922
|
const start = this.index;
|
|
892
|
-
if (this.eat3(
|
|
923
|
+
if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) {
|
|
893
924
|
this.onGroupEnter(start);
|
|
894
925
|
this.consumeDisjunction();
|
|
895
|
-
if (!this.eat(
|
|
926
|
+
if (!this.eat(RIGHT_PARENTHESIS)) {
|
|
896
927
|
this.raise("Unterminated group");
|
|
897
928
|
}
|
|
898
929
|
this.onGroupLeave(start, this.index);
|
|
@@ -902,19 +933,19 @@ class RegExpValidator {
|
|
|
902
933
|
}
|
|
903
934
|
consumeCapturingGroup() {
|
|
904
935
|
const start = this.index;
|
|
905
|
-
if (this.eat(
|
|
936
|
+
if (this.eat(LEFT_PARENTHESIS)) {
|
|
906
937
|
let name = null;
|
|
907
938
|
if (this.ecmaVersion >= 2018) {
|
|
908
939
|
if (this.consumeGroupSpecifier()) {
|
|
909
940
|
name = this._lastStrValue;
|
|
910
941
|
}
|
|
911
942
|
}
|
|
912
|
-
else if (this.currentCodePoint ===
|
|
943
|
+
else if (this.currentCodePoint === QUESTION_MARK) {
|
|
913
944
|
this.raise("Invalid group");
|
|
914
945
|
}
|
|
915
946
|
this.onCapturingGroupEnter(start, name);
|
|
916
947
|
this.consumeDisjunction();
|
|
917
|
-
if (!this.eat(
|
|
948
|
+
if (!this.eat(RIGHT_PARENTHESIS)) {
|
|
918
949
|
this.raise("Unterminated group");
|
|
919
950
|
}
|
|
920
951
|
this.onCapturingGroupLeave(start, this.index, name);
|
|
@@ -934,11 +965,11 @@ class RegExpValidator {
|
|
|
934
965
|
}
|
|
935
966
|
consumeReverseSolidusFollowedByC() {
|
|
936
967
|
const start = this.index;
|
|
937
|
-
if (this.currentCodePoint ===
|
|
938
|
-
this.nextCodePoint ===
|
|
968
|
+
if (this.currentCodePoint === REVERSE_SOLIDUS &&
|
|
969
|
+
this.nextCodePoint === LATIN_SMALL_LETTER_C) {
|
|
939
970
|
this._lastIntValue = this.currentCodePoint;
|
|
940
971
|
this.advance();
|
|
941
|
-
this.onCharacter(start, this.index,
|
|
972
|
+
this.onCharacter(start, this.index, REVERSE_SOLIDUS);
|
|
942
973
|
return true;
|
|
943
974
|
}
|
|
944
975
|
return false;
|
|
@@ -963,17 +994,17 @@ class RegExpValidator {
|
|
|
963
994
|
const start = this.index;
|
|
964
995
|
const cp = this.currentCodePoint;
|
|
965
996
|
if (cp !== -1 &&
|
|
966
|
-
cp !==
|
|
967
|
-
cp !==
|
|
968
|
-
cp !==
|
|
969
|
-
cp !==
|
|
970
|
-
cp !==
|
|
971
|
-
cp !==
|
|
972
|
-
cp !==
|
|
973
|
-
cp !==
|
|
974
|
-
cp !==
|
|
975
|
-
cp !==
|
|
976
|
-
cp !==
|
|
997
|
+
cp !== CIRCUMFLEX_ACCENT &&
|
|
998
|
+
cp !== DOLLAR_SIGN &&
|
|
999
|
+
cp !== REVERSE_SOLIDUS &&
|
|
1000
|
+
cp !== FULL_STOP &&
|
|
1001
|
+
cp !== ASTERISK &&
|
|
1002
|
+
cp !== PLUS_SIGN &&
|
|
1003
|
+
cp !== QUESTION_MARK &&
|
|
1004
|
+
cp !== LEFT_PARENTHESIS &&
|
|
1005
|
+
cp !== RIGHT_PARENTHESIS &&
|
|
1006
|
+
cp !== LEFT_SQUARE_BRACKET &&
|
|
1007
|
+
cp !== VERTICAL_LINE) {
|
|
977
1008
|
this.advance();
|
|
978
1009
|
this.onCharacter(start, this.index, cp);
|
|
979
1010
|
return true;
|
|
@@ -981,7 +1012,7 @@ class RegExpValidator {
|
|
|
981
1012
|
return false;
|
|
982
1013
|
}
|
|
983
1014
|
consumeGroupSpecifier() {
|
|
984
|
-
if (this.eat(
|
|
1015
|
+
if (this.eat(QUESTION_MARK)) {
|
|
985
1016
|
if (this.eatGroupName()) {
|
|
986
1017
|
if (!this._groupNames.has(this._lastStrValue)) {
|
|
987
1018
|
this._groupNames.add(this._lastStrValue);
|
|
@@ -1022,32 +1053,32 @@ class RegExpValidator {
|
|
|
1022
1053
|
}
|
|
1023
1054
|
consumeCharacterClassEscape() {
|
|
1024
1055
|
const start = this.index;
|
|
1025
|
-
if (this.eat(
|
|
1056
|
+
if (this.eat(LATIN_SMALL_LETTER_D)) {
|
|
1026
1057
|
this._lastIntValue = -1;
|
|
1027
1058
|
this.onEscapeCharacterSet(start - 1, this.index, "digit", false);
|
|
1028
1059
|
return true;
|
|
1029
1060
|
}
|
|
1030
|
-
if (this.eat(
|
|
1061
|
+
if (this.eat(LATIN_CAPITAL_LETTER_D)) {
|
|
1031
1062
|
this._lastIntValue = -1;
|
|
1032
1063
|
this.onEscapeCharacterSet(start - 1, this.index, "digit", true);
|
|
1033
1064
|
return true;
|
|
1034
1065
|
}
|
|
1035
|
-
if (this.eat(
|
|
1066
|
+
if (this.eat(LATIN_SMALL_LETTER_S)) {
|
|
1036
1067
|
this._lastIntValue = -1;
|
|
1037
1068
|
this.onEscapeCharacterSet(start - 1, this.index, "space", false);
|
|
1038
1069
|
return true;
|
|
1039
1070
|
}
|
|
1040
|
-
if (this.eat(
|
|
1071
|
+
if (this.eat(LATIN_CAPITAL_LETTER_S)) {
|
|
1041
1072
|
this._lastIntValue = -1;
|
|
1042
1073
|
this.onEscapeCharacterSet(start - 1, this.index, "space", true);
|
|
1043
1074
|
return true;
|
|
1044
1075
|
}
|
|
1045
|
-
if (this.eat(
|
|
1076
|
+
if (this.eat(LATIN_SMALL_LETTER_W)) {
|
|
1046
1077
|
this._lastIntValue = -1;
|
|
1047
1078
|
this.onEscapeCharacterSet(start - 1, this.index, "word", false);
|
|
1048
1079
|
return true;
|
|
1049
1080
|
}
|
|
1050
|
-
if (this.eat(
|
|
1081
|
+
if (this.eat(LATIN_CAPITAL_LETTER_W)) {
|
|
1051
1082
|
this._lastIntValue = -1;
|
|
1052
1083
|
this.onEscapeCharacterSet(start - 1, this.index, "word", true);
|
|
1053
1084
|
return true;
|
|
@@ -1055,12 +1086,12 @@ class RegExpValidator {
|
|
|
1055
1086
|
let negate = false;
|
|
1056
1087
|
if (this._uFlag &&
|
|
1057
1088
|
this.ecmaVersion >= 2018 &&
|
|
1058
|
-
(this.eat(
|
|
1059
|
-
(negate = this.eat(
|
|
1089
|
+
(this.eat(LATIN_SMALL_LETTER_P) ||
|
|
1090
|
+
(negate = this.eat(LATIN_CAPITAL_LETTER_P)))) {
|
|
1060
1091
|
this._lastIntValue = -1;
|
|
1061
|
-
if (this.eat(
|
|
1092
|
+
if (this.eat(LEFT_CURLY_BRACKET) &&
|
|
1062
1093
|
this.eatUnicodePropertyValueExpression() &&
|
|
1063
|
-
this.eat(
|
|
1094
|
+
this.eat(RIGHT_CURLY_BRACKET)) {
|
|
1064
1095
|
this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", this._lastKeyValue, this._lastValValue || null, negate);
|
|
1065
1096
|
return true;
|
|
1066
1097
|
}
|
|
@@ -1086,7 +1117,7 @@ class RegExpValidator {
|
|
|
1086
1117
|
}
|
|
1087
1118
|
consumeKGroupName() {
|
|
1088
1119
|
const start = this.index;
|
|
1089
|
-
if (this.eat(
|
|
1120
|
+
if (this.eat(LATIN_SMALL_LETTER_K)) {
|
|
1090
1121
|
if (this.eatGroupName()) {
|
|
1091
1122
|
const groupName = this._lastStrValue;
|
|
1092
1123
|
this._backreferenceNames.add(groupName);
|
|
@@ -1099,11 +1130,11 @@ class RegExpValidator {
|
|
|
1099
1130
|
}
|
|
1100
1131
|
consumeCharacterClass() {
|
|
1101
1132
|
const start = this.index;
|
|
1102
|
-
if (this.eat(
|
|
1103
|
-
const negate = this.eat(
|
|
1133
|
+
if (this.eat(LEFT_SQUARE_BRACKET)) {
|
|
1134
|
+
const negate = this.eat(CIRCUMFLEX_ACCENT);
|
|
1104
1135
|
this.onCharacterClassEnter(start, negate);
|
|
1105
1136
|
this.consumeClassRanges();
|
|
1106
|
-
if (!this.eat(
|
|
1137
|
+
if (!this.eat(RIGHT_SQUARE_BRACKET)) {
|
|
1107
1138
|
this.raise("Unterminated character class");
|
|
1108
1139
|
}
|
|
1109
1140
|
this.onCharacterClassLeave(start, this.index, negate);
|
|
@@ -1119,10 +1150,10 @@ class RegExpValidator {
|
|
|
1119
1150
|
break;
|
|
1120
1151
|
}
|
|
1121
1152
|
const min = this._lastIntValue;
|
|
1122
|
-
if (!this.eat(
|
|
1153
|
+
if (!this.eat(HYPHEN_MINUS)) {
|
|
1123
1154
|
continue;
|
|
1124
1155
|
}
|
|
1125
|
-
this.onCharacter(this.index - 1, this.index,
|
|
1156
|
+
this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS);
|
|
1126
1157
|
if (!this.consumeClassAtom()) {
|
|
1127
1158
|
break;
|
|
1128
1159
|
}
|
|
@@ -1142,18 +1173,21 @@ class RegExpValidator {
|
|
|
1142
1173
|
consumeClassAtom() {
|
|
1143
1174
|
const start = this.index;
|
|
1144
1175
|
const cp = this.currentCodePoint;
|
|
1145
|
-
if (cp !== -1 &&
|
|
1176
|
+
if (cp !== -1 &&
|
|
1177
|
+
cp !== REVERSE_SOLIDUS &&
|
|
1178
|
+
cp !== RIGHT_SQUARE_BRACKET) {
|
|
1146
1179
|
this.advance();
|
|
1147
1180
|
this._lastIntValue = cp;
|
|
1148
1181
|
this.onCharacter(start, this.index, this._lastIntValue);
|
|
1149
1182
|
return true;
|
|
1150
1183
|
}
|
|
1151
|
-
if (this.eat(
|
|
1184
|
+
if (this.eat(REVERSE_SOLIDUS)) {
|
|
1152
1185
|
if (this.consumeClassEscape()) {
|
|
1153
1186
|
return true;
|
|
1154
1187
|
}
|
|
1155
|
-
if (!this.strict &&
|
|
1156
|
-
this.
|
|
1188
|
+
if (!this.strict &&
|
|
1189
|
+
this.currentCodePoint === LATIN_SMALL_LETTER_C) {
|
|
1190
|
+
this._lastIntValue = REVERSE_SOLIDUS;
|
|
1157
1191
|
this.onCharacter(start, this.index, this._lastIntValue);
|
|
1158
1192
|
return true;
|
|
1159
1193
|
}
|
|
@@ -1166,21 +1200,21 @@ class RegExpValidator {
|
|
|
1166
1200
|
}
|
|
1167
1201
|
consumeClassEscape() {
|
|
1168
1202
|
const start = this.index;
|
|
1169
|
-
if (this.eat(
|
|
1170
|
-
this._lastIntValue =
|
|
1203
|
+
if (this.eat(LATIN_SMALL_LETTER_B)) {
|
|
1204
|
+
this._lastIntValue = BACKSPACE;
|
|
1171
1205
|
this.onCharacter(start - 1, this.index, this._lastIntValue);
|
|
1172
1206
|
return true;
|
|
1173
1207
|
}
|
|
1174
|
-
if (this._uFlag && this.eat(
|
|
1175
|
-
this._lastIntValue =
|
|
1208
|
+
if (this._uFlag && this.eat(HYPHEN_MINUS)) {
|
|
1209
|
+
this._lastIntValue = HYPHEN_MINUS;
|
|
1176
1210
|
this.onCharacter(start - 1, this.index, this._lastIntValue);
|
|
1177
1211
|
return true;
|
|
1178
1212
|
}
|
|
1179
1213
|
let cp = 0;
|
|
1180
1214
|
if (!this.strict &&
|
|
1181
1215
|
!this._uFlag &&
|
|
1182
|
-
this.currentCodePoint ===
|
|
1183
|
-
(isDecimalDigit((cp = this.nextCodePoint)) || cp ===
|
|
1216
|
+
this.currentCodePoint === LATIN_SMALL_LETTER_C &&
|
|
1217
|
+
(isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) {
|
|
1184
1218
|
this.advance();
|
|
1185
1219
|
this.advance();
|
|
1186
1220
|
this._lastIntValue = cp % 0x20;
|
|
@@ -1190,8 +1224,8 @@ class RegExpValidator {
|
|
|
1190
1224
|
return (this.consumeCharacterClassEscape() || this.consumeCharacterEscape());
|
|
1191
1225
|
}
|
|
1192
1226
|
eatGroupName() {
|
|
1193
|
-
if (this.eat(
|
|
1194
|
-
if (this.eatRegExpIdentifierName() && this.eat(
|
|
1227
|
+
if (this.eat(LESS_THAN_SIGN)) {
|
|
1228
|
+
if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) {
|
|
1195
1229
|
return true;
|
|
1196
1230
|
}
|
|
1197
1231
|
this.raise("Invalid capture group name");
|
|
@@ -1213,7 +1247,7 @@ class RegExpValidator {
|
|
|
1213
1247
|
const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020;
|
|
1214
1248
|
let cp = this.currentCodePoint;
|
|
1215
1249
|
this.advance();
|
|
1216
|
-
if (cp ===
|
|
1250
|
+
if (cp === REVERSE_SOLIDUS &&
|
|
1217
1251
|
this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
|
|
1218
1252
|
cp = this._lastIntValue;
|
|
1219
1253
|
}
|
|
@@ -1237,7 +1271,7 @@ class RegExpValidator {
|
|
|
1237
1271
|
const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020;
|
|
1238
1272
|
let cp = this.currentCodePoint;
|
|
1239
1273
|
this.advance();
|
|
1240
|
-
if (cp ===
|
|
1274
|
+
if (cp === REVERSE_SOLIDUS &&
|
|
1241
1275
|
this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
|
|
1242
1276
|
cp = this._lastIntValue;
|
|
1243
1277
|
}
|
|
@@ -1258,7 +1292,7 @@ class RegExpValidator {
|
|
|
1258
1292
|
}
|
|
1259
1293
|
eatCControlLetter() {
|
|
1260
1294
|
const start = this.index;
|
|
1261
|
-
if (this.eat(
|
|
1295
|
+
if (this.eat(LATIN_SMALL_LETTER_C)) {
|
|
1262
1296
|
if (this.eatControlLetter()) {
|
|
1263
1297
|
return true;
|
|
1264
1298
|
}
|
|
@@ -1267,7 +1301,7 @@ class RegExpValidator {
|
|
|
1267
1301
|
return false;
|
|
1268
1302
|
}
|
|
1269
1303
|
eatZero() {
|
|
1270
|
-
if (this.currentCodePoint ===
|
|
1304
|
+
if (this.currentCodePoint === DIGIT_ZERO &&
|
|
1271
1305
|
!isDecimalDigit(this.nextCodePoint)) {
|
|
1272
1306
|
this._lastIntValue = 0;
|
|
1273
1307
|
this.advance();
|
|
@@ -1276,24 +1310,24 @@ class RegExpValidator {
|
|
|
1276
1310
|
return false;
|
|
1277
1311
|
}
|
|
1278
1312
|
eatControlEscape() {
|
|
1279
|
-
if (this.eat(
|
|
1280
|
-
this._lastIntValue =
|
|
1313
|
+
if (this.eat(LATIN_SMALL_LETTER_F)) {
|
|
1314
|
+
this._lastIntValue = FORM_FEED;
|
|
1281
1315
|
return true;
|
|
1282
1316
|
}
|
|
1283
|
-
if (this.eat(
|
|
1284
|
-
this._lastIntValue =
|
|
1317
|
+
if (this.eat(LATIN_SMALL_LETTER_N)) {
|
|
1318
|
+
this._lastIntValue = LINE_FEED;
|
|
1285
1319
|
return true;
|
|
1286
1320
|
}
|
|
1287
|
-
if (this.eat(
|
|
1288
|
-
this._lastIntValue =
|
|
1321
|
+
if (this.eat(LATIN_SMALL_LETTER_R)) {
|
|
1322
|
+
this._lastIntValue = CARRIAGE_RETURN;
|
|
1289
1323
|
return true;
|
|
1290
1324
|
}
|
|
1291
|
-
if (this.eat(
|
|
1292
|
-
this._lastIntValue =
|
|
1325
|
+
if (this.eat(LATIN_SMALL_LETTER_T)) {
|
|
1326
|
+
this._lastIntValue = CHARACTER_TABULATION;
|
|
1293
1327
|
return true;
|
|
1294
1328
|
}
|
|
1295
|
-
if (this.eat(
|
|
1296
|
-
this._lastIntValue =
|
|
1329
|
+
if (this.eat(LATIN_SMALL_LETTER_V)) {
|
|
1330
|
+
this._lastIntValue = LINE_TABULATION;
|
|
1297
1331
|
return true;
|
|
1298
1332
|
}
|
|
1299
1333
|
return false;
|
|
@@ -1310,7 +1344,7 @@ class RegExpValidator {
|
|
|
1310
1344
|
eatRegExpUnicodeEscapeSequence(forceUFlag = false) {
|
|
1311
1345
|
const start = this.index;
|
|
1312
1346
|
const uFlag = forceUFlag || this._uFlag;
|
|
1313
|
-
if (this.eat(
|
|
1347
|
+
if (this.eat(LATIN_SMALL_LETTER_U)) {
|
|
1314
1348
|
if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) ||
|
|
1315
1349
|
this.eatFixedHexDigits(4) ||
|
|
1316
1350
|
(uFlag && this.eatRegExpUnicodeCodePointEscape())) {
|
|
@@ -1328,8 +1362,8 @@ class RegExpValidator {
|
|
|
1328
1362
|
if (this.eatFixedHexDigits(4)) {
|
|
1329
1363
|
const lead = this._lastIntValue;
|
|
1330
1364
|
if (isLeadSurrogate(lead) &&
|
|
1331
|
-
this.eat(
|
|
1332
|
-
this.eat(
|
|
1365
|
+
this.eat(REVERSE_SOLIDUS) &&
|
|
1366
|
+
this.eat(LATIN_SMALL_LETTER_U) &&
|
|
1333
1367
|
this.eatFixedHexDigits(4)) {
|
|
1334
1368
|
const trail = this._lastIntValue;
|
|
1335
1369
|
if (isTrailSurrogate(trail)) {
|
|
@@ -1343,9 +1377,9 @@ class RegExpValidator {
|
|
|
1343
1377
|
}
|
|
1344
1378
|
eatRegExpUnicodeCodePointEscape() {
|
|
1345
1379
|
const start = this.index;
|
|
1346
|
-
if (this.eat(
|
|
1380
|
+
if (this.eat(LEFT_CURLY_BRACKET) &&
|
|
1347
1381
|
this.eatHexDigits() &&
|
|
1348
|
-
this.eat(
|
|
1382
|
+
this.eat(RIGHT_CURLY_BRACKET) &&
|
|
1349
1383
|
isValidUnicode(this._lastIntValue)) {
|
|
1350
1384
|
return true;
|
|
1351
1385
|
}
|
|
@@ -1366,32 +1400,32 @@ class RegExpValidator {
|
|
|
1366
1400
|
return false;
|
|
1367
1401
|
}
|
|
1368
1402
|
if (this._uFlag) {
|
|
1369
|
-
return isSyntaxCharacter(cp) || cp ===
|
|
1403
|
+
return isSyntaxCharacter(cp) || cp === SOLIDUS;
|
|
1370
1404
|
}
|
|
1371
1405
|
if (this.strict) {
|
|
1372
1406
|
return !isIdContinue(cp);
|
|
1373
1407
|
}
|
|
1374
1408
|
if (this._nFlag) {
|
|
1375
|
-
return !(cp ===
|
|
1409
|
+
return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K);
|
|
1376
1410
|
}
|
|
1377
|
-
return cp !==
|
|
1411
|
+
return cp !== LATIN_SMALL_LETTER_C;
|
|
1378
1412
|
}
|
|
1379
1413
|
eatDecimalEscape() {
|
|
1380
1414
|
this._lastIntValue = 0;
|
|
1381
1415
|
let cp = this.currentCodePoint;
|
|
1382
|
-
if (cp >=
|
|
1416
|
+
if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) {
|
|
1383
1417
|
do {
|
|
1384
|
-
this._lastIntValue = 10 * this._lastIntValue + (cp -
|
|
1418
|
+
this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO);
|
|
1385
1419
|
this.advance();
|
|
1386
|
-
} while ((cp = this.currentCodePoint) >=
|
|
1387
|
-
cp <=
|
|
1420
|
+
} while ((cp = this.currentCodePoint) >= DIGIT_ZERO &&
|
|
1421
|
+
cp <= DIGIT_NINE);
|
|
1388
1422
|
return true;
|
|
1389
1423
|
}
|
|
1390
1424
|
return false;
|
|
1391
1425
|
}
|
|
1392
1426
|
eatUnicodePropertyValueExpression() {
|
|
1393
1427
|
const start = this.index;
|
|
1394
|
-
if (this.eatUnicodePropertyName() && this.eat(
|
|
1428
|
+
if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) {
|
|
1395
1429
|
this._lastKeyValue = this._lastStrValue;
|
|
1396
1430
|
if (this.eatUnicodePropertyValue()) {
|
|
1397
1431
|
this._lastValValue = this._lastStrValue;
|
|
@@ -1439,7 +1473,7 @@ class RegExpValidator {
|
|
|
1439
1473
|
}
|
|
1440
1474
|
eatHexEscapeSequence() {
|
|
1441
1475
|
const start = this.index;
|
|
1442
|
-
if (this.eat(
|
|
1476
|
+
if (this.eat(LATIN_SMALL_LETTER_X)) {
|
|
1443
1477
|
if (this.eatFixedHexDigits(2)) {
|
|
1444
1478
|
return true;
|
|
1445
1479
|
}
|
|
@@ -1493,7 +1527,7 @@ class RegExpValidator {
|
|
|
1493
1527
|
const cp = this.currentCodePoint;
|
|
1494
1528
|
if (isOctalDigit(cp)) {
|
|
1495
1529
|
this.advance();
|
|
1496
|
-
this._lastIntValue = cp -
|
|
1530
|
+
this._lastIntValue = cp - DIGIT_ZERO;
|
|
1497
1531
|
return true;
|
|
1498
1532
|
}
|
|
1499
1533
|
this._lastIntValue = 0;
|
|
@@ -1515,18 +1549,19 @@ class RegExpValidator {
|
|
|
1515
1549
|
}
|
|
1516
1550
|
}
|
|
1517
1551
|
|
|
1518
|
-
const
|
|
1519
|
-
const
|
|
1520
|
-
const
|
|
1552
|
+
const DUMMY_PATTERN = {};
|
|
1553
|
+
const DUMMY_FLAGS = {};
|
|
1554
|
+
const DUMMY_CAPTURING_GROUP = {};
|
|
1521
1555
|
class RegExpParserState {
|
|
1522
1556
|
constructor(options) {
|
|
1523
|
-
|
|
1524
|
-
this.
|
|
1557
|
+
var _a;
|
|
1558
|
+
this._node = DUMMY_PATTERN;
|
|
1559
|
+
this._flags = DUMMY_FLAGS;
|
|
1525
1560
|
this._backreferences = [];
|
|
1526
1561
|
this._capturingGroups = [];
|
|
1527
1562
|
this.source = "";
|
|
1528
|
-
this.strict = Boolean(options
|
|
1529
|
-
this.ecmaVersion = (options
|
|
1563
|
+
this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict);
|
|
1564
|
+
this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : 2023;
|
|
1530
1565
|
}
|
|
1531
1566
|
get pattern() {
|
|
1532
1567
|
if (this._node.type !== "Pattern") {
|
|
@@ -1540,7 +1575,7 @@ class RegExpParserState {
|
|
|
1540
1575
|
}
|
|
1541
1576
|
return this._flags;
|
|
1542
1577
|
}
|
|
1543
|
-
|
|
1578
|
+
onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, }) {
|
|
1544
1579
|
this._flags = {
|
|
1545
1580
|
type: "Flags",
|
|
1546
1581
|
parent: null,
|
|
@@ -1575,7 +1610,7 @@ class RegExpParserState {
|
|
|
1575
1610
|
const ref = reference.ref;
|
|
1576
1611
|
const group = typeof ref === "number"
|
|
1577
1612
|
? this._capturingGroups[ref - 1]
|
|
1578
|
-
: this._capturingGroups.find(g => g.name === ref);
|
|
1613
|
+
: this._capturingGroups.find((g) => g.name === ref);
|
|
1579
1614
|
reference.resolved = group;
|
|
1580
1615
|
group.references.push(reference);
|
|
1581
1616
|
}
|
|
@@ -1811,7 +1846,7 @@ class RegExpParserState {
|
|
|
1811
1846
|
end,
|
|
1812
1847
|
raw: this.source.slice(start, end),
|
|
1813
1848
|
ref,
|
|
1814
|
-
resolved:
|
|
1849
|
+
resolved: DUMMY_CAPTURING_GROUP,
|
|
1815
1850
|
};
|
|
1816
1851
|
parent.elements.push(node);
|
|
1817
1852
|
this._backreferences.push(node);
|
|
@@ -1857,7 +1892,7 @@ class RegExpParserState {
|
|
|
1857
1892
|
min.type !== "Character" ||
|
|
1858
1893
|
max.type !== "Character" ||
|
|
1859
1894
|
hyphen.type !== "Character" ||
|
|
1860
|
-
hyphen.value !==
|
|
1895
|
+
hyphen.value !== HYPHEN_MINUS) {
|
|
1861
1896
|
throw new Error("UnknownError");
|
|
1862
1897
|
}
|
|
1863
1898
|
const node = {
|
|
@@ -2081,7 +2116,7 @@ function parseRegExpLiteral(source, options) {
|
|
|
2081
2116
|
return new RegExpParser(options).parseLiteral(String(source));
|
|
2082
2117
|
}
|
|
2083
2118
|
function validateRegExpLiteral(source, options) {
|
|
2084
|
-
|
|
2119
|
+
new RegExpValidator(options).validateLiteral(source);
|
|
2085
2120
|
}
|
|
2086
2121
|
function visitRegExpAST(node, handlers) {
|
|
2087
2122
|
new RegExpVisitor(handlers).visit(node);
|