Merge ~ilasc/launchpad:eslint-fix-no-new into launchpad:master

Proposed by Ioana Lasc
Status: Merged
Approved by: Ioana Lasc
Approved revision: 29b14750f2be5f50402118189382d9aa73e609a8
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ilasc/launchpad:eslint-fix-no-new
Merge into: launchpad:master
Diff against target: 12 lines (+1/-0)
1 file modified
lib/lp/registry/javascript/tests/test_team_mailinglists.js (+1/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+407006@code.launchpad.net

Commit message

Fix no-new in test_team_mailinglists.js

Description of the change

We need the new operator in there otherwise we fail with:

Failure in '
 '/home/ilasc/launchpad/launchpad/lib/lp/registry/javascript/tests/test_team_mailinglists.html.Team '
 'Mailinglists.test_nav: Unexpected error: undefined is not a function '
 "(evaluating 'this._initBase(cfg)'

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

Generally LGTM, but could you use `eslint-disable-next-line` rather than `eslint-disable`? As I understand it, `eslint-disable` disables the rule for the rest of the block or until a matching `eslint-enable` is reached, and we don't need to be that extensive here.

review: Approve
Revision history for this message
Ioana Lasc (ilasc) wrote :

Totally agreed (in fact that's what I meant to do), thanks for catching this Colin!
Tweaked and landing.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/javascript/tests/test_team_mailinglists.js b/lib/lp/registry/javascript/tests/test_team_mailinglists.js
2index a196b0f..2932f59 100644
3--- a/lib/lp/registry/javascript/tests/test_team_mailinglists.js
4+++ b/lib/lp/registry/javascript/tests/test_team_mailinglists.js
5@@ -54,6 +54,7 @@ YUI.add('lp.registry.team.mailinglists.test', function (Y) {
6 forwards_navigation: Y.all('.last,.next'),
7 backwards_navigation: Y.all('.first,.previous')
8 };
9+ // eslint-disable-next-line no-new
10 new Y.lp.registry.team.mailinglists.MessageList(config);
11
12 var fired = false;

Subscribers

People subscribed via source and target branches

to status/vote changes: