Initial ESlint conversion
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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({
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -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({
|
||||
|
@ -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;
|
||||
|
@ -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(
|
||||
|
@ -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 }));
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ export const sectionPageSizeDefaults = {
|
||||
};
|
||||
|
||||
export class SectionProperties extends XmlComponent {
|
||||
constructor({
|
||||
public constructor({
|
||||
page: {
|
||||
size: {
|
||||
width = sectionPageSizeDefaults.WIDTH,
|
||||
|
@ -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(
|
||||
|
@ -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({
|
||||
|
Reference in New Issue
Block a user