Skip to content

Commit

Permalink
Merge pull request #2403 from dolanmiu/feature/bump-eslint-plugin
Browse files Browse the repository at this point in the history
Upgrade @typescript-eslint/parser
  • Loading branch information
dolanmiu authored Nov 2, 2023
2 parents 8fbbd57 + 35702c3 commit f5f0218
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 175 deletions.
235 changes: 61 additions & 174 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@types/unzipper": "^0.10.4",
"@types/xml": "^1.0.8",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^5.36.1",
"@typescript-eslint/parser": "^6.9.1",
"@vitest/coverage-v8": "^0.33.0",
"@vitest/ui": "^0.33.0",
"cspell": "^7.3.8",
Expand Down
1 change: 1 addition & 0 deletions src/file/document/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ 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;
}
Expand Down
1 change: 1 addition & 0 deletions src/file/paragraph/properties.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// 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 { DocumentWrapper } from "../document-wrapper";
import { IShadingAttributesProperties, Shading } from "../shading";
Expand Down
1 change: 1 addition & 0 deletions src/file/paragraph/run/properties.ts
Original file line number Diff line number Diff line change
@@ -1,4 +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";
Expand Down
1 change: 1 addition & 0 deletions src/file/xml-components/imported-xml-component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe("ImportedXmlComponent", () => {
otherAttr: "2",
};
importedXmlComponent = new ImportedXmlComponent("w:test", attributes);
// eslint-disable-next-line functional/immutable-data
importedXmlComponent.push(new ImportedXmlComponent("w:child"));
});

Expand Down
2 changes: 2 additions & 0 deletions src/file/xml-components/imported-xml-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ 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);
}
}
Expand Down Expand Up @@ -60,6 +61,7 @@ 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));
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/file/xml-components/xml-component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,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);
Expand All @@ -43,6 +45,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",
Expand Down

0 comments on commit f5f0218

Please sign in to comment.