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

@ -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,