Initial ESlint conversion
This commit is contained in:
@ -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 }));
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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({
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
Reference in New Issue
Block a user