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