diff --git a/src/file/index.ts b/src/file/index.ts index 3d86dafdb2..42a9ca3b76 100644 --- a/src/file/index.ts +++ b/src/file/index.ts @@ -5,4 +5,4 @@ export * from "./numbering"; export * from "./media"; export * from "./drawing"; export * from "./styles"; -export * from "./xml-components"; \ No newline at end of file +export * from "./xml-components"; diff --git a/src/file/media/media.ts b/src/file/media/media.ts index 7f5c960a55..69435eb21f 100644 --- a/src/file/media/media.ts +++ b/src/file/media/media.ts @@ -11,7 +11,7 @@ export class Media { this.map = new Map(); } - private createMedia(key: string, relationshipsCount, dimensions, data: fs.ReadStream | Buffer, filePath?: string, ) { + private createMedia(key: string, relationshipsCount, dimensions, data: fs.ReadStream | Buffer, filePath?: string) { const imageData = { referenceId: this.map.size + relationshipsCount + 1, stream: data, @@ -54,12 +54,12 @@ export class Media { if (width && height) { dimensions = { width: width, - height: height - } + height: height, + }; } else { dimensions = sizeOf(data); } - + return this.createMedia(key, relationshipsCount, dimensions, data); } diff --git a/src/file/numbering/index.ts b/src/file/numbering/index.ts index d7a38258d3..a861d336ee 100644 --- a/src/file/numbering/index.ts +++ b/src/file/numbering/index.ts @@ -1,2 +1,2 @@ export * from "./numbering"; -export * from "./abstract-numbering"; \ No newline at end of file +export * from "./abstract-numbering"; diff --git a/src/file/numbering/numbering.ts b/src/file/numbering/numbering.ts index 517766987a..a659643b38 100644 --- a/src/file/numbering/numbering.ts +++ b/src/file/numbering/numbering.ts @@ -49,8 +49,8 @@ export class Numbering extends XmlComponent { } public prepForXml(): IXmlableObject { - this.abstractNumbering.forEach(x => this.root.push(x)); - this.concreteNumbering.forEach(x => this.root.push(x)); + this.abstractNumbering.forEach((x) => this.root.push(x)); + this.concreteNumbering.forEach((x) => this.root.push(x)); return super.prepForXml(); } } diff --git a/src/file/paragraph/paragraph.spec.ts b/src/file/paragraph/paragraph.spec.ts index 0aa17b558a..863d0ceb3d 100644 --- a/src/file/paragraph/paragraph.spec.ts +++ b/src/file/paragraph/paragraph.spec.ts @@ -168,10 +168,12 @@ describe("Paragraph", () => { expect(tree).to.deep.equal({ "w:p": [ { - "w:pPr": [{ - "w:pageBreakBefore": [] - }], - } + "w:pPr": [ + { + "w:pageBreakBefore": [], + }, + ], + }, ], }); }); diff --git a/src/file/styles/external-styles-factory.spec.ts b/src/file/styles/external-styles-factory.spec.ts index 0957c25d9f..861a6f05d8 100644 --- a/src/file/styles/external-styles-factory.spec.ts +++ b/src/file/styles/external-styles-factory.spec.ts @@ -154,7 +154,6 @@ describe("External styles factory", () => { ], rootKey: "w:style", }); - }); }); }); diff --git a/src/file/styles/external-styles-factory.ts b/src/file/styles/external-styles-factory.ts index 703f017922..315eb7452c 100644 --- a/src/file/styles/external-styles-factory.ts +++ b/src/file/styles/external-styles-factory.ts @@ -44,9 +44,7 @@ export class ExternalStylesFactory { }); // convert the styles one by one - xmlStyles["w:style"] - .map((style) => this.convertElement("w:style", style)) - .forEach(importedStyle.push.bind(importedStyle)); + xmlStyles["w:style"].map((style) => this.convertElement("w:style", style)).forEach(importedStyle.push.bind(importedStyle)); return importedStyle; } diff --git a/src/file/table/index.ts b/src/file/table/index.ts index ef3d91a47b..dfba175857 100644 --- a/src/file/table/index.ts +++ b/src/file/table/index.ts @@ -1,2 +1,2 @@ export * from "./table"; -export * from './table-cell'; \ No newline at end of file +export * from "./table-cell"; diff --git a/src/file/table/table-cell.spec.ts b/src/file/table/table-cell.spec.ts index 596150d6d5..01c81848bb 100644 --- a/src/file/table/table-cell.spec.ts +++ b/src/file/table/table-cell.spec.ts @@ -169,13 +169,13 @@ describe("TableCellWidth", () => { expect(tree).to.deep.equal({ "w:tcW": [ { - "_attr": { + _attr: { "w:type": "dxa", - "w:w": 100 - } - } - ] + "w:w": 100, + }, + }, + ], }); }); }); -}); \ No newline at end of file +}); diff --git a/src/file/xml-components/index.ts b/src/file/xml-components/index.ts index 85e7e383f7..917933869e 100644 --- a/src/file/xml-components/index.ts +++ b/src/file/xml-components/index.ts @@ -1,5 +1,5 @@ export * from "./xml-component"; export * from "./attributes"; export * from "./default-attributes"; -export * from './imported-xml-component'; +export * from "./imported-xml-component"; export * from "./xmlable-object"; diff --git a/src/file/xml-components/xml-component.spec.ts b/src/file/xml-components/xml-component.spec.ts index 25bf442bc9..8b4f983388 100644 --- a/src/file/xml-components/xml-component.spec.ts +++ b/src/file/xml-components/xml-component.spec.ts @@ -24,9 +24,9 @@ describe("XmlComponent", () => { const child = new TestComponent("w:test1"); child.delete(); xmlComponent.addChildElement(child); - + const xml = xmlComponent.prepForXml(); - assert.equal(xml['w:test'].length, 0); + assert.equal(xml["w:test"].length, 0); }); }); }); diff --git a/src/file/xml-components/xml-component.ts b/src/file/xml-components/xml-component.ts index b41bb01267..bce354a422 100644 --- a/src/file/xml-components/xml-component.ts +++ b/src/file/xml-components/xml-component.ts @@ -12,7 +12,7 @@ export abstract class XmlComponent extends BaseXmlComponent { public prepForXml(): IXmlableObject { const children = this.root - .filter(c => { + .filter((c) => { if (c instanceof BaseXmlComponent) { return !c.isDeleted; }