Skip to content

Commit 7cf1c90

Browse files
committed
Fix stale linting issues
1 parent cc1f249 commit 7cf1c90

13 files changed

Lines changed: 21 additions & 27 deletions

File tree

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/Utils.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ export class AVComponentUtils {
5959
canvases: Canvas[],
6060
target: string
6161
): string | undefined {
62-
let t: number[] | null = Utils.getTemporalComponent(target);
62+
const t: number[] | null = Utils.getTemporalComponent(target);
6363

6464
if (t) {
6565
let offset: number = 0;
66-
let targetWithoutTemporal: string = target.substr(0, target.indexOf("#"));
66+
const targetWithoutTemporal: string = target.substr(0, target.indexOf("#"));
6767

6868
// loop through canvases adding up their durations until we reach the targeted canvas
6969
for (let i = 0; i < canvases.length; i++) {

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/components/av-component.tsβ€Ž

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
/* eslint-disable no-debugger */
2-
/* eslint-disable @typescript-eslint/no-unused-vars */
3-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
4-
/* eslint-disable @typescript-eslint/ban-ts-ignore */
1+
2+
3+
54
const $ = require("jquery");
65
require("jquery-ui-dist/jquery-ui");
76
require("jquery-ui-dist/jquery-ui.css");
@@ -99,7 +98,7 @@ export class AVComponent extends BaseComponent {
9998
}
10099

101100
public set(data: IAVComponentData): void {
102-
// eslint-disable-next-line no-debugger
101+
103102
Logger.groupCollapsed("AVComponent.set()");
104103
Logger.log("Data", data);
105104

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/components/canvas-instance.tsβ€Ž

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
2-
/* eslint-disable @typescript-eslint/no-unused-vars */
3-
/* eslint-disable @typescript-eslint/ban-ts-ignore */
1+
2+
43
import { convertToPercentage } from "../helpers/convert-to-percentage";
54

65
const $ = require("jquery");
@@ -227,8 +226,9 @@ export class CanvasInstance extends BaseComponent {
227226

228227
// this._renderSyncIndicator(data)
229228

230-
// @ts-ignore
231-
const plan = createTimePlansFromManifest(
229+
// upstream passes a second argument that createTimePlansFromManifest
230+
// ignores; cast keeps the call as-is without a line-fragile @ts-ignore
231+
const plan = (createTimePlansFromManifest as any)(
232232
helper.manifest as any,
233233
mediaElements
234234
);
@@ -437,7 +437,7 @@ export class CanvasInstance extends BaseComponent {
437437
this._canvasHeight = canvasHeight;
438438
}
439439

440-
// eslint-disable-next-line @typescript-eslint/no-this-alias
440+
441441
const that = this;
442442

443443
let prevClicks = 0;
@@ -1180,7 +1180,7 @@ export class CanvasInstance extends BaseComponent {
11801180
this._$durationHighlight.hide();
11811181
}
11821182

1183-
// eslint-disable-next-line @typescript-eslint/no-this-alias
1183+
11841184
const that = this;
11851185

11861186
// try to destroy existing rangeTimelineContainer
@@ -1464,11 +1464,11 @@ export class CanvasInstance extends BaseComponent {
14641464

14651465
data.timeout = null;
14661466

1467-
// eslint-disable-next-line @typescript-eslint/no-this-alias
1467+
14681468
const that = this;
14691469

14701470
data.checkForStall = function () {
1471-
// eslint-disable-next-line @typescript-eslint/no-this-alias
1471+
14721472
const self = this;
14731473

14741474
if (this.active) {

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/components/volume-control.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-unused-vars */
1+
22
const $ = require("jquery");
33
import { IAVVolumeControlState } from "../interfaces/volume-control-state";
44
import { BaseComponent, IBaseComponentOptions } from "@iiif/base-component";
@@ -42,7 +42,7 @@ export class AVVolumeControl extends BaseComponent {
4242

4343
this._$element.append(this._$volumeMute, this._$volumeSlider);
4444

45-
// eslint-disable-next-line @typescript-eslint/no-this-alias
45+
4646
const that = this;
4747

4848
this._$volumeMute.on("touchstart click", (e) => {

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/globals.d.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ declare let jQuery: any;
1414
// Declared here rather than via @types/jqueryui, whose non-generic JQuery
1515
// interface declaration conflicts with @types/jquery v3. switchClass is
1616
// already declared globally in src/globals.d.ts.
17-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
17+
1818
interface JQuery<TElement = HTMLElement> {
1919
slider(...args: any[]): any;
2020
}

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/helpers/debounce.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function debounce(fn: any, debounceDuration: number): any {
1111

1212
return function () {
1313
if (!fn.debouncing) {
14-
// eslint-disable-next-line prefer-rest-params
14+
1515
const args: any = Array.prototype.slice.apply(arguments);
1616
fn.lastReturnVal = fn.apply(window, args);
1717
fn.debouncing = true;

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/helpers/get-spatial-component.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export function getSpatialComponent(target: string): number[] | null {
33
let xywh: number[] | null = null;
44

55
if (spatial && spatial[1]) {
6-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
6+
77
xywh = <any>spatial[1].split(",");
88
}
99

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/interfaces/canvas-instance-data.tsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { IAVComponentData } from "./component-data";
22
import { VirtualCanvas } from "../elements/virtual-canvas";
33
import { Canvas, Range } from "manifesto.js";
44

5-
// eslint-disable-next-line @typescript-eslint/interface-name-prefix
65
export interface IAVCanvasInstanceData extends IAVComponentData {
76
canvas?: Canvas | VirtualCanvas;
87
range?: Range;

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/interfaces/component-content.tsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/interface-name-prefix
21
export interface IAVComponentContent {
32
currentTime: string;
43
collapse: string;

β€Žsrc/content-handlers/iiif/modules/iiif-av-component-module/interfaces/component-data.tsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Helper } from "@iiif/manifold";
22
import { IAVComponentContent } from "./component-content";
33

4-
// eslint-disable-next-line @typescript-eslint/interface-name-prefix
54
export interface IAVComponentData {
65
[key: string]: any;
76
adaptiveAuthEnabled?: boolean;

0 commit comments

Comments
Β (0)