Merge ~twom/launchpad:eslint-distroseriesdifference into launchpad:master

Proposed by Tom Wardill
Status: Merged
Approved by: Tom Wardill
Approved revision: 347a02fcf950524f2b535be7c0b16604c0e635ae
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~twom/launchpad:eslint-distroseriesdifference
Merge into: launchpad:master
Diff against target: 41 lines (+12/-0)
2 files modified
lib/lp/registry/javascript/distroseriesdifferences_details.js (+8/-0)
lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+4/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+407011@code.launchpad.net

Commit message

Ignore no-new in distroseriesdifference

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/javascript/distroseriesdifferences_details.js b/lib/lp/registry/javascript/distroseriesdifferences_details.js
2index 7f267ed..2f4066c 100644
3--- a/lib/lp/registry/javascript/distroseriesdifferences_details.js
4+++ b/lib/lp/registry/javascript/distroseriesdifferences_details.js
5@@ -106,6 +106,10 @@ Y.extend(ExpandableRowWidget, Y.Base, {
6 var blacklist_slot = container.one('div.blacklist-options');
7
8 if (blacklist_slot !== null) {
9+ // XXX the structure of these widgets means they
10+ // are creating side effects on new, but still return
11+ // undefined, so can't be used as variables.
12+ // eslint-disable-next-line no-new
13 new BlacklistWidget(
14 {srcNode: blacklist_slot,
15 sourceName: source_name,
16@@ -617,6 +621,10 @@ namespace.AddCommentWidget = AddCommentWidget;
17
18 namespace.setup = function() {
19 Y.all('table.listing a.toggle-extra').each(function(toggle){
20+ // XXX the structure of these widgets means they
21+ // are creating side effects on new, but still return
22+ // undefined, so can't be used as variables.
23+ // eslint-disable-next-line no-new
24 new namespace.ExpandableRowWidget({toggle: toggle});
25 });
26 };
27diff --git a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
28index 7f72f19..682470d 100644
29--- a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
30+++ b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
31@@ -98,6 +98,10 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
32 },
33
34 test_initializer: function() {
35+ // XXX the structure of these widgets means they
36+ // are creating side effects on new, but still return
37+ // undefined, so can't be used as variables.
38+ // eslint-disable-next-line no-new
39 new module.ExpandableRowWidget({toggle: this.toggle});
40 Y.Assert.isTrue(this.toggle.hasClass('treeCollapsed'));
41 Y.Assert.isTrue(this.toggle.hasClass('sprite'));

Subscribers

People subscribed via source and target branches

to status/vote changes: