Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Expand no-unused-vars check to all function parameters.
Anders Kaseorg407c16fc77a3
diff --git a/.eslintrc.json b/.eslintrc.jsonindex 723a21ab57a..1ea0a718169 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -93,7 +93,10 @@"no-undef-init": "error","no-unneeded-ternary": ["error", {"defaultAssignment": false}],"no-unused-expressions": "error",- "no-unused-vars": ["error", {"ignoreRestSiblings": true}],+ "no-unused-vars": [+ "error",+ {"args": "all", "argsIgnorePattern": "^_", "ignoreRestSiblings": true}+ ],"no-use-before-define": ["error", {"functions": false}],"no-useless-concat": "error","no-useless-constructor": "error",@@ -186,7 +189,10 @@"@typescript-eslint/no-unsafe-call": "off","@typescript-eslint/no-unsafe-member-access": "off","@typescript-eslint/no-unsafe-return": "off",- "@typescript-eslint/no-unused-vars": ["error", {"ignoreRestSiblings": true}],+ "@typescript-eslint/no-unused-vars": [+ "error",+ {"args": "all", "argsIgnorePattern": "^_", "ignoreRestSiblings": true}+ ],"@typescript-eslint/no-use-before-define": ["error", {"functions": false}],"@typescript-eslint/promise-function-async": "error","import/no-cycle": "error",diff --git a/tools/check-openapi b/tools/check-openapiindex f138490a66a..00de988cc6f 100755--- a/tools/check-openapi+++ b/tools/check-openapi@@ -43,7 +43,7 @@ async function checkFile(file) {const promises = [];visit(doc, {- Map(key, node) {+ Map(_key, node) {if (node.has("$ref") && node.items.length !== 1) {const {line, col} = lineCounter.linePos(node.range[0]);console.error("%s:%d:%d: Siblings of $ref have no effect", file, line, col);@@ -51,7 +51,7 @@ async function checkFile(file) {}},- Pair(key, node) {+ Pair(_key, node) {if (node.key instanceof Scalar &&node.key.value === "allOf" &&diff --git a/web/babel.config.js b/web/babel.config.jsindex d6e00223fd9..ed155b7c611 100644--- a/web/babel.config.js+++ b/web/babel.config.js@@ -6,7 +6,7 @@ module.exports = {"formatjs",{additionalFunctionNames: ["$t", "$t_html"],- overrideIdFn: (id, defaultMessage) => defaultMessage,+ overrideIdFn: (_id, defaultMessage) => defaultMessage,},],],diff --git a/web/src/buddy_list.js b/web/src/buddy_list.jsindex bf0ed87cdf1..7d6a8eec882 100644--- a/web/src/buddy_list.js+++ b/web/src/buddy_list.js@@ -102,7 +102,7 @@ export class BuddyList extends BuddyListConf {get_items() {const $obj = this.$container.find(`${this.item_sel}`);- return $obj.map((i, elem) => $(elem));+ return $obj.map((_i, elem) => $(elem));}first_key() {diff --git a/web/src/compose_ui.js b/web/src/compose_ui.jsindex dc9b8e1e254..63575d0bcc3 100644--- a/web/src/compose_ui.js+++ b/web/src/compose_ui.js@@ -327,7 +327,7 @@ export function handle_keydown(event, $textarea) {}}-export function handle_keyup(event, $textarea) {+export function handle_keyup(_event, $textarea) {// Set the rtl class if the text has an rtl direction, remove it otherwisertl.set_rtl_class_for_textarea($textarea);}diff --git a/web/src/copy_and_paste.js b/web/src/copy_and_paste.jsindex 9ae03e8810e..11400708fbe 100644--- a/web/src/copy_and_paste.js+++ b/web/src/copy_and_paste.js@@ -113,7 +113,7 @@ function select_div($div, selection) {selection.selectAllChildren($div[0]);}-function remove_div(div, ranges, selection) {+function remove_div(_div, ranges, selection) {window.setTimeout(() => {selection = window.getSelection();selection.removeAllRanges();diff --git a/web/src/flatpickr.js b/web/src/flatpickr.jsindex 9bb687f3280..445ae1104f9 100644--- a/web/src/flatpickr.js+++ b/web/src/flatpickr.js@@ -30,7 +30,7 @@ export function show_flatpickr(element, callback, default_timestamp, options = {disableMobile: true,time_24hr: user_settings.twenty_four_hour_time,minuteIncrement: 1,- onKeyDown(selectedDates, dateStr, instance, event) {+ onKeyDown(_selectedDates, _dateStr, instance, event) {// See also the keydown handler below.//// TODO: Add a clear explanation of exactly how keydiff --git a/web/src/giphy.js b/web/src/giphy.jsindex 31451a479af..7b2003f812f 100644--- a/web/src/giphy.js+++ b/web/src/giphy.js@@ -117,7 +117,7 @@ async function renderGIPHYGrid(targetEl) {);hide_giphy_popover();},- onGifVisible(gif, e) {+ onGifVisible(_gif, e) {// Set tabindex for all the GIFs that// are visible to the user. This allows// user to navigate the GIFs using tab.diff --git a/web/src/hotkey.js b/web/src/hotkey.jsindex d5405ee43f3..09d85c2e8e0 100644--- a/web/src/hotkey.js+++ b/web/src/hotkey.js@@ -820,7 +820,7 @@ export function process_hotkey(e, hotkey) {// Shortcuts that don't require a messageswitch (event_name) {case "narrow_private":- return do_narrow_action((target, opts) => {+ return do_narrow_action((_target, opts) => {narrow.by("is", "dm", opts);});case "query_streams":diff --git a/web/src/info_overlay.js b/web/src/info_overlay.jsindex effb002ef0e..087f6402860 100644--- a/web/src/info_overlay.js+++ b/web/src/info_overlay.js@@ -217,7 +217,7 @@ export function set_up_toggler() {{label: $t({defaultMessage: "Message formatting"}), key: "message-formatting"},{label: $t({defaultMessage: "Search filters"}), key: "search-operators"},],- callback(name, key) {+ callback(_name, key) {$(".overlay-modal").hide();$(`#${CSS.escape(key)}`).show();scroll_utildiff --git a/web/src/markdown.js b/web/src/markdown.jsindex a9148c23d34..110944ad55d 100644--- a/web/src/markdown.js+++ b/web/src/markdown.js@@ -38,7 +38,7 @@ export function translate_emoticons_to_names({src, get_emoticon_translations}) {const terminal_symbols = ",.;?!()[] \"'\n\t"; // From composebox_typeaheadconst symbols_except_space = terminal_symbols.replace(" ", "");- const emoticon_replacer = function (match, g1, offset, str) {+ const emoticon_replacer = function (match, _g1, offset, str) {const prev_char = str[offset - 1];const next_char = str[offset + match.length];diff --git a/web/src/message_fetch.js b/web/src/message_fetch.jsindex c1fded77cec..f96925a4c74 100644--- a/web/src/message_fetch.js+++ b/web/src/message_fetch.js@@ -416,7 +416,7 @@ export function maybe_load_newer_messages(opts) {const anchor = get_frontfill_anchor(msg_list);- function load_more(data, args) {+ function load_more(_data, args) {if (args.fetch_again && args.msg_list === message_lists.current) {maybe_load_newer_messages({msg_list: message_lists.current});}diff --git a/web/src/message_list_view.js b/web/src/message_list_view.jsindex dc8f941c6ea..d92f2e9f8e0 100644--- a/web/src/message_list_view.js+++ b/web/src/message_list_view.js@@ -1621,7 +1621,7 @@ export class MessageListView {show_messages_as_unread(message_ids) {const $table = rows.get_table(this.table_name);- const $rows_to_show_as_unread = $table.find(".message_row").filter((index, $row) => {+ const $rows_to_show_as_unread = $table.find(".message_row").filter((_index, $row) => {const message_id = Number.parseFloat($row.getAttribute("zid"));return message_ids.includes(message_id);});diff --git a/web/src/messages_overlay_ui.js b/web/src/messages_overlay_ui.jsindex 147584120e1..e25bdcb010e 100644--- a/web/src/messages_overlay_ui.js+++ b/web/src/messages_overlay_ui.js@@ -34,7 +34,7 @@ export function focus_on_sibling_element(context) {}}-export function modals_handle_events(e, event_key, context) {+export function modals_handle_events(_e, event_key, context) {initialize_focus(event_key, context);// This detects up arrow key presses when the overlaydiff --git a/web/src/search_suggestion.js b/web/src/search_suggestion.jsindex 3468fc93f04..da85368cca1 100644--- a/web/src/search_suggestion.js+++ b/web/src/search_suggestion.js@@ -705,7 +705,7 @@ class Attacher {}}-export function get_search_result(base_query, query) {+export function get_search_result(_base_query, query) {let suggestion;// search_operators correspond to the operators for the query in the input.diff --git a/web/src/settings_toggle.js b/web/src/settings_toggle.jsindex 1e5b42409b7..a69d39ad82d 100644--- a/web/src/settings_toggle.js+++ b/web/src/settings_toggle.js@@ -19,7 +19,7 @@ export function initialize() {{label: $t({defaultMessage: "Personal"}), key: "settings"},{label: $t({defaultMessage: "Organization"}), key: "organization"},],- callback(name, key) {+ callback(_name, key) {if (key === "organization") {settings_panel_menu.show_org_settings();} else {diff --git a/web/src/stream_edit.js b/web/src/stream_edit.jsindex e1c21c335a7..0fb66d01d88 100644--- a/web/src/stream_edit.js+++ b/web/src/stream_edit.js@@ -267,7 +267,7 @@ export function setup_stream_settings(node) {{label: $t({defaultMessage: "Personal"}), key: "personal_settings"},{label: $t({defaultMessage: "Subscribers"}), key: "subscriber_settings"},],- callback(name, key) {+ callback(_name, key) {$(".stream_section").hide();$(`.${CSS.escape(key)}`).show();select_tab = key;diff --git a/web/src/stream_settings_ui.js b/web/src/stream_settings_ui.jsindex 997b270fc0d..a9862f79620 100644--- a/web/src/stream_settings_ui.js+++ b/web/src/stream_settings_ui.js@@ -628,7 +628,7 @@ export function setup_page(callback) {},],html_class: "stream_sorter_toggle",- callback(value, key) {+ callback(_value, key) {switch_stream_sort(key);},});@@ -644,7 +644,7 @@ export function setup_page(callback) {{label: $t({defaultMessage: "Subscribed"}), key: "subscribed"},{label: $t({defaultMessage: "All streams"}), key: "all-streams"},],- callback(value, key) {+ callback(_value, key) {switch_stream_tab(key);},});@@ -952,7 +952,7 @@ function ajaxSubscribe(stream, color, $stream_row) {return channel.post({url: "/json/users/me/subscriptions",data: {subscriptions: JSON.stringify([{name: stream, color}])},- success(resp, statusText, xhr) {+ success(_resp, _statusText, xhr) {if (overlays.streams_open()) {$("#create_stream_name").val("");}diff --git a/web/src/todo_widget.js b/web/src/todo_widget.jsindex 3469296bad7..74f62daa05a 100644--- a/web/src/todo_widget.js+++ b/web/src/todo_widget.js@@ -127,7 +127,7 @@ export class TaskData {return event;},- inbound: (sender_id, data) => {+ inbound: (_sender_id, data) => {// All message readers may strike/unstrike todo tasks.const key = data.key;if (typeof key !== "string") {diff --git a/web/src/ui_init.js b/web/src/ui_init.jsindex d8b34999697..03feda5fb47 100644--- a/web/src/ui_init.js+++ b/web/src/ui_init.js@@ -253,7 +253,7 @@ export function initialize_kitchen_sink_stuff() {// the code here can probably be moved to more// specific-purpose modules like message_viewport.js.- const throttled_mousewheelhandler = _.throttle((e, delta) => {+ const throttled_mousewheelhandler = _.throttle((_e, delta) => {// Most of the mouse wheel's work will be handled by the// scroll handler, but when we're at the top or bottom of the// page, the pointer may still need to move.diff --git a/web/src/upload.js b/web/src/upload.jsindex 36b4a7ca204..06f061575ac 100644--- a/web/src/upload.js+++ b/web/src/upload.js@@ -364,7 +364,7 @@ export function setup_upload(config) {}});- uppy.on("upload-error", (file, error, response) => {+ uppy.on("upload-error", (file, _error, response) => {const message = response ? response.body.msg : undefined;show_error_message(config, message, file.id);compose_ui.replace_syntax(get_translated_status(file), "", get_item("textarea", config));diff --git a/web/src/user_group_edit.js b/web/src/user_group_edit.jsindex 0a6c27d06ac..ac613145a62 100644--- a/web/src/user_group_edit.js+++ b/web/src/user_group_edit.js@@ -153,7 +153,7 @@ export function setup_group_settings(node) {{label: $t({defaultMessage: "General"}), key: "group_general_settings"},{label: $t({defaultMessage: "Members"}), key: "group_member_settings"},],- callback(name, key) {+ callback(_name, key) {$(".group_setting_section").hide();$(`.${CSS.escape(key)}`).show();select_tab = key;diff --git a/web/src/user_profile.js b/web/src/user_profile.jsindex a4e8a3d2184..14c45fee78a 100644--- a/web/src/user_profile.js+++ b/web/src/user_profile.js@@ -239,7 +239,7 @@ export function show_user_profile(user, default_tab_key = "profile-tab") {{label: $t({defaultMessage: "Streams"}), key: "user-profile-streams-tab"},{label: $t({defaultMessage: "User groups"}), key: "user-profile-groups-tab"},],- callback(name, key) {+ callback(_name, key) {$(".tabcontent").hide();$(`#${CSS.escape(key)}`).show();switch (key) {diff --git a/web/tests/activity.test.js b/web/tests/activity.test.jsindex 7f2d978d09b..e65aa1380ef 100644--- a/web/tests/activity.test.js+++ b/web/tests/activity.test.js@@ -291,7 +291,7 @@ test("handlers", ({override, mock_template}) => {let narrowed;- override(narrow, "by", (method, email) => {+ override(narrow, "by", (_method, email) => {assert.equal(email, "[email protected]");narrowed = true;});@@ -482,7 +482,7 @@ test("insert_one_user_into_empty_list", ({override, mock_template}) => {});test("insert_alice_then_fred", ({override, mock_template}) => {- mock_template("presence_row.hbs", true, (data, html) => html);+ mock_template("presence_row.hbs", true, (_data, html) => html);let appended_html;override(buddy_list.$container, "append", (html) => {@@ -500,7 +500,7 @@ test("insert_alice_then_fred", ({override, mock_template}) => {});test("insert_fred_then_alice_then_rename", ({override, mock_template}) => {- mock_template("presence_row.hbs", true, (data, html) => html);+ mock_template("presence_row.hbs", true, (_data, html) => html);let appended_html;override(buddy_list.$container, "append", (html) => {diff --git a/web/tests/alert_words_ui.test.js b/web/tests/alert_words_ui.test.jsindex c62966272d4..dbd00e3c761 100644--- a/web/tests/alert_words_ui.test.js+++ b/web/tests/alert_words_ui.test.js@@ -22,7 +22,7 @@ run_test("rerender_alert_words_ui", ({mock_template}) => {alert_words_ui.reset();const ListWidget = mock_esm("../src/list_widget", {modifier: noop,- create(container, words, opts) {+ create(_container, words, opts) {const alert_words = [];ListWidget.modifier = opts.modifier;for (const word of words) {diff --git a/web/tests/compose.test.js b/web/tests/compose.test.jsindex 3142b264764..a5a19eb4330 100644--- a/web/tests/compose.test.js+++ b/web/tests/compose.test.js@@ -242,7 +242,7 @@ test_ui("send_message", ({override, override_rewire, mock_template}) => {})();// This is the additional setup which is common to both the tests below.- override(transmit, "send_message", (payload, success, error) => {+ override(transmit, "send_message", (_payload, _success, error) => {stub_state.send_msg_called += 1;error("Error sending message: Server says 408");});diff --git a/web/tests/compose_actions.test.js b/web/tests/compose_actions.test.jsindex 1121bda4083..91626489bba 100644--- a/web/tests/compose_actions.test.js+++ b/web/tests/compose_actions.test.js@@ -393,7 +393,7 @@ test("quote_and_reply", ({disallow, override, override_rewire}) => {override(message_lists.current, "selected_id", () => 100);- override(compose_ui, "insert_syntax_and_focus", (syntax, $textarea, mode) => {+ override(compose_ui, "insert_syntax_and_focus", (syntax, _$textarea, mode) => {assert.equal(syntax, "translated: [Quoting…]");assert.equal(mode, "block");});diff --git a/web/tests/compose_ui.test.js b/web/tests/compose_ui.test.jsindex 27779ad886b..bc23f217375 100644--- a/web/tests/compose_ui.test.js+++ b/web/tests/compose_ui.test.js@@ -475,10 +475,10 @@ run_test("format_text", ({override}) => {let wrap_selection_called = false;let wrap_syntax = "";- override(text_field_edit, "set", (field, text) => {+ override(text_field_edit, "set", (_field, text) => {set_text = text;});- override(text_field_edit, "wrapSelection", (field, syntax) => {+ override(text_field_edit, "wrapSelection", (_field, syntax) => {wrap_selection_called = true;wrap_syntax = syntax;});@@ -627,7 +627,7 @@ run_test("format_text", ({override}) => {run_test("markdown_shortcuts", ({override_rewire}) => {let format_text_type;- override_rewire(compose_ui, "format_text", ($textarea, type) => {+ override_rewire(compose_ui, "format_text", (_$textarea, type) => {format_text_type = type;});diff --git a/web/tests/example8.test.js b/web/tests/example8.test.jsindex d8ab51e0601..085ce236e5d 100644--- a/web/tests/example8.test.js+++ b/web/tests/example8.test.js@@ -120,7 +120,7 @@ run_test("typing_events.render_notifications_for_narrow", ({override, mock_templ// can be helpful in testing conditionals inside the template.// Let's set the mock to just return the rendered html.- mock_template("typing_notifications.hbs", true, (args, rendered_html) => rendered_html);+ mock_template("typing_notifications.hbs", true, (_args, rendered_html) => rendered_html);// Since we only have two(<MAX_USERS_TO_DISPLAY_NAME) typists, both of them// should be rendered but not 'Several people are typing…'diff --git a/web/tests/hashchange.test.js b/web/tests/hashchange.test.jsindex 991a9fcbcc4..ee782dc35b4 100644--- a/web/tests/hashchange.test.js+++ b/web/tests/hashchange.test.js@@ -346,7 +346,7 @@ run_test("save_narrow", ({override}) => {assert.equal(window.location.hash, "#narrow/is/dm");let url_pushed;- override(history, "pushState", (state, title, url) => {+ override(history, "pushState", (_state, _title, url) => {url_pushed = url;});diff --git a/web/tests/lib/index.js b/web/tests/lib/index.jsindex 16bee1b263c..4b8aee61df0 100644--- a/web/tests/lib/index.js+++ b/web/tests/lib/index.js@@ -54,7 +54,7 @@ assert.notEqual(files.length, 0, "No tests found");// Set up our namespace helpers.const window = new Proxy(global, {- set(obj, prop, value) {+ set(_obj, prop, value) {namespace.set_global(prop, value);return true;},diff --git a/web/tests/list_widget.test.js b/web/tests/list_widget.test.jsindex 45d6a54a609..746fe4cdeb8 100644--- a/web/tests/list_widget.test.js+++ b/web/tests/list_widget.test.js@@ -194,7 +194,7 @@ run_test("not_scrolling", () => {};let get_min_load_count_called = false;- const get_min_load_count = (offset, load_count) => {+ const get_min_load_count = (_offset, load_count) => {get_min_load_count_called = true;return load_count;};diff --git a/web/tests/narrow.test.js b/web/tests/narrow.test.jsindex b76b6cd0a8a..2118a6f1553 100644--- a/web/tests/narrow.test.js+++ b/web/tests/narrow.test.js@@ -70,7 +70,7 @@ const bot = {};run_test("empty_narrow_html", ({mock_template}) => {- mock_template("empty_feed_notice.hbs", true, (data, html) => html);+ mock_template("empty_feed_notice.hbs", true, (_data, html) => html);let actual_html = empty_narrow_html("This is a title", "<h1> This is the html </h1>");assert.equal(@@ -197,7 +197,7 @@ run_test("urls", () => {run_test("show_empty_narrow_message", ({mock_template}) => {page_params.stop_words = [];- mock_template("empty_feed_notice.hbs", true, (data, html) => html);+ mock_template("empty_feed_notice.hbs", true, (_data, html) => html);narrow_state.reset_current_filter();narrow_banner.show_empty_narrow_message();@@ -523,7 +523,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {run_test("show_empty_narrow_message_with_search", ({mock_template}) => {page_params.stop_words = [];- mock_template("empty_feed_notice.hbs", true, (data, html) => html);+ mock_template("empty_feed_notice.hbs", true, (_data, html) => html);narrow_state.reset_current_filter();set_filter([["search", "grail"]]);@@ -539,7 +539,7 @@ run_test("hide_empty_narrow_message", () => {run_test("show_search_stopwords", ({mock_template}) => {page_params.stop_words = ["what", "about"];- mock_template("empty_feed_notice.hbs", true, (data, html) => html);+ mock_template("empty_feed_notice.hbs", true, (_data, html) => html);const expected_search_data = {has_stop_word: true,@@ -604,7 +604,7 @@ run_test("show_search_stopwords", ({mock_template}) => {run_test("show_invalid_narrow_message", ({mock_template}) => {narrow_state.reset_current_filter();- mock_template("empty_feed_notice.hbs", true, (data, html) => html);+ mock_template("empty_feed_notice.hbs", true, (_data, html) => html);stream_data.add_sub({name: "streamA", stream_id: 88});stream_data.add_sub({name: "streamB", stream_id: 77});diff --git a/web/tests/notifications.test.js b/web/tests/notifications.test.jsindex 4ea360eeb28..187f48068d6 100644--- a/web/tests/notifications.test.js+++ b/web/tests/notifications.test.js@@ -281,7 +281,7 @@ test("basic_notifications", () => {// Notifications API stubclass StubNotification {- constructor(title, {icon, body, tag}) {+ constructor(_title, {icon, body, tag}) {this.icon = icon;this.body = body;this.tag = tag;diff --git a/web/tests/recent_topics.test.js b/web/tests/recent_topics.test.jsindex fe562173de4..a68fa111c13 100644--- a/web/tests/recent_topics.test.js+++ b/web/tests/recent_topics.test.js@@ -44,7 +44,7 @@ let expected_data_to_replace_in_list_widget;const ListWidget = mock_esm("../src/list_widget", {modifier: noop,- create(container, mapped_topic_values, opts) {+ create(_container, mapped_topic_values, opts) {const formatted_topics = [];ListWidget.modifier = opts.modifier;for (const item of mapped_topic_values) {@@ -522,7 +522,7 @@ test("test_filter_pm", ({mock_template}) => {i += 1;});- mock_template("recent_topic_row.hbs", true, (data, html) => {+ mock_template("recent_topic_row.hbs", true, (_data, html) => {assert.ok(html.startsWith('<tr id="recent_conversation'));});@@ -805,7 +805,7 @@ test("basic assertions", ({mock_template, override_rewire}) => {rt.clear_for_tests();mock_template("recent_topics_table.hbs", false, () => {});- mock_template("recent_topic_row.hbs", true, (data, html) => {+ mock_template("recent_topic_row.hbs", true, (_data, html) => {assert.ok(html.startsWith('<tr id="recent_conversation'));});diff --git a/web/tests/rendered_markdown.test.js b/web/tests/rendered_markdown.test.jsindex 031fa9c7074..babfdef75dc 100644--- a/web/tests/rendered_markdown.test.js+++ b/web/tests/rendered_markdown.test.js@@ -13,7 +13,7 @@ class Clipboard {constructor(...args) {clipboard_args = args;}- on(success, show_copied_confirmation) {+ on(_success, show_copied_confirmation) {show_copied_confirmation();}}diff --git a/web/tests/settings_muted_users.test.js b/web/tests/settings_muted_users.test.jsindex 2ec20538224..fa620fca17d 100644--- a/web/tests/settings_muted_users.test.js+++ b/web/tests/settings_muted_users.test.js@@ -19,7 +19,7 @@ run_test("settings", ({override}) => {people.add_active_user({user_id: 5, email: "[email protected]", full_name: "Feivel Fiverson"});muted_users.add_muted_user(5, 1577836800);let populate_list_called = false;- override(list_widget, "create", ($container, list) => {+ override(list_widget, "create", (_$container, list) => {assert.deepEqual(list, [{date_muted_str: "Jan 1, 2020",diff --git a/web/tests/settings_realm_domains.test.js b/web/tests/settings_realm_domains.test.jsindex 868370cb103..511cdf9fb76 100644--- a/web/tests/settings_realm_domains.test.js+++ b/web/tests/settings_realm_domains.test.js@@ -13,7 +13,7 @@ mock_esm("../src/ui_report", {elem.val(msg);},- error(msg, xhr, elem) {+ error(msg, _xhr, elem) {elem.val(msg);},});diff --git a/web/tests/settings_user_topics.test.js b/web/tests/settings_user_topics.test.jsindex d9300b26c18..9ea1fb56ad1 100644--- a/web/tests/settings_user_topics.test.js+++ b/web/tests/settings_user_topics.test.js@@ -28,7 +28,7 @@ run_test("settings", ({override}) => {1577836800,);let populate_list_called = false;- override(list_widget, "create", ($container, list) => {+ override(list_widget, "create", (_$container, list) => {assert.deepEqual(list, [{date_updated: 1577836800000,diff --git a/web/tests/topic_generator.test.js b/web/tests/topic_generator.test.jsindex ee5eb060ee3..13a8f55a225 100644--- a/web/tests/topic_generator.test.js+++ b/web/tests/topic_generator.test.js@@ -49,7 +49,7 @@ run_test("topics", ({override}) => {[4, ["4a"]],]);- function has_unread_messages(stream, topic) {+ function has_unread_messages(_stream, topic) {return topic !== "read";}@@ -105,7 +105,7 @@ run_test("topics", ({override}) => {[devel_stream_id, muted_stream_id].includes(stream_id),);- override(user_topics, "is_topic_muted", (stream_name, topic) => topic === "muted");+ override(user_topics, "is_topic_muted", (_stream_name, topic) => topic === "muted");let next_item = tg.get_next_topic("announce", "whatever");assert.deepEqual(next_item, {diff --git a/web/tests/typing_events.test.js b/web/tests/typing_events.test.jsindex f69feebeb7a..ec96743a896 100644--- a/web/tests/typing_events.test.js+++ b/web/tests/typing_events.test.js@@ -50,7 +50,7 @@ run_test("render_notifications_for_narrow", ({override, mock_template}) => {const $typing_notifications = $("#typing_notifications");- mock_template("typing_notifications.hbs", true, (args, rendered_html) => rendered_html);+ mock_template("typing_notifications.hbs", true, (_args, rendered_html) => rendered_html);// Having only two(<MAX_USERS_TO_DISPLAY_NAME) typists, both of them// should be rendered but not 'Several people are typing…'diff --git a/web/tests/upload.test.js b/web/tests/upload.test.jsindex 3736d37d73e..509cf04d159 100644--- a/web/tests/upload.test.js+++ b/web/tests/upload.test.js@@ -215,7 +215,7 @@ test("upload_files", async ({mock_template, override_rewire}) => {},};let hide_upload_banner_called = false;- override_rewire(upload, "hide_upload_banner", (uppy, config) => {+ override_rewire(upload, "hide_upload_banner", (_uppy, config) => {hide_upload_banner_called = true;assert.equal(config.mode, "compose");});@@ -380,7 +380,7 @@ test("file_input", ({override_rewire}) => {},};let upload_files_called = false;- override_rewire(upload, "upload_files", (uppy, config, files) => {+ override_rewire(upload, "upload_files", (_uppy, config, files) => {assert.equal(config.mode, "compose");assert.equal(files, files);upload_files_called = true;