← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Tom Wardill has proposed merging ~twom/launchpad:eslint-distroseriesdifference into launchpad:master.

Commit message:
Ignore no-new in distroseriesdifference

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/407011
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~twom/launchpad:eslint-distroseriesdifference into launchpad:master.
diff --git a/lib/lp/registry/javascript/distroseriesdifferences_details.js b/lib/lp/registry/javascript/distroseriesdifferences_details.js
index 7f267ed..2f4066c 100644
--- a/lib/lp/registry/javascript/distroseriesdifferences_details.js
+++ b/lib/lp/registry/javascript/distroseriesdifferences_details.js
@@ -106,6 +106,10 @@ Y.extend(ExpandableRowWidget, Y.Base, {
         var blacklist_slot = container.one('div.blacklist-options');
 
         if (blacklist_slot !== null) {
+            // XXX the structure of these widgets means they
+            // are creating side effects on new, but still return
+            // undefined, so can't be used as variables.
+            // eslint-disable-next-line no-new
             new BlacklistWidget(
                 {srcNode: blacklist_slot,
                  sourceName: source_name,
@@ -617,6 +621,10 @@ namespace.AddCommentWidget = AddCommentWidget;
 
 namespace.setup = function() {
     Y.all('table.listing a.toggle-extra').each(function(toggle){
+        // XXX the structure of these widgets means they
+        // are creating side effects on new, but still return
+        // undefined, so can't be used as variables.
+        // eslint-disable-next-line no-new
         new namespace.ExpandableRowWidget({toggle: toggle});
     });
 };
diff --git a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
index 7f72f19..682470d 100644
--- a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
+++ b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
@@ -98,6 +98,10 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
         },
 
         test_initializer: function() {
+            // XXX the structure of these widgets means they
+            // are creating side effects on new, but still return
+            // undefined, so can't be used as variables.
+            // eslint-disable-next-line no-new
             new module.ExpandableRowWidget({toggle: this.toggle});
             Y.Assert.isTrue(this.toggle.hasClass('treeCollapsed'));
             Y.Assert.isTrue(this.toggle.hasClass('sprite'));