Updated lint rules
This commit is contained in:
@ -3,9 +3,9 @@ import { Paragraph, ParagraphProperties } from "../..";
|
||||
import { SectionProperties, SectionPropertiesOptions } from "./section-properties";
|
||||
|
||||
export class Body extends XmlComponent {
|
||||
private defaultSection: SectionProperties;
|
||||
private readonly defaultSection: SectionProperties;
|
||||
|
||||
private sections: SectionProperties[] = [];
|
||||
private readonly sections: SectionProperties[] = [];
|
||||
|
||||
constructor(sectionPropertiesOptions?: SectionPropertiesOptions) {
|
||||
super("w:body");
|
||||
|
@ -23,7 +23,8 @@ export type SectionPropertiesOptions = IPageSizeAttributes &
|
||||
IPageNumberTypeAttributes;
|
||||
|
||||
export class SectionProperties extends XmlComponent {
|
||||
private options: SectionPropertiesOptions;
|
||||
private readonly options: SectionPropertiesOptions;
|
||||
|
||||
constructor(options?: SectionPropertiesOptions) {
|
||||
super("w:sectPr");
|
||||
|
||||
|
@ -28,7 +28,7 @@ const defaultDrawingOptions: IDrawingOptions = {
|
||||
};
|
||||
|
||||
export class Drawing extends XmlComponent {
|
||||
private inline: Inline;
|
||||
private readonly inline: Inline;
|
||||
|
||||
constructor(imageData: IMediaData, drawingOptions?: IDrawingOptions) {
|
||||
super("w:drawing");
|
||||
|
@ -2,7 +2,7 @@ import { XmlComponent } from "file/xml-components";
|
||||
import { ExtentAttributes } from "./extent-attributes";
|
||||
|
||||
export class Extent extends XmlComponent {
|
||||
private attributes: ExtentAttributes;
|
||||
private readonly attributes: ExtentAttributes;
|
||||
|
||||
constructor(x: number, y: number) {
|
||||
super("wp:extent");
|
||||
|
@ -3,7 +3,7 @@ import { GraphicDataAttributes } from "./graphic-data-attribute";
|
||||
import { Pic } from "./pic";
|
||||
|
||||
export class GraphicData extends XmlComponent {
|
||||
private pic: Pic;
|
||||
private readonly pic: Pic;
|
||||
|
||||
constructor(referenceId: number, x: number, y: number) {
|
||||
super("a:graphicData");
|
||||
|
@ -6,7 +6,7 @@ import { PicAttributes } from "./pic-attributes";
|
||||
import { ShapeProperties } from "./shape-properties/shape-properties";
|
||||
|
||||
export class Pic extends XmlComponent {
|
||||
private shapeProperties: ShapeProperties;
|
||||
private readonly shapeProperties: ShapeProperties;
|
||||
|
||||
constructor(referenceId: number, x: number, y: number) {
|
||||
super("pic:pic");
|
||||
|
@ -3,7 +3,7 @@ import { XmlComponent } from "file/xml-components";
|
||||
import { ExtentsAttributes } from "./extents-attributes";
|
||||
|
||||
export class Extents extends XmlComponent {
|
||||
private attributes: ExtentsAttributes;
|
||||
private readonly attributes: ExtentsAttributes;
|
||||
|
||||
constructor(x: number, y: number) {
|
||||
super("a:ext");
|
||||
|
@ -4,7 +4,7 @@ import { Extents } from "./extents/extents";
|
||||
import { Offset } from "./offset/off";
|
||||
|
||||
export class Form extends XmlComponent {
|
||||
private extents: Extents;
|
||||
private readonly extents: Extents;
|
||||
|
||||
constructor(x: number, y: number) {
|
||||
super("a:xfrm");
|
||||
|
@ -7,7 +7,7 @@ import { PresetGeometry } from "./preset-geometry/preset-geometry";
|
||||
import { ShapePropertiesAttributes } from "./shape-properties-attributes";
|
||||
|
||||
export class ShapeProperties extends XmlComponent {
|
||||
private form: Form;
|
||||
private readonly form: Form;
|
||||
|
||||
constructor(x: number, y: number) {
|
||||
super("pic:spPr");
|
||||
|
@ -12,7 +12,7 @@ class GraphicAttributes extends XmlAttributeComponent<IGraphicProperties> {
|
||||
}
|
||||
|
||||
export class Graphic extends XmlComponent {
|
||||
private data: GraphicData;
|
||||
private readonly data: GraphicData;
|
||||
|
||||
constructor(referenceId: number, x: number, y: number) {
|
||||
super("a:graphic");
|
||||
|
@ -9,10 +9,10 @@ import { Graphic } from "./../inline/graphic";
|
||||
import { InlineAttributes } from "./inline-attributes";
|
||||
|
||||
export class Inline extends XmlComponent {
|
||||
private extent: Extent;
|
||||
private graphic: Graphic;
|
||||
private readonly extent: Extent;
|
||||
private readonly graphic: Graphic;
|
||||
|
||||
constructor(referenceId: number, private dimensions: IMediaDataDimensions) {
|
||||
constructor(referenceId: number, private readonly dimensions: IMediaDataDimensions) {
|
||||
super("wp:inline");
|
||||
|
||||
this.root.push(
|
||||
|
@ -5,7 +5,8 @@ import { Table } from "../table";
|
||||
import { FooterAttributes } from "./footer-attributes";
|
||||
|
||||
export class Footer extends XmlComponent {
|
||||
private refId: number;
|
||||
private readonly refId: number;
|
||||
|
||||
constructor(referenceNumber: number) {
|
||||
super("w:ftr");
|
||||
this.refId = referenceNumber;
|
||||
|
@ -5,9 +5,11 @@ import { Table } from "../table";
|
||||
import { HeaderAttributes } from "./header-attributes";
|
||||
|
||||
export class Header extends XmlComponent {
|
||||
private refId: number;
|
||||
private readonly refId: number;
|
||||
|
||||
constructor(referenceNumber: number) {
|
||||
super("w:hdr");
|
||||
|
||||
this.refId = referenceNumber;
|
||||
this.root.push(
|
||||
new HeaderAttributes({
|
||||
|
@ -7,8 +7,8 @@ import { Num } from "./num";
|
||||
export class Numbering extends XmlComponent {
|
||||
private nextId: number;
|
||||
|
||||
private abstractNumbering: XmlComponent[] = [];
|
||||
private concreteNumbering: XmlComponent[] = [];
|
||||
private readonly abstractNumbering: XmlComponent[] = [];
|
||||
private readonly concreteNumbering: XmlComponent[] = [];
|
||||
|
||||
constructor() {
|
||||
super("w:numbering");
|
||||
|
@ -19,7 +19,7 @@ import { ParagraphProperties } from "./properties";
|
||||
import { PictureRun, Run, TextRun } from "./run";
|
||||
|
||||
export class Paragraph extends XmlComponent {
|
||||
private properties: ParagraphProperties;
|
||||
private readonly properties: ParagraphProperties;
|
||||
|
||||
constructor(text?: string) {
|
||||
super("w:p");
|
||||
|
@ -4,7 +4,7 @@ import { IMediaData } from "../../media/data";
|
||||
import { Run } from "../run";
|
||||
|
||||
export class PictureRun extends Run {
|
||||
private drawing: Drawing;
|
||||
private readonly drawing: Drawing;
|
||||
|
||||
constructor(imageData: IMediaData, drawingOptions?: IDrawingOptions) {
|
||||
super();
|
||||
|
@ -144,7 +144,8 @@ export class TableCell extends XmlComponent {
|
||||
}
|
||||
|
||||
export class TableCellProperties extends XmlComponent {
|
||||
private cellBorder: TableCellBorders;
|
||||
private readonly cellBorder: TableCellBorders;
|
||||
|
||||
constructor() {
|
||||
super("w:tcPr");
|
||||
this.cellBorder = new TableCellBorders();
|
||||
|
Reference in New Issue
Block a user