From 2381ba8a05e54e40ec78479ef09b7e06adab4dd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 03:57:15 +0100 Subject: [PATCH] build(deps-dev): bump eslint from 8.57.1 to 9.13.0 (#2792) * build(deps-dev): bump eslint from 8.57.1 to 9.13.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.13.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.57.1...v9.13.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Upgrade EsLint * Fix all new lint errors --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dolan Miu --- .vscode/settings.json | 3 +- eslint.config.ts | 370 ++++ package-lock.json | 1935 +++++++---------- package.json | 11 +- src/export/formatter.ts | 1 - src/export/packer/next-compiler.spec.ts | 1 - src/export/packer/next-compiler.ts | 8 +- src/export/packer/packer.spec.ts | 2 - src/export/packer/packer.ts | 3 +- src/file/app-properties/app-properties.ts | 1 + src/file/border/border.ts | 6 +- src/file/checkbox/checkbox-util.spec.ts | 2 + src/file/checkbox/checkbox-util.ts | 10 +- src/file/checkbox/checkbox.spec.ts | 1 + src/file/checkbox/checkbox.ts | 3 +- src/file/content-types/content-types.spec.ts | 2 - src/file/content-types/content-types.ts | 1 + src/file/content-types/default/default.ts | 1 + src/file/content-types/override/override.ts | 1 + src/file/core-properties/properties.spec.ts | 2 +- src/file/core-properties/properties.ts | 20 +- .../custom-properties/custom-properties.ts | 1 + src/file/custom-properties/custom-property.ts | 5 +- src/file/document-wrapper.ts | 6 +- .../section-properties/properties/columns.ts | 2 +- .../section-properties/properties/doc-grid.ts | 6 +- .../header-footer-reference.spec.ts | 1 + .../properties/header-footer-reference.ts | 4 +- .../properties/line-number.ts | 4 +- .../properties/page-borders.spec.ts | 2 +- .../properties/page-borders.ts | 10 +- .../properties/page-margin.ts | 2 +- .../properties/page-number.ts | 7 +- .../properties/page-text-direction.spec.ts | 1 + .../properties/page-text-direction.ts | 3 - .../properties/section-type.spec.ts | 1 + .../properties/section-type.ts | 2 - .../section-properties.spec.ts | 2 +- .../section-properties/section-properties.ts | 11 +- src/file/document/document-attributes.ts | 4 +- .../document-background.ts | 4 +- src/file/document/document.ts | 6 +- src/file/drawing/anchor/anchor-attributes.ts | 5 +- src/file/drawing/anchor/anchor.spec.ts | 1 - src/file/drawing/anchor/anchor.ts | 1 + .../drawing/doc-properties/doc-properties.ts | 7 +- src/file/drawing/drawing.spec.ts | 8 +- src/file/drawing/drawing.ts | 4 +- .../drawing/floating/floating-position.ts | 18 +- .../drawing/floating/horizontal-position.ts | 1 + .../drawing/floating/vertical-position.ts | 1 + .../graphic-frame-locks.ts | 1 + .../graphic-frame/graphic-frame-properties.ts | 1 + .../graphic-data/pic/blip/blip-extentions.ts | 2 +- .../graphic/graphic-data/pic/blip/blip.ts | 1 + .../child-non-visual-pic-properties.ts | 1 + .../pic-locks/pic-locks.ts | 1 + .../non-visual-pic-properties.ts | 1 + .../non-visual-properties.ts | 2 +- .../inline/graphic/graphic-data/pic/pic.ts | 2 +- .../pic/shape-properties/form.spec.ts | 1 + .../shape-properties/form/extents/extents.ts | 1 + .../pic/shape-properties/form/offset/off.ts | 1 + .../pic/shape-properties/outline/outline.ts | 3 +- .../outline/solid-fill.spec.ts | 2 +- .../shape-properties/outline/solid-fill.ts | 2 +- .../preset-geometry/preset-geometry.ts | 1 + .../pic/shape-properties/shape-properties.ts | 3 +- src/file/drawing/inline/inline.spec.ts | 1 + src/file/drawing/inline/inline.ts | 1 + src/file/drawing/text-wrap/text-wrapping.ts | 7 +- src/file/drawing/text-wrap/wrap-square.ts | 4 +- src/file/file.ts | 10 +- src/file/fonts/font-table.ts | 2 +- src/file/fonts/font.ts | 6 +- src/file/footer-wrapper.ts | 4 +- src/file/footer/footer.ts | 1 + src/file/footnotes/footnote/footnote.ts | 6 +- .../run/continuation-seperator-run.ts | 1 + .../footnotes/footnote/run/seperator-run.ts | 1 + src/file/header-wrapper.ts | 4 +- src/file/header.ts | 4 +- src/file/header/header.ts | 1 + src/file/media/data.ts | 4 +- src/file/media/media.spec.ts | 1 - src/file/media/media.ts | 4 +- src/file/numbering/abstract-numbering.spec.ts | 2 +- src/file/numbering/level.ts | 4 +- src/file/numbering/num.ts | 8 +- src/file/numbering/numbering.ts | 6 +- .../paragraph/formatting/alignment.spec.ts | 1 + src/file/paragraph/formatting/alignment.ts | 3 - src/file/paragraph/formatting/border.spec.ts | 2 +- src/file/paragraph/formatting/border.ts | 4 +- src/file/paragraph/formatting/break.ts | 1 + src/file/paragraph/formatting/indent.ts | 6 +- src/file/paragraph/formatting/spacing.ts | 5 +- src/file/paragraph/formatting/tab-stop.ts | 6 +- src/file/paragraph/frame/frame-properties.ts | 14 +- .../paragraph/links/hyperlink-attributes.ts | 4 +- .../links/pageref-field-instruction.spec.ts | 1 + .../links/pageref-field-instruction.ts | 2 +- src/file/paragraph/links/pageref.spec.ts | 1 + src/file/paragraph/links/pageref.ts | 1 + .../paragraph/math/fraction/math-fraction.ts | 4 +- .../math/function/math-function-name.ts | 1 + .../paragraph/math/function/math-function.ts | 4 +- src/file/paragraph/math/math-component.ts | 2 +- src/file/paragraph/math/math.ts | 4 +- .../paragraph/math/n-ary/math-integral.ts | 4 +- .../paragraph/math/n-ary/math-limit-lower.ts | 5 +- .../paragraph/math/n-ary/math-limit-upper.ts | 5 +- src/file/paragraph/math/n-ary/math-limit.ts | 1 + src/file/paragraph/math/n-ary/math-sum.ts | 4 +- .../paragraph/math/radical/math-degree.ts | 1 + .../math/radical/math-radical-properties.ts | 1 + .../paragraph/math/radical/math-radical.ts | 4 +- ...b-super-script-function-properties.spec.ts | 1 + ...math-pre-sub-super-script-function.spec.ts | 2 +- .../math-pre-sub-super-script-function.ts | 6 +- ...ath-sub-script-function-properties.spec.ts | 1 + .../math-sub-script-function.spec.ts | 2 +- .../sub-script/math-sub-script-function.ts | 6 +- ...b-super-script-function-properties.spec.ts | 1 + .../math-sub-super-script-function.spec.ts | 2 +- .../math-sub-super-script-function.ts | 6 +- ...h-super-script-function-properties.spec.ts | 1 + .../math-super-script-function.spec.ts | 2 +- .../math-super-script-function.ts | 6 +- src/file/paragraph/paragraph.spec.ts | 7 +- src/file/paragraph/paragraph.ts | 8 +- src/file/paragraph/properties.spec.ts | 4 +- src/file/paragraph/properties.ts | 21 +- src/file/paragraph/run/comment-run.ts | 8 +- src/file/paragraph/run/empty-children.spec.ts | 1 + src/file/paragraph/run/formatting.ts | 2 +- src/file/paragraph/run/image-run.ts | 7 +- src/file/paragraph/run/language.ts | 4 +- src/file/paragraph/run/positional-tab.ts | 5 +- src/file/paragraph/run/properties.ts | 24 +- src/file/paragraph/run/run-components/text.ts | 4 +- src/file/paragraph/run/run-fonts.ts | 4 +- src/file/paragraph/run/run.spec.ts | 3 +- src/file/paragraph/run/run.ts | 18 +- .../paragraph/run/sequential-identifier.ts | 1 + src/file/paragraph/run/simple-field.ts | 1 + src/file/paragraph/run/symbol-run.spec.ts | 2 +- src/file/paragraph/run/symbol-run.ts | 4 +- .../relationship/relationship.ts | 1 + src/file/relationships/relationships.spec.ts | 1 - src/file/relationships/relationships.ts | 1 + src/file/settings/compatibility.ts | 5 +- src/file/settings/settings.ts | 4 +- src/file/shading/shading.ts | 6 +- src/file/shared/number-format.ts | 2 - src/file/styles/defaults/document-defaults.ts | 5 +- src/file/styles/external-styles-factory.ts | 4 +- src/file/styles/factory.ts | 9 +- src/file/styles/latent-styles/exceptions.ts | 4 +- .../styles/latent-styles/latent-styles.ts | 1 + src/file/styles/style/character-style.spec.ts | 2 +- src/file/styles/style/character-style.ts | 8 +- src/file/styles/style/default-styles.ts | 3 +- src/file/styles/style/paragraph-style.spec.ts | 2 +- src/file/styles/style/paragraph-style.ts | 9 +- src/file/styles/style/style.ts | 9 +- src/file/styles/styles.ts | 5 +- .../table-of-contents-properties.ts | 4 +- .../table-of-contents/table-of-contents.ts | 3 +- src/file/table/grid.spec.ts | 2 +- .../table/table-cell/table-cell-components.ts | 7 +- .../table-cell/table-cell-properties.spec.ts | 1 - .../table/table-cell/table-cell-properties.ts | 6 +- src/file/table/table-cell/table-cell.ts | 4 +- .../table/table-properties/table-borders.ts | 4 +- .../table-cell-margin.spec.ts | 2 +- .../table-properties/table-cell-margin.ts | 7 +- .../table-float-properties.ts | 2 +- .../table-properties/table-properties.spec.ts | 1 - .../table-properties/table-properties.ts | 4 +- .../table/table-row/table-row-properties.ts | 4 +- src/file/table/table-row/table-row.spec.ts | 2 +- src/file/table/table-row/table-row.ts | 5 +- src/file/table/table-width.ts | 2 +- src/file/table/table.spec.ts | 4 +- src/file/table/table.ts | 4 +- .../deleted-text-run.ts | 12 +- .../inserted-text-run.ts | 2 +- src/file/track-revision/track-revision.ts | 4 +- src/file/xml-components/base.ts | 4 +- src/file/xml-components/default-attributes.ts | 11 +- .../imported-xml-component.spec.ts | 6 +- .../xml-components/imported-xml-component.ts | 2 - src/file/xml-components/simple-elements.ts | 3 +- src/file/xml-components/xml-component.spec.ts | 7 +- src/file/xml-components/xmlable-object.ts | 7 +- src/patcher/content-types-manager.spec.ts | 1 + src/patcher/from-docx.spec.ts | 4 +- src/patcher/from-docx.ts | 25 +- src/patcher/paragraph-split-inject.ts | 1 + src/patcher/paragraph-token-replacer.ts | 2 +- src/patcher/patch-detector.spec.ts | 3 +- src/patcher/patch-detector.ts | 5 +- src/patcher/relationship-manager.spec.ts | 3 +- src/patcher/relationship-manager.ts | 1 + src/patcher/replacer.spec.ts | 4 +- src/patcher/replacer.ts | 15 +- src/patcher/run-renderer.spec.ts | 1 + src/patcher/run-renderer.ts | 8 +- src/patcher/traverser.ts | 5 +- src/patcher/util.ts | 2 +- src/util/convenience-functions.spec.ts | 2 +- src/util/convenience-functions.ts | 2 +- src/util/values.spec.ts | 1 + 214 files changed, 1583 insertions(+), 1586 deletions(-) create mode 100644 eslint.config.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index f144f59202..5702eef168 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,6 @@ "editor.formatOnSave": false, "prettier.tabWidth": 4, "prettier.arrowParens": "always", - "prettier.bracketSpacing": true + "prettier.bracketSpacing": true, + "eslint.useFlatConfig": true } diff --git a/eslint.config.ts b/eslint.config.ts new file mode 100644 index 0000000000..8733c814a1 --- /dev/null +++ b/eslint.config.ts @@ -0,0 +1,370 @@ +import eslint from "@eslint/js"; +import type { Linter } from "eslint"; +import importPlugin from "eslint-plugin-import"; +import unicorn from "eslint-plugin-unicorn"; +import jsdoc from "eslint-plugin-jsdoc"; +import preferArrow from "eslint-plugin-prefer-arrow"; +import functional from "eslint-plugin-functional"; +import globals from "globals"; +import tsEslint from "typescript-eslint"; + +const config: Linter.Config[] = [ + { + ignores: ["**/vite.config.ts", "**/build/**", "**/coverage/**", "**/*.js", "eslint.config.ts", "**/demo/**", "**/scripts/**"], + }, + eslint.configs.recommended, + importPlugin.flatConfigs.recommended, + ...tsEslint.configs.recommended, + ...tsEslint.configs.stylistic, + { + files: ["**/src/**/*.ts"], + plugins: { + unicorn, + jsdoc, + "prefer-arrow": preferArrow, + functional, + }, + + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + + settings: { + "import/resolver": { + typescript: true, + node: true, + }, + }, + + rules: { + "no-undef": "off", + "no-extra-boolean-cast": "off", + "no-alert": "error", + "no-self-compare": "error", + "no-unreachable-loop": "error", + "no-template-curly-in-string": "error", + "no-unused-private-class-members": "error", + "no-extend-native": "error", + "no-floating-decimal": "error", + "no-implied-eval": "error", + "no-iterator": "error", + "no-lone-blocks": "error", + "no-loop-func": "error", + "no-new-object": "error", + "no-proto": "error", + "no-useless-catch": "error", + "one-var-declaration-per-line": "error", + "prefer-arrow-callback": "error", + "prefer-destructuring": "error", + "prefer-exponentiation-operator": "error", + "prefer-promise-reject-errors": "error", + "prefer-regex-literals": "error", + "prefer-spread": "error", + "prefer-template": "error", + "require-await": "error", + "@typescript-eslint/adjacent-overload-signatures": "error", + + "@typescript-eslint/array-type": [ + "error", + { + default: "array", + }, + ], + + "@typescript-eslint/no-restricted-types": [ + "error", + { + types: { + Object: { + message: "Avoid using the `Object` type. Did you mean `object`?", + fixWith: "object", + }, + + Function: { + message: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.", + }, + + Boolean: { + message: "Avoid using the `Boolean` type. Did you mean `boolean`?", + fixWith: "boolean", + }, + + Number: { + message: "Avoid using the `Number` type. Did you mean `number`?", + fixWith: "number", + }, + + String: { + message: "Avoid using the `String` type. Did you mean `string`?", + fixWith: "string", + }, + + Symbol: { + message: "Avoid using the `Symbol` type. Did you mean `symbol`?", + fixWith: "symbol", + }, + }, + }, + ], + + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/dot-notation": "error", + + "@typescript-eslint/explicit-function-return-type": [ + "error", + { + allowExpressions: true, + allowTypedFunctionExpressions: true, + allowHigherOrderFunctions: false, + allowDirectConstAssertionInArrowFunctions: true, + allowConciseArrowFunctionExpressionsStartingWithVoid: true, + }, + ], + + "@typescript-eslint/explicit-member-accessibility": [ + "error", + { + accessibility: "explicit", + + overrides: { + accessors: "explicit", + }, + }, + ], + + "@typescript-eslint/explicit-module-boundary-types": [ + "error", + { + allowArgumentsExplicitlyTypedAsAny: true, + allowDirectConstAssertionInArrowFunctions: true, + allowHigherOrderFunctions: false, + allowTypedFunctionExpressions: false, + }, + ], + + "@typescript-eslint/naming-convention": [ + "error", + { + selector: ["objectLiteralProperty"], + leadingUnderscore: "allow", + format: ["camelCase", "PascalCase", "UPPER_CASE"], + + filter: { + regex: "(^[a-z]+:.+)|_attr|[0-9]", + match: false, + }, + }, + ], + + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-parameter-properties": "off", + "@typescript-eslint/no-require-imports": "error", + + "@typescript-eslint/no-shadow": [ + "error", + { + hoist: "all", + }, + ], + + "@typescript-eslint/consistent-type-definitions": ["error", "type"], + + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unused-expressions": "error", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/prefer-readonly": "error", + + "@typescript-eslint/triple-slash-reference": [ + "error", + { + path: "always", + types: "prefer-import", + lib: "always", + }, + ], + + "@typescript-eslint/typedef": [ + "error", + { + parameter: true, + propertyDeclaration: true, + }, + ], + + "@typescript-eslint/no-inferrable-types": "off", + + "@typescript-eslint/unified-signatures": "error", + "arrow-body-style": "error", + complexity: "off", + "consistent-return": "error", + "constructor-super": "error", + curly: "error", + "dot-notation": "off", + eqeqeq: ["error", "smart"], + "guard-for-in": "error", + + "id-denylist": ["error", "any", "Number", "number", "String", "string", "Boolean", "boolean", "Undefined", "undefined"], + + "id-match": "error", + "import/no-default-export": "error", + "import/no-extraneous-dependencies": "off", + "import/no-internal-modules": "off", + "sort-imports": [ + "error", + { + allowSeparatedGroups: true, + ignoreDeclarationSort: true, + }, + ], + "import/order": [ + "error", + { + groups: [["external", "builtin"], "internal", ["sibling", "parent", "index"]], + "newlines-between": "always", + pathGroups: [ + { pattern: "@file/**/*", group: "internal" }, + { pattern: "@file/**", group: "internal" }, + { pattern: "@export/**", group: "internal" }, + ], + pathGroupsExcludedImportTypes: ["internal"], + alphabetize: { + order: "asc", + caseInsensitive: true, + }, + }, + ], + indent: "off", + "jsdoc/check-alignment": "error", + "jsdoc/check-indentation": "off", + "max-classes-per-file": "off", + "max-len": "off", + "new-parens": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-cond-assign": "error", + "no-console": "error", + "no-debugger": "error", + "no-duplicate-case": "error", + "no-duplicate-imports": "error", + "no-empty": "error", + "no-empty-function": "off", + "no-eval": "error", + "no-extra-bind": "error", + "no-fallthrough": "off", + "no-invalid-this": "off", + "no-multiple-empty-lines": "error", + "no-new-func": "error", + "no-new-wrappers": "error", + "no-param-reassign": "error", + "no-redeclare": "error", + "no-return-await": "error", + "no-sequences": "error", + "no-shadow": "off", + "no-sparse-arrays": "error", + "no-throw-literal": "error", + "no-trailing-spaces": "error", + "no-undef-init": "error", + + "no-underscore-dangle": [ + "error", + { + allow: ["_attr"], + }, + ], + + "no-unsafe-finally": "error", + "no-unused-expressions": "off", + "no-unused-labels": "error", + "no-use-before-define": "off", + "no-useless-constructor": "error", + "no-var": "error", + "object-shorthand": "off", + "one-var": ["error", "never"], + "prefer-arrow/prefer-arrow-functions": "error", + "prefer-const": "error", + "prefer-object-spread": "error", + radix: "error", + "space-in-parens": ["error", "never"], + + "spaced-comment": [ + "error", + "always", + { + markers: ["/"], + }, + ], + + "unicorn/filename-case": "error", + "unicorn/prefer-ternary": "error", + "use-isnan": "error", + "valid-typeof": "off", + + "functional/immutable-data": [ + "error", + { + ignoreImmediateMutation: true, + ignoreAccessorPattern: ["**.root*", "**.numberingReferences*", "**.sections*", "**.properties*"], + }, + ], + + "functional/prefer-property-signatures": "error", + "functional/no-mixed-types": "error", + "functional/prefer-readonly-type": "error", + + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^[_]+$", + }, + ], + }, + }, + { + files: ["**/*.spec.ts"], + plugins: { + unicorn, + jsdoc, + "prefer-arrow": preferArrow, + functional, + }, + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + }, + + sourceType: "module", + + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + project: ["tsconfig.json"], + }, + }, + rules: { + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/dot-notation": "off", + "prefer-destructuring": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "no-unused-vars": [ + "error", + { + argsIgnorePattern: "^[_]+$", + }, + ], + }, + }, +]; + +export default config; diff --git a/package-lock.json b/package-lock.json index 778f2d9da6..5ad479b436 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,8 @@ "xml-js": "^1.6.8" }, "devDependencies": { + "@eslint/compat": "^1.2.1", + "@types/eslint__js": "^8.42.3", "@types/inquirer": "^9.0.3", "@types/prompt": "^1.1.1", "@types/unzipper": "^0.10.4", @@ -27,8 +29,9 @@ "@vitest/ui": "^2.1.2", "cspell": "^8.2.3", "docsify-cli": "^4.3.0", - "eslint": "^8.23.0", - "eslint-plugin-functional": "^6.0.0", + "eslint": "^9.13.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-functional": "^7.0.2", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsdoc": "^50.3.1", "eslint-plugin-no-null": "^1.0.2", @@ -37,6 +40,7 @@ "execa": "^9.4.0", "glob": "^11.0.0", "inquirer": "^12.0.0", + "jiti": "^2.3.3", "jsdom": "^25.0.1", "pre-commit": "^1.2.2", "prettier": "^3.1.1", @@ -44,6 +48,7 @@ "tsx": "^4.7.0", "typedoc": "^0.26.9", "typescript": "5.3.3", + "typescript-eslint": "^8.10.0", "unzipper": "^0.12.3", "vite": "^5.0.10", "vite-plugin-dts": "^4.2.4", @@ -1051,97 +1056,47 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@eslint/compat": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.1.tgz", + "integrity": "sha512-JbHG2TWuCeNzh87fXo+/46Z1LEo9DBA9T188d0fZgGxAD+cNyS6sx9fdiyxjGPBMyQVRlCutTByZ6a5+YMkF7g==", "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" + "peerDependencies": { + "eslint": "^9.10.0" }, "peerDependenciesMeta": { - "supports-color": { + "eslint": { "optional": true } } }, - "node_modules/@eslint/eslintrc/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", + "@eslint/object-schema": "^2.1.4", "debug": "^4.3.1", - "minimatch": "^3.0.5" + "minimatch": "^3.1.2" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/debug": { + "node_modules/@eslint/config-array/node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", @@ -1158,12 +1113,131 @@ } } }, - "node_modules/@humanwhocodes/config-array/node_modules/ms": { + "node_modules/@eslint/config-array/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", + "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz", + "integrity": "sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==", + "dev": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", + "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", + "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", + "dev": true, + "dependencies": { + "@humanfs/core": "^0.19.0", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1177,12 +1251,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true + "node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@inquirer/checkbox": { "version": "4.0.0", @@ -1766,6 +1846,16 @@ "node": ">= 8" } }, + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.4.0" + } + }, "node_modules/@pkgr/core": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", @@ -2336,6 +2426,27 @@ "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", "dev": true }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -2367,6 +2478,12 @@ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -2478,75 +2595,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.10.0.tgz", - "integrity": "sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "8.10.0", - "@typescript-eslint/utils": "8.10.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.10.0.tgz", - "integrity": "sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.10.0", - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/typescript-estree": "8.10.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/@typescript-eslint/parser": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.10.0.tgz", @@ -2615,14 +2663,17 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/type-utils": { "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.10.0.tgz", - "integrity": "sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.10.0.tgz", + "integrity": "sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/visitor-keys": "8.10.0" + "@typescript-eslint/typescript-estree": "8.10.0", + "@typescript-eslint/utils": "8.10.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2630,28 +2681,6 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -2659,78 +2688,12 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/@typescript-eslint/type-utils/node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -2743,38 +2706,12 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/type-utils/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } + "license": "MIT" }, "node_modules/@typescript-eslint/types": { "version": "8.10.0", @@ -2877,159 +2814,26 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.10.0.tgz", + "integrity": "sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/scope-manager": "8.10.0", + "@typescript-eslint/types": "8.10.0", + "@typescript-eslint/typescript-estree": "8.10.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { @@ -3636,15 +3440,6 @@ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "dev": true }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.findlastindex": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", @@ -5182,10 +4977,11 @@ "dev": true }, "node_modules/deepmerge-ts": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", - "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.3.tgz", + "integrity": "sha512-qCSH6I0INPxd9Y1VtAiLpnYvz5O//6rCfJXKk0z66Up9/VOSr+1yS8XSKA5IWRxjocFGlzPyaZYe+jxq7OOLtQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=16.0.0" } @@ -5316,18 +5112,6 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/docsify": { "version": "4.12.2", "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.12.2.tgz", @@ -5507,18 +5291,6 @@ "node": ">= 8.16.2" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/domain-browser": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", @@ -5627,6 +5399,20 @@ "once": "^1.4.0" } }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -5890,59 +5676,63 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", + "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.13.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-import-resolver-node": { @@ -5971,6 +5761,67 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", + "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.3.5", + "enhanced-resolve": "^5.15.0", + "eslint-module-utils": "^2.8.1", + "fast-glob": "^3.3.2", + "get-tsconfig": "^4.7.5", + "is-bun-module": "^1.0.2", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/eslint-module-utils": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", @@ -6004,9 +5855,9 @@ "dev": true }, "node_modules/eslint-plugin-functional": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-functional/-/eslint-plugin-functional-6.6.3.tgz", - "integrity": "sha512-sVbbvNvwX3HVkXAykKyoNLv57r4DPF7f1sy+/8j4YtzLYVQPGljMUWv3T6Kd4lwnnjmcKuj0EkIbS+knL6P5jw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-functional/-/eslint-plugin-functional-7.0.2.tgz", + "integrity": "sha512-IBriPyU3Uc1EieU5YVyiqrwHzw2yl4bRW58Xf5RP8x3pf80MoqObgfNu9DERwSIgvFOm93jdalUITc96Ysnx7g==", "dev": true, "funding": [ { @@ -6014,20 +5865,21 @@ "url": "https://ko-fi.com/rebeccastevens" } ], + "license": "MIT", "dependencies": { - "@typescript-eslint/utils": "^7.3.1", - "deepmerge-ts": "^5.1.0", - "escape-string-regexp": "^4.0.0", - "is-immutable-type": "^4.0.0", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "@typescript-eslint/utils": "^8.0.0", + "deepmerge-ts": "^7.1.0", + "escape-string-regexp": "^5.0.0", + "is-immutable-type": "^5.0.0", + "ts-api-utils": "^1.3.0", + "ts-declaration-location": "^1.0.4" }, "engines": { - "node": ">=16.10.0" + "node": ">=v18.18.0" }, "peerDependencies": { - "eslint": "^8.0.0 || ^9.0.0", - "typescript": ">=4.3.5" + "eslint": "^9.0.0", + "typescript": ">=4.7.4" }, "peerDependenciesMeta": { "typescript": { @@ -6036,29 +5888,18 @@ } }, "node_modules/eslint-plugin-functional/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-functional/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-plugin-import": { "version": "2.31.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", @@ -6206,35 +6047,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", - "dev": true, - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/eslint-plugin-jsdoc/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6356,6 +6168,22 @@ "node": ">=10" } }, + "node_modules/eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -6368,15 +6196,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -6469,31 +6288,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -6542,18 +6348,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6582,17 +6376,29 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", "dev": true, "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6623,15 +6429,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -6644,7 +6441,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -6915,15 +6712,15 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -7030,17 +6827,16 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": ">=12.0.0" + "node": ">=16" } }, "node_modules/flat-cache/node_modules/json-buffer": { @@ -7440,27 +7236,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7481,26 +7262,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", @@ -8207,6 +7968,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-bun-module": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.2.1.tgz", + "integrity": "sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.6.3" + } + }, + "node_modules/is-bun-module/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -8322,14 +8106,15 @@ } }, "node_modules/is-immutable-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-immutable-type/-/is-immutable-type-4.0.0.tgz", - "integrity": "sha512-gyFBCXv+NikTs8/PGZhgjbMmFZQ5jvHGZIsVu6+/9Bk4K7imlWBIDN7hTr9fNioGzFg71I4YM3z8f0aKXarTAw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-immutable-type/-/is-immutable-type-5.0.0.tgz", + "integrity": "sha512-mcvHasqbRBWJznuPqqHRKiJgYAz60sZ0mvO3bN70JbkuK7ksfmgc489aKZYxMEjIbRvyOseaTjaRZLRF/xFeRA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@typescript-eslint/type-utils": "^7.2.0", + "@typescript-eslint/type-utils": "^8.0.0", "ts-api-utils": "^1.3.0", - "ts-declaration-location": "^1.0.0" + "ts-declaration-location": "^1.0.4" }, "peerDependencies": { "eslint": "*", @@ -8759,6 +8544,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/jiti": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.3.3.tgz", + "integrity": "sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -10222,15 +10017,6 @@ "node": "20 || >=22" } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", @@ -10879,41 +10665,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -11321,15 +11072,6 @@ "node": ">= 10" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/slashes": { "version": "3.0.12", "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", @@ -11781,6 +11523,16 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -12077,6 +11829,7 @@ "resolved": "https://registry.npmjs.org/ts-declaration-location/-/ts-declaration-location-1.0.4.tgz", "integrity": "sha512-r4JoxYhKULbZuH81Pjrp9OEG5St7XWk7zXwGkLKhmVcjiBVHTJXV5wK6dEa9JKW5QGSTW6b1lOjxAKp8R1SQhg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "minimatch": "^10.0.0" }, @@ -12089,6 +11842,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -12098,6 +11852,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -12356,6 +12111,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.10.0.tgz", + "integrity": "sha512-YIu230PeN7z9zpu/EtqCIuRVHPs4iSlqW6TEvjbyDAE3MZsSl2RXBo+5ag+lbABCG8sFM1WVKEXhlQ8Ml8A3Fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.10.0", + "@typescript-eslint/parser": "8.10.0", + "@typescript-eslint/utils": "8.10.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", @@ -14879,66 +14658,27 @@ } }, "@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true }, - "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "@eslint/compat": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.1.tgz", + "integrity": "sha512-JbHG2TWuCeNzh87fXo+/46Z1LEo9DBA9T188d0fZgGxAD+cNyS6sx9fdiyxjGPBMyQVRlCutTByZ6a5+YMkF7g==", + "dev": true, + "requires": {} + }, + "@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dev": true, "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } - } - }, - "@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true - }, - "@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^2.0.3", + "@eslint/object-schema": "^2.1.4", "debug": "^4.3.1", - "minimatch": "^3.0.5" + "minimatch": "^3.1.2" }, "dependencies": { "debug": { @@ -14958,16 +14698,99 @@ } } }, + "@eslint/core": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "@eslint/js": { + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", + "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "dev": true + }, + "@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true + }, + "@eslint/plugin-kit": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.1.tgz", + "integrity": "sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==", + "dev": true, + "requires": { + "levn": "^0.4.1" + } + }, + "@humanfs/core": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", + "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", + "dev": true + }, + "@humanfs/node": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", + "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", + "dev": true, + "requires": { + "@humanfs/core": "^0.19.0", + "@humanwhocodes/retry": "^0.3.0" + } + }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, - "@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true }, "@inquirer/checkbox": { @@ -15421,6 +15244,12 @@ "fastq": "^1.6.0" } }, + "@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true + }, "@pkgr/core": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", @@ -15804,6 +15633,25 @@ "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", "dev": true }, + "@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "requires": { + "@types/eslint": "*" + } + }, "@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -15835,6 +15683,12 @@ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -15928,47 +15782,6 @@ "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^1.3.0" - }, - "dependencies": { - "@typescript-eslint/type-utils": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.10.0.tgz", - "integrity": "sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "8.10.0", - "@typescript-eslint/utils": "8.10.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/utils": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.10.0.tgz", - "integrity": "sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.10.0", - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/typescript-estree": "8.10.0" - } - }, - "debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "requires": { - "ms": "^2.1.3" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } } }, "@typescript-eslint/parser": { @@ -16012,58 +15825,17 @@ } }, "@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.10.0.tgz", + "integrity": "sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/typescript-estree": "8.10.0", + "@typescript-eslint/utils": "8.10.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "dependencies": { - "@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - } - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, "debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -16073,26 +15845,11 @@ "ms": "^2.1.3" } }, - "minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true - }, - "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true } } }, @@ -16160,98 +15917,15 @@ } }, "@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.10.0.tgz", + "integrity": "sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - } - }, - "@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - } - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "requires": { - "ms": "^2.1.3" - } - }, - "minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true - } + "@typescript-eslint/scope-manager": "8.10.0", + "@typescript-eslint/types": "8.10.0", + "@typescript-eslint/typescript-estree": "8.10.0" } }, "@typescript-eslint/visitor-keys": { @@ -16723,12 +16397,6 @@ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "dev": true }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, "array.prototype.findlastindex": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", @@ -17897,9 +17565,9 @@ "dev": true }, "deepmerge-ts": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", - "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.3.tgz", + "integrity": "sha512-qCSH6I0INPxd9Y1VtAiLpnYvz5O//6rCfJXKk0z66Up9/VOSr+1yS8XSKA5IWRxjocFGlzPyaZYe+jxq7OOLtQ==", "dev": true }, "defer-to-connect": { @@ -17998,15 +17666,6 @@ } } }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, "docsify": { "version": "4.12.2", "resolved": "https://registry.npmjs.org/docsify/-/docsify-4.12.2.tgz", @@ -18158,15 +17817,6 @@ } } }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, "domain-browser": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", @@ -18265,6 +17915,16 @@ "once": "^1.4.0" } }, + "enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -18473,57 +18133,48 @@ "dev": true }, "eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", + "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.7.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.13.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", "text-table": "^0.2.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -18584,20 +18235,10 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", "dev": true }, "glob-parent": { @@ -18636,15 +18277,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -18693,6 +18325,39 @@ } } }, + "eslint-import-resolver-typescript": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", + "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", + "dev": true, + "requires": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.3.5", + "enhanced-resolve": "^5.15.0", + "eslint-module-utils": "^2.8.1", + "fast-glob": "^3.3.2", + "get-tsconfig": "^4.7.5", + "is-bun-module": "^1.0.2", + "is-glob": "^4.0.3" + }, + "dependencies": { + "debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, "eslint-module-utils": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", @@ -18720,29 +18385,23 @@ } }, "eslint-plugin-functional": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-functional/-/eslint-plugin-functional-6.6.3.tgz", - "integrity": "sha512-sVbbvNvwX3HVkXAykKyoNLv57r4DPF7f1sy+/8j4YtzLYVQPGljMUWv3T6Kd4lwnnjmcKuj0EkIbS+knL6P5jw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-functional/-/eslint-plugin-functional-7.0.2.tgz", + "integrity": "sha512-IBriPyU3Uc1EieU5YVyiqrwHzw2yl4bRW58Xf5RP8x3pf80MoqObgfNu9DERwSIgvFOm93jdalUITc96Ysnx7g==", "dev": true, "requires": { - "@typescript-eslint/utils": "^7.3.1", - "deepmerge-ts": "^5.1.0", - "escape-string-regexp": "^4.0.0", - "is-immutable-type": "^4.0.0", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "@typescript-eslint/utils": "^8.0.0", + "deepmerge-ts": "^7.1.0", + "escape-string-regexp": "^5.0.0", + "is-immutable-type": "^5.0.0", + "ts-api-utils": "^1.3.0", + "ts-declaration-location": "^1.0.4" }, "dependencies": { "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true } } @@ -18861,23 +18520,6 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", - "dev": true - }, - "espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", - "dev": true, - "requires": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" - } - }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -18960,6 +18602,16 @@ } } }, + "eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -18967,14 +18619,22 @@ "dev": true }, "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", "dev": true, "requires": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true + } } }, "esprima": { @@ -18990,14 +18650,6 @@ "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "esrecurse": { @@ -19007,16 +18659,14 @@ "dev": true, "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, "estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -19220,12 +18870,12 @@ } }, "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" } }, "fill-range": { @@ -19298,14 +18948,13 @@ "dev": true }, "flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "dependencies": { "json-buffer": { @@ -19589,21 +19238,10 @@ } }, "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - }, - "dependencies": { - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - } - } + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true }, "globalthis": { "version": "1.0.3", @@ -19614,20 +19252,6 @@ "define-properties": "^1.1.3" } }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, "globrex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", @@ -20145,6 +19769,23 @@ } } }, + "is-bun-module": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.2.1.tgz", + "integrity": "sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==", + "dev": true, + "requires": { + "semver": "^7.6.3" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, "is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -20220,14 +19861,14 @@ } }, "is-immutable-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-immutable-type/-/is-immutable-type-4.0.0.tgz", - "integrity": "sha512-gyFBCXv+NikTs8/PGZhgjbMmFZQ5jvHGZIsVu6+/9Bk4K7imlWBIDN7hTr9fNioGzFg71I4YM3z8f0aKXarTAw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-immutable-type/-/is-immutable-type-5.0.0.tgz", + "integrity": "sha512-mcvHasqbRBWJznuPqqHRKiJgYAz60sZ0mvO3bN70JbkuK7ksfmgc489aKZYxMEjIbRvyOseaTjaRZLRF/xFeRA==", "dev": true, "requires": { - "@typescript-eslint/type-utils": "^7.2.0", + "@typescript-eslint/type-utils": "^8.0.0", "ts-api-utils": "^1.3.0", - "ts-declaration-location": "^1.0.0" + "ts-declaration-location": "^1.0.4" } }, "is-installed-globally": { @@ -20517,6 +20158,12 @@ "@isaacs/cliui": "^8.0.2" } }, + "jiti": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.3.3.tgz", + "integrity": "sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==", + "dev": true + }, "jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -21620,12 +21267,6 @@ } } }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, "pathe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", @@ -22098,31 +21739,6 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, "ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -22449,12 +22065,6 @@ "totalist": "^3.0.0" } }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "slashes": { "version": "3.0.12", "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", @@ -22812,6 +22422,12 @@ "tslib": "^2.6.2" } }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, "term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -23227,6 +22843,17 @@ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true }, + "typescript-eslint": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.10.0.tgz", + "integrity": "sha512-YIu230PeN7z9zpu/EtqCIuRVHPs4iSlqW6TEvjbyDAE3MZsSl2RXBo+5ag+lbABCG8sFM1WVKEXhlQ8Ml8A3Fw==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "8.10.0", + "@typescript-eslint/parser": "8.10.0", + "@typescript-eslint/utils": "8.10.0" + } + }, "uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", diff --git a/package.json b/package.json index a22500040a..a1acfe319f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test": "vitest --ui --coverage", "test:ci": "vitest run --coverage", "prepublishOnly": "npm run build --omit=dev", - "lint": "eslint --ext .ts src", + "lint": "eslint --flag unstable_ts_config --config eslint.config.ts", "predemo": "npm run build", "demo": "tsx ./demo/index.ts", "typedoc": "typedoc src/index.ts --tsconfig tsconfig.typedoc.json", @@ -68,6 +68,8 @@ }, "homepage": "https://docx.js.org", "devDependencies": { + "@eslint/compat": "^1.2.1", + "@types/eslint__js": "^8.42.3", "@types/inquirer": "^9.0.3", "@types/prompt": "^1.1.1", "@types/unzipper": "^0.10.4", @@ -78,8 +80,9 @@ "@vitest/ui": "^2.1.2", "cspell": "^8.2.3", "docsify-cli": "^4.3.0", - "eslint": "^8.23.0", - "eslint-plugin-functional": "^6.0.0", + "eslint": "^9.13.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-functional": "^7.0.2", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsdoc": "^50.3.1", "eslint-plugin-no-null": "^1.0.2", @@ -88,6 +91,7 @@ "execa": "^9.4.0", "glob": "^11.0.0", "inquirer": "^12.0.0", + "jiti": "^2.3.3", "jsdom": "^25.0.1", "pre-commit": "^1.2.2", "prettier": "^3.1.1", @@ -95,6 +99,7 @@ "tsx": "^4.7.0", "typedoc": "^0.26.9", "typescript": "5.3.3", + "typescript-eslint": "^8.10.0", "unzipper": "^0.12.3", "vite": "^5.0.10", "vite-plugin-dts": "^4.2.4", diff --git a/src/export/formatter.ts b/src/export/formatter.ts index 26dc04eb09..694c97f9b4 100644 --- a/src/export/formatter.ts +++ b/src/export/formatter.ts @@ -1,7 +1,6 @@ import { BaseXmlComponent, IContext, IXmlableObject } from "@file/xml-components"; export class Formatter { - // tslint:disable-next-line: no-object-literal-type-assertion public format(input: BaseXmlComponent, context: IContext = { stack: [] } as unknown as IContext): IXmlableObject { const output = input.prepForXml(context); diff --git a/src/export/packer/next-compiler.spec.ts b/src/export/packer/next-compiler.spec.ts index 753389de44..e0c7197df7 100644 --- a/src/export/packer/next-compiler.spec.ts +++ b/src/export/packer/next-compiler.spec.ts @@ -125,7 +125,6 @@ describe("Compiler", () => { ], }); - // tslint:disable-next-line: no-string-literal const spy = vi.spyOn(compiler["formatter"], "format"); compiler.compile(file); diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index b7df84c899..089489d902 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -9,12 +9,12 @@ import { ImageReplacer } from "./image-replacer"; import { NumberingReplacer } from "./numbering-replacer"; import { PrettifyType } from "./packer"; -interface IXmlifyedFile { +type IXmlifyedFile = { readonly data: string; readonly path: string; -} +}; -interface IXmlifyedFileMapping { +type IXmlifyedFileMapping = { readonly Document: IXmlifyedFile; readonly Styles: IXmlifyedFile; readonly Properties: IXmlifyedFile; @@ -34,7 +34,7 @@ interface IXmlifyedFileMapping { readonly Comments?: IXmlifyedFile; readonly FontTable?: IXmlifyedFile; readonly FontTableRelationships?: IXmlifyedFile; -} +}; export class Compiler { private readonly formatter: Formatter; diff --git a/src/export/packer/packer.spec.ts b/src/export/packer/packer.spec.ts index ae59646cf9..344d3d35f2 100644 --- a/src/export/packer/packer.spec.ts +++ b/src/export/packer/packer.spec.ts @@ -139,7 +139,6 @@ describe("Packer", () => { it("should create a standard docx file", async () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any vi.spyOn((Packer as any).compiler, "compile").mockReturnValue({ - // tslint:disable-next-line: no-empty generateAsync: () => vi.fn(), }); const str = await Packer.toBlob(file); @@ -167,7 +166,6 @@ describe("Packer", () => { it("should create a standard docx file", async () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any vi.spyOn((Packer as any).compiler, "compile").mockReturnValue({ - // tslint:disable-next-line: no-empty generateAsync: () => Promise.resolve(vi.fn()), }); const stream = Packer.toStream(file); diff --git a/src/export/packer/packer.ts b/src/export/packer/packer.ts index 4f1bc53458..78dff25943 100644 --- a/src/export/packer/packer.ts +++ b/src/export/packer/packer.ts @@ -1,4 +1,5 @@ import { Stream } from "stream"; + import { File } from "@file/file"; import { Compiler } from "./next-compiler"; @@ -10,7 +11,7 @@ export const PrettifyType = { NONE: "", WITH_2_BLANKS: " ", WITH_4_BLANKS: " ", - // eslint-disable-next-line @typescript-eslint/naming-convention + WITH_TAB: "\t", } as const; diff --git a/src/file/app-properties/app-properties.ts b/src/file/app-properties/app-properties.ts index 7774a155b1..715d95fa1d 100644 --- a/src/file/app-properties/app-properties.ts +++ b/src/file/app-properties/app-properties.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { AppPropertiesAttributes } from "./app-properties-attributes"; export class AppProperties extends XmlComponent { diff --git a/src/file/border/border.ts b/src/file/border/border.ts index 5b76390af5..55942c2595 100644 --- a/src/file/border/border.ts +++ b/src/file/border/border.ts @@ -22,7 +22,7 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; import { eighthPointMeasureValue, hexColorValue, pointMeasureValue } from "@util/values"; -export interface IBorderOptions { +export type IBorderOptions = { readonly style: (typeof BorderStyle)[keyof typeof BorderStyle]; /** Border color, in hex (eg 'FF00AA') */ readonly color?: string; @@ -30,7 +30,7 @@ export interface IBorderOptions { readonly size?: number; /** Spacing offset. Values are specified in pt */ readonly space?: number; -} +}; export class BorderElement extends XmlComponent { public constructor(elementName: string, { color, size, space, style }: IBorderOptions) { @@ -55,7 +55,6 @@ class BordersAttributes extends XmlAttributeComponent { }; } -/* eslint-disable @typescript-eslint/naming-convention */ export const BorderStyle = { SINGLE: "single", DASH_DOT_STROKED: "dashDotStroked", @@ -85,4 +84,3 @@ export const BorderStyle = { TRIPLE: "triple", WAVE: "wave", } as const; -/* eslint-enable */ diff --git a/src/file/checkbox/checkbox-util.spec.ts b/src/file/checkbox/checkbox-util.spec.ts index 74fc74b820..bc696acd9d 100644 --- a/src/file/checkbox/checkbox-util.spec.ts +++ b/src/file/checkbox/checkbox-util.spec.ts @@ -1,5 +1,7 @@ import { describe, expect, it } from "vitest"; + import { Formatter } from "@export/formatter"; + import { CheckBoxUtil } from "."; describe("CheckBoxUtil", () => { diff --git a/src/file/checkbox/checkbox-util.ts b/src/file/checkbox/checkbox-util.ts index d6abb2a3b3..010405e436 100644 --- a/src/file/checkbox/checkbox-util.ts +++ b/src/file/checkbox/checkbox-util.ts @@ -7,20 +7,20 @@ // // -import { XmlComponent } from "@file/xml-components"; import { CheckBoxSymbolElement } from "@file/checkbox/checkbox-symbol"; +import { XmlComponent } from "@file/xml-components"; -export interface ICheckboxSymbolProperties { +export type ICheckboxSymbolProperties = { readonly value?: string; readonly font?: string; -} +}; -export interface ICheckboxSymbolOptions { +export type ICheckboxSymbolOptions = { readonly alias?: string; readonly checked?: boolean; readonly checkedState?: ICheckboxSymbolProperties; readonly uncheckedState?: ICheckboxSymbolProperties; -} +}; export class CheckBoxUtil extends XmlComponent { private readonly DEFAULT_UNCHECKED_SYMBOL: string = "2610"; diff --git a/src/file/checkbox/checkbox.spec.ts b/src/file/checkbox/checkbox.spec.ts index e6553ac459..f546cd6a73 100644 --- a/src/file/checkbox/checkbox.spec.ts +++ b/src/file/checkbox/checkbox.spec.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; + import { Formatter } from "@export/formatter"; import { CheckBox } from "./checkbox"; diff --git a/src/file/checkbox/checkbox.ts b/src/file/checkbox/checkbox.ts index 9b75ee7f6c..bd6a28fb87 100644 --- a/src/file/checkbox/checkbox.ts +++ b/src/file/checkbox/checkbox.ts @@ -1,7 +1,8 @@ import { SymbolRun } from "@file/paragraph/run/symbol-run"; -import { StructuredDocumentTagProperties } from "@file/table-of-contents/sdt-properties"; import { StructuredDocumentTagContent } from "@file/table-of-contents/sdt-content"; +import { StructuredDocumentTagProperties } from "@file/table-of-contents/sdt-properties"; import { XmlComponent } from "@file/xml-components"; + import { CheckBoxUtil, ICheckboxSymbolOptions } from "./checkbox-util"; export class CheckBox extends XmlComponent { diff --git a/src/file/content-types/content-types.spec.ts b/src/file/content-types/content-types.spec.ts index 1fac77993e..cf78cb6809 100644 --- a/src/file/content-types/content-types.spec.ts +++ b/src/file/content-types/content-types.spec.ts @@ -1,5 +1,3 @@ -// tslint:disable:no-string-literal - import { beforeEach, describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; diff --git a/src/file/content-types/content-types.ts b/src/file/content-types/content-types.ts index fc7cc8a8b0..8107e2525c 100644 --- a/src/file/content-types/content-types.ts +++ b/src/file/content-types/content-types.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { ContentTypeAttributes } from "./content-types-attributes"; import { Default } from "./default/default"; import { Override } from "./override/override"; diff --git a/src/file/content-types/default/default.ts b/src/file/content-types/default/default.ts index 775300258c..eba4d9e149 100644 --- a/src/file/content-types/default/default.ts +++ b/src/file/content-types/default/default.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { DefaultAttributes } from "./default-attributes"; export class Default extends XmlComponent { diff --git a/src/file/content-types/override/override.ts b/src/file/content-types/override/override.ts index d28a40e473..511edd95a6 100644 --- a/src/file/content-types/override/override.ts +++ b/src/file/content-types/override/override.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { OverrideAttributes } from "./override-attributes"; export class Override extends XmlComponent { diff --git a/src/file/core-properties/properties.spec.ts b/src/file/core-properties/properties.spec.ts index 133cc3e858..40dad1db53 100644 --- a/src/file/core-properties/properties.spec.ts +++ b/src/file/core-properties/properties.spec.ts @@ -45,7 +45,7 @@ describe("Properties", () => { expect(tree["cp:coreProperties"]).to.be.an.instanceof(Array); // eslint-disable-next-line @typescript-eslint/no-explicit-any - const key = (obj: { readonly [key: string]: any }) => Object.keys(obj)[0]; + const key = (obj: Readonly>) => Object.keys(obj)[0]; expect(tree["cp:coreProperties"].map(key)).to.include.members([ "_attr", "cp:keywords", diff --git a/src/file/core-properties/properties.ts b/src/file/core-properties/properties.ts index d51b1f23b7..97ab062316 100644 --- a/src/file/core-properties/properties.ts +++ b/src/file/core-properties/properties.ts @@ -1,19 +1,18 @@ +import { FontOptions } from "@file/fonts/font-table"; import { ICommentsOptions } from "@file/paragraph/run/comment-run"; import { ICompatibilityOptions } from "@file/settings/compatibility"; -import { FontOptions } from "@file/fonts/font-table"; import { StringContainer, XmlComponent } from "@file/xml-components"; import { dateTimeValue } from "@util/values"; import { ICustomPropertyOptions } from "../custom-properties"; import { IDocumentBackgroundOptions } from "../document"; - import { DocumentAttributes } from "../document/document-attributes"; import { ISectionOptions } from "../file"; import { INumberingOptions } from "../numbering"; import { Paragraph } from "../paragraph"; import { IStylesOptions } from "../styles"; -export interface IPropertiesOptions { +export type IPropertiesOptions = { readonly sections: readonly ISectionOptions[]; readonly title?: string; readonly subject?: string; @@ -26,11 +25,14 @@ export interface IPropertiesOptions { readonly styles?: IStylesOptions; readonly numbering?: INumberingOptions; readonly comments?: ICommentsOptions; - readonly footnotes?: { - readonly [key: string]: { - readonly children: readonly Paragraph[]; - }; - }; + readonly footnotes?: Readonly< + Record< + string, + { + readonly children: readonly Paragraph[]; + } + > + >; readonly background?: IDocumentBackgroundOptions; readonly features?: { readonly trackRevisions?: boolean; @@ -42,7 +44,7 @@ export interface IPropertiesOptions { readonly evenAndOddHeaderAndFooters?: boolean; readonly defaultTabStop?: number; readonly fonts?: readonly FontOptions[]; -} +}; // diff --git a/src/file/custom-properties/custom-properties.ts b/src/file/custom-properties/custom-properties.ts index c85a02ef74..f24dcaa12a 100644 --- a/src/file/custom-properties/custom-properties.ts +++ b/src/file/custom-properties/custom-properties.ts @@ -1,4 +1,5 @@ import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components"; + import { CustomPropertiesAttributes } from "./custom-properties-attributes"; import { CustomProperty, ICustomPropertyOptions } from "./custom-property"; diff --git a/src/file/custom-properties/custom-property.ts b/src/file/custom-properties/custom-property.ts index 65e926ad4a..c72de03e33 100644 --- a/src/file/custom-properties/custom-property.ts +++ b/src/file/custom-properties/custom-property.ts @@ -1,10 +1,11 @@ import { XmlComponent } from "@file/xml-components"; + import { CustomPropertyAttributes } from "./custom-property-attributes"; -export interface ICustomPropertyOptions { +export type ICustomPropertyOptions = { readonly name: string; readonly value: string; -} +}; export class CustomProperty extends XmlComponent { public constructor(id: number, properties: ICustomPropertyOptions) { diff --git a/src/file/document-wrapper.ts b/src/file/document-wrapper.ts index e60b2a1927..578ac2d048 100644 --- a/src/file/document-wrapper.ts +++ b/src/file/document-wrapper.ts @@ -1,14 +1,14 @@ -import { XmlComponent } from "./xml-components"; import { Document, IDocumentOptions } from "./document"; import { Footer } from "./footer/footer"; import { FootNotes } from "./footnotes"; import { Header } from "./header/header"; import { Relationships } from "./relationships"; +import { XmlComponent } from "./xml-components"; -export interface IViewWrapper { +export type IViewWrapper = { readonly View: Document | Footer | Header | FootNotes | XmlComponent; readonly Relationships: Relationships; -} +}; export class DocumentWrapper implements IViewWrapper { private readonly document: Document; diff --git a/src/file/document/body/section-properties/properties/columns.ts b/src/file/document/body/section-properties/properties/columns.ts index 8cf204d1a6..628c01a8b9 100644 --- a/src/file/document/body/section-properties/properties/columns.ts +++ b/src/file/document/body/section-properties/properties/columns.ts @@ -1,5 +1,5 @@ import { NextAttributeComponent, XmlComponent } from "@file/xml-components"; -import { decimalNumber, PositiveUniversalMeasure, twipsMeasureValue } from "@util/values"; +import { PositiveUniversalMeasure, decimalNumber, twipsMeasureValue } from "@util/values"; import { Column } from "./column"; diff --git a/src/file/document/body/section-properties/properties/doc-grid.ts b/src/file/document/body/section-properties/properties/doc-grid.ts index e7ddbe6a77..e9f086045a 100644 --- a/src/file/document/body/section-properties/properties/doc-grid.ts +++ b/src/file/document/body/section-properties/properties/doc-grid.ts @@ -17,7 +17,6 @@ import { decimalNumber } from "@util/values"; // // -/* eslint-disable @typescript-eslint/naming-convention */ export const DocumentGridType = { DEFAULT: "default", LINES: "lines", @@ -25,12 +24,11 @@ export const DocumentGridType = { SNAP_TO_CHARS: "snapToChars", } as const; -/* eslint-enable */ -export interface IDocGridAttributesProperties { +export type IDocGridAttributesProperties = { readonly type?: (typeof DocumentGridType)[keyof typeof DocumentGridType]; readonly linePitch?: number; readonly charSpace?: number; -} +}; export class DocGridAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/document/body/section-properties/properties/header-footer-reference.spec.ts b/src/file/document/body/section-properties/properties/header-footer-reference.spec.ts index 84f3d131f9..f996b4d889 100644 --- a/src/file/document/body/section-properties/properties/header-footer-reference.spec.ts +++ b/src/file/document/body/section-properties/properties/header-footer-reference.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { HeaderFooterReference, HeaderFooterReferenceType, HeaderFooterType } from "./header-footer-reference"; describe("HeaderFooterReference", () => { diff --git a/src/file/document/body/section-properties/properties/header-footer-reference.ts b/src/file/document/body/section-properties/properties/header-footer-reference.ts index ab7b4f44c0..ee8a45a226 100644 --- a/src/file/document/body/section-properties/properties/header-footer-reference.ts +++ b/src/file/document/body/section-properties/properties/header-footer-reference.ts @@ -32,10 +32,10 @@ export const HeaderFooterReferenceType = { // // -export interface IHeaderFooterOptions { +export type IHeaderFooterOptions = { readonly type?: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; readonly id?: number; -} +}; class FooterReferenceAttributes extends XmlAttributeComponent<{ readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; diff --git a/src/file/document/body/section-properties/properties/line-number.ts b/src/file/document/body/section-properties/properties/line-number.ts index 3c71597fd6..50bfd17ce0 100644 --- a/src/file/document/body/section-properties/properties/line-number.ts +++ b/src/file/document/body/section-properties/properties/line-number.ts @@ -1,6 +1,6 @@ // http://officeopenxml.com/WPsectionLineNumbering.php import { BuilderElement, XmlComponent } from "@file/xml-components"; -import { decimalNumber, PositiveUniversalMeasure, twipsMeasureValue } from "@util/values"; +import { PositiveUniversalMeasure, decimalNumber, twipsMeasureValue } from "@util/values"; // // @@ -10,13 +10,11 @@ import { decimalNumber, PositiveUniversalMeasure, twipsMeasureValue } from "@uti // // -/* eslint-disable @typescript-eslint/naming-convention */ export const LineNumberRestartFormat = { NEW_PAGE: "newPage", NEW_SECTION: "newSection", CONTINUOUS: "continuous", } as const; -/* eslint-enable */ // // diff --git a/src/file/document/body/section-properties/properties/page-borders.spec.ts b/src/file/document/body/section-properties/properties/page-borders.spec.ts index 8890ca0eee..2b983d5f17 100644 --- a/src/file/document/body/section-properties/properties/page-borders.spec.ts +++ b/src/file/document/body/section-properties/properties/page-borders.spec.ts @@ -3,7 +3,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { BorderStyle } from "@file/border"; -import { PageBorderDisplay, PageBorders, PageBorderZOrder } from "./page-borders"; +import { PageBorderDisplay, PageBorderZOrder, PageBorders } from "./page-borders"; describe("PageBorders", () => { describe("#constructor()", () => { diff --git a/src/file/document/body/section-properties/properties/page-borders.ts b/src/file/document/body/section-properties/properties/page-borders.ts index e7fe557da5..e597cac61b 100644 --- a/src/file/document/body/section-properties/properties/page-borders.ts +++ b/src/file/document/body/section-properties/properties/page-borders.ts @@ -10,13 +10,11 @@ import { IgnoreIfEmptyXmlComponent, XmlAttributeComponent } from "@file/xml-comp // // -/* eslint-disable @typescript-eslint/naming-convention */ export const PageBorderDisplay = { ALL_PAGES: "allPages", FIRST_PAGE: "firstPage", NOT_FIRST_PAGE: "notFirstPage", } as const; -/* eslint-enable */ // // @@ -40,19 +38,19 @@ export const PageBorderZOrder = { FRONT: "front", } as const; -export interface IPageBorderAttributes { +export type IPageBorderAttributes = { readonly display?: (typeof PageBorderDisplay)[keyof typeof PageBorderDisplay]; readonly offsetFrom?: (typeof PageBorderOffsetFrom)[keyof typeof PageBorderOffsetFrom]; readonly zOrder?: (typeof PageBorderZOrder)[keyof typeof PageBorderZOrder]; -} +}; -export interface IPageBordersOptions { +export type IPageBordersOptions = { readonly pageBorders?: IPageBorderAttributes; readonly pageBorderTop?: IBorderOptions; readonly pageBorderRight?: IBorderOptions; readonly pageBorderBottom?: IBorderOptions; readonly pageBorderLeft?: IBorderOptions; -} +}; class PageBordersAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/document/body/section-properties/properties/page-margin.ts b/src/file/document/body/section-properties/properties/page-margin.ts index 5e905c0f73..03378a0db2 100644 --- a/src/file/document/body/section-properties/properties/page-margin.ts +++ b/src/file/document/body/section-properties/properties/page-margin.ts @@ -1,5 +1,5 @@ import { NextAttributeComponent, XmlComponent } from "@file/xml-components"; -import { PositiveUniversalMeasure, signedTwipsMeasureValue, twipsMeasureValue, UniversalMeasure } from "@util/values"; +import { PositiveUniversalMeasure, UniversalMeasure, signedTwipsMeasureValue, twipsMeasureValue } from "@util/values"; // // diff --git a/src/file/document/body/section-properties/properties/page-number.ts b/src/file/document/body/section-properties/properties/page-number.ts index cf93ea1355..055349d0ec 100644 --- a/src/file/document/body/section-properties/properties/page-number.ts +++ b/src/file/document/body/section-properties/properties/page-number.ts @@ -13,7 +13,6 @@ import { decimalNumber } from "@util/values"; // // -/* eslint-disable @typescript-eslint/naming-convention */ export const PageNumberSeparator = { HYPHEN: "hyphen", PERIOD: "period", @@ -22,13 +21,11 @@ export const PageNumberSeparator = { EN_DASH: "endash", } as const; -/* eslint-enable */ - -export interface IPageNumberTypeAttributes { +export type IPageNumberTypeAttributes = { readonly start?: number; readonly formatType?: (typeof NumberFormat)[keyof typeof NumberFormat]; readonly separator?: (typeof PageNumberSeparator)[keyof typeof PageNumberSeparator]; -} +}; // // diff --git a/src/file/document/body/section-properties/properties/page-text-direction.spec.ts b/src/file/document/body/section-properties/properties/page-text-direction.spec.ts index e1a690d66c..e4c1c87095 100644 --- a/src/file/document/body/section-properties/properties/page-text-direction.spec.ts +++ b/src/file/document/body/section-properties/properties/page-text-direction.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { PageTextDirection, PageTextDirectionType } from "./page-text-direction"; describe("PageTextDirection", () => { diff --git a/src/file/document/body/section-properties/properties/page-text-direction.ts b/src/file/document/body/section-properties/properties/page-text-direction.ts index b5b71c03da..ee883e3f1e 100644 --- a/src/file/document/body/section-properties/properties/page-text-direction.ts +++ b/src/file/document/body/section-properties/properties/page-text-direction.ts @@ -1,13 +1,10 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; -/* eslint-disable @typescript-eslint/naming-convention */ export const PageTextDirectionType = { LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb", TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl", } as const; -/* eslint-enable */ - class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType]; }> { diff --git a/src/file/document/body/section-properties/properties/section-type.spec.ts b/src/file/document/body/section-properties/properties/section-type.spec.ts index 644e6d568f..068d657a27 100644 --- a/src/file/document/body/section-properties/properties/section-type.spec.ts +++ b/src/file/document/body/section-properties/properties/section-type.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { SectionType, Type } from "./section-type"; describe("Type", () => { diff --git a/src/file/document/body/section-properties/properties/section-type.ts b/src/file/document/body/section-properties/properties/section-type.ts index 4b3a5ea6a9..e56a4c45a9 100644 --- a/src/file/document/body/section-properties/properties/section-type.ts +++ b/src/file/document/body/section-properties/properties/section-type.ts @@ -11,7 +11,6 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; // // -/* eslint-disable @typescript-eslint/naming-convention */ export const SectionType = { NEXT_PAGE: "nextPage", NEXT_COLUMN: "nextColumn", @@ -19,7 +18,6 @@ export const SectionType = { EVEN_PAGE: "evenPage", ODD_PAGE: "oddPage", } as const; -/* eslint-enable */ // // diff --git a/src/file/document/body/section-properties/section-properties.spec.ts b/src/file/document/body/section-properties/section-properties.spec.ts index cefee6d830..a31d2723b8 100644 --- a/src/file/document/body/section-properties/section-properties.spec.ts +++ b/src/file/document/body/section-properties/section-properties.spec.ts @@ -15,7 +15,7 @@ import { LineNumberRestartFormat } from "./properties/line-number"; import { PageBorderOffsetFrom } from "./properties/page-borders"; import { PageTextDirectionType } from "./properties/page-text-direction"; import { SectionType } from "./properties/section-type"; -import { sectionMarginDefaults, sectionPageSizeDefaults, SectionProperties } from "./section-properties"; +import { SectionProperties, sectionMarginDefaults, sectionPageSizeDefaults } from "./section-properties"; const DEFAULT_MARGINS = { "w:bottom": sectionMarginDefaults.BOTTOM, diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index 2e9c61819b..3a83945691 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -1,14 +1,13 @@ // http://officeopenxml.com/WPsection.php -// tslint:disable: no-unnecessary-initializer import { FooterWrapper } from "@file/footer-wrapper"; import { HeaderWrapper } from "@file/header-wrapper"; import { VerticalAlign, VerticalAlignElement } from "@file/vertical-align"; import { OnOffElement, XmlComponent } from "@file/xml-components"; -import { HeaderFooterReference, HeaderFooterReferenceType, HeaderFooterType } from "./properties/header-footer-reference"; import { Columns, IColumnsAttributes } from "./properties/columns"; import { DocumentGrid, IDocGridAttributesProperties } from "./properties/doc-grid"; +import { HeaderFooterReference, HeaderFooterReferenceType, HeaderFooterType } from "./properties/header-footer-reference"; import { ILineNumberAttributes, createLineNumberType } from "./properties/line-number"; import { IPageBordersOptions, PageBorders } from "./properties/page-borders"; import { IPageMarginAttributes, PageMargin } from "./properties/page-margin"; @@ -17,13 +16,13 @@ import { IPageSizeAttributes, PageOrientation, PageSize } from "./properties/pag import { PageTextDirection, PageTextDirectionType } from "./properties/page-text-direction"; import { SectionType, Type } from "./properties/section-type"; -export interface IHeaderFooterGroup { +export type IHeaderFooterGroup = { readonly default?: T; readonly first?: T; readonly even?: T; -} +}; -export interface ISectionPropertiesOptions { +export type ISectionPropertiesOptions = { readonly page?: { readonly size?: IPageSizeAttributes; readonly margin?: IPageMarginAttributes; @@ -39,7 +38,7 @@ export interface ISectionPropertiesOptions { readonly verticalAlign?: (typeof VerticalAlign)[keyof typeof VerticalAlign]; readonly column?: IColumnsAttributes; readonly type?: (typeof SectionType)[keyof typeof SectionType]; -} +}; // // diff --git a/src/file/document/document-attributes.ts b/src/file/document/document-attributes.ts index e919fa3de5..996763d792 100644 --- a/src/file/document/document-attributes.ts +++ b/src/file/document/document-attributes.ts @@ -1,7 +1,7 @@ import { XmlAttributeComponent } from "@file/xml-components"; /* cSpell:disable */ -export interface IDocumentAttributesProperties { +export type IDocumentAttributesProperties = { readonly wpc?: string; readonly mc?: string; readonly o?: string; @@ -41,7 +41,7 @@ export interface IDocumentAttributesProperties { readonly w16?: string; readonly w16sdtdh?: string; readonly w16se?: string; -} +}; /* cSpell:enable */ export class DocumentAttributes extends XmlAttributeComponent { diff --git a/src/file/document/document-background/document-background.ts b/src/file/document/document-background/document-background.ts index a769065632..c3d3143ca0 100644 --- a/src/file/document/document-background/document-background.ts +++ b/src/file/document/document-background/document-background.ts @@ -39,12 +39,12 @@ export class DocumentBackgroundAttributes extends XmlAttributeComponent<{ }; } -export interface IDocumentBackgroundOptions { +export type IDocumentBackgroundOptions = { readonly color?: string; readonly themeColor?: string; readonly themeShade?: string; readonly themeTint?: string; -} +}; // // diff --git a/src/file/document/document.ts b/src/file/document/document.ts index e1b098d9cb..f233d932c8 100644 --- a/src/file/document/document.ts +++ b/src/file/document/document.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/WPdocument.php import { XmlComponent } from "@file/xml-components"; + import { ConcreteHyperlink, Paragraph } from "../paragraph"; import { Table } from "../table"; import { TableOfContents } from "../table-of-contents"; @@ -7,9 +8,9 @@ import { Body } from "./body"; import { DocumentAttributes } from "./document-attributes"; import { DocumentBackground, IDocumentBackgroundOptions } from "./document-background"; -export interface IDocumentOptions { +export type IDocumentOptions = { readonly background?: IDocumentBackgroundOptions; -} +}; // // @@ -80,7 +81,6 @@ export class Document extends XmlComponent { } public add(item: Paragraph | Table | TableOfContents | ConcreteHyperlink): Document { - // eslint-disable-next-line functional/immutable-data this.body.push(item); return this; } diff --git a/src/file/drawing/anchor/anchor-attributes.ts b/src/file/drawing/anchor/anchor-attributes.ts index 2e4ca7a33d..8d3210fdea 100644 --- a/src/file/drawing/anchor/anchor-attributes.ts +++ b/src/file/drawing/anchor/anchor-attributes.ts @@ -1,14 +1,15 @@ import { XmlAttributeComponent } from "@file/xml-components"; + import { IDistance } from "../drawing"; -export interface IAnchorAttributes extends IDistance { +export type IAnchorAttributes = { readonly allowOverlap?: "0" | "1"; readonly behindDoc?: "0" | "1"; readonly layoutInCell?: "0" | "1"; readonly locked?: "0" | "1"; readonly relativeHeight?: number; readonly simplePos?: "0" | "1"; -} +} & IDistance; export class AnchorAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/drawing/anchor/anchor.spec.ts b/src/file/drawing/anchor/anchor.spec.ts index ab0c9cb401..b5f5f2e3e3 100644 --- a/src/file/drawing/anchor/anchor.spec.ts +++ b/src/file/drawing/anchor/anchor.spec.ts @@ -1,7 +1,6 @@ import { assert, describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; - import { Utility } from "tests/utility"; import { IDrawingOptions } from "../drawing"; diff --git a/src/file/drawing/anchor/anchor.ts b/src/file/drawing/anchor/anchor.ts index e674e4ce20..2d4ba1aa20 100644 --- a/src/file/drawing/anchor/anchor.ts +++ b/src/file/drawing/anchor/anchor.ts @@ -1,6 +1,7 @@ // http://officeopenxml.com/drwPicFloating.php import { IMediaData, IMediaDataTransformation } from "@file/media"; import { XmlComponent } from "@file/xml-components"; + import { IDrawingOptions } from "../drawing"; import { HorizontalPosition, IFloating, SimplePos, VerticalPosition } from "../floating"; import { Graphic } from "../inline/graphic"; diff --git a/src/file/drawing/doc-properties/doc-properties.ts b/src/file/drawing/doc-properties/doc-properties.ts index 5df1497bb5..242bcdea42 100644 --- a/src/file/drawing/doc-properties/doc-properties.ts +++ b/src/file/drawing/doc-properties/doc-properties.ts @@ -1,7 +1,6 @@ // https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_docPr_topic_ID0ES32OB.html -import { IContext, IXmlableObject, NextAttributeComponent, XmlComponent } from "@file/xml-components"; import { ConcreteHyperlink } from "@file/paragraph"; - +import { IContext, IXmlableObject, NextAttributeComponent, XmlComponent } from "@file/xml-components"; import { docPropertiesUniqueNumericIdGen } from "@util/convenience-functions"; import { createHyperlinkClick } from "./doc-properties-children"; @@ -18,11 +17,11 @@ import { createHyperlinkClick } from "./doc-properties-children"; // // -export interface DocPropertiesOptions { +export type DocPropertiesOptions = { readonly name: string; readonly description: string; readonly title: string; -} +}; export class DocProperties extends XmlComponent { private readonly docPropertiesUniqueNumericId = docPropertiesUniqueNumericIdGen(); diff --git a/src/file/drawing/drawing.spec.ts b/src/file/drawing/drawing.spec.ts index 73bb1fcd15..c2bc794a64 100644 --- a/src/file/drawing/drawing.spec.ts +++ b/src/file/drawing/drawing.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest"; -import { IContext } from "@file/xml-components"; import { Formatter } from "@export/formatter"; +import { IContext } from "@file/xml-components"; import { ConcreteHyperlink, TextRun } from "../"; import { Drawing, IDrawingOptions } from "./drawing"; @@ -80,7 +80,6 @@ describe("Drawing", () => { { "a:graphicFrameLocks": { _attr: { - // tslint:disable-next-line:object-literal-key-quotes noChangeAspect: 1, "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main", }, @@ -139,7 +138,6 @@ describe("Drawing", () => { { "a:blip": { _attr: { - // tslint:disable-next-line:object-literal-key-quotes cstate: "none", "r:embed": "rId{test.jpg}", }, @@ -311,7 +309,6 @@ describe("Drawing", () => { { "a:graphicFrameLocks": { _attr: { - // tslint:disable-next-line:object-literal-key-quotes noChangeAspect: 1, "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main", }, @@ -370,7 +367,6 @@ describe("Drawing", () => { { "a:blip": { _attr: { - // tslint:disable-next-line:object-literal-key-quotes cstate: "none", "r:embed": "rId{test.jpg}", }, @@ -554,7 +550,6 @@ describe("Drawing", () => { { "a:graphicFrameLocks": { _attr: { - // tslint:disable-next-line:object-literal-key-quotes noChangeAspect: 1, "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main", }, @@ -622,7 +617,6 @@ describe("Drawing", () => { { "a:blip": { _attr: { - // tslint:disable-next-line:object-literal-key-quotes cstate: "none", "r:embed": "rId{test.jpg}", }, diff --git a/src/file/drawing/drawing.ts b/src/file/drawing/drawing.ts index 3664da15a2..2e6cf991fa 100644 --- a/src/file/drawing/drawing.ts +++ b/src/file/drawing/drawing.ts @@ -14,11 +14,11 @@ export type IDistance = { readonly distR?: number; }; -export interface IDrawingOptions { +export type IDrawingOptions = { readonly floating?: IFloating; readonly docProperties?: DocPropertiesOptions; readonly outline?: OutlineOptions; -} +}; // // diff --git a/src/file/drawing/floating/floating-position.ts b/src/file/drawing/floating/floating-position.ts index 9d3cf27397..dc4b7fb8e5 100644 --- a/src/file/drawing/floating/floating-position.ts +++ b/src/file/drawing/floating/floating-position.ts @@ -4,7 +4,6 @@ import { HorizontalPositionAlign, VerticalPositionAlign } from "@file/shared/ali import { ITextWrapping } from "../text-wrap"; -/* eslint-disable @typescript-eslint/naming-convention */ export const HorizontalPositionRelativeFrom = { CHARACTER: "character", COLUMN: "column", @@ -27,27 +26,26 @@ export const VerticalPositionRelativeFrom = { TOP_MARGIN: "topMargin", } as const; -/* eslint-enable */ -export interface IHorizontalPositionOptions { +export type IHorizontalPositionOptions = { readonly relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom]; readonly align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign]; readonly offset?: number; -} +}; -export interface IVerticalPositionOptions { +export type IVerticalPositionOptions = { readonly relative?: (typeof VerticalPositionRelativeFrom)[keyof typeof VerticalPositionRelativeFrom]; readonly align?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign]; readonly offset?: number; -} +}; -export interface IMargins { +export type IMargins = { readonly left?: number; readonly bottom?: number; readonly top?: number; readonly right?: number; -} +}; -export interface IFloating { +export type IFloating = { readonly horizontalPosition: IHorizontalPositionOptions; readonly verticalPosition: IVerticalPositionOptions; readonly allowOverlap?: boolean; @@ -57,4 +55,4 @@ export interface IFloating { readonly margins?: IMargins; readonly wrap?: ITextWrapping; readonly zIndex?: number; -} +}; diff --git a/src/file/drawing/floating/horizontal-position.ts b/src/file/drawing/floating/horizontal-position.ts index 10b36ba778..0cdc495c5b 100644 --- a/src/file/drawing/floating/horizontal-position.ts +++ b/src/file/drawing/floating/horizontal-position.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/drwPicFloating-position.php import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; + import { Align } from "./align"; import { HorizontalPositionRelativeFrom, IHorizontalPositionOptions } from "./floating-position"; import { PositionOffset } from "./position-offset"; diff --git a/src/file/drawing/floating/vertical-position.ts b/src/file/drawing/floating/vertical-position.ts index 01e4134453..855a1f43b4 100644 --- a/src/file/drawing/floating/vertical-position.ts +++ b/src/file/drawing/floating/vertical-position.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/drwPicFloating-position.php import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; + import { Align } from "./align"; import { IVerticalPositionOptions, VerticalPositionRelativeFrom } from "./floating-position"; import { PositionOffset } from "./position-offset"; diff --git a/src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.ts b/src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.ts index c9b0b33922..c22a603d8c 100644 --- a/src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.ts +++ b/src/file/drawing/graphic-frame/graphic-frame-locks/graphic-frame-locks.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { GraphicFrameLockAttributes } from "./graphic-frame-lock-attributes"; export class GraphicFrameLocks extends XmlComponent { diff --git a/src/file/drawing/graphic-frame/graphic-frame-properties.ts b/src/file/drawing/graphic-frame/graphic-frame-properties.ts index 90935ed533..03d0cd2728 100644 --- a/src/file/drawing/graphic-frame/graphic-frame-properties.ts +++ b/src/file/drawing/graphic-frame/graphic-frame-properties.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { GraphicFrameLocks } from "./graphic-frame-locks/graphic-frame-locks"; export class GraphicFrameProperties extends XmlComponent { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.ts b/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.ts index 909d87f80b..e15c132c58 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.ts @@ -1,5 +1,5 @@ -import { BuilderElement, XmlComponent } from "@file/xml-components"; import { IMediaData } from "@file/media"; +import { BuilderElement, XmlComponent } from "@file/xml-components"; const createSvgBlip = (mediaData: IMediaData): XmlComponent => new BuilderElement({ diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts b/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts index d322272737..e57274c373 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/blip/blip.ts @@ -1,5 +1,6 @@ import { IMediaData } from "@file/media"; import { BuilderElement, XmlComponent } from "@file/xml-components"; + import { createExtentionList } from "./blip-extentions"; type BlipAttributes = { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.ts b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.ts index 979272cf8f..18ca70c711 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/child-non-visual-pic-properties.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { PicLocks } from "./pic-locks/pic-locks"; export class ChildNonVisualProperties extends XmlComponent { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.ts b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.ts index b507c8e7b1..594b3da755 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/child-non-visual-pic-properties/pic-locks/pic-locks.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { PicLocksAttributes } from "./pic-locks-attributes"; export class PicLocks extends XmlComponent { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.ts b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.ts index a5bc3c24dd..6e28a27e13 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-pic-properties.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { ChildNonVisualProperties } from "./child-non-visual-pic-properties/child-non-visual-pic-properties"; import { NonVisualProperties } from "./non-visual-properties/non-visual-properties"; diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.ts b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.ts index 31842356c0..880b79dcab 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/non-visual-pic-properties/non-visual-properties/non-visual-properties.ts @@ -1,6 +1,6 @@ -import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components"; import { createHyperlinkClick } from "@file/drawing/doc-properties/doc-properties-children"; import { ConcreteHyperlink } from "@file/paragraph"; +import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components"; import { NonVisualPropertiesAttributes } from "./non-visual-properties-attributes"; diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/pic.ts b/src/file/drawing/inline/graphic/graphic-data/pic/pic.ts index e05c6aa15a..da43e86f0a 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/pic.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/pic.ts @@ -5,8 +5,8 @@ import { XmlComponent } from "@file/xml-components"; import { BlipFill } from "./blip/blip-fill"; import { NonVisualPicProperties } from "./non-visual-pic-properties/non-visual-pic-properties"; import { PicAttributes } from "./pic-attributes"; -import { ShapeProperties } from "./shape-properties/shape-properties"; import { OutlineOptions } from "./shape-properties/outline/outline"; +import { ShapeProperties } from "./shape-properties/shape-properties"; export class Pic extends XmlComponent { public constructor({ diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.ts index 2e032a1638..8b24f7d434 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { Form } from "./form/form"; describe("Form", () => { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.ts index b87cbe5d83..4aa40e8a02 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/extents/extents.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/drwSp-size.php import { XmlComponent } from "@file/xml-components"; + import { ExtentsAttributes } from "./extents-attributes"; export class Extents extends XmlComponent { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts index eef5b9e0f8..ab0ab07f77 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/form/offset/off.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/drwSp-size.php import { XmlComponent } from "@file/xml-components"; + import { OffsetAttributes } from "./off-attributes"; export class Offset extends XmlComponent { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.ts index ed274299d1..05e21c7464 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.ts @@ -1,8 +1,9 @@ // http://officeopenxml.com/drwSp-outline.php import { BuilderElement, XmlComponent } from "@file/xml-components"; + import { createNoFill } from "./no-fill"; -import { createSolidFill } from "./solid-fill"; import { SchemeColor } from "./scheme-color"; +import { createSolidFill } from "./solid-fill"; // // diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.ts index e66a53c4fe..2436a8f1cd 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; -import { createSolidFill } from "./solid-fill"; import { SchemeColor } from "./scheme-color"; +import { createSolidFill } from "./solid-fill"; describe("createSolidFill", () => { it("should create of rgb", () => { diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.ts index ee3d58777a..aa8ec9c177 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.ts @@ -1,7 +1,7 @@ import { BuilderElement, XmlComponent } from "@file/xml-components"; -import { createSchemeColor, SchemeColor } from "./scheme-color"; import { createSolidRgbColor } from "./rgb-color"; +import { SchemeColor, createSchemeColor } from "./scheme-color"; export type RgbColorOptions = { readonly type: "rgb"; diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.ts index 816bdedcda..8b38aa1842 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/preset-geometry/preset-geometry.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/drwSp-prstGeom.php import { XmlComponent } from "@file/xml-components"; + import { AdjustmentValues } from "./adjustment-values/adjustment-values"; import { PresetGeometryAttributes } from "./preset-geometry-attributes"; diff --git a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.ts b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.ts index 8b9effc44d..fb00d37eaa 100644 --- a/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.ts +++ b/src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.ts @@ -1,11 +1,12 @@ // http://officeopenxml.com/drwSp-SpPr.php import { IMediaDataTransformation } from "@file/media"; import { XmlComponent } from "@file/xml-components"; + import { Form } from "./form"; +import { createNoFill } from "./outline/no-fill"; import { OutlineOptions, createOutline } from "./outline/outline"; import { PresetGeometry } from "./preset-geometry/preset-geometry"; import { ShapePropertiesAttributes } from "./shape-properties-attributes"; -import { createNoFill } from "./outline/no-fill"; export class ShapeProperties extends XmlComponent { private readonly form: Form; diff --git a/src/file/drawing/inline/inline.spec.ts b/src/file/drawing/inline/inline.spec.ts index 1d2a791507..09c89e7100 100644 --- a/src/file/drawing/inline/inline.spec.ts +++ b/src/file/drawing/inline/inline.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { createInline } from "./inline"; describe("Inline", () => { diff --git a/src/file/drawing/inline/inline.ts b/src/file/drawing/inline/inline.ts index e752c9faa5..09959210b3 100644 --- a/src/file/drawing/inline/inline.ts +++ b/src/file/drawing/inline/inline.ts @@ -1,6 +1,7 @@ // http://officeopenxml.com/drwPicInline.php import { IMediaData, IMediaDataTransformation } from "@file/media"; import { BuilderElement, XmlComponent } from "@file/xml-components"; + import { DocProperties, DocPropertiesOptions } from "./../doc-properties/doc-properties"; import { createEffectExtent } from "./../effect-extent/effect-extent"; import { Extent } from "./../extent/extent"; diff --git a/src/file/drawing/text-wrap/text-wrapping.ts b/src/file/drawing/text-wrap/text-wrapping.ts index 9ea1f20038..0c82f86134 100644 --- a/src/file/drawing/text-wrap/text-wrapping.ts +++ b/src/file/drawing/text-wrap/text-wrapping.ts @@ -1,7 +1,6 @@ // http://officeopenxml.com/drwPicFloating-textWrap.php import { IDistance } from "../drawing"; -/* eslint-disable @typescript-eslint/naming-convention */ export const TextWrappingType = { NONE: 0, SQUARE: 1, @@ -16,10 +15,8 @@ export const TextWrappingSide = { LARGEST: "largest", } as const; -/* eslint-enable */ - -export interface ITextWrapping { +export type ITextWrapping = { readonly type: (typeof TextWrappingType)[keyof typeof TextWrappingType]; readonly side?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide]; readonly margins?: IDistance; -} +}; diff --git a/src/file/drawing/text-wrap/wrap-square.ts b/src/file/drawing/text-wrap/wrap-square.ts index 3f0b7d3907..f9b1a13e99 100644 --- a/src/file/drawing/text-wrap/wrap-square.ts +++ b/src/file/drawing/text-wrap/wrap-square.ts @@ -5,9 +5,9 @@ import { IDistance } from "../drawing"; import { IMargins } from "../floating"; import { ITextWrapping, TextWrappingSide } from "./text-wrapping"; -interface IWrapSquareAttributes extends IDistance { +type IWrapSquareAttributes = { readonly wrapText?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide]; -} +} & IDistance; class WrapSquareAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/file.ts b/src/file/file.ts index 47dd895166..cc7c5f51d5 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -2,8 +2,10 @@ import { AppProperties } from "./app-properties/app-properties"; import { ContentTypes } from "./content-types/content-types"; import { CoreProperties, IPropertiesOptions } from "./core-properties"; import { CustomProperties } from "./custom-properties"; -import { DocumentWrapper } from "./document-wrapper"; import { HeaderFooterReferenceType, ISectionPropertiesOptions } from "./document/body/section-properties"; +import { DocumentWrapper } from "./document-wrapper"; +import { FileChild } from "./file-child"; +import { FontWrapper } from "./fonts/font-wrapper"; import { FooterWrapper, IDocumentFooter } from "./footer-wrapper"; import { FootnotesWrapper } from "./footnotes-wrapper"; import { Footer, Header } from "./header"; @@ -16,10 +18,8 @@ import { Settings } from "./settings"; import { Styles } from "./styles"; import { ExternalStylesFactory } from "./styles/external-styles-factory"; import { DefaultStylesFactory } from "./styles/factory"; -import { FileChild } from "./file-child"; -import { FontWrapper } from "./fonts/font-wrapper"; -export interface ISectionOptions { +export type ISectionOptions = { readonly headers?: { readonly default?: Header; readonly first?: Header; @@ -32,7 +32,7 @@ export interface ISectionOptions { }; readonly properties?: ISectionPropertiesOptions; readonly children: readonly FileChild[]; -} +}; export class File { // eslint-disable-next-line functional/prefer-readonly-type diff --git a/src/file/fonts/font-table.ts b/src/file/fonts/font-table.ts index fce632a9e2..b3dc461e90 100644 --- a/src/file/fonts/font-table.ts +++ b/src/file/fonts/font-table.ts @@ -1,8 +1,8 @@ import { BuilderElement, XmlComponent } from "@file/xml-components"; import { createRegularFont } from "./create-regular-font"; -import { FontOptionsWithKey } from "./font-wrapper"; import { CharacterSet } from "./font"; +import { FontOptionsWithKey } from "./font-wrapper"; // // diff --git a/src/file/fonts/font.ts b/src/file/fonts/font.ts index 618bcd6293..8a62c0018d 100644 --- a/src/file/fonts/font.ts +++ b/src/file/fonts/font.ts @@ -1,4 +1,4 @@ -import { BuilderElement, createStringElement, OnOffElement, XmlComponent } from "@file/xml-components"; +import { BuilderElement, OnOffElement, XmlComponent, createStringElement } from "@file/xml-components"; // // @@ -27,7 +27,7 @@ import { BuilderElement, createStringElement, OnOffElement, XmlComponent } from // // http://www.datypic.com/sc/ooxml/e-w_embedRegular-1.html -export interface IFontRelationshipOptions { +export type IFontRelationshipOptions = { /** * Relationship to Part */ @@ -40,7 +40,7 @@ export interface IFontRelationshipOptions { * Embedded Font Is Subsetted */ readonly subsetted?: boolean; -} +}; export const CharacterSet = { ANSI: "00", diff --git a/src/file/footer-wrapper.ts b/src/file/footer-wrapper.ts index 8b4958ad5f..cb078f1a8a 100644 --- a/src/file/footer-wrapper.ts +++ b/src/file/footer-wrapper.ts @@ -8,10 +8,10 @@ import { Paragraph } from "./paragraph"; import { Relationships } from "./relationships"; import { Table } from "./table"; -export interface IDocumentFooter { +export type IDocumentFooter = { readonly footer: FooterWrapper; readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; -} +}; export class FooterWrapper implements IViewWrapper { private readonly footer: Footer; diff --git a/src/file/footer/footer.ts b/src/file/footer/footer.ts index fc1607466b..71f69eefe4 100644 --- a/src/file/footer/footer.ts +++ b/src/file/footer/footer.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/WPfooters.php import { InitializableXmlComponent, XmlComponent } from "@file/xml-components"; + import { Paragraph } from "../paragraph"; import { Table } from "../table"; import { FooterAttributes } from "./footer-attributes"; diff --git a/src/file/footnotes/footnote/footnote.ts b/src/file/footnotes/footnote/footnote.ts index fc87a3013b..011ae53c1e 100644 --- a/src/file/footnotes/footnote/footnote.ts +++ b/src/file/footnotes/footnote/footnote.ts @@ -6,15 +6,15 @@ import { FootnoteRefRun } from "./run/footnote-ref-run"; export const FootnoteType = { SEPERATOR: "separator", - // eslint-disable-next-line @typescript-eslint/naming-convention + CONTINUATION_SEPERATOR: "continuationSeparator", } as const; -export interface IFootnoteOptions { +export type IFootnoteOptions = { readonly id: number; readonly type?: (typeof FootnoteType)[keyof typeof FootnoteType]; readonly children: readonly Paragraph[]; -} +}; export class Footnote extends XmlComponent { public constructor(options: IFootnoteOptions) { diff --git a/src/file/footnotes/footnote/run/continuation-seperator-run.ts b/src/file/footnotes/footnote/run/continuation-seperator-run.ts index e70f24f70e..722a2bf385 100644 --- a/src/file/footnotes/footnote/run/continuation-seperator-run.ts +++ b/src/file/footnotes/footnote/run/continuation-seperator-run.ts @@ -1,4 +1,5 @@ import { Run } from "@file/paragraph"; + import { ContinuationSeperator } from "./continuation-seperator"; export class ContinuationSeperatorRun extends Run { diff --git a/src/file/footnotes/footnote/run/seperator-run.ts b/src/file/footnotes/footnote/run/seperator-run.ts index 45ce385884..9f0a12eae4 100644 --- a/src/file/footnotes/footnote/run/seperator-run.ts +++ b/src/file/footnotes/footnote/run/seperator-run.ts @@ -1,4 +1,5 @@ import { Run } from "@file/paragraph"; + import { Seperator } from "./seperator"; export class SeperatorRun extends Run { diff --git a/src/file/header-wrapper.ts b/src/file/header-wrapper.ts index fc7d824f0f..880d9131b4 100644 --- a/src/file/header-wrapper.ts +++ b/src/file/header-wrapper.ts @@ -8,10 +8,10 @@ import { Paragraph } from "./paragraph"; import { Relationships } from "./relationships"; import { Table } from "./table"; -export interface IDocumentHeader { +export type IDocumentHeader = { readonly header: HeaderWrapper; readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; -} +}; export class HeaderWrapper implements IViewWrapper { private readonly header: Header; diff --git a/src/file/header.ts b/src/file/header.ts index 76f008ed76..b76952d8ea 100644 --- a/src/file/header.ts +++ b/src/file/header.ts @@ -1,9 +1,9 @@ import { Paragraph } from "./paragraph"; import { Table } from "./table"; -export interface IHeaderOptions { +export type IHeaderOptions = { readonly children: readonly (Paragraph | Table)[]; -} +}; export class Header { public readonly options: IHeaderOptions; diff --git a/src/file/header/header.ts b/src/file/header/header.ts index e1f65eadbe..08b6ab12dd 100644 --- a/src/file/header/header.ts +++ b/src/file/header/header.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/WPheaders.php import { InitializableXmlComponent, XmlComponent } from "@file/xml-components"; + import { Paragraph } from "../paragraph"; import { Table } from "../table"; import { HeaderAttributes } from "./header-attributes"; diff --git a/src/file/media/data.ts b/src/file/media/data.ts index 1cdd76f2a7..7024c74e4b 100644 --- a/src/file/media/data.ts +++ b/src/file/media/data.ts @@ -1,4 +1,4 @@ -export interface IMediaDataTransformation { +export type IMediaDataTransformation = { readonly pixels: { readonly x: number; readonly y: number; @@ -12,7 +12,7 @@ export interface IMediaDataTransformation { readonly horizontal?: boolean; }; readonly rotation?: number; -} +}; type CoreMediaData = { readonly fileName: string; diff --git a/src/file/media/media.spec.ts b/src/file/media/media.spec.ts index 8cc0d0f741..871bdbcc8c 100644 --- a/src/file/media/media.spec.ts +++ b/src/file/media/media.spec.ts @@ -1,4 +1,3 @@ -// tslint:disable:object-literal-key-quotes import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import * as convenienceFunctions from "@util/convenience-functions"; diff --git a/src/file/media/media.ts b/src/file/media/media.ts index 6478738025..6007658721 100644 --- a/src/file/media/media.ts +++ b/src/file/media/media.ts @@ -1,6 +1,6 @@ import { IMediaData } from "./data"; -export interface IMediaTransformation { +export type IMediaTransformation = { readonly width: number; readonly height: number; readonly flip?: { @@ -8,7 +8,7 @@ export interface IMediaTransformation { readonly horizontal?: boolean; }; readonly rotation?: number; -} +}; export class Media { // eslint-disable-next-line functional/prefer-readonly-type diff --git a/src/file/numbering/abstract-numbering.spec.ts b/src/file/numbering/abstract-numbering.spec.ts index cad3f52fee..77a3dd7b94 100644 --- a/src/file/numbering/abstract-numbering.spec.ts +++ b/src/file/numbering/abstract-numbering.spec.ts @@ -3,8 +3,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { AlignmentType, EmphasisMarkType, TabStopPosition } from "../paragraph"; -import { UnderlineType } from "../paragraph/run/underline"; import { HighlightColor } from "../paragraph/run/properties"; +import { UnderlineType } from "../paragraph/run/underline"; import { ShadingType } from "../shading"; import { AbstractNumbering } from "./abstract-numbering"; import { LevelFormat, LevelSuffix } from "./level"; diff --git a/src/file/numbering/level.ts b/src/file/numbering/level.ts index fb0040f609..e9744e8937 100644 --- a/src/file/numbering/level.ts +++ b/src/file/numbering/level.ts @@ -202,7 +202,7 @@ export const LevelSuffix = { TAB: "tab", } as const; -export interface ILevelsOptions { +export type ILevelsOptions = { readonly level: number; readonly format?: (typeof LevelFormat)[keyof typeof LevelFormat]; readonly text?: string; @@ -214,7 +214,7 @@ export interface ILevelsOptions { readonly run?: IRunStylePropertiesOptions; readonly paragraph?: ILevelParagraphStylePropertiesOptions; }; -} +}; // // diff --git a/src/file/numbering/num.ts b/src/file/numbering/num.ts index 597f7530d1..41d16d60a5 100644 --- a/src/file/numbering/num.ts +++ b/src/file/numbering/num.ts @@ -18,18 +18,18 @@ class NumAttributes extends XmlAttributeComponent<{ protected readonly xmlKeys = { numId: "w:numId" }; } -interface IOverrideLevel { +type IOverrideLevel = { readonly num: number; readonly start?: number; -} +}; -export interface IConcreteNumberingOptions { +export type IConcreteNumberingOptions = { readonly numId: number; readonly abstractNumId: number; readonly reference: string; readonly instance: number; readonly overrideLevels?: readonly IOverrideLevel[]; -} +}; // // ... diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index daf9ca38c7..81efdd83f6 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -4,17 +4,17 @@ import { AlignmentType } from "@file/paragraph"; import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components"; import { abstractNumUniqueNumericIdGen, concreteNumUniqueNumericIdGen, convertInchesToTwip } from "@util/convenience-functions"; -import { DocumentAttributes } from "../document/document-attributes"; import { AbstractNumbering } from "./abstract-numbering"; import { ILevelsOptions, LevelFormat } from "./level"; import { ConcreteNumbering } from "./num"; +import { DocumentAttributes } from "../document/document-attributes"; -export interface INumberingOptions { +export type INumberingOptions = { readonly config: readonly { readonly levels: readonly ILevelsOptions[]; readonly reference: string; }[]; -} +}; // // diff --git a/src/file/paragraph/formatting/alignment.spec.ts b/src/file/paragraph/formatting/alignment.spec.ts index 34048190f6..3042faacc7 100644 --- a/src/file/paragraph/formatting/alignment.spec.ts +++ b/src/file/paragraph/formatting/alignment.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { Alignment, AlignmentType } from "./alignment"; describe("Alignment", () => { diff --git a/src/file/paragraph/formatting/alignment.ts b/src/file/paragraph/formatting/alignment.ts index cfd9f8fbaa..ea99505fbe 100644 --- a/src/file/paragraph/formatting/alignment.ts +++ b/src/file/paragraph/formatting/alignment.ts @@ -20,7 +20,6 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; // // -/* eslint-disable @typescript-eslint/naming-convention */ export const AlignmentType = { /** Align Start */ START: "start", @@ -50,8 +49,6 @@ export const AlignmentType = { JUSTIFIED: "both", } as const; -/* eslint-enable */ - export class AlignmentAttributes extends XmlAttributeComponent<{ readonly val: (typeof AlignmentType)[keyof typeof AlignmentType]; }> { diff --git a/src/file/paragraph/formatting/border.spec.ts b/src/file/paragraph/formatting/border.spec.ts index e6ab032fac..43dafe5e7d 100644 --- a/src/file/paragraph/formatting/border.spec.ts +++ b/src/file/paragraph/formatting/border.spec.ts @@ -1,8 +1,8 @@ import { beforeEach, describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; - import { BorderStyle } from "@file/border"; + import { Border, ThematicBreak } from "./border"; describe("Border", () => { diff --git a/src/file/paragraph/formatting/border.ts b/src/file/paragraph/formatting/border.ts index 9cef69b6b2..fec72546c6 100644 --- a/src/file/paragraph/formatting/border.ts +++ b/src/file/paragraph/formatting/border.ts @@ -2,12 +2,12 @@ import { BorderElement, BorderStyle, IBorderOptions } from "@file/border"; import { IgnoreIfEmptyXmlComponent, XmlComponent } from "@file/xml-components"; -export interface IBordersOptions { +export type IBordersOptions = { readonly top?: IBorderOptions; readonly bottom?: IBorderOptions; readonly left?: IBorderOptions; readonly right?: IBorderOptions; -} +}; export class Border extends IgnoreIfEmptyXmlComponent { public constructor(options: IBordersOptions) { diff --git a/src/file/paragraph/formatting/break.ts b/src/file/paragraph/formatting/break.ts index b972ed9970..ccf91d7fc8 100644 --- a/src/file/paragraph/formatting/break.ts +++ b/src/file/paragraph/formatting/break.ts @@ -1,5 +1,6 @@ // http://officeopenxml.com/WPtextSpecialContent-break.php import { Attributes, XmlComponent } from "@file/xml-components"; + import { Run } from "../run"; const BreakType = { diff --git a/src/file/paragraph/formatting/indent.ts b/src/file/paragraph/formatting/indent.ts index 059cf9c2a9..68913c4ff0 100644 --- a/src/file/paragraph/formatting/indent.ts +++ b/src/file/paragraph/formatting/indent.ts @@ -1,15 +1,15 @@ // http://officeopenxml.com/WPindentation.php import { NextAttributeComponent, XmlComponent } from "@file/xml-components"; -import { PositiveUniversalMeasure, signedTwipsMeasureValue, twipsMeasureValue, UniversalMeasure } from "@util/values"; +import { PositiveUniversalMeasure, UniversalMeasure, signedTwipsMeasureValue, twipsMeasureValue } from "@util/values"; -export interface IIndentAttributesProperties { +export type IIndentAttributesProperties = { readonly start?: number | UniversalMeasure; readonly end?: number | UniversalMeasure; readonly left?: number | UniversalMeasure; readonly right?: number | UniversalMeasure; readonly hanging?: number | PositiveUniversalMeasure; readonly firstLine?: number | PositiveUniversalMeasure; -} +}; // // diff --git a/src/file/paragraph/formatting/spacing.ts b/src/file/paragraph/formatting/spacing.ts index 4403e866f7..a524888f87 100644 --- a/src/file/paragraph/formatting/spacing.ts +++ b/src/file/paragraph/formatting/spacing.ts @@ -2,21 +2,20 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; export const LineRuleType = { - // eslint-disable-next-line @typescript-eslint/naming-convention AT_LEAST: "atLeast", EXACTLY: "exactly", EXACT: "exact", AUTO: "auto", } as const; -export interface ISpacingProperties { +export type ISpacingProperties = { readonly after?: number; readonly before?: number; readonly line?: number; readonly lineRule?: (typeof LineRuleType)[keyof typeof LineRuleType]; readonly beforeAutoSpacing?: boolean; readonly afterAutoSpacing?: boolean; -} +}; class SpacingAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/paragraph/formatting/tab-stop.ts b/src/file/paragraph/formatting/tab-stop.ts index 20e7ec841c..f69370d045 100644 --- a/src/file/paragraph/formatting/tab-stop.ts +++ b/src/file/paragraph/formatting/tab-stop.ts @@ -1,11 +1,11 @@ // http://officeopenxml.com/WPtab.php import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; -export interface TabStopDefinition { +export type TabStopDefinition = { readonly type: (typeof TabStopType)[keyof typeof TabStopType]; readonly position: number | (typeof TabStopPosition)[keyof typeof TabStopPosition]; readonly leader?: (typeof LeaderType)[keyof typeof LeaderType]; -} +}; export class TabStop extends XmlComponent { public constructor(tabDefinitions: readonly TabStopDefinition[]) { @@ -32,7 +32,7 @@ export const TabStopType = { export const LeaderType = { DOT: "dot", HYPHEN: "hyphen", - // eslint-disable-next-line @typescript-eslint/naming-convention + MIDDLE_DOT: "middleDot", NONE: "none", UNDERSCORE: "underscore", diff --git a/src/file/paragraph/frame/frame-properties.ts b/src/file/paragraph/frame/frame-properties.ts index b72ced9f5f..ea24825720 100644 --- a/src/file/paragraph/frame/frame-properties.ts +++ b/src/file/paragraph/frame/frame-properties.ts @@ -19,13 +19,13 @@ export const FrameWrap = { AROUND: "around", AUTO: "auto", NONE: "none", - // eslint-disable-next-line @typescript-eslint/naming-convention + NOT_BESIDE: "notBeside", THROUGH: "through", TIGHT: "tight", } as const; -interface IBaseFrameOptions { +type IBaseFrameOptions = { readonly anchorLock?: boolean; readonly dropCap?: (typeof DropCapType)[keyof typeof DropCapType]; readonly width: number; @@ -41,23 +41,23 @@ interface IBaseFrameOptions { readonly vertical: number; }; readonly rule?: (typeof HeightRule)[keyof typeof HeightRule]; -} +}; -export interface IXYFrameOptions extends IBaseFrameOptions { +export type IXYFrameOptions = { readonly type: "absolute"; readonly position: { readonly x: number; readonly y: number; }; -} +} & IBaseFrameOptions; -export interface IAlignmentFrameOptions extends IBaseFrameOptions { +export type IAlignmentFrameOptions = { readonly type: "alignment"; readonly alignment: { readonly x: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign]; readonly y: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign]; }; -} +} & IBaseFrameOptions; // Be wary of Typescript's Open types: // https://stackoverflow.com/q/46370222/3481582 diff --git a/src/file/paragraph/links/hyperlink-attributes.ts b/src/file/paragraph/links/hyperlink-attributes.ts index c31f943ce0..28c884ceba 100644 --- a/src/file/paragraph/links/hyperlink-attributes.ts +++ b/src/file/paragraph/links/hyperlink-attributes.ts @@ -1,10 +1,10 @@ import { XmlAttributeComponent } from "@file/xml-components"; -export interface IHyperlinkAttributesProperties { +export type IHyperlinkAttributesProperties = { readonly id?: string; readonly anchor?: string; readonly history: number; -} +}; export class HyperlinkAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/paragraph/links/pageref-field-instruction.spec.ts b/src/file/paragraph/links/pageref-field-instruction.spec.ts index ece399a385..3a5dc227c8 100644 --- a/src/file/paragraph/links/pageref-field-instruction.spec.ts +++ b/src/file/paragraph/links/pageref-field-instruction.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { PageReferenceFieldInstruction } from "./pageref-field-instruction"; describe("PageReference field instruction", () => { diff --git a/src/file/paragraph/links/pageref-field-instruction.ts b/src/file/paragraph/links/pageref-field-instruction.ts index 4006549b6c..da1ca03bfb 100644 --- a/src/file/paragraph/links/pageref-field-instruction.ts +++ b/src/file/paragraph/links/pageref-field-instruction.ts @@ -1,8 +1,8 @@ import { SpaceType } from "@file/shared"; import { XmlComponent } from "@file/xml-components"; -import { TextAttributes } from "../run/text-attributes"; import { IPageReferenceOptions } from "./pageref"; +import { TextAttributes } from "../run/text-attributes"; export class PageReferenceFieldInstruction extends XmlComponent { public constructor(bookmarkId: string, options: IPageReferenceOptions = {}) { diff --git a/src/file/paragraph/links/pageref.spec.ts b/src/file/paragraph/links/pageref.spec.ts index ae214bfbc5..25b748dca9 100644 --- a/src/file/paragraph/links/pageref.spec.ts +++ b/src/file/paragraph/links/pageref.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { PageReference } from "./pageref"; describe("PageReference", () => { diff --git a/src/file/paragraph/links/pageref.ts b/src/file/paragraph/links/pageref.ts index 6137aa92a8..9305f0f305 100644 --- a/src/file/paragraph/links/pageref.ts +++ b/src/file/paragraph/links/pageref.ts @@ -1,5 +1,6 @@ // See https://www.ecma-international.org/publications/standards/Ecma-376.htm (at Part 1, Page 1234) import { Begin, End } from "@file/paragraph/run/field"; + import { Run } from "../run"; import { PageReferenceFieldInstruction } from "./pageref-field-instruction"; diff --git a/src/file/paragraph/math/fraction/math-fraction.ts b/src/file/paragraph/math/fraction/math-fraction.ts index e18d92d985..85e7afaf82 100644 --- a/src/file/paragraph/math/fraction/math-fraction.ts +++ b/src/file/paragraph/math/fraction/math-fraction.ts @@ -4,10 +4,10 @@ import { MathComponent } from "../math-component"; import { MathDenominator } from "./math-denominator"; import { MathNumerator } from "./math-numerator"; -export interface IMathFractionOptions { +export type IMathFractionOptions = { readonly numerator: readonly MathComponent[]; readonly denominator: readonly MathComponent[]; -} +}; export class MathFraction extends XmlComponent { public constructor(options: IMathFractionOptions) { diff --git a/src/file/paragraph/math/function/math-function-name.ts b/src/file/paragraph/math/function/math-function-name.ts index c6984bce02..1a02f4ccb2 100644 --- a/src/file/paragraph/math/function/math-function-name.ts +++ b/src/file/paragraph/math/function/math-function-name.ts @@ -1,5 +1,6 @@ // http://www.datypic.com/sc/ooxml/e-m_fName-1.html import { XmlComponent } from "@file/xml-components"; + import { MathComponent } from "../math-component"; export class MathFunctionName extends XmlComponent { diff --git a/src/file/paragraph/math/function/math-function.ts b/src/file/paragraph/math/function/math-function.ts index 307c8c4390..fff5fa2868 100644 --- a/src/file/paragraph/math/function/math-function.ts +++ b/src/file/paragraph/math/function/math-function.ts @@ -6,10 +6,10 @@ import { MathBase } from "../n-ary"; import { MathFunctionName } from "./math-function-name"; import { MathFunctionProperties } from "./math-function-properties"; -export interface IMathFunctionOptions { +export type IMathFunctionOptions = { readonly children: readonly MathComponent[]; readonly name: readonly MathComponent[]; -} +}; export class MathFunction extends XmlComponent { public constructor(options: IMathFunctionOptions) { diff --git a/src/file/paragraph/math/math-component.ts b/src/file/paragraph/math/math-component.ts index ae30a7d3c6..dc148d8f84 100644 --- a/src/file/paragraph/math/math-component.ts +++ b/src/file/paragraph/math/math-component.ts @@ -2,7 +2,7 @@ import { MathAngledBrackets, MathCurlyBrackets, MathRoundBrackets, MathSquareBra import { MathFraction } from "./fraction"; import { MathFunction } from "./function"; import { MathRun } from "./math-run"; -import { MathSum, MathIntegral } from "./n-ary"; +import { MathIntegral, MathSum } from "./n-ary"; import { MathRadical } from "./radical"; import { MathSubScript, MathSubSuperScript, MathSuperScript } from "./script"; diff --git a/src/file/paragraph/math/math.ts b/src/file/paragraph/math/math.ts index d0d3bcca41..187b92a95b 100644 --- a/src/file/paragraph/math/math.ts +++ b/src/file/paragraph/math/math.ts @@ -3,9 +3,9 @@ import { XmlComponent } from "@file/xml-components"; import { MathComponent } from "./math-component"; -export interface IMathOptions { +export type IMathOptions = { readonly children: readonly MathComponent[]; -} +}; export class Math extends XmlComponent { public constructor(options: IMathOptions) { diff --git a/src/file/paragraph/math/n-ary/math-integral.ts b/src/file/paragraph/math/n-ary/math-integral.ts index 55d0cbbcea..03d251e280 100644 --- a/src/file/paragraph/math/n-ary/math-integral.ts +++ b/src/file/paragraph/math/n-ary/math-integral.ts @@ -6,11 +6,11 @@ import { MathNAryProperties } from "./math-n-ary-properties"; import { MathSubScriptElement } from "./math-sub-script"; import { MathSuperScriptElement } from "./math-super-script"; -export interface IMathIntegralOptions { +export type IMathIntegralOptions = { readonly children: readonly MathComponent[]; readonly subScript?: readonly MathComponent[]; readonly superScript?: readonly MathComponent[]; -} +}; export class MathIntegral extends XmlComponent { public constructor(options: IMathIntegralOptions) { diff --git a/src/file/paragraph/math/n-ary/math-limit-lower.ts b/src/file/paragraph/math/n-ary/math-limit-lower.ts index 0227694cba..ce272a6557 100644 --- a/src/file/paragraph/math/n-ary/math-limit-lower.ts +++ b/src/file/paragraph/math/n-ary/math-limit-lower.ts @@ -1,13 +1,14 @@ // http://www.datypic.com/sc/ooxml/e-m_limLow-1.html import { XmlComponent } from "@file/xml-components"; + import { MathComponent } from "../math-component"; import { MathBase } from "./math-base"; import { MathLimit } from "./math-limit"; -export interface IMathLimitLowerOptions { +export type IMathLimitLowerOptions = { readonly children: readonly MathComponent[]; readonly limit: readonly MathComponent[]; -} +}; export class MathLimitLower extends XmlComponent { public constructor(options: IMathLimitLowerOptions) { diff --git a/src/file/paragraph/math/n-ary/math-limit-upper.ts b/src/file/paragraph/math/n-ary/math-limit-upper.ts index d292c6db62..bb70a36f62 100644 --- a/src/file/paragraph/math/n-ary/math-limit-upper.ts +++ b/src/file/paragraph/math/n-ary/math-limit-upper.ts @@ -1,13 +1,14 @@ // http://www.datypic.com/sc/ooxml/e-m_limUpp-1.html import { XmlComponent } from "@file/xml-components"; + import { MathComponent } from "../math-component"; import { MathBase } from "./math-base"; import { MathLimit } from "./math-limit"; -export interface IMathLimitUpperOptions { +export type IMathLimitUpperOptions = { readonly children: readonly MathComponent[]; readonly limit: readonly MathComponent[]; -} +}; export class MathLimitUpper extends XmlComponent { public constructor(options: IMathLimitUpperOptions) { diff --git a/src/file/paragraph/math/n-ary/math-limit.ts b/src/file/paragraph/math/n-ary/math-limit.ts index f66a54bc5c..0827ff80a4 100644 --- a/src/file/paragraph/math/n-ary/math-limit.ts +++ b/src/file/paragraph/math/n-ary/math-limit.ts @@ -1,5 +1,6 @@ // http://www.datypic.com/sc/ooxml/e-m_lim-1.html import { XmlComponent } from "@file/xml-components"; + import { MathComponent } from "../math-component"; export class MathLimit extends XmlComponent { diff --git a/src/file/paragraph/math/n-ary/math-sum.ts b/src/file/paragraph/math/n-ary/math-sum.ts index b5d0995147..a4758e31a6 100644 --- a/src/file/paragraph/math/n-ary/math-sum.ts +++ b/src/file/paragraph/math/n-ary/math-sum.ts @@ -7,11 +7,11 @@ import { MathNAryProperties } from "./math-n-ary-properties"; import { MathSubScriptElement } from "./math-sub-script"; import { MathSuperScriptElement } from "./math-super-script"; -export interface IMathSumOptions { +export type IMathSumOptions = { readonly children: readonly MathComponent[]; readonly subScript?: readonly MathComponent[]; readonly superScript?: readonly MathComponent[]; -} +}; export class MathSum extends XmlComponent { public constructor(options: IMathSumOptions) { diff --git a/src/file/paragraph/math/radical/math-degree.ts b/src/file/paragraph/math/radical/math-degree.ts index 3942159674..b9e3e0f647 100644 --- a/src/file/paragraph/math/radical/math-degree.ts +++ b/src/file/paragraph/math/radical/math-degree.ts @@ -1,5 +1,6 @@ // http://www.datypic.com/sc/ooxml/e-m_deg-1.html import { XmlComponent } from "@file/xml-components"; + import { MathComponent } from "../math-component"; export class MathDegree extends XmlComponent { diff --git a/src/file/paragraph/math/radical/math-radical-properties.ts b/src/file/paragraph/math/radical/math-radical-properties.ts index 5bfdb1b3b2..923b975793 100644 --- a/src/file/paragraph/math/radical/math-radical-properties.ts +++ b/src/file/paragraph/math/radical/math-radical-properties.ts @@ -1,5 +1,6 @@ // http://www.datypic.com/sc/ooxml/e-m_radPr-1.html import { XmlComponent } from "@file/xml-components"; + import { MathDegreeHide } from "./math-degree-hide"; export class MathRadicalProperties extends XmlComponent { diff --git a/src/file/paragraph/math/radical/math-radical.ts b/src/file/paragraph/math/radical/math-radical.ts index 1684024dc1..a42addc9de 100644 --- a/src/file/paragraph/math/radical/math-radical.ts +++ b/src/file/paragraph/math/radical/math-radical.ts @@ -6,10 +6,10 @@ import { MathBase } from "../n-ary"; import { MathDegree } from "./math-degree"; import { MathRadicalProperties } from "./math-radical-properties"; -export interface IMathRadicalOptions { +export type IMathRadicalOptions = { readonly children: readonly MathComponent[]; readonly degree?: readonly MathComponent[]; -} +}; export class MathRadical extends XmlComponent { public constructor(options: IMathRadicalOptions) { diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts index e91979d61a..c111997650 100644 --- a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties"; describe("MathPreSubSuperScriptProperties", () => { diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts index 9fff56f516..2ced225ca4 100644 --- a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; -import { MathRun } from "../../math-run"; import { MathPreSubSuperScript } from "./math-pre-sub-super-script-function"; +import { MathRun } from "../../math-run"; describe("MathPreSubScript", () => { describe("#constructor()", () => { diff --git a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts index 293a308a36..a6a5ee0ef6 100644 --- a/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts +++ b/src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.ts @@ -1,15 +1,15 @@ // http://www.datypic.com/sc/ooxml/e-m_sPre-1.html import { XmlComponent } from "@file/xml-components"; +import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties"; import { MathComponent } from "../../math-component"; import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n-ary"; -import { MathPreSubSuperScriptProperties } from "./math-pre-sub-super-script-function-properties"; -export interface IMathPreSubSuperScriptOptions { +export type IMathPreSubSuperScriptOptions = { readonly children: readonly MathComponent[]; readonly subScript: readonly MathComponent[]; readonly superScript: readonly MathComponent[]; -} +}; export class MathPreSubSuperScript extends XmlComponent { public constructor(options: IMathPreSubSuperScriptOptions) { diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts index 81009ce1eb..3e1899a84a 100644 --- a/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { MathSubScriptProperties } from "./math-sub-script-function-properties"; describe("MathSubScriptProperties", () => { diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts index 235ac20898..01bc68962b 100644 --- a/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; -import { MathRun } from "../../math-run"; import { MathSubScript } from "./math-sub-script-function"; +import { MathRun } from "../../math-run"; describe("MathSubScript", () => { describe("#constructor()", () => { diff --git a/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts b/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts index e0f70b2089..ee8185b3e5 100644 --- a/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts +++ b/src/file/paragraph/math/script/sub-script/math-sub-script-function.ts @@ -1,14 +1,14 @@ // http://www.datypic.com/sc/ooxml/e-m_sSub-1.html import { XmlComponent } from "@file/xml-components"; +import { MathSubScriptProperties } from "./math-sub-script-function-properties"; import { MathComponent } from "../../math-component"; import { MathBase, MathSubScriptElement } from "../../n-ary"; -import { MathSubScriptProperties } from "./math-sub-script-function-properties"; -export interface IMathSubScriptOptions { +export type IMathSubScriptOptions = { readonly children: readonly MathComponent[]; readonly subScript: readonly MathComponent[]; -} +}; export class MathSubScript extends XmlComponent { public constructor(options: IMathSubScriptOptions) { diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts index 396c6c274b..ea61bd31e4 100644 --- a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties"; describe("MathSubSuperScriptProperties", () => { diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts index 5a81747462..34d364f998 100644 --- a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; -import { MathRun } from "../../math-run"; import { MathSubSuperScript } from "./math-sub-super-script-function"; +import { MathRun } from "../../math-run"; describe("MathSubScript", () => { describe("#constructor()", () => { diff --git a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts index 20699561c6..be64e6efc3 100644 --- a/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts +++ b/src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.ts @@ -1,15 +1,15 @@ // http://www.datypic.com/sc/ooxml/e-m_sSubSup-1.html import { XmlComponent } from "@file/xml-components"; +import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties"; import { MathComponent } from "../../math-component"; import { MathBase, MathSubScriptElement, MathSuperScriptElement } from "../../n-ary"; -import { MathSubSuperScriptProperties } from "./math-sub-super-script-function-properties"; -export interface IMathSubSuperScriptOptions { +export type IMathSubSuperScriptOptions = { readonly children: readonly MathComponent[]; readonly subScript: readonly MathComponent[]; readonly superScript: readonly MathComponent[]; -} +}; export class MathSubSuperScript extends XmlComponent { public constructor(options: IMathSubSuperScriptOptions) { diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts b/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts index 0636ef7cd7..bcc2d33512 100644 --- a/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts +++ b/src/file/paragraph/math/script/super-script/math-super-script-function-properties.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { MathSuperScriptProperties } from "./math-super-script-function-properties"; describe("MathSuperScriptProperties", () => { diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts b/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts index 28bc699114..3ed2eb4491 100644 --- a/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts +++ b/src/file/paragraph/math/script/super-script/math-super-script-function.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; -import { MathRun } from "../../math-run"; import { MathSuperScript } from "./math-super-script-function"; +import { MathRun } from "../../math-run"; describe("MathSuperScript", () => { describe("#constructor()", () => { diff --git a/src/file/paragraph/math/script/super-script/math-super-script-function.ts b/src/file/paragraph/math/script/super-script/math-super-script-function.ts index 148b64d2fe..25364fc53b 100644 --- a/src/file/paragraph/math/script/super-script/math-super-script-function.ts +++ b/src/file/paragraph/math/script/super-script/math-super-script-function.ts @@ -1,14 +1,14 @@ // http://www.datypic.com/sc/ooxml/e-m_sSup-1.html import { XmlComponent } from "@file/xml-components"; +import { MathSuperScriptProperties } from "./math-super-script-function-properties"; import { MathComponent } from "../../math-component"; import { MathBase, MathSuperScriptElement } from "../../n-ary"; -import { MathSuperScriptProperties } from "./math-super-script-function-properties"; -export interface IMathSuperScriptOptions { +export type IMathSuperScriptOptions = { readonly children: readonly MathComponent[]; readonly superScript: readonly MathComponent[]; -} +}; export class MathSuperScript extends XmlComponent { public constructor(options: IMathSuperScriptOptions) { diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index 61ac8f78d0..e76d2be519 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -1,11 +1,10 @@ import { afterEach, assert, beforeEach, describe, expect, it, vi } from "vitest"; -import * as convenienceFunctions from "@util/convenience-functions"; - -import { HorizontalPositionAlign, VerticalPositionAlign } from "@file/shared"; import { Formatter } from "@export/formatter"; import { BorderStyle } from "@file/border"; +import { HorizontalPositionAlign, VerticalPositionAlign } from "@file/shared"; import { EMPTY_OBJECT } from "@file/xml-components"; +import * as convenienceFunctions from "@util/convenience-functions"; import { IViewWrapper } from "../document-wrapper"; import { File } from "../file"; @@ -33,7 +32,7 @@ describe("Paragraph", () => { try { JSON.parse(stringifiedJson); - } catch (e) { + } catch { assert.isTrue(false); } assert.isTrue(true); diff --git a/src/file/paragraph/paragraph.ts b/src/file/paragraph/paragraph.ts index feafb1450f..665b1f2794 100644 --- a/src/file/paragraph/paragraph.ts +++ b/src/file/paragraph/paragraph.ts @@ -1,12 +1,12 @@ // http://officeopenxml.com/WPparagraph.php +import { FileChild } from "@file/file-child"; import { FootnoteReferenceRun } from "@file/footnotes"; import { IContext, IXmlableObject } from "@file/xml-components"; import { uniqueId } from "@util/convenience-functions"; -import { FileChild } from "@file/file-child"; +import { CheckBox } from "../checkbox"; import { TargetModeType } from "../relationships/relationship/relationship"; import { DeletedTextRun, InsertedTextRun } from "../track-revision"; -import { CheckBox } from "../checkbox"; import { ColumnBreak, PageBreak } from "./formatting/break"; import { Bookmark, ConcreteHyperlink, ExternalHyperlink, InternalHyperlink } from "./links"; import { Math } from "./math"; @@ -37,10 +37,10 @@ export type ParagraphChild = | CommentReference | CheckBox; -export interface IParagraphOptions extends IParagraphPropertiesOptions { +export type IParagraphOptions = { readonly text?: string; readonly children?: readonly ParagraphChild[]; -} +} & IParagraphPropertiesOptions; export class Paragraph extends FileChild { private readonly properties: ParagraphProperties; diff --git a/src/file/paragraph/properties.spec.ts b/src/file/paragraph/properties.spec.ts index 6aaf76f033..8e581b5d2a 100644 --- a/src/file/paragraph/properties.spec.ts +++ b/src/file/paragraph/properties.spec.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { DocumentWrapper } from "../document-wrapper"; import { File } from "../file"; - import { ParagraphProperties } from "./properties"; describe("ParagraphProperties", () => { @@ -23,13 +23,11 @@ describe("ParagraphProperties", () => { }, }); const tree = new Formatter().format(properties, { - // tslint:disable-next-line: no-object-literal-type-assertion file: { Numbering: { createConcreteNumberingInstance: (_: string, __: number) => undefined, }, } as File, - // tslint:disable-next-line: no-object-literal-type-assertion viewWrapper: new DocumentWrapper({ background: {} }), stack: [], }); diff --git a/src/file/paragraph/properties.ts b/src/file/paragraph/properties.ts index 4105fa252f..b8d050c6a2 100644 --- a/src/file/paragraph/properties.ts +++ b/src/file/paragraph/properties.ts @@ -1,7 +1,9 @@ // http://officeopenxml.com/WPparagraphProperties.php // https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_suppressLineNumbers_topic_ID0ECJAO.html -/* eslint-disable functional/immutable-data */ -import { IContext, IgnoreIfEmptyXmlComponent, IXmlableObject, OnOffElement, XmlComponent } from "@file/xml-components"; + +import { IContext, IXmlableObject, IgnoreIfEmptyXmlComponent, OnOffElement, XmlComponent } from "@file/xml-components"; + +import { IRunOptions, RunProperties } from "."; import { DocumentWrapper } from "../document-wrapper"; import { IShadingAttributesProperties, Shading } from "../shading"; import { Alignment, AlignmentType } from "./formatting/alignment"; @@ -13,11 +15,10 @@ import { HeadingLevel, Style } from "./formatting/style"; import { TabStop, TabStopDefinition, TabStopType } from "./formatting/tab-stop"; import { NumberProperties } from "./formatting/unordered-list"; import { WordWrap } from "./formatting/word-wrap"; -import { createFrameProperties, IFrameOptions } from "./frame/frame-properties"; +import { IFrameOptions, createFrameProperties } from "./frame/frame-properties"; import { OutlineLevel } from "./links"; -import { IRunOptions, RunProperties } from "."; -export interface ILevelParagraphStylePropertiesOptions { +export type ILevelParagraphStylePropertiesOptions = { readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType]; readonly thematicBreak?: boolean; readonly contextualSpacing?: boolean; @@ -34,9 +35,9 @@ export interface ILevelParagraphStylePropertiesOptions { */ readonly keepLines?: boolean; readonly outlineLevel?: number; -} +}; -export interface IParagraphStylePropertiesOptions extends ILevelParagraphStylePropertiesOptions { +export type IParagraphStylePropertiesOptions = { readonly numbering?: | { readonly reference: string; @@ -45,9 +46,9 @@ export interface IParagraphStylePropertiesOptions extends ILevelParagraphStylePr readonly custom?: boolean; } | false; -} +} & ILevelParagraphStylePropertiesOptions; -export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOptions { +export type IParagraphPropertiesOptions = { readonly border?: IBordersOptions; readonly heading?: (typeof HeadingLevel)[keyof typeof HeadingLevel]; readonly bidirectional?: boolean; @@ -73,7 +74,7 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp * Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference ยง 17.3.1.29. */ readonly run?: IRunOptions; -} +} & IParagraphStylePropertiesOptions; export class ParagraphProperties extends IgnoreIfEmptyXmlComponent { // eslint-disable-next-line functional/prefer-readonly-type diff --git a/src/file/paragraph/run/comment-run.ts b/src/file/paragraph/run/comment-run.ts index f204f7ddcd..0ffc9fe257 100644 --- a/src/file/paragraph/run/comment-run.ts +++ b/src/file/paragraph/run/comment-run.ts @@ -1,17 +1,17 @@ import { FileChild } from "@file/file-child"; import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; -export interface ICommentOptions { +export type ICommentOptions = { readonly id: number; readonly children: readonly FileChild[]; readonly initials?: string; readonly author?: string; readonly date?: Date; -} +}; -export interface ICommentsOptions { +export type ICommentsOptions = { readonly children: readonly ICommentOptions[]; -} +}; class CommentAttributes extends XmlAttributeComponent<{ readonly id: number; diff --git a/src/file/paragraph/run/empty-children.spec.ts b/src/file/paragraph/run/empty-children.spec.ts index 24615575e1..aed7142f4f 100644 --- a/src/file/paragraph/run/empty-children.spec.ts +++ b/src/file/paragraph/run/empty-children.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { AnnotationReference, CarriageReturn, diff --git a/src/file/paragraph/run/formatting.ts b/src/file/paragraph/run/formatting.ts index 3629dd36ee..50c14ac568 100644 --- a/src/file/paragraph/run/formatting.ts +++ b/src/file/paragraph/run/formatting.ts @@ -1,5 +1,5 @@ import { Attributes, XmlComponent } from "@file/xml-components"; -import { hexColorValue, signedTwipsMeasureValue, UniversalMeasure } from "@util/values"; +import { UniversalMeasure, hexColorValue, signedTwipsMeasureValue } from "@util/values"; export class CharacterSpacing extends XmlComponent { public constructor(value: number | UniversalMeasure) { diff --git a/src/file/paragraph/run/image-run.ts b/src/file/paragraph/run/image-run.ts index b73d5ee874..d909e95808 100644 --- a/src/file/paragraph/run/image-run.ts +++ b/src/file/paragraph/run/image-run.ts @@ -1,10 +1,9 @@ +import { DocPropertiesOptions } from "@file/drawing/doc-properties/doc-properties"; +import { IContext, IXmlableObject } from "@file/xml-components"; import { hashedId } from "@util/convenience-functions"; -import { IContext, IXmlableObject } from "@file/xml-components"; -import { DocPropertiesOptions } from "@file/drawing/doc-properties/doc-properties"; - -import { OutlineOptions } from "../../drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline"; import { Drawing, IFloating } from "../../drawing"; +import { OutlineOptions } from "../../drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline"; import { IMediaTransformation } from "../../media"; import { IMediaData } from "../../media/data"; import { Run } from "../run"; diff --git a/src/file/paragraph/run/language.ts b/src/file/paragraph/run/language.ts index b0978b38bc..4b9088ac28 100644 --- a/src/file/paragraph/run/language.ts +++ b/src/file/paragraph/run/language.ts @@ -5,11 +5,11 @@ import { BuilderElement, XmlComponent } from "@file/xml-components"; // // // -export interface ILanguageOptions { +export type ILanguageOptions = { readonly value?: string; readonly eastAsia?: string; readonly bidirectional?: string; -} +}; export const createLanguageComponent = (options: ILanguageOptions): XmlComponent => new BuilderElement<{ diff --git a/src/file/paragraph/run/positional-tab.ts b/src/file/paragraph/run/positional-tab.ts index c9f97ca2dc..bb8c6fc217 100644 --- a/src/file/paragraph/run/positional-tab.ts +++ b/src/file/paragraph/run/positional-tab.ts @@ -38,15 +38,14 @@ export const PositionalTabLeader = { DOT: "dot", HYPHEN: "hyphen", UNDERSCORE: "underscore", - // eslint-disable-next-line @typescript-eslint/naming-convention MIDDLE_DOT: "middleDot", } as const; -export interface PositionalTabOptions { +export type PositionalTabOptions = { readonly alignment: (typeof PositionalTabAlignment)[keyof typeof PositionalTabAlignment]; readonly relativeTo: (typeof PositionalTabRelativeTo)[keyof typeof PositionalTabRelativeTo]; readonly leader: (typeof PositionalTabLeader)[keyof typeof PositionalTabLeader]; -} +}; // // diff --git a/src/file/paragraph/run/properties.ts b/src/file/paragraph/run/properties.ts index 25e63a0cc7..756d99c320 100644 --- a/src/file/paragraph/run/properties.ts +++ b/src/file/paragraph/run/properties.ts @@ -1,5 +1,5 @@ // https://www.ecma-international.org/wp-content/uploads/ECMA-376-1_5th_edition_december_2016.zip page 297, section 17.3.2.21 -/* eslint-disable functional/immutable-data */ + import { BorderElement, IBorderOptions } from "@file/border"; import { IShadingAttributesProperties, Shading } from "@file/shading"; import { ChangeAttributes, IChangedAttributesProperties } from "@file/track-revision/track-revision"; @@ -15,17 +15,16 @@ import { PositiveUniversalMeasure, UniversalMeasure } from "@util/values"; import { EmphasisMark, EmphasisMarkType } from "./emphasis-mark"; import { CharacterSpacing, Color, Highlight, HighlightComplexScript } from "./formatting"; -import { createLanguageComponent, ILanguageOptions } from "./language"; +import { ILanguageOptions, createLanguageComponent } from "./language"; import { IFontAttributesProperties, RunFonts } from "./run-fonts"; import { SubScript, SuperScript } from "./script"; import { Underline, UnderlineType } from "./underline"; -interface IFontOptions { +type IFontOptions = { readonly name: string; readonly hint?: string; -} +}; -/* eslint-disable @typescript-eslint/naming-convention */ export const TextEffect = { BLINK_BACKGROUND: "blinkBackground", LIGHTS: "lights", @@ -63,9 +62,7 @@ export const HighlightColor = { YELLOW: "yellow", } as const; -/* eslint-enable */ - -export interface IRunStylePropertiesOptions { +export type IRunStylePropertiesOptions = { readonly noProof?: boolean; readonly bold?: boolean; readonly boldComplexScript?: boolean; @@ -106,13 +103,13 @@ export interface IRunStylePropertiesOptions { readonly specVanish?: boolean; readonly scale?: number; readonly math?: boolean; -} +}; -export interface IRunPropertiesOptions extends IRunStylePropertiesOptions { +export type IRunPropertiesOptions = { readonly style?: string; -} +} & IRunStylePropertiesOptions; -export interface IRunPropertiesChangeOptions extends IRunPropertiesOptions, IChangedAttributesProperties {} +export type IRunPropertiesChangeOptions = {} & IRunPropertiesOptions & IChangedAttributesProperties; // // @@ -157,7 +154,6 @@ export interface IRunPropertiesChangeOptions extends IRunPropertiesOptions, ICha // // // -/* eslint-disable functional/immutable-data */ export class RunProperties extends IgnoreIfEmptyXmlComponent { public constructor(options?: IRunPropertiesOptions) { @@ -326,8 +322,6 @@ export class RunProperties extends IgnoreIfEmptyXmlComponent { } } -/* eslint-enable */ - export class RunPropertiesChange extends XmlComponent { public constructor(options: IRunPropertiesChangeOptions) { super("w:rPrChange"); diff --git a/src/file/paragraph/run/run-components/text.ts b/src/file/paragraph/run/run-components/text.ts index db6c8d77b0..4edaf321ba 100644 --- a/src/file/paragraph/run/run-components/text.ts +++ b/src/file/paragraph/run/run-components/text.ts @@ -11,10 +11,10 @@ import { TextAttributes } from "../text-attributes"; // // -interface ITextOptions { +type ITextOptions = { readonly space?: (typeof SpaceType)[keyof typeof SpaceType]; readonly text?: string; -} +}; export class Text extends XmlComponent { public constructor(options: string | ITextOptions) { diff --git a/src/file/paragraph/run/run-fonts.ts b/src/file/paragraph/run/run-fonts.ts index 6eafd998f8..d6a184c934 100644 --- a/src/file/paragraph/run/run-fonts.ts +++ b/src/file/paragraph/run/run-fonts.ts @@ -1,12 +1,12 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; -export interface IFontAttributesProperties { +export type IFontAttributesProperties = { readonly ascii?: string; readonly cs?: string; readonly eastAsia?: string; readonly hAnsi?: string; readonly hint?: string; -} +}; class RunFontAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/paragraph/run/run.spec.ts b/src/file/paragraph/run/run.spec.ts index 8939f68c4a..0ed444371d 100644 --- a/src/file/paragraph/run/run.spec.ts +++ b/src/file/paragraph/run/run.spec.ts @@ -5,9 +5,10 @@ import { BorderStyle } from "@file/border"; import { ShadingType } from "@file/shading"; import { EmphasisMarkType } from "./emphasis-mark"; +import { HighlightColor, TextEffect } from "./properties"; import { PageNumber, Run } from "./run"; import { UnderlineType } from "./underline"; -import { HighlightColor, TextEffect } from "./properties"; + describe("Run", () => { describe("#noProof()", () => { it("turns off spelling and grammar checkers for a run", () => { diff --git a/src/file/paragraph/run/run.ts b/src/file/paragraph/run/run.ts index d3dba0e230..9f79925113 100644 --- a/src/file/paragraph/run/run.ts +++ b/src/file/paragraph/run/run.ts @@ -1,14 +1,9 @@ // http://officeopenxml.com/WPtext.php -import { XmlComponent } from "@file/xml-components"; - import { FootnoteReferenceRun } from "@file/footnotes/footnote/run/reference-run"; import { FieldInstruction } from "@file/table-of-contents/field-instruction"; +import { XmlComponent } from "@file/xml-components"; import { Break } from "./break"; -import { Begin, End, Separate } from "./field"; -import { NumberOfPages, NumberOfPagesSection, Page, CurrentSection } from "./page-number"; -import { IRunPropertiesOptions, RunProperties } from "./properties"; -import { Text } from "./run-components/text"; import { AnnotationReference, CarriageReturn, @@ -28,9 +23,13 @@ import { YearLong, YearShort, } from "./empty-children"; +import { Begin, End, Separate } from "./field"; +import { CurrentSection, NumberOfPages, NumberOfPagesSection, Page } from "./page-number"; import { PositionalTab } from "./positional-tab"; +import { IRunPropertiesOptions, RunProperties } from "./properties"; +import { Text } from "./run-components/text"; -export interface IRunOptions extends IRunPropertiesOptions { +export type IRunOptions = { // // // @@ -96,9 +95,8 @@ export interface IRunOptions extends IRunPropertiesOptions { )[]; readonly break?: number; readonly text?: string; -} +} & IRunPropertiesOptions; -/* eslint-disable @typescript-eslint/naming-convention */ export const PageNumber = { CURRENT: "CURRENT", TOTAL_PAGES: "TOTAL_PAGES", @@ -106,8 +104,6 @@ export const PageNumber = { CURRENT_SECTION: "SECTION", } as const; -/* eslint-enable */ - export class Run extends XmlComponent { protected readonly properties: RunProperties; diff --git a/src/file/paragraph/run/sequential-identifier.ts b/src/file/paragraph/run/sequential-identifier.ts index 109ddd4a18..4dc9c98ef8 100644 --- a/src/file/paragraph/run/sequential-identifier.ts +++ b/src/file/paragraph/run/sequential-identifier.ts @@ -1,5 +1,6 @@ import { Run } from "@file/paragraph/run"; import { Begin, End, Separate } from "@file/paragraph/run/field"; + import { SequentialIdentifierInstruction } from "./sequential-identifier-instruction"; export class SequentialIdentifier extends Run { diff --git a/src/file/paragraph/run/simple-field.ts b/src/file/paragraph/run/simple-field.ts index 83bfc17e75..1a4e7a9b60 100644 --- a/src/file/paragraph/run/simple-field.ts +++ b/src/file/paragraph/run/simple-field.ts @@ -1,5 +1,6 @@ // http://www.datypic.com/sc/ooxml/e-w_fldSimple-1.html import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; + import { TextRun } from "./text-run"; class FldSimpleAttrs extends XmlAttributeComponent<{ readonly instr: string }> { diff --git a/src/file/paragraph/run/symbol-run.spec.ts b/src/file/paragraph/run/symbol-run.spec.ts index 47db16466c..afdd32c328 100644 --- a/src/file/paragraph/run/symbol-run.spec.ts +++ b/src/file/paragraph/run/symbol-run.spec.ts @@ -3,8 +3,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { EmphasisMarkType } from "./emphasis-mark"; -import { UnderlineType } from "./underline"; import { SymbolRun } from "./symbol-run"; +import { UnderlineType } from "./underline"; describe("SymbolRun", () => { let run: SymbolRun; diff --git a/src/file/paragraph/run/symbol-run.ts b/src/file/paragraph/run/symbol-run.ts index 5848016ecc..df9ac67aa7 100644 --- a/src/file/paragraph/run/symbol-run.ts +++ b/src/file/paragraph/run/symbol-run.ts @@ -1,10 +1,10 @@ import { IRunOptions, Run } from "./run"; import { Symbol } from "./run-components/symbol"; -export interface ISymbolRunOptions extends IRunOptions { +export type ISymbolRunOptions = { readonly char: string; readonly symbolfont?: string; -} +} & IRunOptions; export class SymbolRun extends Run { public constructor(options: ISymbolRunOptions | string) { diff --git a/src/file/relationships/relationship/relationship.ts b/src/file/relationships/relationship/relationship.ts index 4734d61d58..8cfa46f142 100644 --- a/src/file/relationships/relationship/relationship.ts +++ b/src/file/relationships/relationship/relationship.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { RelationshipAttributes } from "./relationship-attributes"; export type RelationshipType = diff --git a/src/file/relationships/relationships.spec.ts b/src/file/relationships/relationships.spec.ts index c21c9d0dd2..d0f745bf40 100644 --- a/src/file/relationships/relationships.spec.ts +++ b/src/file/relationships/relationships.spec.ts @@ -1,4 +1,3 @@ -// tslint:disable:no-string-literal import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; diff --git a/src/file/relationships/relationships.ts b/src/file/relationships/relationships.ts index f66eea8c19..ca019ab498 100644 --- a/src/file/relationships/relationships.ts +++ b/src/file/relationships/relationships.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { RelationshipsAttributes } from "./attributes"; import { Relationship, RelationshipType, TargetModeType } from "./relationship/relationship"; diff --git a/src/file/settings/compatibility.ts b/src/file/settings/compatibility.ts index 1f2160c91a..fdda107967 100644 --- a/src/file/settings/compatibility.ts +++ b/src/file/settings/compatibility.ts @@ -1,5 +1,6 @@ // http://www.datypic.com/sc/ooxml/e-w_compat-1.html import { OnOffElement, XmlComponent } from "@file/xml-components"; + import { CompatibilitySetting } from "./compatibility-setting/compatibility-setting"; // @@ -74,7 +75,7 @@ import { CompatibilitySetting } from "./compatibility-setting/compatibility-sett // // -export interface ICompatibilityOptions { +export type ICompatibilityOptions = { readonly version?: number; /** Use Simplified Rules For Table Border Conflicts */ readonly useSingleBorderforContiguousCells?: boolean; @@ -206,7 +207,7 @@ export interface ICompatibilityOptions { readonly useAnsiKerningPairs?: boolean; /** Use Cached Paragraph Information for Column Balancing */ readonly cachedColumnBalance?: boolean; -} +}; export class Compatibility extends XmlComponent { public constructor(options: ICompatibilityOptions) { diff --git a/src/file/settings/settings.ts b/src/file/settings/settings.ts index ad89de7b49..393c84ed72 100644 --- a/src/file/settings/settings.ts +++ b/src/file/settings/settings.ts @@ -146,14 +146,14 @@ export class SettingsAttributes extends XmlAttributeComponent<{ // // -export interface ISettingsOptions { +export type ISettingsOptions = { readonly compatibilityModeVersion?: number; readonly evenAndOddHeaders?: boolean; readonly trackRevisions?: boolean; readonly updateFields?: boolean; readonly compatibility?: ICompatibilityOptions; readonly defaultTabStop?: number; -} +}; export class Settings extends XmlComponent { public constructor(options: ISettingsOptions) { diff --git a/src/file/shading/shading.ts b/src/file/shading/shading.ts index e2d9369c1d..56c4d59a4e 100644 --- a/src/file/shading/shading.ts +++ b/src/file/shading/shading.ts @@ -20,11 +20,11 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; import { hexColorValue } from "@util/values"; -export interface IShadingAttributesProperties { +export type IShadingAttributesProperties = { readonly fill?: string; readonly color?: string; readonly type?: (typeof ShadingType)[keyof typeof ShadingType]; -} +}; class ShadingAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { @@ -47,7 +47,6 @@ export class Shading extends XmlComponent { } } -/* eslint-disable @typescript-eslint/naming-convention */ export const ShadingType = { CLEAR: "clear", DIAGONAL_CROSS: "diagCross", @@ -87,4 +86,3 @@ export const ShadingType = { THIN_VERTICAL_STRIPE: "thinVertStripe", VERTICAL_STRIPE: "vertStripe", } as const; -/* eslint-enable */ diff --git a/src/file/shared/number-format.ts b/src/file/shared/number-format.ts index 58e37f87c3..06adfbb827 100644 --- a/src/file/shared/number-format.ts +++ b/src/file/shared/number-format.ts @@ -66,7 +66,6 @@ // // -/* eslint-disable @typescript-eslint/naming-convention*/ export const NumberFormat = { DECIMAL: "decimal", UPPER_ROMAN: "upperRoman", @@ -132,4 +131,3 @@ export const NumberFormat = { DOLLAR_TEXT: "dollarText", // } as const; -/* eslint-enable */ diff --git a/src/file/styles/defaults/document-defaults.ts b/src/file/styles/defaults/document-defaults.ts index 57724758f4..fe1b9aa5fb 100644 --- a/src/file/styles/defaults/document-defaults.ts +++ b/src/file/styles/defaults/document-defaults.ts @@ -1,13 +1,14 @@ import { IParagraphStylePropertiesOptions } from "@file/paragraph/properties"; import { IRunStylePropertiesOptions } from "@file/paragraph/run/properties"; import { XmlComponent } from "@file/xml-components"; + import { ParagraphPropertiesDefaults } from "./paragraph-properties"; import { RunPropertiesDefaults } from "./run-properties"; -export interface IDocumentDefaultsOptions { +export type IDocumentDefaultsOptions = { readonly paragraph?: IParagraphStylePropertiesOptions; readonly run?: IRunStylePropertiesOptions; -} +}; export class DocumentDefaults extends XmlComponent { private readonly runPropertiesDefaults: RunPropertiesDefaults; diff --git a/src/file/styles/external-styles-factory.ts b/src/file/styles/external-styles-factory.ts index 19dc396378..a0cd0099db 100644 --- a/src/file/styles/external-styles-factory.ts +++ b/src/file/styles/external-styles-factory.ts @@ -1,5 +1,7 @@ -import { convertToXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent } from "@file/xml-components"; import { Element as XMLElement, xml2js } from "xml-js"; + +import { ImportedRootElementAttributes, ImportedXmlComponent, convertToXmlComponent } from "@file/xml-components"; + import { Styles } from "./"; export class ExternalStylesFactory { diff --git a/src/file/styles/factory.ts b/src/file/styles/factory.ts index 63ac2571d2..382175cb32 100644 --- a/src/file/styles/factory.ts +++ b/src/file/styles/factory.ts @@ -1,6 +1,3 @@ -import { DocumentAttributes } from "../document/document-attributes"; -import { IStylesOptions } from "./styles"; - import { DocumentDefaults, IDocumentDefaultsOptions } from "./defaults"; import { FootnoteReferenceStyle, @@ -19,8 +16,10 @@ import { StrongStyle, TitleStyle, } from "./style"; +import { IStylesOptions } from "./styles"; +import { DocumentAttributes } from "../document/document-attributes"; -export interface IDefaultStylesOptions { +export type IDefaultStylesOptions = { readonly document?: IDocumentDefaultsOptions; readonly title?: IBaseParagraphStyleOptions; readonly heading1?: IBaseParagraphStyleOptions; @@ -35,7 +34,7 @@ export interface IDefaultStylesOptions { readonly footnoteReference?: IBaseCharacterStyleOptions; readonly footnoteText?: IBaseParagraphStyleOptions; readonly footnoteTextChar?: IBaseCharacterStyleOptions; -} +}; export class DefaultStylesFactory { public newInstance(options: IDefaultStylesOptions = {}): IStylesOptions { diff --git a/src/file/styles/latent-styles/exceptions.ts b/src/file/styles/latent-styles/exceptions.ts index b4da25c10b..174d6c3421 100644 --- a/src/file/styles/latent-styles/exceptions.ts +++ b/src/file/styles/latent-styles/exceptions.ts @@ -1,12 +1,12 @@ import { XmlAttributeComponent, XmlComponent } from "@file/xml-components"; -export interface ILatentStyleExceptionAttributesProperties { +export type ILatentStyleExceptionAttributesProperties = { readonly name?: string; readonly uiPriority?: string; readonly qFormat?: string; readonly semiHidden?: string; readonly unhideWhenUsed?: string; -} +}; export class LatentStyleExceptionAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/styles/latent-styles/latent-styles.ts b/src/file/styles/latent-styles/latent-styles.ts index 5c9c94b29e..e77678bf07 100644 --- a/src/file/styles/latent-styles/latent-styles.ts +++ b/src/file/styles/latent-styles/latent-styles.ts @@ -1,4 +1,5 @@ import { XmlComponent } from "@file/xml-components"; + import { LatentStyleException } from "./exceptions"; export class LatentStyles extends XmlComponent { diff --git a/src/file/styles/style/character-style.spec.ts b/src/file/styles/style/character-style.spec.ts index 16f85e3d43..68a62135b1 100644 --- a/src/file/styles/style/character-style.spec.ts +++ b/src/file/styles/style/character-style.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { EmphasisMarkType } from "@file/paragraph/run/emphasis-mark"; -import { UnderlineType } from "@file/paragraph/run/underline"; import { HighlightColor } from "@file/paragraph/run/properties"; +import { UnderlineType } from "@file/paragraph/run/underline"; import { ShadingType } from "@file/shading"; import { EMPTY_OBJECT } from "@file/xml-components"; diff --git a/src/file/styles/style/character-style.ts b/src/file/styles/style/character-style.ts index f2743e2c03..188f574195 100644 --- a/src/file/styles/style/character-style.ts +++ b/src/file/styles/style/character-style.ts @@ -2,13 +2,13 @@ import { IRunStylePropertiesOptions, RunProperties } from "@file/paragraph/run/p import { IStyleOptions, Style } from "./style"; -export interface IBaseCharacterStyleOptions extends IStyleOptions { +export type IBaseCharacterStyleOptions = { readonly run?: IRunStylePropertiesOptions; -} +} & IStyleOptions; -export interface ICharacterStyleOptions extends IBaseCharacterStyleOptions { +export type ICharacterStyleOptions = { readonly id: string; -} +} & IBaseCharacterStyleOptions; export class StyleForCharacter extends Style { private readonly runProperties: RunProperties; diff --git a/src/file/styles/style/default-styles.ts b/src/file/styles/style/default-styles.ts index 2a3e6fd318..50a01f854e 100644 --- a/src/file/styles/style/default-styles.ts +++ b/src/file/styles/style/default-styles.ts @@ -1,6 +1,5 @@ -import { UnderlineType } from "@file/paragraph/run/underline"; - import { LineRuleType } from "@file/paragraph"; +import { UnderlineType } from "@file/paragraph/run/underline"; import { IBaseCharacterStyleOptions, StyleForCharacter } from "./character-style"; import { IBaseParagraphStyleOptions, IParagraphStyleOptions, StyleForParagraph } from "./paragraph-style"; diff --git a/src/file/styles/style/paragraph-style.spec.ts b/src/file/styles/style/paragraph-style.spec.ts index 429c5d0e8f..1f06b04ae9 100644 --- a/src/file/styles/style/paragraph-style.spec.ts +++ b/src/file/styles/style/paragraph-style.spec.ts @@ -2,8 +2,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { AlignmentType, EmphasisMarkType, TabStopPosition } from "@file/paragraph"; -import { UnderlineType } from "@file/paragraph/run/underline"; import { HighlightColor } from "@file/paragraph/run"; +import { UnderlineType } from "@file/paragraph/run/underline"; import { ShadingType } from "@file/shading"; import { EMPTY_OBJECT } from "@file/xml-components"; diff --git a/src/file/styles/style/paragraph-style.ts b/src/file/styles/style/paragraph-style.ts index 84b9dd909e..7dc4eeb887 100644 --- a/src/file/styles/style/paragraph-style.ts +++ b/src/file/styles/style/paragraph-style.ts @@ -1,15 +1,16 @@ import { IParagraphStylePropertiesOptions, IRunStylePropertiesOptions, ParagraphProperties } from "@file/paragraph"; import { RunProperties } from "@file/paragraph/run/properties"; + import { IStyleOptions, Style } from "./style"; -export interface IBaseParagraphStyleOptions extends IStyleOptions { +export type IBaseParagraphStyleOptions = { readonly paragraph?: IParagraphStylePropertiesOptions; readonly run?: IRunStylePropertiesOptions; -} +} & IStyleOptions; -export interface IParagraphStyleOptions extends IBaseParagraphStyleOptions { +export type IParagraphStyleOptions = { readonly id: string; -} +} & IBaseParagraphStyleOptions; export class StyleForParagraph extends Style { private readonly paragraphProperties: ParagraphProperties; diff --git a/src/file/styles/style/style.ts b/src/file/styles/style/style.ts index e6c78780d4..12dbe33900 100644 --- a/src/file/styles/style/style.ts +++ b/src/file/styles/style/style.ts @@ -1,4 +1,5 @@ import { OnOffElement, StringValueElement, XmlAttributeComponent, XmlComponent } from "@file/xml-components"; + import { Name, UiPriority } from "./components"; // @@ -32,14 +33,14 @@ import { Name, UiPriority } from "./components"; // // -export interface IStyleAttributes { +export type IStyleAttributes = { readonly type?: string; readonly styleId?: string; readonly default?: boolean; readonly customStyle?: string; -} +}; -export interface IStyleOptions { +export type IStyleOptions = { readonly name?: string; /** * Specifies the style upon which the current style is based-that is, the style from which the current style inherits. It is the mechanism for implementing style inheritance. @@ -55,7 +56,7 @@ export interface IStyleOptions { readonly semiHidden?: boolean; readonly unhideWhenUsed?: boolean; readonly quickFormat?: boolean; -} +}; class StyleAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/styles/styles.ts b/src/file/styles/styles.ts index eff550ade4..4e269f48d4 100644 --- a/src/file/styles/styles.ts +++ b/src/file/styles/styles.ts @@ -1,16 +1,17 @@ import { IDefaultStylesOptions } from "@file/styles/factory"; import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "@file/xml-components"; + import { StyleForCharacter, StyleForParagraph } from "./style"; import { ICharacterStyleOptions } from "./style/character-style"; import { IParagraphStyleOptions } from "./style/paragraph-style"; -export interface IStylesOptions { +export type IStylesOptions = { readonly default?: IDefaultStylesOptions; readonly initialStyles?: BaseXmlComponent; readonly paragraphStyles?: readonly IParagraphStyleOptions[]; readonly characterStyles?: readonly ICharacterStyleOptions[]; readonly importedStyles?: readonly (XmlComponent | StyleForParagraph | StyleForCharacter | ImportedXmlComponent)[]; -} +}; // // diff --git a/src/file/table-of-contents/table-of-contents-properties.ts b/src/file/table-of-contents/table-of-contents-properties.ts index f53299d795..86aeedb823 100644 --- a/src/file/table-of-contents/table-of-contents-properties.ts +++ b/src/file/table-of-contents/table-of-contents-properties.ts @@ -16,7 +16,7 @@ export class StyleLevel { * Short Guide: * http://officeopenxml.com/WPtableOfContents.php */ -export interface ITableOfContentsOptions { +export type ITableOfContentsOptions = { /** * \a option - Includes captioned items, but omits caption labels and numbers. * The identifier designated by text in this switch's field-argument corresponds to the caption label. @@ -119,4 +119,4 @@ export interface ITableOfContentsOptions { * \z Hides tab leader and page numbers in web page view (ยง17.18.102). */ readonly hideTabAndPageNumbersInWebView?: boolean; -} +}; diff --git a/src/file/table-of-contents/table-of-contents.ts b/src/file/table-of-contents/table-of-contents.ts index da11a28719..e3a110bb4a 100644 --- a/src/file/table-of-contents/table-of-contents.ts +++ b/src/file/table-of-contents/table-of-contents.ts @@ -1,9 +1,10 @@ // http://officeopenxml.com/WPtableOfContents.php // http://www.datypic.com/sc/ooxml/e-w_sdt-1.html +import { FileChild } from "@file/file-child"; import { Paragraph } from "@file/paragraph"; import { Run } from "@file/paragraph/run"; import { Begin, End, Separate } from "@file/paragraph/run/field"; -import { FileChild } from "@file/file-child"; + import { FieldInstruction } from "./field-instruction"; import { StructuredDocumentTagContent } from "./sdt-content"; import { StructuredDocumentTagProperties } from "./sdt-properties"; diff --git a/src/file/table/grid.spec.ts b/src/file/table/grid.spec.ts index 64e4501864..e50974bc13 100644 --- a/src/file/table/grid.spec.ts +++ b/src/file/table/grid.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest"; -import { EMPTY_OBJECT } from "@file/xml-components"; import { Formatter } from "@export/formatter"; +import { EMPTY_OBJECT } from "@file/xml-components"; import { GridCol, TableGrid } from "./grid"; diff --git a/src/file/table/table-cell/table-cell-components.ts b/src/file/table/table-cell/table-cell-components.ts index 11e9dc711f..160b54a9bf 100644 --- a/src/file/table/table-cell/table-cell-components.ts +++ b/src/file/table/table-cell/table-cell-components.ts @@ -17,14 +17,14 @@ import { decimalNumber } from "@util/values"; // // -export interface ITableCellBorders { +export type ITableCellBorders = { readonly top?: IBorderOptions; readonly start?: IBorderOptions; readonly left?: IBorderOptions; readonly bottom?: IBorderOptions; readonly end?: IBorderOptions; readonly right?: IBorderOptions; -} +}; export class TableCellBorders extends IgnoreIfEmptyXmlComponent { public constructor(options: ITableCellBorders) { @@ -113,11 +113,8 @@ export class VerticalMerge extends XmlComponent { } export const TextDirection = { - // eslint-disable-next-line @typescript-eslint/naming-convention BOTTOM_TO_TOP_LEFT_TO_RIGHT: "btLr", - // eslint-disable-next-line @typescript-eslint/naming-convention LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb", - // eslint-disable-next-line @typescript-eslint/naming-convention TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl", } as const; diff --git a/src/file/table/table-cell/table-cell-properties.spec.ts b/src/file/table/table-cell/table-cell-properties.spec.ts index 504dc2229e..995459a3c5 100644 --- a/src/file/table/table-cell/table-cell-properties.spec.ts +++ b/src/file/table/table-cell/table-cell-properties.spec.ts @@ -5,7 +5,6 @@ import { BorderStyle } from "@file/border"; import { VerticalAlign } from "@file/vertical-align"; import { WidthType } from "../table-width"; - import { VerticalMergeType } from "./table-cell-components"; import { TableCellProperties } from "./table-cell-properties"; diff --git a/src/file/table/table-cell/table-cell-properties.ts b/src/file/table/table-cell/table-cell-properties.ts index 21c8c9a4a3..f9dcb12875 100644 --- a/src/file/table/table-cell/table-cell-properties.ts +++ b/src/file/table/table-cell/table-cell-properties.ts @@ -7,14 +7,14 @@ import { ITableWidthProperties, TableWidthElement } from "../table-width"; import { GridSpan, ITableCellBorders, - TableCellBorders, TDirection, + TableCellBorders, TextDirection, VerticalMerge, VerticalMergeType, } from "./table-cell-components"; -export interface ITableCellPropertiesOptions { +export type ITableCellPropertiesOptions = { readonly shading?: IShadingAttributesProperties; readonly margins?: ITableCellMarginOptions; readonly verticalAlign?: (typeof VerticalAlign)[keyof typeof VerticalAlign]; @@ -24,7 +24,7 @@ export interface ITableCellPropertiesOptions { readonly columnSpan?: number; readonly rowSpan?: number; readonly borders?: ITableCellBorders; -} +}; export class TableCellProperties extends IgnoreIfEmptyXmlComponent { public constructor(options: ITableCellPropertiesOptions) { diff --git a/src/file/table/table-cell/table-cell.ts b/src/file/table/table-cell/table-cell.ts index f9547d9ba5..66aef552a7 100644 --- a/src/file/table/table-cell/table-cell.ts +++ b/src/file/table/table-cell/table-cell.ts @@ -5,9 +5,9 @@ import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components"; import { Table } from "../table"; import { ITableCellPropertiesOptions, TableCellProperties } from "./table-cell-properties"; -export interface ITableCellOptions extends ITableCellPropertiesOptions { +export type ITableCellOptions = { readonly children: readonly (Paragraph | Table)[]; -} +} & ITableCellPropertiesOptions; export class TableCell extends XmlComponent { public constructor(public readonly options: ITableCellOptions) { diff --git a/src/file/table/table-properties/table-borders.ts b/src/file/table/table-properties/table-borders.ts index dee2e5cd90..f31f0255a0 100644 --- a/src/file/table/table-properties/table-borders.ts +++ b/src/file/table/table-properties/table-borders.ts @@ -2,14 +2,14 @@ import { BorderElement, BorderStyle, IBorderOptions } from "@file/border"; import { XmlComponent } from "@file/xml-components"; -export interface ITableBordersOptions { +export type ITableBordersOptions = { readonly top?: IBorderOptions; readonly bottom?: IBorderOptions; readonly left?: IBorderOptions; readonly right?: IBorderOptions; readonly insideHorizontal?: IBorderOptions; readonly insideVertical?: IBorderOptions; -} +}; const NONE_BORDER = { style: BorderStyle.NONE, diff --git a/src/file/table/table-properties/table-cell-margin.spec.ts b/src/file/table/table-properties/table-cell-margin.spec.ts index c4fa4239bf..0fdffed12a 100644 --- a/src/file/table/table-properties/table-cell-margin.spec.ts +++ b/src/file/table/table-properties/table-cell-margin.spec.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; -import { WidthType } from "../table-width"; +import { WidthType } from "../table-width"; import { TableCellMargin, TableCellMarginElementType } from "./table-cell-margin"; describe("TableCellMargin", () => { diff --git a/src/file/table/table-properties/table-cell-margin.ts b/src/file/table/table-properties/table-cell-margin.ts index e3a76ee34c..e862de2bf3 100644 --- a/src/file/table/table-properties/table-cell-margin.ts +++ b/src/file/table/table-properties/table-cell-margin.ts @@ -1,13 +1,13 @@ -import { IgnoreIfEmptyXmlComponent } from "@file/xml-components"; import { TableWidthElement, WidthType } from "@file/table"; +import { IgnoreIfEmptyXmlComponent } from "@file/xml-components"; -export interface ITableCellMarginOptions { +export type ITableCellMarginOptions = { readonly marginUnitType?: (typeof WidthType)[keyof typeof WidthType]; readonly top?: number; readonly bottom?: number; readonly left?: number; readonly right?: number; -} +}; // Technically two different types, but they're identical // @@ -35,7 +35,6 @@ export interface ITableCellMarginOptions { export const TableCellMarginElementType = { TABLE: "w:tblCellMar", - // eslint-disable-next-line @typescript-eslint/naming-convention TABLE_CELL: "w:tcMar", } as const; diff --git a/src/file/table/table-properties/table-float-properties.ts b/src/file/table/table-properties/table-float-properties.ts index 3d077fa1b8..9067c91842 100644 --- a/src/file/table/table-properties/table-float-properties.ts +++ b/src/file/table/table-properties/table-float-properties.ts @@ -1,5 +1,5 @@ import { NextAttributeComponent, StringEnumValueElement, XmlComponent } from "@file/xml-components"; -import { PositiveUniversalMeasure, signedTwipsMeasureValue, twipsMeasureValue, UniversalMeasure } from "@util/values"; +import { PositiveUniversalMeasure, UniversalMeasure, signedTwipsMeasureValue, twipsMeasureValue } from "@util/values"; export const TableAnchorType = { MARGIN: "margin", diff --git a/src/file/table/table-properties/table-properties.spec.ts b/src/file/table/table-properties/table-properties.spec.ts index 2d0665182a..cebe7153b6 100644 --- a/src/file/table/table-properties/table-properties.spec.ts +++ b/src/file/table/table-properties/table-properties.spec.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; - import { AlignmentType } from "@file/paragraph"; import { ShadingType } from "@file/shading"; diff --git a/src/file/table/table-properties/table-properties.ts b/src/file/table/table-properties/table-properties.ts index d731693fac..08cfe80b68 100644 --- a/src/file/table/table-properties/table-properties.ts +++ b/src/file/table/table-properties/table-properties.ts @@ -31,7 +31,7 @@ import { ITableCellMarginOptions, TableCellMargin, TableCellMarginElementType } import { ITableFloatOptions, TableFloatProperties } from "./table-float-properties"; import { TableLayout, TableLayoutType } from "./table-layout"; -export interface ITablePropertiesOptions { +export type ITablePropertiesOptions = { readonly width?: ITableWidthProperties; readonly indent?: ITableWidthProperties; readonly layout?: (typeof TableLayoutType)[keyof typeof TableLayoutType]; @@ -42,7 +42,7 @@ export interface ITablePropertiesOptions { readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType]; readonly cellMargin?: ITableCellMarginOptions; readonly visuallyRightToLeft?: boolean; -} +}; export class TableProperties extends IgnoreIfEmptyXmlComponent { public constructor(options: ITablePropertiesOptions) { diff --git a/src/file/table/table-row/table-row-properties.ts b/src/file/table/table-row/table-row-properties.ts index b7d3c7018f..40605869cd 100644 --- a/src/file/table/table-row/table-row-properties.ts +++ b/src/file/table/table-row/table-row-properties.ts @@ -32,14 +32,14 @@ import { PositiveUniversalMeasure } from "@util/values"; import { HeightRule, TableRowHeight } from "./table-row-height"; -export interface ITableRowPropertiesOptions { +export type ITableRowPropertiesOptions = { readonly cantSplit?: boolean; readonly tableHeader?: boolean; readonly height?: { readonly value: number | PositiveUniversalMeasure; readonly rule: (typeof HeightRule)[keyof typeof HeightRule]; }; -} +}; export class TableRowProperties extends IgnoreIfEmptyXmlComponent { public constructor(options: ITableRowPropertiesOptions) { diff --git a/src/file/table/table-row/table-row.spec.ts b/src/file/table/table-row/table-row.spec.ts index d662e9073d..e335ffd2fa 100644 --- a/src/file/table/table-row/table-row.spec.ts +++ b/src/file/table/table-row/table-row.spec.ts @@ -1,10 +1,10 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; - import { Paragraph } from "@file/paragraph"; import { HeightRule } from "@file/table/table-row/table-row-height"; import { EMPTY_OBJECT } from "@file/xml-components"; + import { TableCell } from "../table-cell"; import { TableRow } from "./table-row"; diff --git a/src/file/table/table-row/table-row.ts b/src/file/table/table-row/table-row.ts index 863274bccf..9850c19f64 100644 --- a/src/file/table/table-row/table-row.ts +++ b/src/file/table/table-row/table-row.ts @@ -1,10 +1,11 @@ import { XmlComponent } from "@file/xml-components"; + import { TableCell } from "../table-cell"; import { ITableRowPropertiesOptions, TableRowProperties } from "./table-row-properties"; -export interface ITableRowOptions extends ITableRowPropertiesOptions { +export type ITableRowOptions = { readonly children: readonly TableCell[]; -} +} & ITableRowPropertiesOptions; export class TableRow extends XmlComponent { public constructor(private readonly options: ITableRowOptions) { diff --git a/src/file/table/table-width.ts b/src/file/table/table-width.ts index 4a950566eb..3bb16c6654 100644 --- a/src/file/table/table-width.ts +++ b/src/file/table/table-width.ts @@ -1,6 +1,6 @@ // http://officeopenxml.com/WPtableWidth.php import { NextAttributeComponent, XmlComponent } from "@file/xml-components"; -import { measurementOrPercentValue, Percentage, UniversalMeasure } from "@util/values"; +import { Percentage, UniversalMeasure, measurementOrPercentValue } from "@util/values"; // // diff --git a/src/file/table/table.spec.ts b/src/file/table/table.spec.ts index f9eee74990..e4694e1644 100644 --- a/src/file/table/table.spec.ts +++ b/src/file/table/table.spec.ts @@ -1,14 +1,12 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -/* tslint:disable:no-unused-expression */ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { AlignmentType, Paragraph } from "../paragraph"; import { Table } from "./table"; -import { RelativeHorizontalPosition, RelativeVerticalPosition, TableAnchorType } from "./table-properties"; - import { TableCell } from "./table-cell"; +import { RelativeHorizontalPosition, RelativeVerticalPosition, TableAnchorType } from "./table-properties"; import { TableLayoutType } from "./table-properties/table-layout"; import { TableRow } from "./table-row"; import { WidthType } from "./table-width"; diff --git a/src/file/table/table.ts b/src/file/table/table.ts index 91269bc319..0cf2e6e6ee 100644 --- a/src/file/table/table.ts +++ b/src/file/table/table.ts @@ -20,7 +20,7 @@ import { ITableWidthProperties } from "./table-width"; table will make it look reasonable, as the layout algorithm will expand columns to fit its content */ -export interface ITableOptions { +export type ITableOptions = { readonly rows: readonly TableRow[]; readonly width?: ITableWidthProperties; readonly columnWidths?: readonly number[]; @@ -32,7 +32,7 @@ export interface ITableOptions { readonly borders?: ITableBordersOptions; readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType]; readonly visuallyRightToLeft?: boolean; -} +}; export class Table extends FileChild { public constructor({ diff --git a/src/file/track-revision/track-revision-components/deleted-text-run.ts b/src/file/track-revision/track-revision-components/deleted-text-run.ts index 50cb82ad42..30fe7fbec0 100644 --- a/src/file/track-revision/track-revision-components/deleted-text-run.ts +++ b/src/file/track-revision/track-revision-components/deleted-text-run.ts @@ -1,14 +1,14 @@ import { XmlComponent } from "@file/xml-components"; -import { Break } from "../../paragraph/run/break"; -import { Begin, End, Separate } from "../../paragraph/run/field"; -import { IRunOptions, PageNumber } from "../../paragraph/run/run"; -import { ChangeAttributes, IChangedAttributesProperties } from "../track-revision"; -import { RunProperties } from "../../paragraph/run/properties"; import { DeletedNumberOfPages, DeletedNumberOfPagesSection, DeletedPage } from "./deleted-page-number"; import { DeletedText } from "./deleted-text"; +import { Break } from "../../paragraph/run/break"; +import { Begin, End, Separate } from "../../paragraph/run/field"; +import { RunProperties } from "../../paragraph/run/properties"; +import { IRunOptions, PageNumber } from "../../paragraph/run/run"; +import { ChangeAttributes, IChangedAttributesProperties } from "../track-revision"; -interface IDeletedRunOptions extends IRunOptions, IChangedAttributesProperties {} +type IDeletedRunOptions = IRunOptions & IChangedAttributesProperties; export class DeletedTextRun extends XmlComponent { protected readonly deletedTextRunWrapper: DeletedTextRunWrapper; diff --git a/src/file/track-revision/track-revision-components/inserted-text-run.ts b/src/file/track-revision/track-revision-components/inserted-text-run.ts index 6b66797653..9084674590 100644 --- a/src/file/track-revision/track-revision-components/inserted-text-run.ts +++ b/src/file/track-revision/track-revision-components/inserted-text-run.ts @@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components"; import { IRunOptions, TextRun } from "../../index"; import { ChangeAttributes, IChangedAttributesProperties } from "../track-revision"; -interface IInsertedRunOptions extends IChangedAttributesProperties, IRunOptions {} +type IInsertedRunOptions = IChangedAttributesProperties & IRunOptions; export class InsertedTextRun extends XmlComponent { public constructor(options: IInsertedRunOptions) { diff --git a/src/file/track-revision/track-revision.ts b/src/file/track-revision/track-revision.ts index 37fe5ef951..d5a666abb8 100644 --- a/src/file/track-revision/track-revision.ts +++ b/src/file/track-revision/track-revision.ts @@ -1,10 +1,10 @@ import { XmlAttributeComponent } from "@file/xml-components"; -export interface IChangedAttributesProperties { +export type IChangedAttributesProperties = { readonly id: number; readonly author: string; readonly date: string; -} +}; export class ChangeAttributes extends XmlAttributeComponent { protected readonly xmlKeys = { diff --git a/src/file/xml-components/base.ts b/src/file/xml-components/base.ts index 4bd1043b90..3b89f8fa49 100644 --- a/src/file/xml-components/base.ts +++ b/src/file/xml-components/base.ts @@ -2,12 +2,12 @@ import { IViewWrapper } from "../document-wrapper"; import { File } from "../file"; import { IXmlableObject } from "./xmlable-object"; -export interface IContext { +export type IContext = { readonly file: File; readonly viewWrapper: IViewWrapper; // eslint-disable-next-line functional/prefer-readonly-type readonly stack: IXmlableObject[]; -} +}; export abstract class BaseXmlComponent { protected readonly rootKey: string; diff --git a/src/file/xml-components/default-attributes.ts b/src/file/xml-components/default-attributes.ts index 881765ed20..373b172812 100644 --- a/src/file/xml-components/default-attributes.ts +++ b/src/file/xml-components/default-attributes.ts @@ -1,13 +1,13 @@ import { BaseXmlComponent, IContext } from "./base"; -import { IXmlableObject, IXmlAttribute } from "./xmlable-object"; +import { IXmlAttribute, IXmlableObject } from "./xmlable-object"; type AttributeMap = Record; -export type AttributeData = { readonly [key: string]: boolean | number | string }; +export type AttributeData = Record; export type AttributePayload = { readonly [P in keyof T]: { readonly key: string; readonly value: T[P] } }; // eslint-disable-next-line @typescript-eslint/no-explicit-any -export abstract class XmlAttributeComponent extends BaseXmlComponent { +export abstract class XmlAttributeComponent> extends BaseXmlComponent { protected readonly xmlKeys?: AttributeMap; public constructor(private readonly root: T) { @@ -15,12 +15,9 @@ export abstract class XmlAttributeComponent = {}; Object.entries(this.root).forEach(([key, value]) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any if (value !== undefined) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any const newKey = (this.xmlKeys && this.xmlKeys[key]) || key; // eslint-disable-next-line functional/immutable-data attrs[newKey] = value; diff --git a/src/file/xml-components/imported-xml-component.spec.ts b/src/file/xml-components/imported-xml-component.spec.ts index 6f71fb8223..48747e3a86 100644 --- a/src/file/xml-components/imported-xml-component.spec.ts +++ b/src/file/xml-components/imported-xml-component.spec.ts @@ -3,8 +3,8 @@ import { Element, xml2js } from "xml-js"; import { EMPTY_OBJECT } from "@file/xml-components"; -import { convertToXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent } from "./imported-xml-component"; import { IContext } from "./base"; +import { ImportedRootElementAttributes, ImportedXmlComponent, convertToXmlComponent } from "./imported-xml-component"; const xmlString = ` @@ -55,13 +55,12 @@ describe("ImportedXmlComponent", () => { otherAttr: "2", }; importedXmlComponent = new ImportedXmlComponent("w:test", attributes); - // eslint-disable-next-line functional/immutable-data + importedXmlComponent.push(new ImportedXmlComponent("w:child")); }); describe("#prepForXml()", () => { it("should transform for xml", () => { - // tslint:disable-next-line: no-object-literal-type-assertion const converted = importedXmlComponent.prepForXml({ stack: [] } as unknown as IContext); expect(JSON.parse(JSON.stringify(converted))).to.deep.equal({ "w:test": [ @@ -108,7 +107,6 @@ describe("ImportedRootElementAttributes", () => { describe("#prepForXml()", () => { it("should work", () => { - // tslint:disable-next-line: no-object-literal-type-assertion const converted = attributes.prepForXml({} as IContext); expect(converted).to.deep.equal({ _attr: {}, diff --git a/src/file/xml-components/imported-xml-component.ts b/src/file/xml-components/imported-xml-component.ts index e90c169dd9..1db2e4dd91 100644 --- a/src/file/xml-components/imported-xml-component.ts +++ b/src/file/xml-components/imported-xml-component.ts @@ -21,7 +21,6 @@ export const convertToXmlComponent = (element: XmlElement): ImportedXmlComponent for (const childElm of childElements) { const child = convertToXmlComponent(childElm); if (child !== undefined) { - // eslint-disable-next-line functional/immutable-data xmlComponent.push(child); } } @@ -62,7 +61,6 @@ export class ImportedXmlComponent extends XmlComponent { public constructor(rootKey: string, _attr?: any) { super(rootKey); if (_attr) { - // eslint-disable-next-line functional/immutable-data this.root.push(new ImportedXmlComponentAttributes(_attr)); } } diff --git a/src/file/xml-components/simple-elements.ts b/src/file/xml-components/simple-elements.ts index 3a4651e4c9..c941b35c4d 100644 --- a/src/file/xml-components/simple-elements.ts +++ b/src/file/xml-components/simple-elements.ts @@ -1,6 +1,5 @@ import { AttributeData, AttributePayload, Attributes, NextAttributeComponent, XmlComponent } from "@file/xml-components"; - -import { hpsMeasureValue, PositiveUniversalMeasure } from "@util/values"; +import { PositiveUniversalMeasure, hpsMeasureValue } from "@util/values"; // This represents element type CT_OnOff, which indicate a boolean value. // diff --git a/src/file/xml-components/xml-component.spec.ts b/src/file/xml-components/xml-component.spec.ts index 559072e235..8c1234d2bc 100644 --- a/src/file/xml-components/xml-component.spec.ts +++ b/src/file/xml-components/xml-component.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; + import { Attributes, BaseXmlComponent, XmlComponent } from "./"; class TestComponent extends XmlComponent { @@ -20,13 +21,13 @@ describe("XmlComponent", () => { }); it("should handle children elements", () => { const xmlComponent = new TestComponent("w:test"); - // eslint-disable-next-line functional/immutable-data + xmlComponent.push( new Attributes({ val: "test", }), ); - // eslint-disable-next-line functional/immutable-data + xmlComponent.push(new TestComponent("innerTest")); const tree = new Formatter().format(xmlComponent); @@ -45,7 +46,7 @@ describe("XmlComponent", () => { }); it("should hoist attrs if only attrs are present", () => { const xmlComponent = new TestComponent("w:test"); - // eslint-disable-next-line functional/immutable-data + xmlComponent.push( new Attributes({ val: "test", diff --git a/src/file/xml-components/xmlable-object.ts b/src/file/xml-components/xmlable-object.ts index ac6811e37f..f1fcf93510 100644 --- a/src/file/xml-components/xmlable-object.ts +++ b/src/file/xml-components/xmlable-object.ts @@ -1,12 +1,11 @@ -export interface IXmlAttribute { - readonly [key: string]: string | number | boolean; -} +export type IXmlAttribute = Readonly>; + +// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style, @typescript-eslint/consistent-type-definitions export interface IXmlableObject extends Record { // readonly _attr?: IXmlAttribute; // eslint-disable-next-line @typescript-eslint/no-explicit-any readonly [key: string]: any; } - // Needed because of: https://github.com/s-panferov/awesome-typescript-loader/issues/432 /** * @ignore diff --git a/src/patcher/content-types-manager.spec.ts b/src/patcher/content-types-manager.spec.ts index 7e4554cf5b..4dd6527015 100644 --- a/src/patcher/content-types-manager.spec.ts +++ b/src/patcher/content-types-manager.spec.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; + import { appendContentType } from "./content-types-manager"; describe("content-types-manager", () => { diff --git a/src/patcher/from-docx.spec.ts b/src/patcher/from-docx.spec.ts index cb8032fac6..8eee52260c 100644 --- a/src/patcher/from-docx.spec.ts +++ b/src/patcher/from-docx.spec.ts @@ -1,9 +1,9 @@ -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import JSZip from "jszip"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { ExternalHyperlink, ImageRun, Paragraph, TextRun } from "@file/paragraph"; -import { patchDocument, PatchType } from "./from-docx"; +import { PatchType, patchDocument } from "./from-docx"; const MOCK_XML = ` diff --git a/src/patcher/from-docx.ts b/src/patcher/from-docx.ts index ff9b3ea848..fd472bdacc 100644 --- a/src/patcher/from-docx.ts +++ b/src/patcher/from-docx.ts @@ -1,20 +1,20 @@ import JSZip from "jszip"; import { Element, js2xml } from "xml-js"; -import { ConcreteHyperlink, ExternalHyperlink, ParagraphChild } from "@file/paragraph"; -import { FileChild } from "@file/file-child"; -import { IMediaData, Media } from "@file/media"; +import { ImageReplacer } from "@export/packer/image-replacer"; import { IViewWrapper } from "@file/document-wrapper"; import { File } from "@file/file"; -import { IContext } from "@file/xml-components"; -import { ImageReplacer } from "@export/packer/image-replacer"; +import { FileChild } from "@file/file-child"; +import { IMediaData, Media } from "@file/media"; +import { ConcreteHyperlink, ExternalHyperlink, ParagraphChild } from "@file/paragraph"; import { TargetModeType } from "@file/relationships/relationship/relationship"; +import { IContext } from "@file/xml-components"; import { uniqueId } from "@util/convenience-functions"; +import { appendContentType } from "./content-types-manager"; +import { appendRelationship, getNextRelationshipIndex } from "./relationship-manager"; import { replacer } from "./replacer"; import { toJson } from "./util"; -import { appendRelationship, getNextRelationshipIndex } from "./relationship-manager"; -import { appendContentType } from "./content-types-manager"; // eslint-disable-next-line functional/prefer-readonly-type export type InputDataType = Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream; @@ -34,15 +34,15 @@ type FilePatch = { readonly children: readonly FileChild[]; }; -interface IImageRelationshipAddition { +type IImageRelationshipAddition = { readonly key: string; readonly mediaDatas: readonly IMediaData[]; -} +}; -interface IHyperlinkRelationshipAddition { +type IHyperlinkRelationshipAddition = { readonly key: string; readonly hyperlink: { readonly id: string; readonly link: string }; -} +}; export type IPatch = ParagraphPatch | FilePatch; @@ -65,7 +65,7 @@ export type PatchDocumentOutputType = keyof OutputByType; export type PatchDocumentOptions = { readonly outputType: T; readonly data: InputDataType; - readonly patches: { readonly [key: string]: IPatch }; + readonly patches: Readonly>; readonly keepOriginalStyles?: boolean; }; @@ -134,7 +134,6 @@ export const patchDocument = async { diff --git a/src/patcher/paragraph-token-replacer.ts b/src/patcher/paragraph-token-replacer.ts index 906fcbf79e..32eec3bbcc 100644 --- a/src/patcher/paragraph-token-replacer.ts +++ b/src/patcher/paragraph-token-replacer.ts @@ -1,7 +1,7 @@ import { Element } from "xml-js"; -import { createTextElementContents, patchSpaceAttribute } from "./util"; import { IRenderedParagraphNode } from "./run-renderer"; +import { createTextElementContents, patchSpaceAttribute } from "./util"; const ReplaceMode = { START: 0, diff --git a/src/patcher/patch-detector.spec.ts b/src/patcher/patch-detector.spec.ts index dee2bb7ecc..d239ae4f6b 100644 --- a/src/patcher/patch-detector.spec.ts +++ b/src/patcher/patch-detector.spec.ts @@ -1,5 +1,6 @@ -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import JSZip from "jszip"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; + import { patchDetector } from "./patch-detector"; const MOCK_XML = ` diff --git a/src/patcher/patch-detector.ts b/src/patcher/patch-detector.ts index 7ebcede050..31756f0a6e 100644 --- a/src/patcher/patch-detector.ts +++ b/src/patcher/patch-detector.ts @@ -1,7 +1,8 @@ import JSZip from "jszip"; -import { toJson } from "./util"; -import { traverse } from "./traverser"; + import { InputDataType } from "./from-docx"; +import { traverse } from "./traverser"; +import { toJson } from "./util"; type PatchDetectorOptions = { readonly data: InputDataType; diff --git a/src/patcher/relationship-manager.spec.ts b/src/patcher/relationship-manager.spec.ts index 32bf414423..f4228f4e73 100644 --- a/src/patcher/relationship-manager.spec.ts +++ b/src/patcher/relationship-manager.spec.ts @@ -1,6 +1,7 @@ -import { TargetModeType } from "@file/relationships/relationship/relationship"; import { describe, expect, it } from "vitest"; +import { TargetModeType } from "@file/relationships/relationship/relationship"; + import { appendRelationship, getNextRelationshipIndex } from "./relationship-manager"; describe("relationship-manager", () => { diff --git a/src/patcher/relationship-manager.ts b/src/patcher/relationship-manager.ts index dbaf734b8a..295c540662 100644 --- a/src/patcher/relationship-manager.ts +++ b/src/patcher/relationship-manager.ts @@ -1,6 +1,7 @@ import { Element } from "xml-js"; import { RelationshipType, TargetModeType } from "@file/relationships/relationship/relationship"; + import { getFirstLevelElements } from "./util"; const getIdFromRelationshipId = (relationshipId: string): number => { diff --git a/src/patcher/replacer.spec.ts b/src/patcher/replacer.spec.ts index 12fdb27dc7..f1e9650fcc 100644 --- a/src/patcher/replacer.spec.ts +++ b/src/patcher/replacer.spec.ts @@ -1,11 +1,11 @@ +import { describe, expect, it, vi } from "vitest"; + import { IViewWrapper } from "@file/document-wrapper"; import { File } from "@file/file"; import { Paragraph, TextRun } from "@file/paragraph"; import { IContext } from "@file/xml-components"; -import { describe, expect, it, vi } from "vitest"; import { PatchType } from "./from-docx"; - import { replacer } from "./replacer"; export const MOCK_JSON = { diff --git a/src/patcher/replacer.ts b/src/patcher/replacer.ts index f9670c1fb0..ba4dc4334a 100644 --- a/src/patcher/replacer.ts +++ b/src/patcher/replacer.ts @@ -1,14 +1,14 @@ -import { Element } from "xml-js"; import xml from "xml"; +import { Element } from "xml-js"; import { Formatter } from "@export/formatter"; import { IContext, XmlComponent } from "@file/xml-components"; import { IPatch, PatchType } from "./from-docx"; -import { toJson } from "./util"; -import { replaceTokenInParagraphElement } from "./paragraph-token-replacer"; import { findRunElementIndexWithToken, splitRunElement } from "./paragraph-split-inject"; +import { replaceTokenInParagraphElement } from "./paragraph-token-replacer"; import { findLocationOfText } from "./traverser"; +import { toJson } from "./util"; const formatter = new Formatter(); @@ -34,16 +34,13 @@ export const replacer = ({ } for (const renderedParagraph of renderedParagraphs) { - const textJson = patch.children - // eslint-disable-next-line no-loop-func - .map((c) => toJson(xml(formatter.format(c as XmlComponent, context)))) - .map((c) => c.elements![0]); + const textJson = patch.children.map((c) => toJson(xml(formatter.format(c as XmlComponent, context)))).map((c) => c.elements![0]); switch (patch.type) { case PatchType.DOCUMENT: { const parentElement = goToParentElementFromPath(json, renderedParagraph.pathToParagraph); const elementIndex = getLastElementIndexFromPath(renderedParagraph.pathToParagraph); - // eslint-disable-next-line functional/immutable-data, prefer-destructuring + // eslint-disable-next-line functional/immutable-data parentElement.elements!.splice(elementIndex, 1, ...textJson); break; } @@ -67,7 +64,7 @@ export const replacer = ({ if (keepOriginalStyles) { const runElementNonTextualElements = runElementToBeReplaced.elements!.filter( - (e) => e.type === "element" && e.name !== "w:t" && e.name !== "w:br", + (e) => e.type === "element" && e.name !== "w:t" && e.name !== "w:br" && e.name !== "w:tab", ); newRunElements = textJson.map((e) => ({ diff --git a/src/patcher/run-renderer.spec.ts b/src/patcher/run-renderer.spec.ts index 7d17d6c7ca..8aca6090f8 100644 --- a/src/patcher/run-renderer.spec.ts +++ b/src/patcher/run-renderer.spec.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; + import { renderParagraphNode } from "./run-renderer"; describe("run-renderer", () => { diff --git a/src/patcher/run-renderer.ts b/src/patcher/run-renderer.ts index 005ad71fe7..af0482cc4c 100644 --- a/src/patcher/run-renderer.ts +++ b/src/patcher/run-renderer.ts @@ -2,17 +2,17 @@ import { Element } from "xml-js"; import { ElementWrapper } from "./traverser"; -export interface IRenderedParagraphNode { +export type IRenderedParagraphNode = { readonly text: string; readonly runs: readonly IRenderedRunNode[]; readonly index: number; readonly pathToParagraph: readonly number[]; -} +}; -interface StartAndEnd { +type StartAndEnd = { readonly start: number; readonly end: number; -} +}; type IParts = { readonly text: string; diff --git a/src/patcher/traverser.ts b/src/patcher/traverser.ts index b05279696d..2df41859bc 100644 --- a/src/patcher/traverser.ts +++ b/src/patcher/traverser.ts @@ -2,11 +2,11 @@ import { Element } from "xml-js"; import { IRenderedParagraphNode, renderParagraphNode } from "./run-renderer"; -export interface ElementWrapper { +export type ElementWrapper = { readonly element: Element; readonly index: number; readonly parent: ElementWrapper | undefined; -} +}; const elementsToWrapper = (wrapper: ElementWrapper): readonly ElementWrapper[] => wrapper.element.elements?.map((e, i) => ({ @@ -27,7 +27,6 @@ export const traverse = (node: Element): readonly IRenderedParagraphNode[] => { }), ]; - // eslint-disable-next-line functional/immutable-data let currentNode: ElementWrapper | undefined; while (queue.length > 0) { // eslint-disable-next-line functional/immutable-data diff --git a/src/patcher/util.ts b/src/patcher/util.ts index 7bbc0a2dfd..17159ebb12 100644 --- a/src/patcher/util.ts +++ b/src/patcher/util.ts @@ -1,5 +1,5 @@ -import { xml2js, Element } from "xml-js"; import xml from "xml"; +import { Element, xml2js } from "xml-js"; import { Formatter } from "@export/formatter"; import { Text } from "@file/paragraph/run/run-components/text"; diff --git a/src/util/convenience-functions.spec.ts b/src/util/convenience-functions.spec.ts index c283bdf14f..29b1b745f4 100644 --- a/src/util/convenience-functions.spec.ts +++ b/src/util/convenience-functions.spec.ts @@ -7,8 +7,8 @@ import { convertInchesToTwip, convertMillimetersToTwip, docPropertiesUniqueNumericIdGen, - uniqueId, hashedId, + uniqueId, uniqueNumericIdCreator, uniqueUuid, } from "./convenience-functions"; diff --git a/src/util/convenience-functions.ts b/src/util/convenience-functions.ts index 7e9a69bf90..6c9eb3e388 100644 --- a/src/util/convenience-functions.ts +++ b/src/util/convenience-functions.ts @@ -1,5 +1,5 @@ -import { nanoid, customAlphabet } from "nanoid/non-secure"; import hash from "hash.js"; +import { customAlphabet, nanoid } from "nanoid/non-secure"; // Twip - twentieths of a point export const convertMillimetersToTwip = (millimeters: number): number => Math.floor((millimeters / 25.4) * 72 * 20); diff --git a/src/util/values.spec.ts b/src/util/values.spec.ts index 0506f9589d..e68713e7dd 100644 --- a/src/util/values.spec.ts +++ b/src/util/values.spec.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; + import { dateTimeValue, hexColorValue,