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 interface IContext {
export abstract class BaseXmlComponent {
protected readonly rootKey: string;
constructor(rootKey: string) {
public constructor(rootKey: string) {
this.rootKey = rootKey;
}

View File

@ -8,7 +8,7 @@ export abstract class XmlAttributeComponent<T> extends BaseXmlComponent {
protected root: T;
protected readonly xmlKeys?: AttributeMap<T>;
constructor(properties: T) {
public constructor(properties: T) {
super("_attr");
this.root = properties;
}

View File

@ -52,7 +52,7 @@ export class ImportedXmlComponent extends XmlComponent {
*/
// tslint:disable-next-line:variable-name
constructor(rootKey: string, _attr?: any) {
public constructor(rootKey: string, _attr?: any) {
super(rootKey);
if (_attr) {
this.root.push(new ImportedXmlComponentAttributes(_attr));
@ -69,7 +69,7 @@ export class ImportedXmlComponent extends XmlComponent {
*/
export class ImportedRootElementAttributes extends XmlComponent {
// tslint:disable-next-line:variable-name
constructor(private readonly _attr: any) {
public constructor(private readonly _attr: any) {
super("");
}

View File

@ -1,7 +1,7 @@
import { XmlComponent } from "@file/xml-components";
export abstract class InitializableXmlComponent extends XmlComponent {
constructor(rootKey: string, initComponent?: InitializableXmlComponent) {
public constructor(rootKey: string, initComponent?: InitializableXmlComponent) {
super(rootKey);
if (initComponent) {

View File

@ -13,7 +13,7 @@ import { hpsMeasureValue } from "@util/values";
// <xsd:attribute name="val" type="s:ST_OnOff"/>
// </xsd:complexType>
export class OnOffElement extends XmlComponent {
constructor(name: string, val: boolean | undefined = true) {
public constructor(name: string, val: boolean | undefined = true) {
super(name);
if (val !== true) {
this.root.push(new Attributes({ val }));
@ -27,7 +27,7 @@ export class OnOffElement extends XmlComponent {
// <xsd:attribute name="val" type="ST_HpsMeasure" use="required"/>
// </xsd:complexType>
export class HpsMeasureElement extends XmlComponent {
constructor(name: string, val: number | string) {
public constructor(name: string, val: number | string) {
super(name);
this.root.push(new Attributes({ val: hpsMeasureValue(val) }));
}
@ -39,7 +39,7 @@ export class HpsMeasureElement extends XmlComponent {
// <xsd:attribute name="val" type="s:ST_String" use="required"/>
// </xsd:complexType>
export class StringValueElement extends XmlComponent {
constructor(name: string, val: string) {
public constructor(name: string, val: string) {
super(name);
this.root.push(new Attributes({ val }));
}
@ -47,7 +47,7 @@ export class StringValueElement extends XmlComponent {
// This represents various number element types.
export class NumberValueElement extends XmlComponent {
constructor(name: string, val: number) {
public constructor(name: string, val: number) {
super(name);
this.root.push(new Attributes({ val }));
}
@ -58,7 +58,7 @@ export class NumberValueElement extends XmlComponent {
// new StringContainer("hello", "world")
// <hello>world</hello>
export class StringContainer extends XmlComponent {
constructor(name: string, val: string) {
public constructor(name: string, val: string) {
super(name);
this.root.push(val);
}

View File

@ -7,7 +7,7 @@ export abstract class XmlComponent extends BaseXmlComponent {
// tslint:disable-next-line:readonly-keyword no-any
protected root: (BaseXmlComponent | string | any)[];
constructor(rootKey: string) {
public constructor(rootKey: string) {
super(rootKey);
this.root = new Array<BaseXmlComponent | string>();
}