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

@ -10,7 +10,7 @@ export class Bookmark {
public readonly children: ParagraphChild[];
public readonly end: BookmarkEnd;
constructor(options: { readonly id: string; readonly children: ParagraphChild[] }) {
public constructor(options: { readonly id: string; readonly children: ParagraphChild[] }) {
const linkId = uniqueNumericId();
this.start = new BookmarkStart(options.id, linkId);
@ -52,7 +52,7 @@ export class Bookmark {
// </xsd:complexType>
export class BookmarkStart extends XmlComponent {
constructor(id: string, linkId: number) {
public constructor(id: string, linkId: number) {
super("w:bookmarkStart");
const attributes = new BookmarkStartAttributes({
@ -64,7 +64,7 @@ export class BookmarkStart extends XmlComponent {
}
export class BookmarkEnd extends XmlComponent {
constructor(linkId: number) {
public constructor(linkId: number) {
super("w:bookmarkEnd");
const attributes = new BookmarkEndAttributes({

View File

@ -13,7 +13,7 @@ export enum HyperlinkType {
export class ConcreteHyperlink extends XmlComponent {
public readonly linkId: string;
constructor(children: ParagraphChild[], relationshipId: string, anchor?: string) {
public constructor(children: ParagraphChild[], relationshipId: string, anchor?: string) {
super("w:hyperlink");
this.linkId = relationshipId;
@ -33,13 +33,13 @@ export class ConcreteHyperlink extends XmlComponent {
}
export class InternalHyperlink extends ConcreteHyperlink {
constructor(options: { readonly children: ParagraphChild[]; readonly anchor: string }) {
public constructor(options: { readonly children: ParagraphChild[]; readonly anchor: string }) {
super(options.children, uniqueId(), options.anchor);
}
}
export class ExternalHyperlink extends XmlComponent {
constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) {
public constructor(public readonly options: { readonly children: ParagraphChild[]; readonly link: string }) {
super("w:externalHyperlink");
}
}

View File

@ -2,7 +2,7 @@
import { Attributes, XmlComponent } from "@file/xml-components";
export class OutlineLevel extends XmlComponent {
constructor(public readonly level: number) {
public constructor(public readonly level: number) {
super("w:outlineLvl");
this.root.push(

View File

@ -5,7 +5,7 @@ import { TextAttributes } from "../run/text-attributes";
import { IPageReferenceOptions } from "./pageref-properties";
export class PageReferenceFieldInstruction extends XmlComponent {
constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
public constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));

View File

@ -5,7 +5,7 @@ import { PageReferenceFieldInstruction } from "./pageref-field-instruction";
import type { IPageReferenceOptions } from "./pageref-properties";
export class PageReference extends Run {
constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
public constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
super({
children: [new Begin(true), new PageReferenceFieldInstruction(bookmarkId, options), new End()],
});