mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1165281 - Fix Loop no-spaced-func ESlint rules. r=Standard8
This commit is contained in:
parent
877daf65ee
commit
88e065697c
@ -52,7 +52,6 @@
|
||||
"no-redeclare": 0, // TODO: Remove (use default)
|
||||
"no-return-assign": 0, // TODO: Remove (use default)
|
||||
"no-shadow": 0, // TODO: Remove (use default)
|
||||
"no-spaced-func": 0, // TODO: Remove (use default)
|
||||
"no-underscore-dangle": 0, // Leave as 0. Commonly used for private variables.
|
||||
"no-unneeded-ternary": 2,
|
||||
"no-unused-expressions": 0, // TODO: Remove (use default)
|
||||
|
@ -109,7 +109,7 @@ loop.store.FxOSActiveRoomStore = (function() {
|
||||
return;
|
||||
}
|
||||
if (event.target.error.name !== "NO_PROVIDER") {
|
||||
console.error ("Unexpected " + event.target.error.name);
|
||||
console.error("Unexpected " + event.target.error.name);
|
||||
return;
|
||||
}
|
||||
// We need to install the FxOS app.
|
||||
|
@ -268,7 +268,7 @@ const batch = function(operation, data, callback) {
|
||||
let processed = [];
|
||||
if (!LoopContactsInternal.hasOwnProperty(operation) ||
|
||||
typeof LoopContactsInternal[operation] != "function") {
|
||||
callback(new Error ("LoopContactsInternal does not contain a '" +
|
||||
callback(new Error("LoopContactsInternal does not contain a '" +
|
||||
operation + "' method"));
|
||||
return;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ PushSocket.prototype = {
|
||||
|
||||
connect: function(pushUri, onMsg, onStart, onClose) {
|
||||
if (!pushUri || !onMsg || !onStart || !onClose) {
|
||||
throw new Error("PushSocket: missing required parameter(s):"
|
||||
throw new Error("PushSocket: missing required parameter(s):" +
|
||||
(pushUri ? "" : " pushUri") +
|
||||
(onMsg ? "" : " onMsg") +
|
||||
(onStart ? "" : " onStart") +
|
||||
|
@ -165,7 +165,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
|
||||
|
||||
request.onerror = (function(event) {
|
||||
if (event.target.error.name !== "NO_PROVIDER") {
|
||||
console.error ("Unexpected " + event.target.error.name);
|
||||
console.error("Unexpected " + event.target.error.name);
|
||||
this.trigger("session:error", "fxos_app_needed", {
|
||||
fxosAppName: loop.config.fxosApp.name
|
||||
});
|
||||
|
@ -165,7 +165,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
|
||||
|
||||
request.onerror = (function(event) {
|
||||
if (event.target.error.name !== "NO_PROVIDER") {
|
||||
console.error ("Unexpected " + event.target.error.name);
|
||||
console.error("Unexpected " + event.target.error.name);
|
||||
this.trigger("session:error", "fxos_app_needed", {
|
||||
fxosAppName: loop.config.fxosApp.name
|
||||
});
|
||||
|
@ -169,7 +169,7 @@ describe("loop.store.RoomStore", function () {
|
||||
});
|
||||
|
||||
describe("refresh", function() {
|
||||
it ("should clear the list of rooms", function() {
|
||||
it("should clear the list of rooms", function() {
|
||||
fakeMozLoop.rooms.trigger("refresh", "refresh");
|
||||
|
||||
expect(store.getStoreState().rooms).to.have.length.of(0);
|
||||
|
@ -170,7 +170,7 @@ const monkeyPatchImporter = function(importer) {
|
||||
|
||||
add_task(function* test_CardDavImport() {
|
||||
let importer = monkeyPatchImporter(new CardDavImporter());
|
||||
yield new Promise ((resolve, reject) => {
|
||||
yield new Promise((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.com",
|
||||
@ -265,7 +265,7 @@ add_task(function* test_CardDavImport() {
|
||||
Assert.equal(c.name[0], "anyone@example.com", "Full name should be synthesized correctly");
|
||||
|
||||
// Check that a re-import doesn't cause contact duplication.
|
||||
yield new Promise ((resolve, reject) => {
|
||||
yield new Promise((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.com",
|
||||
@ -278,7 +278,7 @@ add_task(function* test_CardDavImport() {
|
||||
"Second import shouldn't increase DB size");
|
||||
|
||||
// Check that errors are propagated back to caller
|
||||
let error = yield new Promise ((resolve, reject) => {
|
||||
let error = yield new Promise((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.com",
|
||||
@ -289,7 +289,7 @@ add_task(function* test_CardDavImport() {
|
||||
});
|
||||
Assert.equal(error.message, "401 Auth Failure", "Auth error should propagate");
|
||||
|
||||
error = yield new Promise ((resolve, reject) => {
|
||||
error = yield new Promise((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.invalid",
|
||||
@ -304,7 +304,7 @@ add_task(function* test_CardDavImport() {
|
||||
mockDb.getByServiceId = function(serviceId, callback) {
|
||||
callback(new Error("getByServiceId failed"));
|
||||
};
|
||||
error = yield new Promise ((resolve, reject) => {
|
||||
error = yield new Promise((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.com",
|
||||
@ -316,7 +316,7 @@ add_task(function* test_CardDavImport() {
|
||||
Assert.equal(error.message, "getByServiceId failed", "Database error should propagate");
|
||||
mockDb.getByServiceId = tmp;
|
||||
|
||||
error = yield new Promise ((resolve, reject) => {
|
||||
error = yield new Promise((resolve, reject) => {
|
||||
info("Initiating import");
|
||||
importer.startImport({
|
||||
"host": "example.com"
|
||||
|
Loading…
Reference in New Issue
Block a user