Bug 1165281 - Fix Loop no-spaced-func ESlint rules. r=Standard8

This commit is contained in:
Aaron Raimist 2015-06-01 10:23:00 -04:00
parent 877daf65ee
commit 88e065697c
8 changed files with 12 additions and 13 deletions

View File

@ -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)

View File

@ -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.

View File

@ -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;
}

View File

@ -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") +

View File

@ -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
});

View File

@ -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
});

View File

@ -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);

View File

@ -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"