From b7e02436b8feeece6404de60cbbc016d1eceba38 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 24 Sep 2024 20:01:36 -0700 Subject: [PATCH] =?UTF-8?q?eslint:=20Avoid=20@typescript-eslint/no-depreca?= =?UTF-8?q?ted=20for=20jQuery=20=E2=80=98on=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- web/src/portico/landing-page.ts | 2 +- web/src/settings_profile_fields.ts | 7 +++++-- web/src/support/support.ts | 4 ++-- web/src/tippyjs.ts | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/web/src/portico/landing-page.ts b/web/src/portico/landing-page.ts index e991d2deb6..32f124d3ce 100644 --- a/web/src/portico/landing-page.ts +++ b/web/src/portico/landing-page.ts @@ -263,7 +263,7 @@ $(document).on("click", ".pricing-tab", function () { window.history.pushState(null, "", `#${id}`); }); -$(document).on("click", ".comparison-tab", function (this: HTMLElement) { +$(document).on("click", ".comparison-tab", function (this: HTMLElement, _event: JQuery.Event) { const plans_columns_counts = { "tab-cloud": 3, "tab-hosted": 4, diff --git a/web/src/settings_profile_fields.ts b/web/src/settings_profile_fields.ts index 83f5d7565a..96207524a2 100644 --- a/web/src/settings_profile_fields.ts +++ b/web/src/settings_profile_fields.ts @@ -599,7 +599,10 @@ function update_profile_fields_checkboxes(): void { ); } -function toggle_display_in_profile_summary_profile_field(this: HTMLInputElement): void { +function toggle_display_in_profile_summary_profile_field( + this: HTMLInputElement, + _event: JQuery.Event, +): void { const field_id = Number.parseInt($(this).attr("data-profile-field-id")!, 10); const data = { @@ -615,7 +618,7 @@ function toggle_display_in_profile_summary_profile_field(this: HTMLInputElement) ); } -function toggle_required(this: HTMLInputElement): void { +function toggle_required(this: HTMLInputElement, _event: JQuery.Event): void { const field_id = Number.parseInt($(this).attr("data-profile-field-id")!, 10); const data = { diff --git a/web/src/support/support.ts b/web/src/support/support.ts index d2e7ebb2b1..a278ee534c 100644 --- a/web/src/support/support.ts +++ b/web/src/support/support.ts @@ -50,7 +50,7 @@ $(() => { $("body").on( "blur", "input[name='monthly_discounted_price']", - function (this: HTMLInputElement) { + function (this: HTMLInputElement, _event: JQuery.Event) { const input_monthly_price = $(this).val(); if (!input_monthly_price) { return; @@ -76,7 +76,7 @@ $(() => { $("body").on( "blur", "input[name='annual_discounted_price']", - function (this: HTMLInputElement) { + function (this: HTMLInputElement, _event: JQuery.Event) { const input_annual_price = $(this).val(); if (!input_annual_price) { return; diff --git a/web/src/tippyjs.ts b/web/src/tippyjs.ts index 61582096f0..dc6528796e 100644 --- a/web/src/tippyjs.ts +++ b/web/src/tippyjs.ts @@ -311,7 +311,7 @@ export function initialize(): void { $("body").on( "blur", ".message_control_button, .delete-selected-drafts-button-container", - function (this: tippy.ReferenceElement) { + function (this: tippy.ReferenceElement, _event: JQuery.Event) { // Remove tooltip when user is trying to tab through all the icons. // If user tabs slowly, tooltips are displayed otherwise they are // destroyed before they can be displayed.