Initial ESlint conversion
This commit is contained in:
@ -13,7 +13,7 @@ export class DocumentDefaults extends XmlComponent {
|
||||
private readonly runPropertiesDefaults: RunPropertiesDefaults;
|
||||
private readonly paragraphPropertiesDefaults: ParagraphPropertiesDefaults;
|
||||
|
||||
constructor(options: IDocumentDefaultsOptions) {
|
||||
public constructor(options: IDocumentDefaultsOptions) {
|
||||
super("w:docDefaults");
|
||||
|
||||
this.runPropertiesDefaults = new RunPropertiesDefaults(options.run);
|
||||
|
@ -2,7 +2,7 @@ import { IParagraphStylePropertiesOptions, ParagraphProperties } from "@file/par
|
||||
import { XmlComponent } from "@file/xml-components";
|
||||
|
||||
export class ParagraphPropertiesDefaults extends XmlComponent {
|
||||
constructor(options?: IParagraphStylePropertiesOptions) {
|
||||
public constructor(options?: IParagraphStylePropertiesOptions) {
|
||||
super("w:pPrDefault");
|
||||
this.root.push(new ParagraphProperties(options));
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { IRunStylePropertiesOptions, RunProperties } from "@file/paragraph/run/p
|
||||
import { XmlComponent } from "@file/xml-components";
|
||||
|
||||
export class RunPropertiesDefaults extends XmlComponent {
|
||||
constructor(options?: IRunStylePropertiesOptions) {
|
||||
public constructor(options?: IRunStylePropertiesOptions) {
|
||||
super("w:rPrDefault");
|
||||
|
||||
this.root.push(new RunProperties(options));
|
||||
|
@ -19,7 +19,7 @@ export class LatentStyleExceptionAttributes extends XmlAttributeComponent<ILaten
|
||||
}
|
||||
|
||||
export class LatentStyleException extends XmlComponent {
|
||||
constructor(attributes: ILatentStyleExceptionAttributesProperties) {
|
||||
public constructor(attributes: ILatentStyleExceptionAttributesProperties) {
|
||||
super("w:lsdException");
|
||||
this.root.push(new LatentStyleExceptionAttributes(attributes));
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
|
||||
import { LatentStyleException } from "./exceptions";
|
||||
|
||||
export class LatentStyles extends XmlComponent {
|
||||
constructor(latentException?: LatentStyleException) {
|
||||
public constructor(latentException?: LatentStyleException) {
|
||||
super("w:latentStyles");
|
||||
|
||||
if (latentException) {
|
||||
|
@ -14,7 +14,7 @@ export interface ICharacterStyleOptions extends IBaseCharacterStyleOptions {
|
||||
export class StyleForCharacter extends Style {
|
||||
private readonly runProperties: RunProperties;
|
||||
|
||||
constructor(options: ICharacterStyleOptions) {
|
||||
public constructor(options: ICharacterStyleOptions) {
|
||||
super(
|
||||
{ type: "character", styleId: options.id },
|
||||
{
|
||||
|
@ -9,14 +9,14 @@ class ComponentAttributes extends XmlAttributeComponent<{
|
||||
}
|
||||
|
||||
export class Name extends XmlComponent {
|
||||
constructor(value: string) {
|
||||
public constructor(value: string) {
|
||||
super("w:name");
|
||||
this.root.push(new ComponentAttributes({ val: value }));
|
||||
}
|
||||
}
|
||||
|
||||
export class UiPriority extends XmlComponent {
|
||||
constructor(value: number) {
|
||||
public constructor(value: number) {
|
||||
super("w:uiPriority");
|
||||
this.root.push(new ComponentAttributes({ val: decimalNumber(value) }));
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { IBaseCharacterStyleOptions, StyleForCharacter } from "./character-style
|
||||
import { IBaseParagraphStyleOptions, IParagraphStyleOptions, StyleForParagraph } from "./paragraph-style";
|
||||
|
||||
export class HeadingStyle extends StyleForParagraph {
|
||||
constructor(options: IParagraphStyleOptions) {
|
||||
public constructor(options: IParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
basedOn: "Normal",
|
||||
@ -17,7 +17,7 @@ export class HeadingStyle extends StyleForParagraph {
|
||||
}
|
||||
|
||||
export class TitleStyle extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Title",
|
||||
@ -27,7 +27,7 @@ export class TitleStyle extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class Heading1Style extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Heading1",
|
||||
@ -37,7 +37,7 @@ export class Heading1Style extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class Heading2Style extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Heading2",
|
||||
@ -47,7 +47,7 @@ export class Heading2Style extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class Heading3Style extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Heading3",
|
||||
@ -57,7 +57,7 @@ export class Heading3Style extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class Heading4Style extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Heading4",
|
||||
@ -67,7 +67,7 @@ export class Heading4Style extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class Heading5Style extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Heading5",
|
||||
@ -77,7 +77,7 @@ export class Heading5Style extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class Heading6Style extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Heading6",
|
||||
@ -87,7 +87,7 @@ export class Heading6Style extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class StrongStyle extends HeadingStyle {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Strong",
|
||||
@ -97,7 +97,7 @@ export class StrongStyle extends HeadingStyle {
|
||||
}
|
||||
|
||||
export class ListParagraph extends StyleForParagraph {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "ListParagraph",
|
||||
@ -109,7 +109,7 @@ export class ListParagraph extends StyleForParagraph {
|
||||
}
|
||||
|
||||
export class FootnoteText extends StyleForParagraph {
|
||||
constructor(options: IBaseParagraphStyleOptions) {
|
||||
public constructor(options: IBaseParagraphStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "FootnoteText",
|
||||
@ -134,7 +134,7 @@ export class FootnoteText extends StyleForParagraph {
|
||||
}
|
||||
|
||||
export class FootnoteReferenceStyle extends StyleForCharacter {
|
||||
constructor(options: IBaseCharacterStyleOptions) {
|
||||
public constructor(options: IBaseCharacterStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "FootnoteReference",
|
||||
@ -149,7 +149,7 @@ export class FootnoteReferenceStyle extends StyleForCharacter {
|
||||
}
|
||||
|
||||
export class FootnoteTextChar extends StyleForCharacter {
|
||||
constructor(options: IBaseCharacterStyleOptions) {
|
||||
public constructor(options: IBaseCharacterStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "FootnoteTextChar",
|
||||
@ -165,7 +165,7 @@ export class FootnoteTextChar extends StyleForCharacter {
|
||||
}
|
||||
|
||||
export class HyperlinkStyle extends StyleForCharacter {
|
||||
constructor(options: IBaseCharacterStyleOptions) {
|
||||
public constructor(options: IBaseCharacterStyleOptions) {
|
||||
super({
|
||||
...options,
|
||||
id: "Hyperlink",
|
||||
|
@ -16,7 +16,7 @@ export class StyleForParagraph extends Style {
|
||||
private readonly paragraphProperties: ParagraphProperties;
|
||||
private readonly runProperties: RunProperties;
|
||||
|
||||
constructor(options: IParagraphStyleOptions) {
|
||||
public constructor(options: IParagraphStyleOptions) {
|
||||
super({ type: "paragraph", styleId: options.id }, options);
|
||||
|
||||
this.paragraphProperties = new ParagraphProperties(options.paragraph);
|
||||
|
@ -60,7 +60,7 @@ class StyleAttributes extends XmlAttributeComponent<IStyleAttributes> {
|
||||
}
|
||||
|
||||
export class Style extends XmlComponent {
|
||||
constructor(attributes: IStyleAttributes, options: IStyleOptions) {
|
||||
public constructor(attributes: IStyleAttributes, options: IStyleOptions) {
|
||||
super("w:style");
|
||||
this.root.push(new StyleAttributes(attributes));
|
||||
if (options.name) {
|
||||
|
@ -20,7 +20,7 @@ export interface IStylesOptions {
|
||||
// </xsd:sequence>
|
||||
// </xsd:complexType>
|
||||
export class Styles extends XmlComponent {
|
||||
constructor(options: IStylesOptions) {
|
||||
public constructor(options: IStylesOptions) {
|
||||
super("w:styles");
|
||||
|
||||
if (options.initialStyles) {
|
||||
|
Reference in New Issue
Block a user