Bug 1294545 - Enable the arrow-spacing rule for eslint. r=felipe
authorJared Wein <jwein@mozilla.com>
Tue, 16 Aug 2016 15:44:15 -0400
changeset 335594 7d7772912cf12d7acce3f85d588bc5816a6f4c48
parent 335593 23b49f827838f8462c82cad654867d846d9567c9
child 335595 e90c59d60ded2bf4b2d2a29d0aa1e912f5bacf72
push id10033
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:50:26 +0000
treeherdermozilla-aurora@5dddbefdf759 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1294545
milestone51.0a1
Bug 1294545 - Enable the arrow-spacing rule for eslint. r=felipe MozReview-Commit-ID: L4Qwpoukz8R
browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm
toolkit/.eslintrc
--- a/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
+++ b/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
@@ -90,18 +90,18 @@ add_task(function* testSyncedTabsSidebar
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: true,
     hasSyncedThisSession: true,
     getTabClients() { return Promise.resolve([]) },
     syncTabs() { return Promise.resolve(); },
   };
 
-  sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(true));
-  sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve(Cu.cloneInto(FIXTURE, {})));
+  sinon.stub(syncedTabsDeckComponent, "_accountStatus", () => Promise.resolve(true));
+  sinon.stub(SyncedTabs._internal, "getTabClients", () => Promise.resolve(Cu.cloneInto(FIXTURE, {})));
 
   yield syncedTabsDeckComponent.updatePanel();
   // This is a hacky way of waiting for the view to render. The view renders
   // after the following promise (a different instance of which is triggered
   // in updatePanel) resolves, so we wait for it here as well
   yield syncedTabsDeckComponent.tabListComponent._store.getData();
 
   Assert.ok(SyncedTabs._internal.getTabClients.called, "get clients called");
@@ -143,18 +143,18 @@ add_task(function* testSyncedTabsSidebar
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: true,
     hasSyncedThisSession: true,
     getTabClients() { return Promise.resolve([]) },
     syncTabs() { return Promise.resolve(); },
   };
 
-  sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(true));
-  sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve(Cu.cloneInto(FIXTURE, {})));
+  sinon.stub(syncedTabsDeckComponent, "_accountStatus", () => Promise.resolve(true));
+  sinon.stub(SyncedTabs._internal, "getTabClients", () => Promise.resolve(Cu.cloneInto(FIXTURE, {})));
 
   yield syncedTabsDeckComponent.updatePanel();
   // This is a hacky way of waiting for the view to render. The view renders
   // after the following promise (a different instance of which is triggered
   // in updatePanel) resolves, so we wait for it here as well
   yield syncedTabsDeckComponent.tabListComponent._store.getData();
 
   let filterInput = syncedTabsDeckComponent._window.document.querySelector(".tabsFilter");
@@ -207,25 +207,25 @@ add_task(function* testSyncedTabsSidebar
     syncTabs() { return Promise.resolve(); },
   };
 
   Assert.ok(syncedTabsDeckComponent, "component exists");
 
   sinon.spy(syncedTabsDeckComponent, "updatePanel");
   sinon.spy(syncedTabsDeckComponent, "observe");
 
-  sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.reject("Test error"));
+  sinon.stub(syncedTabsDeckComponent, "_accountStatus", () => Promise.reject("Test error"));
   yield syncedTabsDeckComponent.updatePanel();
 
   let selectedPanel = syncedTabsDeckComponent.container.querySelector(".sync-state.selected");
   Assert.ok(selectedPanel.classList.contains("notAuthedInfo"),
     "not-authed panel is selected on auth error");
 
   syncedTabsDeckComponent._accountStatus.restore();
-  sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(accountExists));
+  sinon.stub(syncedTabsDeckComponent, "_accountStatus", () => Promise.resolve(accountExists));
   yield syncedTabsDeckComponent.updatePanel();
   selectedPanel = syncedTabsDeckComponent.container.querySelector(".sync-state.selected");
   Assert.ok(selectedPanel.classList.contains("notAuthedInfo"),
     "not-authed panel is selected");
 
   accountExists = true;
   yield syncedTabsDeckComponent.updatePanel();
   selectedPanel = syncedTabsDeckComponent.container.querySelector(".sync-state.selected");
@@ -234,24 +234,24 @@ add_task(function* testSyncedTabsSidebar
 
   SyncedTabs._internal.isConfiguredToSyncTabs = true;
   yield syncedTabsDeckComponent.updatePanel();
   selectedPanel = syncedTabsDeckComponent.container.querySelector(".sync-state.selected");
   Assert.ok(selectedPanel.classList.contains("tabs-fetching"),
     "tabs fetch panel is selected");
 
   SyncedTabs._internal.hasSyncedThisSession = true;
-  sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve([]));
+  sinon.stub(SyncedTabs._internal, "getTabClients", () => Promise.resolve([]));
   yield syncedTabsDeckComponent.updatePanel();
   selectedPanel = syncedTabsDeckComponent.container.querySelector(".sync-state.selected");
   Assert.ok(selectedPanel.classList.contains("singleDeviceInfo"),
     "tabs fetch panel is selected");
 
   SyncedTabs._internal.getTabClients.restore();
-  sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve([{id: "mock"}]));
+  sinon.stub(SyncedTabs._internal, "getTabClients", () => Promise.resolve([{id: "mock"}]));
   yield syncedTabsDeckComponent.updatePanel();
   selectedPanel = syncedTabsDeckComponent.container.querySelector(".sync-state.selected");
   Assert.ok(selectedPanel.classList.contains("tabs-container"),
     "tabs panel is selected");
 });
 
 add_task(testClean);
 
@@ -265,18 +265,18 @@ add_task(function* testSyncedTabsSidebar
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: true,
     hasSyncedThisSession: true,
     getTabClients() { return Promise.resolve([]) },
     syncTabs() { return Promise.resolve(); },
   };
 
-  sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(true));
-  sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve(Cu.cloneInto(FIXTURE, {})));
+  sinon.stub(syncedTabsDeckComponent, "_accountStatus", () => Promise.resolve(true));
+  sinon.stub(SyncedTabs._internal, "getTabClients", () => Promise.resolve(Cu.cloneInto(FIXTURE, {})));
 
   yield syncedTabsDeckComponent.updatePanel();
   // This is a hacky way of waiting for the view to render. The view renders
   // after the following promise (a different instance of which is triggered
   // in updatePanel) resolves, so we wait for it here as well
   yield syncedTabsDeckComponent.tabListComponent._store.getData();
 
   info("Right-clicking the search box should show text-related actions");
--- a/browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js
+++ b/browser/components/syncedtabs/test/xpcshell/test_SyncedTabsDeckComponent.js
@@ -12,17 +12,17 @@ let { DeckView } = Cu.import("resource:/
 add_task(function* testInitUninit() {
   let deckStore = new SyncedTabsDeckStore();
   let listComponent = {};
 
   let ViewMock = sinon.stub();
   let view = {render: sinon.spy(), destroy: sinon.spy(), container: {}};
   ViewMock.returns(view);
 
-  sinon.stub(SyncedTabs, "syncTabs", ()=> Promise.resolve());
+  sinon.stub(SyncedTabs, "syncTabs", () => Promise.resolve());
 
   sinon.spy(deckStore, "on");
   sinon.stub(deckStore, "setPanels");
 
   let component = new SyncedTabsDeckComponent({
     window,
     deckStore,
     listComponent,
@@ -81,17 +81,17 @@ add_task(function* testObserver() {
   let deckStore = new SyncedTabsDeckStore();
   let listStore = new SyncedTabsListStore(SyncedTabs);
   let listComponent = {};
 
   let ViewMock = sinon.stub();
   let view = {render: sinon.spy(), destroy: sinon.spy(), container: {}};
   ViewMock.returns(view);
 
-  sinon.stub(SyncedTabs, "syncTabs", ()=> Promise.resolve());
+  sinon.stub(SyncedTabs, "syncTabs", () => Promise.resolve());
 
   sinon.spy(deckStore, "on");
   sinon.stub(deckStore, "setPanels");
 
   sinon.stub(listStore, "getData");
 
   let component = new SyncedTabsDeckComponent({
     window,
@@ -141,17 +141,17 @@ add_task(function* testPanelStatus() {
   let component = new SyncedTabsDeckComponent({
     fxAccounts,
     deckStore,
     listComponent,
     SyncedTabs: SyncedTabsMock,
   });
 
   let isAuthed = false;
-  sinon.stub(fxAccounts, "accountStatus", ()=> Promise.resolve(isAuthed));
+  sinon.stub(fxAccounts, "accountStatus", () => Promise.resolve(isAuthed));
   let result = yield component.getPanelStatus();
   Assert.equal(result, component.PANELS.NOT_AUTHED_INFO);
 
   isAuthed = true;
 
   SyncedTabsMock.isConfiguredToSyncTabs = false;
   result = yield component.getPanelStatus();
   Assert.equal(result, component.PANELS.TABS_DISABLED);
@@ -160,30 +160,30 @@ add_task(function* testPanelStatus() {
 
   SyncedTabsMock.hasSyncedThisSession = false;
   result = yield component.getPanelStatus();
   Assert.equal(result, component.PANELS.TABS_FETCHING);
 
   SyncedTabsMock.hasSyncedThisSession = true;
 
   let clients = [];
-  sinon.stub(SyncedTabsMock, "getTabClients", ()=> Promise.resolve(clients));
+  sinon.stub(SyncedTabsMock, "getTabClients", () => Promise.resolve(clients));
   result = yield component.getPanelStatus();
   Assert.equal(result, component.PANELS.SINGLE_DEVICE_INFO);
 
   clients = ["mock-client"];
   result = yield component.getPanelStatus();
   Assert.equal(result, component.PANELS.TABS_CONTAINER);
 
   fxAccounts.accountStatus.restore();
-  sinon.stub(fxAccounts, "accountStatus", ()=> Promise.reject("err"));
+  sinon.stub(fxAccounts, "accountStatus", () => Promise.reject("err"));
   result = yield component.getPanelStatus();
   Assert.equal(result, component.PANELS.NOT_AUTHED_INFO);
 
-  sinon.stub(component, "getPanelStatus", ()=> Promise.resolve("mock-panelId"));
+  sinon.stub(component, "getPanelStatus", () => Promise.resolve("mock-panelId"));
   sinon.spy(deckStore, "selectPanel");
   yield component.updatePanel();
   Assert.ok(deckStore.selectPanel.calledWith("mock-panelId"));
 });
 
 add_task(function* testActions() {
   let listComponent = {};
   let windowMock = {
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm
@@ -15,17 +15,17 @@ Cu.import("resource://gre/modules/Task.j
 this.Buttons = {
 
   init(libDir) {
     createWidget();
   },
 
   configurations: {
     navBarButtons: {
-      applyConfig: Task.async(() =>{
+      applyConfig: Task.async(() => {
         let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
         CustomizableUI.addWidgetToArea("screenshot-widget", CustomizableUI.AREA_NAVBAR);
       }),
     },
 
     tabsToolbarButtons: {
       applyConfig: Task.async(() => {
         let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
--- a/toolkit/.eslintrc
+++ b/toolkit/.eslintrc
@@ -1,17 +1,17 @@
 {
   // When adding items to this file please check for effects on all of toolkit
   // and browser
   "rules": {
     // Braces only needed for multi-line arrow function blocks
     // "arrow-body-style": [2, "as-needed"],
 
     // Require spacing around =>
-    // "arrow-spacing": 2,
+    "arrow-spacing": 2,
 
     // Always require spacing around a single line block
     "block-spacing": 2,
 
     // No newline before open brace for a block
     // "brace-style": 2,
 
     // No space before always a space after a comma