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

Proposed by Colin Watson
Status: Merged
Merged at revision: 18465
Proposed branch: lp:~cjwatson/launchpad/eslint-lexical-fixes
Merge into: lp:launchpad
Diff against target: 269 lines (+32/-25)
17 files modified
lib/lp/app/javascript/comment.js (+1/-1)
lib/lp/app/javascript/date.js (+1/-1)
lib/lp/app/javascript/deprecated/ui.js (+2/-1)
lib/lp/app/javascript/subscribers/subscribers_list.js (+1/-1)
lib/lp/app/javascript/testing/helpers.js (+2/-1)
lib/lp/app/javascript/tests/test_comment.js (+1/-1)
lib/lp/app/javascript/ui/banner.js (+4/-4)
lib/lp/code/javascript/branchmergeproposal.status.js (+2/-1)
lib/lp/code/javascript/gitrepository.edit.js (+2/-1)
lib/lp/code/javascript/productseries-setbranch.js (+1/-1)
lib/lp/code/javascript/sourcepackagerecipe.new.js (+7/-4)
lib/lp/code/javascript/tests/test_gitrepository.edit.js (+1/-1)
lib/lp/registry/javascript/distroseries/initseries.js (+2/-2)
lib/lp/registry/javascript/distroseriesdifferences_details.js (+1/-1)
lib/lp/services/webhooks/javascript/deliveries.js (+2/-2)
lib/lp/services/webhooks/javascript/tests/test_deliveries.js (+1/-1)
lib/lp/soyuz/javascript/lp_dynamic_dom_updater.js (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/launchpad/eslint-lexical-fixes
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+331230@code.launchpad.net

Commit message

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

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Self-approving since this is boring and trivial.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
353 return true;353 return true;
354 }354 }
355 if (this.has_inline()) {355 if (this.has_inline()) {
356 return true356 return true;
357 }357 }
358 return namespace.Comment.prototype.validate.apply(this);358 return namespace.Comment.prototype.validate.apply(this);
359 },359 },
360360
=== 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 @@
2 * GNU Affero General Public License version 3 (see the file LICENSE). */2 * GNU Affero General Public License version 3 (see the file LICENSE). */
33
4YUI.add('lp.app.date', function(Y) {4YUI.add('lp.app.date', function(Y) {
5 5
6var namespace = Y.namespace('lp.app.date');6var namespace = Y.namespace('lp.app.date');
77
8namespace.parse_date = function(str) {8namespace.parse_date = function(str) {
99
=== 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 @@
1111
12 module.update_field = function(selector, content)12 module.update_field = function(selector, content)
13 {13 {
14 if (Y.Lang.isString(content))14 if (Y.Lang.isString(content)) {
15 content = Y.Escape.html(content);15 content = Y.Escape.html(content);
16 }
1617
17 var element = Y.one(selector);18 var element = Y.one(selector);
18 element.setContent(content);19 element.setContent(content);
1920
=== 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 @@
199 }199 }
200 if (this._updateSubscribersList(subscriber)) {200 if (this._updateSubscribersList(subscriber)) {
201 if (subscriber.can_edit === true) {201 if (subscriber.can_edit === true) {
202 this.subscribers_list.addSubscriber(subscriber, level, 202 this.subscribers_list.addSubscriber(subscriber, level,
203 false, {203 false, {
204 unsubscribe_callback: unsubscribe_callback});204 unsubscribe_callback: unsubscribe_callback});
205 } else {205 } else {
206206
=== 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 @@
55 this.get = function(url, config) {55 this.get = function(url, config) {
56 this._call('get', config, arguments);56 this._call('get', config, arguments);
57 };57 };
58 }58 };
59
59 /**60 /**
60 * Captures call data and simulates callbacks.61 * Captures call data and simulates callbacks.
61 *62 *
6263
=== 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 @@
115 var comment = this._get_mocked_comment();115 var comment = this._get_mocked_comment();
116 var reset_contents_called = false;116 var reset_contents_called = false;
117 comment.reset_contents = function () {117 comment.reset_contents = function () {
118 reset_contents_called = true; 118 reset_contents_called = true;
119 };119 };
120 comment.insert_comment_HTML('<span id="fake"></span>');120 comment.insert_comment_HTML('<span id="fake"></span>');
121 Y.Assert.isTrue(reset_contents_called);121 Y.Assert.isTrue(reset_contents_called);
122122
=== 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 @@
224 if (obj.is_beta) {224 if (obj.is_beta) {
225 content = content + [225 content = content + [
226 '<span class="beta-feature">',226 '<span class="beta-feature">',
227 obj.title,227 obj.title
228 ].join('')228 ].join('');
229 if (obj.url !== '') {229 if (obj.url !== '') {
230 content = content + [230 content = content + [
231 '&nbsp;<a class="info-link" href="',231 '&nbsp;<a class="info-link" href="',
232 obj.url + '">(read more)</a>',232 obj.url + '">(read more)</a>'
233 ].join('')233 ].join('');
234 }234 }
235 content = content + [235 content = content + [
236 '</span>'236 '</span>'
237237
=== 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 @@
115 old_row.remove();115 old_row.remove();
116 }116 }
117 }117 }
118 // Remove all left over old rows, and add all left over new rows.118 // Remove all left over old rows, and add all left over
119 // new rows.
119 while (old_pos < old_size) {120 while (old_pos < old_size) {
120 old_row = old_rows.item(old_pos);121 old_row = old_rows.item(old_pos);
121 ++old_pos;122 ++old_pos;
122123
=== 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 @@
18 module.onclick_target = function(e) {18 module.onclick_target = function(e) {
19 var value = false;19 var value = false;
20 Y.all('input[name="field.target"]').each(function(node) {20 Y.all('input[name="field.target"]').each(function(node) {
21 if (node.get('checked'))21 if (node.get('checked')) {
22 value = node.get('value');22 value = node.get('value');
23 }
23 });24 });
24 module.set_enabled('field.owner_default', value !== 'personal');25 module.set_enabled('field.owner_default', value !== 'personal');
25 };26 };
2627
=== 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 @@
30 for (i = 0; i < vcs.length; i++) {30 for (i = 0; i < vcs.length; i++) {
31 if (vcs[i].checked) {31 if (vcs[i].checked) {
32 return vcs[i].value;32 return vcs[i].value;
33 } 33 }
34 }34 }
35 return null;35 return null;
36 };36 };
3737
=== 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 @@
13 function getRadioSelectedValue(selector) {13 function getRadioSelectedValue(selector) {
14 var tmpValue= false;14 var tmpValue= false;
15 Y.all(selector).each(function(node) {15 Y.all(selector).each(function(node) {
16 if (node.get('checked'))16 if (node.get('checked')) {
17 tmpValue = node.get('value');17 tmpValue = node.get('value');
18 });18 }
19 });
19 return tmpValue;20 return tmpValue;
20 }21 }
2122
@@ -26,7 +27,9 @@
26 function set_enabled(field_id, is_enabled) {27 function set_enabled(field_id, is_enabled) {
27 var field = Y.DOM.byId(field_id);28 var field = Y.DOM.byId(field_id);
28 field.disabled = !is_enabled;29 field.disabled = !is_enabled;
29 if (is_enabled && set_field_focus) field.focus();30 if (is_enabled && set_field_focus) {
31 field.focus();
32 }
30 }33 }
3134
32 module.onclick_use_ppa = function(e) {35 module.onclick_use_ppa = function(e) {
3336
=== 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 @@
91 // The owner_default checkbox is enabled.91 // The owner_default checkbox is enabled.
92 Y.Assert.isFalse(this.owner_default.disabled,92 Y.Assert.isFalse(this.owner_default.disabled,
93 'owner_default not disabled');93 'owner_default not disabled');
94 },94 }
95 }));95 }));
96}, '0.1', {96}, '0.1', {
97 requires: ['lp.testing.runner', 'test', 'test-console',97 requires: ['lp.testing.runner', 'test', 'test-console',
9898
=== 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 @@
147 if (copy_package === 'none') {147 if (copy_package === 'none') {
148 packageset_ids = [];148 packageset_ids = [];
149 } else if (copy_package === 'all') {149 } else if (copy_package === 'all') {
150 packageset_ids = null; 150 packageset_ids = null;
151 } else {151 } else {
152 packageset_ids = values(this.packagesetChoice.get("choice"));152 packageset_ids = values(this.packagesetChoice.get("choice"));
153 }153 }
@@ -286,7 +286,7 @@
286 .set("name", "field.package_copy_choice")286 .set("name", "field.package_copy_choice")
287 .set("multiple", false)287 .set("multiple", false)
288 .set("label", "Packages to copy:")288 .set("label", "Packages to copy:")
289 .set("description", 289 .set("description",
290 "Choose which packages to copy from the parent series ")290 "Choose which packages to copy from the parent series ")
291 .set("choices", [291 .set("choices", [
292 {text: "Copy all packages", value: "all"},292 {text: "Copy all packages", value: "all"},
293293
=== 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 @@
568 },568 },
569569
570 /**570 /**
571 * Handle the add comment event triggered by theĀ 'add comment' form.571 * Handle the add comment event triggered by the 'add comment' form.
572 *572 *
573 * This method adds the content of the comment form as a comment via573 * This method adds the content of the comment form as a comment via
574 * the API.574 * the API.
575575
=== 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 @@
54WebhookDeliveries.ATTRS = {54WebhookDeliveries.ATTRS = {
5555
56 deliveries: {56 deliveries: {
57 value: [],57 value: []
58 }58 }
5959
60};60};
@@ -279,7 +279,7 @@
279 // delivery_retried() when the request has been sent.279 // delivery_retried() when the request has been sent.
280 this.fire(280 this.fire(
281 namespace.WebhookDeliveries.RETRY_DELIVERY,281 namespace.WebhookDeliveries.RETRY_DELIVERY,
282 delivery_url)282 delivery_url);
283 }283 }
284284
285});285});
286286
=== 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 @@
7070
71 createWidget: function(cfg) {71 createWidget: function(cfg) {
72 var config = Y.merge(cfg, {72 var config = Y.merge(cfg, {
73 srcNode: "#test-deliveries",73 srcNode: "#test-deliveries"
74 });74 });
75 var ns = Y.lp.services.webhooks.deliveries;75 var ns = Y.lp.services.webhooks.deliveries;
76 return new ns.WebhookDeliveries(config);76 return new ns.WebhookDeliveries(config);
7777
=== 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 @@
335335
336 // Update our actual poll interval.336 // Update our actual poll interval.
337 var actual_interval_updated = this._updateActualInterval(337 var actual_interval_updated = this._updateActualInterval(
338 elapsed_time)338 elapsed_time);
339 if (actual_interval_updated) {339 if (actual_interval_updated) {
340 Y.log("Actual poll interval updated to " +340 Y.log("Actual poll interval updated to " +
341 this._actual_interval + "ms.");341 this._actual_interval + "ms.");