Bug 1294545 - Enable the arrow-spacing rule for eslint. r=felipe

MozReview-Commit-ID: L4Qwpoukz8R
This commit is contained in:
Jared Wein 2016-08-16 15:44:15 -04:00
Родитель e6276ea7f5
Коммит 2794558914
4 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -95,8 +95,8 @@ add_task(function* testSyncedTabsSidebarList() {
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
@ -148,8 +148,8 @@ add_task(function* testSyncedTabsSidebarFilteredList() {
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
@ -212,7 +212,7 @@ add_task(function* testSyncedTabsSidebarStatus() {
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");
@ -220,7 +220,7 @@ add_task(function* testSyncedTabsSidebarStatus() {
"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"),
@ -239,14 +239,14 @@ add_task(function* testSyncedTabsSidebarStatus() {
"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"),
@ -270,8 +270,8 @@ add_task(function* testSyncedTabsSidebarContextMenu() {
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

Просмотреть файл

@ -17,7 +17,7 @@ add_task(function* testInitUninit() {
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");
@ -86,7 +86,7 @@ add_task(function* testObserver() {
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");
@ -146,7 +146,7 @@ add_task(function* testPanelStatus() {
});
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);
@ -165,7 +165,7 @@ add_task(function* testPanelStatus() {
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);
@ -174,11 +174,11 @@ add_task(function* testPanelStatus() {
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"));

Просмотреть файл

@ -20,7 +20,7 @@ this.Buttons = {
configurations: {
navBarButtons: {
applyConfig: Task.async(() =>{
applyConfig: Task.async(() => {
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
CustomizableUI.addWidgetToArea("screenshot-widget", CustomizableUI.AREA_NAVBAR);
}),

Просмотреть файл

@ -6,7 +6,7 @@
// "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,