Skip to content

Commit

Permalink
Satisfy ESLint after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWolla committed Aug 2, 2023
1 parent 34c7b83 commit e768e76
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 21 deletions.
4 changes: 2 additions & 2 deletions ts/WoltLabSuite/Core/Acp/Ui/Trophy/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function setupTypeChange(): void {

const typeSelection = document.querySelector("select[name=type]") as HTMLSelectElement;
typeSelection.addEventListener("change", () => {
if (typeSelection.value === TrophyType.Image) {
if (typeSelection.value as TrophyType === TrophyType.Image) {
badgeContainer.hidden = true;
imageContainer.hidden = false;
} else if (typeSelection.value === TrophyType.Badge) {
} else if (typeSelection.value as TrophyType === TrophyType.Badge) {
badgeContainer.hidden = false;
imageContainer.hidden = true;
}
Expand Down
2 changes: 2 additions & 0 deletions ts/WoltLabSuite/Core/Element/woltlab-core-dialog-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface WoltlabCoreDialogControlEventMap {
extra: CustomEvent;
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class WoltlabCoreDialogControlElement extends HTMLElement {
#cancelButton?: HTMLButtonElement;
#extraButton?: HTMLButtonElement;
Expand Down Expand Up @@ -146,6 +147,7 @@ export class WoltlabCoreDialogControlElement extends HTMLElement {
}
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export interface WoltlabCoreDialogControlElement extends HTMLElement {
addEventListener: {
<T extends keyof WoltlabCoreDialogControlEventMap>(
Expand Down
2 changes: 2 additions & 0 deletions ts/WoltLabSuite/Core/Element/woltlab-core-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export type WoltlabCoreDialogControlOptions = {
primary: string;
};

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export class WoltlabCoreDialogElement extends HTMLElement {
readonly #content: HTMLElement;
readonly #dialog: HTMLDialogElement;
Expand Down Expand Up @@ -311,6 +312,7 @@ export class WoltlabCoreDialogElement extends HTMLElement {
}
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
export interface WoltlabCoreDialogElement extends HTMLElement {
addEventListener: {
<T extends keyof WoltlabCoreDialogEventMap>(
Expand Down
12 changes: 6 additions & 6 deletions ts/WoltLabSuite/WebComponent/woltlab-core-date-time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@
TodayOrYesterday: new Intl.RelativeTimeFormat(locale, { numeric: "auto" }),
};

const enum TimePeriod {
OneMinute = 60,
OneHour = 3_600,
OneDay = 86_400,
OneWeek = 86_400 * 7,
}
const TimePeriod = {
OneMinute: 60,
OneHour: 3_600,
OneDay: 86_400,
OneWeek: 86_400 * 7,
};

class WoltlabCoreDateTimeElement extends HTMLElement {
#date?: Date;
Expand Down
4 changes: 3 additions & 1 deletion ts/WoltLabSuite/WebComponent/woltlab-core-pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
switchPage: CustomEvent<number>;
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
class WoltlabCorePaginationElement extends HTMLElement {
readonly #className = "pagination";

Expand Down Expand Up @@ -245,7 +246,7 @@

const url = new URL(this.url);
url.search += url.search !== "" ? "&" : "?";
url.search += new URLSearchParams([["pageNo", page.toString()]]);
url.search += (new URLSearchParams([["pageNo", page.toString()]])).toString();

return url.toString();
}
Expand Down Expand Up @@ -299,6 +300,7 @@
}
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
interface WoltlabCorePaginationElement extends HTMLElement {
addEventListener: {
<T extends keyof WoltlabCorePaginationEventMap>(
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions wcfsetup/install/files/js/WoltLabSuite/WebComponent.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e768e76

Please sign in to comment.