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

@ -18,7 +18,7 @@ export class AlignmentAttributes extends XmlAttributeComponent<{ readonly val: A
}
export class Alignment extends XmlComponent {
constructor(type: AlignmentType) {
public constructor(type: AlignmentType) {
super("w:jc");
this.root.push(new AlignmentAttributes({ val: type }));
}

View File

@ -10,7 +10,7 @@ export interface IBordersOptions {
}
export class Border extends IgnoreIfEmptyXmlComponent {
constructor(options: IBordersOptions) {
public constructor(options: IBordersOptions) {
super("w:pBdr");
if (options.top) {
@ -32,7 +32,7 @@ export class Border extends IgnoreIfEmptyXmlComponent {
}
export class ThematicBreak extends XmlComponent {
constructor() {
public constructor() {
super("w:pBdr");
const bottom = new BorderElement("w:bottom", {
color: "auto",

View File

@ -9,7 +9,7 @@ enum BreakType {
}
class Break extends XmlComponent {
constructor(type: BreakType) {
public constructor(type: BreakType) {
super("w:br");
this.root.push(
new Attributes({
@ -20,14 +20,14 @@ class Break extends XmlComponent {
}
export class PageBreak extends Run {
constructor() {
public constructor() {
super({});
this.root.push(new Break(BreakType.PAGE));
}
}
export class ColumnBreak extends Run {
constructor() {
public constructor() {
super({});
this.root.push(new Break(BreakType.COLUMN));
}
@ -37,7 +37,7 @@ export class ColumnBreak extends Run {
* Add page break before the paragraph if there is no one added before.
*/
export class PageBreakBefore extends XmlComponent {
constructor() {
public constructor() {
super("w:pageBreakBefore");
}
}

View File

@ -41,7 +41,7 @@ class IndentAttributes extends XmlAttributeComponent<IIndentAttributesProperties
// ...
// <xsd:element name="ind" type="CT_Ind" minOccurs="0"/>
export class Indent extends XmlComponent {
constructor({ start, end, left, right, hanging, firstLine }: IIndentAttributesProperties) {
public constructor({ start, end, left, right, hanging, firstLine }: IIndentAttributesProperties) {
super("w:ind");
this.root.push(
new IndentAttributes({

View File

@ -25,7 +25,7 @@ class SpacingAttributes extends XmlAttributeComponent<ISpacingProperties> {
}
export class Spacing extends XmlComponent {
constructor(options: ISpacingProperties) {
public constructor(options: ISpacingProperties) {
super("w:spacing");
this.root.push(new SpacingAttributes(options));
}

View File

@ -11,7 +11,7 @@ export enum HeadingLevel {
}
export class Style extends XmlComponent {
constructor(styleId: string) {
public constructor(styleId: string) {
super("w:pStyle");
this.root.push(
new Attributes({

View File

@ -2,7 +2,7 @@
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
export class TabStop extends XmlComponent {
constructor(type: TabStopType, position: number, leader?: LeaderType) {
public constructor(type: TabStopType, position: number, leader?: LeaderType) {
super("w:tabs");
this.root.push(new TabStopItem(type, position, leader));
}
@ -41,7 +41,7 @@ export class TabAttributes extends XmlAttributeComponent<{
}
export class TabStopItem extends XmlComponent {
constructor(value: TabStopType, position: string | number, leader?: LeaderType) {
public constructor(value: TabStopType, position: string | number, leader?: LeaderType) {
super("w:tab");
this.root.push(
new TabAttributes({

View File

@ -1,7 +1,7 @@
import { Attributes, XmlComponent } from "@file/xml-components";
export class NumberProperties extends XmlComponent {
constructor(numberId: number | string, indentLevel: number) {
public constructor(numberId: number | string, indentLevel: number) {
super("w:numPr");
this.root.push(new IndentLevel(indentLevel));
this.root.push(new NumberId(numberId));
@ -9,7 +9,7 @@ export class NumberProperties extends XmlComponent {
}
class IndentLevel extends XmlComponent {
constructor(level: number) {
public constructor(level: number) {
super("w:ilvl");
if (level > 9) {
@ -27,7 +27,7 @@ class IndentLevel extends XmlComponent {
}
class NumberId extends XmlComponent {
constructor(id: number | string) {
public constructor(id: number | string) {
super("w:numId");
this.root.push(
new Attributes({