Use new eslint-plugin-functional instead of tslint-immutable

This commit is contained in:
Dolan Miu
2022-09-15 20:00:50 +01:00
parent d020d59b11
commit e90d97b813
70 changed files with 321 additions and 436 deletions

View File

@ -33,15 +33,17 @@ export interface ISectionOptions {
readonly even?: Footer;
};
readonly properties?: ISectionPropertiesOptions;
readonly children: (Paragraph | Table | TableOfContents)[];
readonly children: readonly (Paragraph | Table | TableOfContents)[];
}
export class File {
// tslint:disable-next-line:readonly-keyword
// eslint-disable-next-line functional/immutable-data
private currentRelationshipId: number = 1;
private readonly documentWrapper: DocumentWrapper;
// eslint-disable-next-line functional/immutable-data
private readonly headers: IDocumentHeader[] = [];
// eslint-disable-next-line functional/immutable-data
private readonly footers: IDocumentFooter[] = [];
private readonly coreProperties: CoreProperties;
private readonly numbering: Numbering;
@ -268,11 +270,11 @@ export class File {
return this.fileRelationships;
}
public get Headers(): HeaderWrapper[] {
public get Headers(): readonly HeaderWrapper[] {
return this.headers.map((item) => item.header);
}
public get Footers(): FooterWrapper[] {
public get Footers(): readonly FooterWrapper[] {
return this.footers.map((item) => item.footer);
}