Initial ESlint conversion

This commit is contained in:
Dolan Miu
2022-08-31 07:52:27 +01:00
parent d7a9cb2168
commit 1bdf9a4987
210 changed files with 4685 additions and 333 deletions

View File

@ -6,7 +6,7 @@ import { ISectionPropertiesOptions, SectionProperties } from "./section-properti
export class Body extends XmlComponent {
private readonly sections: SectionProperties[] = [];
constructor() {
public constructor() {
super("w:body");
}

View File

@ -14,7 +14,7 @@ export class ColumnAttributes extends XmlAttributeComponent<IColumnAttributes> {
}
export class Column extends XmlComponent {
constructor({ width, space }: IColumnAttributes) {
public constructor({ width, space }: IColumnAttributes) {
super("w:col");
this.root.push(
new ColumnAttributes({

View File

@ -30,7 +30,7 @@ export class ColumnsAttributes extends XmlAttributeComponent<IColumnsAttributes>
}
export class Columns extends XmlComponent {
constructor({ space, count, separate, equalWidth, children }: IColumnsAttributes) {
public constructor({ space, count, separate, equalWidth, children }: IColumnsAttributes) {
super("w:cols");
this.root.push(
new ColumnsAttributes({

View File

@ -38,7 +38,7 @@ export class DocGridAttributes extends XmlAttributeComponent<IDocGridAttributesP
}
export class DocumentGrid extends XmlComponent {
constructor(linePitch: number, charSpace?: number, type?: DocumentGridType) {
public constructor(linePitch: number, charSpace?: number, type?: DocumentGridType) {
super("w:docGrid");
this.root.push(

View File

@ -52,7 +52,7 @@ export enum HeaderFooterType {
FOOTER = "w:footerReference",
}
export class HeaderFooterReference extends XmlComponent {
constructor(type: HeaderFooterType, options: IHeaderFooterOptions) {
public constructor(type: HeaderFooterType, options: IHeaderFooterOptions) {
super(type);
this.root.push(

View File

@ -39,7 +39,7 @@ export class LineNumberAttributes extends XmlAttributeComponent<ILineNumberAttri
}
export class LineNumberType extends XmlComponent {
constructor({ countBy, start, restart, distance }: ILineNumberAttributes) {
public constructor({ countBy, start, restart, distance }: ILineNumberAttributes) {
super("w:lnNumType");
this.root.push(
new LineNumberAttributes({

View File

@ -71,7 +71,7 @@ class PageBordersAttributes extends XmlAttributeComponent<IPageBorderAttributes>
// <xsd:attribute name="offsetFrom" type="ST_PageBorderOffset" use="optional" default="text"/>
// </xsd:complexType>
export class PageBorders extends IgnoreIfEmptyXmlComponent {
constructor(options?: IPageBordersOptions) {
public constructor(options?: IPageBordersOptions) {
super("w:pgBorders");
if (!options) {

View File

@ -33,7 +33,7 @@ export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttri
}
export class PageMargin extends XmlComponent {
constructor(
public constructor(
top: number | string,
right: number | string,
bottom: number | string,

View File

@ -41,7 +41,7 @@ export class PageNumberTypeAttributes extends XmlAttributeComponent<IPageNumberT
};
}
export class PageNumberType extends XmlComponent {
constructor({ start, formatType, separator }: IPageNumberTypeAttributes) {
public constructor({ start, formatType, separator }: IPageNumberTypeAttributes) {
super("w:pgNumType");
this.root.push(
new PageNumberTypeAttributes({

View File

@ -33,7 +33,7 @@ export class PageSizeAttributes extends XmlAttributeComponent<IPageSizeAttribute
}
export class PageSize extends XmlComponent {
constructor(width: number | string, height: number | string, orientation: PageOrientation) {
public constructor(width: number | string, height: number | string, orientation: PageOrientation) {
super("w:pgSz");
const flip = orientation === PageOrientation.LANDSCAPE;

View File

@ -10,7 +10,7 @@ class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val:
}
export class PageTextDirection extends XmlComponent {
constructor(value: PageTextDirectionType) {
public constructor(value: PageTextDirectionType) {
super("w:textDirection");
this.root.push(

View File

@ -30,7 +30,7 @@ export class SectionTypeAttributes extends XmlAttributeComponent<{
}
export class Type extends XmlComponent {
constructor(value: SectionType) {
public constructor(value: SectionType) {
super("w:type");
this.root.push(new SectionTypeAttributes({ val: value }));
}

View File

@ -92,7 +92,7 @@ export const sectionPageSizeDefaults = {
};
export class SectionProperties extends XmlComponent {
constructor({
public constructor({
page: {
size: {
width = sectionPageSizeDefaults.WIDTH,

View File

@ -63,7 +63,7 @@ export interface IDocumentBackgroundOptions {
// </xsd:complexType>
export class DocumentBackground extends XmlComponent {
constructor(options: IDocumentBackgroundOptions) {
public constructor(options: IDocumentBackgroundOptions) {
super("w:background");
this.root.push(

View File

@ -33,7 +33,7 @@ export interface IDocumentOptions {
export class Document extends XmlComponent {
private readonly body: Body;
constructor(options: IDocumentOptions) {
public constructor(options: IDocumentOptions) {
super("w:document");
this.root.push(
new DocumentAttributes({