← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/eslint-lexical-fixes into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/eslint-lexical-fixes into lp:launchpad.

Commit message:
Fix a few trivial lexical issues (whitespace, semicolons, etc.) noticed by ESLint.

Requested reviews:
  Colin Watson (cjwatson)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/eslint-lexical-fixes/+merge/331230
-- 
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/app/javascript/comment.js'
--- lib/lp/app/javascript/comment.js	2017-07-21 17:35:14 +0000
+++ lib/lp/app/javascript/comment.js	2017-09-22 20:32:15 +0000
@@ -353,7 +353,7 @@
             return true;
         }
         if (this.has_inline()) {
-            return true
+            return true;
         }
         return namespace.Comment.prototype.validate.apply(this);
     },

=== modified file 'lib/lp/app/javascript/date.js'
--- lib/lp/app/javascript/date.js	2015-09-09 07:00:07 +0000
+++ lib/lp/app/javascript/date.js	2017-09-22 20:32:15 +0000
@@ -2,7 +2,7 @@
  * GNU Affero General Public License version 3 (see the file LICENSE). */
 
 YUI.add('lp.app.date', function(Y) {
-    
+
 var namespace = Y.namespace('lp.app.date');
 
 namespace.parse_date = function(str) {

=== modified file 'lib/lp/app/javascript/deprecated/ui.js'
--- lib/lp/app/javascript/deprecated/ui.js	2012-08-22 17:38:03 +0000
+++ lib/lp/app/javascript/deprecated/ui.js	2017-09-22 20:32:15 +0000
@@ -11,8 +11,9 @@
 
     module.update_field = function(selector, content)
     {
-      if (Y.Lang.isString(content))
+      if (Y.Lang.isString(content)) {
         content = Y.Escape.html(content);
+      }
 
       var element = Y.one(selector);
       element.setContent(content);

=== modified file 'lib/lp/app/javascript/subscribers/subscribers_list.js'
--- lib/lp/app/javascript/subscribers/subscribers_list.js	2017-07-21 17:35:14 +0000
+++ lib/lp/app/javascript/subscribers/subscribers_list.js	2017-09-22 20:32:15 +0000
@@ -199,7 +199,7 @@
     }
     if (this._updateSubscribersList(subscriber)) {
         if (subscriber.can_edit === true) {
-            this.subscribers_list.addSubscriber(subscriber, level, 
+            this.subscribers_list.addSubscriber(subscriber, level,
             false, {
                 unsubscribe_callback: unsubscribe_callback});
         } else {

=== modified file 'lib/lp/app/javascript/testing/helpers.js'
--- lib/lp/app/javascript/testing/helpers.js	2017-07-24 15:37:03 +0000
+++ lib/lp/app/javascript/testing/helpers.js	2017-09-22 20:32:15 +0000
@@ -55,7 +55,8 @@
         this.get = function(url, config) {
             this._call('get', config, arguments);
         };
-    }
+    };
+
     /**
      * Captures call data and simulates callbacks.
      *

=== modified file 'lib/lp/app/javascript/tests/test_comment.js'
--- lib/lp/app/javascript/tests/test_comment.js	2017-07-24 15:37:03 +0000
+++ lib/lp/app/javascript/tests/test_comment.js	2017-09-22 20:32:15 +0000
@@ -115,7 +115,7 @@
             var comment = this._get_mocked_comment();
             var reset_contents_called = false;
             comment.reset_contents = function () {
-                reset_contents_called = true; 
+                reset_contents_called = true;
             };
             comment.insert_comment_HTML('<span id="fake"></span>');
             Y.Assert.isTrue(reset_contents_called);

=== modified file 'lib/lp/app/javascript/ui/banner.js'
--- lib/lp/app/javascript/ui/banner.js	2016-01-28 19:26:11 +0000
+++ lib/lp/app/javascript/ui/banner.js	2017-09-22 20:32:15 +0000
@@ -224,13 +224,13 @@
                            if (obj.is_beta) {
                                content = content + [
                                  '<span class="beta-feature">',
-                                 obj.title,
-                                 ].join('')
+                                 obj.title
+                                 ].join('');
                                if (obj.url !== '') {
                                    content = content + [
                                        '&nbsp;<a class="info-link" href="',
-                                       obj.url + '">(read more)</a>',
-                                   ].join('')
+                                       obj.url + '">(read more)</a>'
+                                   ].join('');
                                }
                                content = content + [
                                    '</span>'

=== modified file 'lib/lp/code/javascript/branchmergeproposal.status.js'
--- lib/lp/code/javascript/branchmergeproposal.status.js	2017-07-24 15:37:03 +0000
+++ lib/lp/code/javascript/branchmergeproposal.status.js	2017-09-22 20:32:15 +0000
@@ -115,7 +115,8 @@
                             old_row.remove();
                         }
                     }
-                    // Remove all left over old rows, and add all left over new rows.
+                    // Remove all left over old rows, and add all left over
+                    // new rows.
                     while (old_pos < old_size) {
                         old_row = old_rows.item(old_pos);
                         ++old_pos;

=== modified file 'lib/lp/code/javascript/gitrepository.edit.js'
--- lib/lp/code/javascript/gitrepository.edit.js	2015-06-16 14:31:07 +0000
+++ lib/lp/code/javascript/gitrepository.edit.js	2017-09-22 20:32:15 +0000
@@ -18,8 +18,9 @@
     module.onclick_target = function(e) {
         var value = false;
         Y.all('input[name="field.target"]').each(function(node) {
-            if (node.get('checked'))
+            if (node.get('checked')) {
                 value = node.get('value');
+            }
         });
         module.set_enabled('field.owner_default', value !== 'personal');
     };

=== modified file 'lib/lp/code/javascript/productseries-setbranch.js'
--- lib/lp/code/javascript/productseries-setbranch.js	2017-07-21 16:43:02 +0000
+++ lib/lp/code/javascript/productseries-setbranch.js	2017-09-22 20:32:15 +0000
@@ -30,7 +30,7 @@
         for (i = 0; i < vcs.length; i++) {
             if (vcs[i].checked) {
                 return vcs[i].value;
-            } 
+            }
         }
         return null;
     };

=== modified file 'lib/lp/code/javascript/sourcepackagerecipe.new.js'
--- lib/lp/code/javascript/sourcepackagerecipe.new.js	2012-07-05 16:13:56 +0000
+++ lib/lp/code/javascript/sourcepackagerecipe.new.js	2017-09-22 20:32:15 +0000
@@ -13,9 +13,10 @@
     function getRadioSelectedValue(selector) {
       var tmpValue= false;
       Y.all(selector).each(function(node) {
-          if (node.get('checked'))
-            tmpValue = node.get('value');
-        });
+        if (node.get('checked')) {
+          tmpValue = node.get('value');
+        }
+      });
       return tmpValue;
     }
 
@@ -26,7 +27,9 @@
     function set_enabled(field_id, is_enabled) {
        var field = Y.DOM.byId(field_id);
        field.disabled = !is_enabled;
-       if (is_enabled && set_field_focus) field.focus();
+       if (is_enabled && set_field_focus) {
+         field.focus();
+       }
     }
 
     module.onclick_use_ppa = function(e) {

=== modified file 'lib/lp/code/javascript/tests/test_gitrepository.edit.js'
--- lib/lp/code/javascript/tests/test_gitrepository.edit.js	2015-06-16 14:31:07 +0000
+++ lib/lp/code/javascript/tests/test_gitrepository.edit.js	2017-09-22 20:32:15 +0000
@@ -91,7 +91,7 @@
             // The owner_default checkbox is enabled.
             Y.Assert.isFalse(this.owner_default.disabled,
                              'owner_default not disabled');
-        },
+        }
     }));
 }, '0.1', {
     requires: ['lp.testing.runner', 'test', 'test-console',

=== modified file 'lib/lp/registry/javascript/distroseries/initseries.js'
--- lib/lp/registry/javascript/distroseries/initseries.js	2017-07-24 15:37:03 +0000
+++ lib/lp/registry/javascript/distroseries/initseries.js	2017-09-22 20:32:15 +0000
@@ -147,7 +147,7 @@
         if (copy_package === 'none') {
             packageset_ids = [];
         } else if (copy_package === 'all') {
-            packageset_ids = null; 
+            packageset_ids = null;
         } else {
             packageset_ids = values(this.packagesetChoice.get("choice"));
         }
@@ -286,7 +286,7 @@
             .set("name", "field.package_copy_choice")
             .set("multiple", false)
             .set("label", "Packages to copy:")
-            .set("description", 
+            .set("description",
                 "Choose which packages to copy from the parent series ")
             .set("choices", [
                 {text: "Copy all packages", value: "all"},

=== modified file 'lib/lp/registry/javascript/distroseriesdifferences_details.js'
--- lib/lp/registry/javascript/distroseriesdifferences_details.js	2017-07-21 17:35:14 +0000
+++ lib/lp/registry/javascript/distroseriesdifferences_details.js	2017-09-22 20:32:15 +0000
@@ -568,7 +568,7 @@
     },
 
     /**
-     * Handle the add comment event triggered by the 'add comment' form.
+     * Handle the add comment event triggered by the 'add comment' form.
      *
      * This method adds the content of the comment form as a comment via
      * the API.

=== modified file 'lib/lp/services/webhooks/javascript/deliveries.js'
--- lib/lp/services/webhooks/javascript/deliveries.js	2017-07-24 15:37:03 +0000
+++ lib/lp/services/webhooks/javascript/deliveries.js	2017-09-22 20:32:15 +0000
@@ -54,7 +54,7 @@
 WebhookDeliveries.ATTRS = {
 
     deliveries: {
-        value: [],
+        value: []
     }
 
 };
@@ -279,7 +279,7 @@
         // delivery_retried() when the request has been sent.
         this.fire(
             namespace.WebhookDeliveries.RETRY_DELIVERY,
-            delivery_url)
+            delivery_url);
     }
 
 });

=== modified file 'lib/lp/services/webhooks/javascript/tests/test_deliveries.js'
--- lib/lp/services/webhooks/javascript/tests/test_deliveries.js	2015-10-20 10:05:02 +0000
+++ lib/lp/services/webhooks/javascript/tests/test_deliveries.js	2017-09-22 20:32:15 +0000
@@ -70,7 +70,7 @@
 
         createWidget: function(cfg) {
             var config = Y.merge(cfg, {
-                srcNode: "#test-deliveries",
+                srcNode: "#test-deliveries"
             });
             var ns = Y.lp.services.webhooks.deliveries;
             return new ns.WebhookDeliveries(config);

=== modified file 'lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js'
--- lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js	2017-07-21 17:35:14 +0000
+++ lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js	2017-09-22 20:32:15 +0000
@@ -335,7 +335,7 @@
 
             // Update our actual poll interval.
             var actual_interval_updated = this._updateActualInterval(
-                elapsed_time)
+                elapsed_time);
             if (actual_interval_updated) {
                 Y.log("Actual poll interval updated to " +
                     this._actual_interval + "ms.");


References