Use new eslint-plugin-functional instead of tslint-immutable
This commit is contained in:
@ -12,7 +12,7 @@ export interface ICommentOptions {
|
||||
}
|
||||
|
||||
export interface ICommentsOptions {
|
||||
readonly children: ICommentOptions[];
|
||||
readonly children: readonly ICommentOptions[];
|
||||
}
|
||||
|
||||
class CommentAttributes extends XmlAttributeComponent<{
|
||||
|
@ -40,7 +40,7 @@ describe("ImageRun", () => {
|
||||
const tree = new Formatter().format(currentImageRun, {
|
||||
file: {
|
||||
Media: {
|
||||
// tslint:disable-next-line: no-empty
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
addImage: () => {},
|
||||
},
|
||||
} as unknown as File,
|
||||
@ -290,7 +290,7 @@ describe("ImageRun", () => {
|
||||
const tree = new Formatter().format(currentImageRun, {
|
||||
file: {
|
||||
Media: {
|
||||
// tslint:disable-next-line: no-empty
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
addImage: () => {},
|
||||
},
|
||||
} as unknown as File,
|
||||
@ -519,6 +519,7 @@ describe("ImageRun", () => {
|
||||
});
|
||||
|
||||
it("should return UInt8Array if atob is present", () => {
|
||||
// eslint-disable-next-line functional/immutable-data
|
||||
global.atob = () => "atob result";
|
||||
|
||||
const currentImageRun = new ImageRun({
|
||||
@ -542,7 +543,7 @@ describe("ImageRun", () => {
|
||||
const tree = new Formatter().format(currentImageRun, {
|
||||
file: {
|
||||
Media: {
|
||||
// tslint:disable-next-line: no-empty
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
addImage: () => {},
|
||||
},
|
||||
} as unknown as File,
|
||||
@ -775,6 +776,7 @@ describe("ImageRun", () => {
|
||||
});
|
||||
|
||||
it("should use data as is if its not a string", () => {
|
||||
// eslint-disable-next-line functional/immutable-data
|
||||
global.atob = () => "atob result";
|
||||
|
||||
const currentImageRun = new ImageRun({
|
||||
@ -798,7 +800,7 @@ describe("ImageRun", () => {
|
||||
const tree = new Formatter().format(currentImageRun, {
|
||||
file: {
|
||||
Media: {
|
||||
// tslint:disable-next-line: no-empty
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
addImage: () => {},
|
||||
},
|
||||
} as unknown as File,
|
||||
|
@ -62,6 +62,7 @@ export class ImageRun extends Run {
|
||||
.map((c) => c.charCodeAt(0)),
|
||||
);
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
||||
const b = require("buf" + "fer");
|
||||
return new b.Buffer(dataURI, "base64");
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { Text } from "./run-components/text";
|
||||
import { TextAttributes } from "./text-attributes";
|
||||
|
||||
export interface IRunOptions extends IRunPropertiesOptions {
|
||||
readonly children?: (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[];
|
||||
readonly children?: readonly (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[];
|
||||
readonly break?: number;
|
||||
readonly text?: string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user