diff --git a/.eslintrc.json b/.eslintrc.json index 723a21ab57..1ea0a71816 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-openapi index f138490a66..00de988cc6 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.js index d6e00223fd..ed155b7c61 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.js index bf0ed87cdf..7d6a8eec88 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.js index dc9b8e1e25..63575d0bcc 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 otherwise rtl.set_rtl_class_for_textarea($textarea); } diff --git a/web/src/copy_and_paste.js b/web/src/copy_and_paste.js index 9ae03e8810..11400708fb 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.js index 9bb687f328..445ae1104f 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 key diff --git a/web/src/giphy.js b/web/src/giphy.js index 31451a479a..7b2003f812 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.js index d5405ee43f..09d85c2e8e 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 message switch (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.js index effb002ef0..087f640286 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_util diff --git a/web/src/markdown.js b/web/src/markdown.js index a9148c23d3..110944ad55 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_typeahead const 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.js index c1fded77ce..f96925a4c7 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.js index dc8f941c6e..d92f2e9f8e 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.js index 147584120e..e25bdcb010 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 overlay diff --git a/web/src/search_suggestion.js b/web/src/search_suggestion.js index 3468fc93f0..da85368cca 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.js index 1e5b42409b..a69d39ad82 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.js index e1c21c335a..0fb66d01d8 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.js index 997b270fc0..a9862f7962 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.js index 3469296bad..74f62daa05 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.js index d8b3499969..03feda5fb4 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.js index 36b4a7ca20..06f061575a 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.js index 0a6c27d06a..ac613145a6 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.js index a4e8a3d218..14c45fee78 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.js index 7f2d978d09..e65aa1380e 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, "alice@zulip.com"); 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.js index c62966272d..dbd00e3c76 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.js index 3142b26476..a5a19eb433 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.js index 1121bda408..91626489bb 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.js index 27779ad886..bc23f21737 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.js index d8ab51e060..085ce236e5 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( { 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.js index 16bee1b263..4b8aee61df 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.js index 45d6a54a60..746fe4cdeb 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.js index b76b6cd0a8..2118a6f155 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", "

This is the html

"); 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.js index 4ea360eeb2..187f48068d 100644 --- a/web/tests/notifications.test.js +++ b/web/tests/notifications.test.js @@ -281,7 +281,7 @@ test("basic_notifications", () => { // Notifications API stub class 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.js index fe562173de..a68fa111c1 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(' { 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(' { people.add_active_user({user_id: 5, email: "five@zulip.com", 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.js index 868370cb10..511cdf9fb7 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.js index d9300b26c1..9ea1fb56ad 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.js index ee5eb060ee..13a8f55a22 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.js index f69feebeb7..ec96743a89 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( { }, }; 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;