eslint: Enable spaced-comment rule.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-03-26 12:38:59 -07:00
committed by Tim Abbott
parent d55dc6f8f1
commit 7f89cb9535
7 changed files with 13 additions and 13 deletions

View File

@@ -87,7 +87,7 @@
} }
], ],
"radix": "error", "radix": "error",
"spaced-comment": "off", "spaced-comment": ["error", "always", {"markers": ["/"]}],
"strict": "error", "strict": "error",
"unicorn/consistent-function-scoping": "off", "unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off", "unicorn/explicit-length-check": "off",

View File

@@ -741,7 +741,7 @@ test("test_topic_edit", () => {
"4:topic-10,1:topic-7,1:topic-6,1:topic-5,1:topic-4,1:topic-3,1:topic-2,1:topic-1", "4:topic-10,1:topic-7,1:topic-6,1:topic-5,1:topic-4,1:topic-3,1:topic-2,1:topic-1",
); );
////////////////// test change topic ////////////////// // ---------------- test change topic ----------------
verify_topic_data(all_topics, stream1, topic6, messages[8].id, true); verify_topic_data(all_topics, stream1, topic6, messages[8].id, true);
assert.equal(all_topics.get(get_topic_key(stream1, topic8)), undefined); assert.equal(all_topics.get(get_topic_key(stream1, topic8)), undefined);
@@ -754,7 +754,7 @@ test("test_topic_edit", () => {
verify_topic_data(all_topics, stream1, topic8, messages[8].id, true); verify_topic_data(all_topics, stream1, topic8, messages[8].id, true);
assert.equal(all_topics.get(get_topic_key(stream1, topic6)), undefined); assert.equal(all_topics.get(get_topic_key(stream1, topic6)), undefined);
////////////////// test stream change ////////////////// // ---------------- test stream change ----------------
verify_topic_data(all_topics, stream1, topic1, messages[0].id, true); verify_topic_data(all_topics, stream1, topic1, messages[0].id, true);
assert.equal(all_topics.get(get_topic_key(stream2, topic1)), undefined); assert.equal(all_topics.get(get_topic_key(stream2, topic1)), undefined);
@@ -765,7 +765,7 @@ test("test_topic_edit", () => {
assert.equal(all_topics.get(get_topic_key(stream1, topic1)), undefined); assert.equal(all_topics.get(get_topic_key(stream1, topic1)), undefined);
verify_topic_data(all_topics, stream2, topic1, messages[0].id, true); verify_topic_data(all_topics, stream2, topic1, messages[0].id, true);
////////////////// test stream & topic change ////////////////// // ---------------- test stream & topic change ----------------
verify_topic_data(all_topics, stream2, topic1, messages[0].id, true); verify_topic_data(all_topics, stream2, topic1, messages[0].id, true);
assert.equal(all_topics.get(get_topic_key(stream3, topic9)), undefined); assert.equal(all_topics.get(get_topic_key(stream3, topic9)), undefined);

View File

@@ -128,9 +128,9 @@ test_ui("create_sidebar_row", (override) => {
assert(topic_list_cleared); assert(topic_list_cleared);
const expected_elems = [ const expected_elems = [
devel_sidebar, //pinned devel_sidebar, // pinned
split, //separator split, // separator
social_sidebar, //not pinned social_sidebar, // not pinned
]; ];
assert.deepEqual(appended_elems, expected_elems); assert.deepEqual(appended_elems, expected_elems);

View File

@@ -26,9 +26,9 @@ import * as typeahead_helper from "./typeahead_helper";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups";
import * as user_pill from "./user_pill"; import * as user_pill from "./user_pill";
//************************************ // **********************************
// AN IMPORTANT NOTE ABOUT TYPEAHEADS // AN IMPORTANT NOTE ABOUT TYPEAHEADS
//************************************ // **********************************
// They do not do any HTML escaping, at all. // They do not do any HTML escaping, at all.
// And your input to them is rendered as though it were HTML by // And your input to them is rendered as though it were HTML by
// the default highlighter. // the default highlighter.

View File

@@ -463,7 +463,7 @@ function drafts_scroll(next_focus_draft_row) {
const total_dist = dist_from_top + next_focus_draft_row[0].clientHeight; const total_dist = dist_from_top + next_focus_draft_row[0].clientHeight;
const dist_from_bottom = $(".drafts-container")[0].clientHeight - total_dist; const dist_from_bottom = $(".drafts-container")[0].clientHeight - total_dist;
if (dist_from_bottom < -4) { if (dist_from_bottom < -4) {
//-4 is the min dist from the bottom that will require extra scrolling. // -4 is the min dist from the bottom that will require extra scrolling.
$(".drafts-list")[0].scrollTop += $(".drafts-list")[0].clientHeight / 2; $(".drafts-list")[0].scrollTop += $(".drafts-list")[0].clientHeight / 2;
} }
} }

View File

@@ -126,8 +126,8 @@ const keypress_mappings = {
77: {name: "toggle_topic_mute", message_view_only: true}, // 'M' 77: {name: "toggle_topic_mute", message_view_only: true}, // 'M'
80: {name: "narrow_private", message_view_only: true}, // 'P' 80: {name: "narrow_private", message_view_only: true}, // 'P'
82: {name: "respond_to_author", message_view_only: true}, // 'R' 82: {name: "respond_to_author", message_view_only: true}, // 'R'
83: {name: "narrow_by_topic", message_view_only: true}, //'S' 83: {name: "narrow_by_topic", message_view_only: true}, // 'S'
86: {name: "view_selected_stream", message_view_only: false}, //'V' 86: {name: "view_selected_stream", message_view_only: false}, // 'V'
97: {name: "all_messages", message_view_only: true}, // 'a' 97: {name: "all_messages", message_view_only: true}, // 'a'
99: {name: "compose", message_view_only: true}, // 'c' 99: {name: "compose", message_view_only: true}, // 'c'
100: {name: "open_drafts", message_view_only: true}, // 'd' 100: {name: "open_drafts", message_view_only: true}, // 'd'

View File

@@ -88,7 +88,7 @@ export const email_address_visibility_values = {
code: 1, code: 1,
description: i18n.t("Admins, members, and guests"), description: i18n.t("Admins, members, and guests"),
}, },
//// Backend support for this configuration is not available yet. // // Backend support for this configuration is not available yet.
// admins_and_members: { // admins_and_members: {
// code: 2, // code: 2,
// description: i18n.t("Members and admins"), // description: i18n.t("Members and admins"),