chore(lint): Enable object-property-newline allowing all on one line.
This commit is contained in:
Родитель
ebe74cd9f5
Коммит
3167cbc738
|
@ -209,6 +209,7 @@
|
|||
"no-whitespace-before-property": 2,
|
||||
"no-with": 2,
|
||||
"object-curly-spacing": [2, "never"],
|
||||
"object-property-newline": [2, {"allowMultiplePropertiesPerLine": true}],
|
||||
"object-shorthand": [2, "always"],
|
||||
"one-var": [2, "never"],
|
||||
"one-var-declaration-per-line": [2, "initializations"],
|
||||
|
|
|
@ -13,15 +13,18 @@ module.exports = function() {
|
|||
const action = JSON.parse(event.detail);
|
||||
switch (action.type) {
|
||||
case "TOP_FRECENT_SITES_REQUEST":
|
||||
dispatch({type: "TOP_FRECENT_SITES_RESPONSE", data: fakeData.TopSites.rows.map(site => {
|
||||
return Object.assign({}, site, {
|
||||
dispatch({
|
||||
type: "TOP_FRECENT_SITES_RESPONSE",
|
||||
data: fakeData.TopSites.rows.map(site => {
|
||||
return Object.assign({}, site, {
|
||||
// images: [],
|
||||
// favicon: null,
|
||||
// favicon_url: null,
|
||||
// favicon_colors: null,
|
||||
// description: null
|
||||
});
|
||||
})});
|
||||
});
|
||||
})
|
||||
});
|
||||
break;
|
||||
case "RECENT_BOOKMARKS_REQUEST":
|
||||
if (action.meta && action.meta.append) {
|
||||
|
|
|
@ -52,9 +52,7 @@ describe("ContextMenu", () => {
|
|||
assert.ok(instance.refs.foo);
|
||||
});
|
||||
it("should call the onClick function when an option button is clicked", done => {
|
||||
setup({options: [{label: "Foo", onClick() {
|
||||
done();
|
||||
}}]});
|
||||
setup({options: [{label: "Foo", onClick() {done();}}]});
|
||||
TestUtils.Simulate.click(links[0]);
|
||||
});
|
||||
it("should call the onUserEvent function when an option button is clicked and has a userEvent", done => {
|
||||
|
|
|
@ -105,13 +105,16 @@ describe("setRowsOrError", () => {
|
|||
});
|
||||
|
||||
it("should set bookmark status of history items on RECEIVE_BOOKMARK_ADDED", () => {
|
||||
const action = {type: "RECEIVE_BOOKMARK_ADDED", data: {
|
||||
bookmarkGuid: "bookmark123",
|
||||
lastModified: 1234124,
|
||||
frecency: 200,
|
||||
bookmarkTitle: "foo",
|
||||
url: "https://foo.com"
|
||||
}};
|
||||
const action = {
|
||||
type: "RECEIVE_BOOKMARK_ADDED",
|
||||
data: {
|
||||
bookmarkGuid: "bookmark123",
|
||||
lastModified: 1234124,
|
||||
frecency: 200,
|
||||
bookmarkTitle: "foo",
|
||||
url: "https://foo.com"
|
||||
}
|
||||
};
|
||||
const prevRows = [
|
||||
{type: "history", url: "blah.com"},
|
||||
{type: "history", url: "https://foo.com", frecency: 1}
|
||||
|
@ -125,10 +128,13 @@ describe("setRowsOrError", () => {
|
|||
});
|
||||
|
||||
it("should remove bookmark status of history items on RECEIVE_BOOKMARK_REMOVED", () => {
|
||||
const action = {type: "RECEIVE_BOOKMARK_REMOVED", data: {
|
||||
url: "https://foo.com",
|
||||
bookmarkId: 123
|
||||
}};
|
||||
const action = {
|
||||
type: "RECEIVE_BOOKMARK_REMOVED",
|
||||
data: {
|
||||
url: "https://foo.com",
|
||||
bookmarkId: 123
|
||||
}
|
||||
};
|
||||
const prevRows = [
|
||||
{type: "history", url: "blah.com"},
|
||||
{
|
||||
|
|
|
@ -20,12 +20,15 @@ let openTabs;
|
|||
// otherwise, we won't be able to close it at the end of the test.
|
||||
function asyncOpenTab(urlPath) {
|
||||
return new Promise(resolve => {
|
||||
tabs.open({url: urlPath, onReady: tab => {
|
||||
openTabs.push(tab);
|
||||
app.once(CONTENT_TO_ADDON, function handler(eventName, {worker}) {
|
||||
resolve(worker);
|
||||
});
|
||||
}});
|
||||
tabs.open({
|
||||
url: urlPath,
|
||||
onReady: tab => {
|
||||
openTabs.push(tab);
|
||||
app.once(CONTENT_TO_ADDON, function handler(eventName, {worker}) {
|
||||
resolve(worker);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче