eslint: Fix @typescript-eslint/no-useless-template-literals.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-01-29 11:25:24 -08:00 committed by Tim Abbott
parent 2dca29ce5a
commit 24ecafbdd2
3 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ import type {Message} from "./message_store";
// one needs an outer element wrapping an object to use this
// construction.
function is_element_in_message_content(message: Message, element_selector: string): boolean {
return $(`<div>${message.content}</div>`).find(`${element_selector}`).length > 0;
return $(`<div>${message.content}</div>`).find(element_selector).length > 0;
}
export function message_has_link(message: Message): boolean {

View File

@ -221,9 +221,9 @@ export function close_if_open(modal_id: string): void {
}
const $micromodal = $(".micromodal.modal--open");
const active_modal_id = CSS.escape(`${CSS.escape($micromodal.attr("id") ?? "")}`);
if (active_modal_id === `${CSS.escape(modal_id)}`) {
Micromodal.close(`${CSS.escape($micromodal.attr("id") ?? "")}`);
const active_modal_id = CSS.escape(CSS.escape($micromodal.attr("id") ?? ""));
if (active_modal_id === CSS.escape(modal_id)) {
Micromodal.close(CSS.escape($micromodal.attr("id") ?? ""));
} else {
blueslip.info(
`${active_modal_id} is the currently active modal and ${modal_id} is already closed.`,
@ -238,7 +238,7 @@ export function close_active(): void {
}
const $micromodal = $(".micromodal.modal--open");
Micromodal.close(`${CSS.escape($micromodal.attr("id") ?? "")}`);
Micromodal.close(CSS.escape($micromodal.attr("id") ?? ""));
}
export function close_active_if_any(): void {

View File

@ -25,7 +25,7 @@ export function close_active(): void {
}
const $micromodal = $(".micromodal.modal--open");
Micromodal.close(`${CSS.escape($micromodal.attr("id") ?? "")}`);
Micromodal.close(CSS.escape($micromodal.attr("id") ?? ""));
}
export function open(modal_id: string, recursive_call_count = 0): void {