mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	lint: Check for space after if in javascript.
This commit is contained in:
		@@ -120,7 +120,7 @@ exports.check_form = function (form_selector, expected, test_name) {
 | 
			
		||||
exports.then_send_message = function (type, params) {
 | 
			
		||||
    casper.waitForSelector('#compose-send-button:enabled');
 | 
			
		||||
    casper.waitForSelector('#new_message_content', function () {
 | 
			
		||||
        if(type === "stream") {
 | 
			
		||||
        if (type === "stream") {
 | 
			
		||||
            casper.page.sendEvent('keypress', "c");
 | 
			
		||||
        }
 | 
			
		||||
        else if (type === "private") {
 | 
			
		||||
 
 | 
			
		||||
@@ -232,7 +232,7 @@ exports.setup_page = function () {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("#id_realm_invite_required").change(function () {
 | 
			
		||||
        if(this.checked) {
 | 
			
		||||
        if (this.checked) {
 | 
			
		||||
            $("#id_realm_invite_by_admins_only").removeAttr("disabled");
 | 
			
		||||
            $("#id_realm_invite_by_admins_only_label").removeClass("control-label-disabled");
 | 
			
		||||
        } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -551,7 +551,7 @@ MessageListView.prototype = {
 | 
			
		||||
            if (elem.is("div")) {
 | 
			
		||||
                new_messages_height += elem.height();
 | 
			
		||||
                // starting from the last message, ignore message heights that weren't sent by me.
 | 
			
		||||
                if(id_of_last_message_sent_by_us > -1) {
 | 
			
		||||
                if (id_of_last_message_sent_by_us > -1) {
 | 
			
		||||
                    distance_to_last_message_sent_by_me += elem.height();
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -104,7 +104,7 @@ exports.initialize = function () {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (notifications_api.checkPermission() !== 0) { // 0 is PERMISSION_ALLOWED
 | 
			
		||||
                if(tutorial.is_running()) {
 | 
			
		||||
                if (tutorial.is_running()) {
 | 
			
		||||
                    tutorial.defer(function () {
 | 
			
		||||
                        notifications_api.requestPermission(function () {
 | 
			
		||||
                            asked_permission_already = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -147,6 +147,8 @@ js_rules = [
 | 
			
		||||
     'description': 'Missing whitespace after "="'},
 | 
			
		||||
    {'pattern': '^[ ]*//[A-Za-z0-9]',
 | 
			
		||||
     'description': 'Missing space after // in comment'},
 | 
			
		||||
    {'pattern': 'if[(]',
 | 
			
		||||
     'description': 'Missing space between if and ('},
 | 
			
		||||
    {'pattern': 'else{$',
 | 
			
		||||
     'description': 'Missing space between else and {'},
 | 
			
		||||
    ] + whitespace_rules
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user