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] <support@github.com>

* Upgrade EsLint

* Fix all new lint errors

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
This commit is contained in:
dependabot[bot]
2024-10-21 03:57:15 +01:00
committed by GitHub
parent 9cff0b2a57
commit 2381ba8a05
214 changed files with 1583 additions and 1586 deletions

View File

@ -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<T extends PatchDocumentOutputType = PatchDocumentOutputType> = {
readonly outputType: T;
readonly data: InputDataType;
readonly patches: { readonly [key: string]: IPatch };
readonly patches: Readonly<Record<string, IPatch>>;
readonly keepOriginalStyles?: boolean;
};
@ -134,7 +134,6 @@ export const patchDocument = async <T extends PatchDocumentOutputType = PatchDoc
// This algorithm is limited to one patch per text run
// Once it cannot find any more occurrences, it will throw an error, and then we break out of the loop
// https://github.com/dolanmiu/docx/issues/2267
// eslint-disable-next-line no-constant-condition
while (true) {
try {
replacer({