mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
lint: Require space after // in JS comments.
This commit is contained in:
@@ -3,7 +3,7 @@ var exports = {};
|
|||||||
var currently_editing_messages = {};
|
var currently_editing_messages = {};
|
||||||
|
|
||||||
|
|
||||||
//returns true if the edit task should end.
|
// Returns true if the edit task should end.
|
||||||
exports.save = function (row, from_topic_edited_only) {
|
exports.save = function (row, from_topic_edited_only) {
|
||||||
var msg_list = current_msg_list;
|
var msg_list = current_msg_list;
|
||||||
var message_id;
|
var message_id;
|
||||||
@@ -79,7 +79,7 @@ function handle_edit_keydown(from_topic_edited_only, e) {
|
|||||||
message_edit.end(row);
|
message_edit.end(row);
|
||||||
}
|
}
|
||||||
} else if (e.target.id === "message_edit_topic" && code === 13) {
|
} else if (e.target.id === "message_edit_topic" && code === 13) {
|
||||||
//hitting enter in topic field isn't so great.
|
// Hitting enter in topic field isn't so great.
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ js_rules = [
|
|||||||
# This rule is constructed with + to avoid triggering on itself
|
# This rule is constructed with + to avoid triggering on itself
|
||||||
{'pattern': " =" + '[^ =>~"]',
|
{'pattern': " =" + '[^ =>~"]',
|
||||||
'description': 'Missing whitespace after "="'},
|
'description': 'Missing whitespace after "="'},
|
||||||
|
{'pattern': '^[ ]*//[A-Za-z0-9]',
|
||||||
|
'description': 'Missing space after // in comment'},
|
||||||
{'pattern': 'else{$',
|
{'pattern': 'else{$',
|
||||||
'description': 'Missing space between else and {'},
|
'description': 'Missing space between else and {'},
|
||||||
] + whitespace_rules
|
] + whitespace_rules
|
||||||
|
|||||||
Reference in New Issue
Block a user