From 34c33b48c49f10ee76e92ae5d3320bfaeb98ef7d Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Fri, 21 Jun 2019 13:38:54 -0700 Subject: [PATCH] Bug 1561435 - Fix linting errors for services/, r=standard8 # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35931 --HG-- extra : source : f441e31c307bc815c7f05e99c0cd8ee77344dc80 extra : intermediate-source : 7e366ab79479e3a9bbdf9e61f04cfa7b6c271990 --- services/common/tests/unit/test_hawkrequest.js | 3 +++ services/common/tokenserverclient.js | 2 +- services/fxaccounts/tests/xpcshell/test_client.js | 3 +++ services/sync/modules/addonutils.js | 2 +- services/sync/modules/engines.js | 2 +- services/sync/modules/engines/addons.js | 2 +- services/sync/modules/engines/bookmarks.js | 4 ++-- services/sync/modules/keys.js | 2 +- services/sync/modules/service.js | 2 +- services/sync/modules/stages/enginesync.js | 2 +- 10 files changed, 15 insertions(+), 9 deletions(-) diff --git a/services/common/tests/unit/test_hawkrequest.js b/services/common/tests/unit/test_hawkrequest.js index 49cd7c7e6424..b00767748b32 100644 --- a/services/common/tests/unit/test_hawkrequest.js +++ b/services/common/tests/unit/test_hawkrequest.js @@ -13,14 +13,17 @@ const { Async } = ChromeUtils.import("resource://services-common/async.js"); // https://github.com/mozilla/fxa-auth-server/wiki/onepw-protocol#wiki-use-session-certificatesign-etc var SESSION_KEYS = { sessionToken: h( + // eslint-disable-next-line no-useless-concat "a0a1a2a3a4a5a6a7 a8a9aaabacadaeaf" + "b0b1b2b3b4b5b6b7 b8b9babbbcbdbebf" ), tokenID: h( + // eslint-disable-next-line no-useless-concat "c0a29dcf46174973 da1378696e4c82ae" + "10f723cf4f4d9f75 e39f4ae3851595ab" ), reqHMACkey: h( + // eslint-disable-next-line no-useless-concat "9d8f22998ee7f579 8b887042466b72d5" + "3e56ab0c094388bf 65831f702d2febc0" ), }; diff --git a/services/common/tokenserverclient.js b/services/common/tokenserverclient.js index 424b9469d79c..71c97072e179 100644 --- a/services/common/tokenserverclient.js +++ b/services/common/tokenserverclient.js @@ -360,7 +360,7 @@ TokenServerClient.prototype = { for (let k of ["id", "key", "api_endpoint", "uid", "duration"]) { if (!(k in result)) { let error = new TokenServerClientServerError( - "Expected key not " + " present in result: " + k + "Expected key not present in result: " + k ); error.cause = "malformed-response"; error.response = response; diff --git a/services/fxaccounts/tests/xpcshell/test_client.js b/services/fxaccounts/tests/xpcshell/test_client.js index 0ba6e9b6af02..e8f8382fc405 100644 --- a/services/fxaccounts/tests/xpcshell/test_client.js +++ b/services/fxaccounts/tests/xpcshell/test_client.js @@ -13,6 +13,7 @@ const FAKE_SESSION_TOKEN = // https://wiki.mozilla.org/Identity/AttachedServices/KeyServerProtocol#.2Faccount.2Fkeys var ACCOUNT_KEYS = { keyFetch: h( + // eslint-disable-next-line no-useless-concat "8081828384858687 88898a8b8c8d8e8f" + "9091929394959697 98999a9b9c9d9e9f" ), @@ -26,10 +27,12 @@ var ACCOUNT_KEYS = { ), kA: h( + // eslint-disable-next-line no-useless-concat "2021222324252627 28292a2b2c2d2e2f" + "3031323334353637 38393a3b3c3d3e3f" ), wrapKB: h( + // eslint-disable-next-line no-useless-concat "4041424344454647 48494a4b4c4d4e4f" + "5051525354555657 58595a5b5c5d5e5f" ), }; diff --git a/services/sync/modules/addonutils.js b/services/sync/modules/addonutils.js index 1331a71d88fa..ee5bcd2631e1 100644 --- a/services/sync/modules/addonutils.js +++ b/services/sync/modules/addonutils.js @@ -331,7 +331,7 @@ AddonUtilsInternal.prototype = { // add-ons without a sourceURI. if (!addon.sourceURI) { this._log.info( - "Skipping install of add-on because missing " + "sourceURI: " + addon.id + "Skipping install of add-on because missing sourceURI: " + addon.id ); return false; } diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index 0f87cbd2c1ee..21853390ad38 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -1732,7 +1732,7 @@ SyncEngine.prototype = { // are the same, does it matter? if (recordsEqual) { this._log.trace( - "Ignoring incoming item because the local item is " + "identical." + "Ignoring incoming item because the local item is identical." ); this._modified.delete(item.id); diff --git a/services/sync/modules/engines/addons.js b/services/sync/modules/engines/addons.js index 11022a54a9af..0b189c5480d3 100644 --- a/services/sync/modules/engines/addons.js +++ b/services/sync/modules/engines/addons.js @@ -643,7 +643,7 @@ AddonsStore.prototype = { if (!result) { this._log.debug( - addon.id + " not syncable: add-on not found in add-on " + "repository." + addon.id + " not syncable: add-on not found in add-on repository." ); return false; } diff --git a/services/sync/modules/engines/bookmarks.js b/services/sync/modules/engines/bookmarks.js index 15227d13e5fe..aaf981a1e8be 100644 --- a/services/sync/modules/engines/bookmarks.js +++ b/services/sync/modules/engines/bookmarks.js @@ -368,7 +368,7 @@ BaseBookmarksEngine.prototype = { let shouldWipeRemote = await PlacesSyncUtils.bookmarks.shouldWipeRemote(); if (!shouldWipeRemote) { this._log.debug( - "Checking if server sync ID ${newSyncID} matches " + "existing", + "Checking if server sync ID ${newSyncID} matches existing", { newSyncID } ); await this._ensureCurrentSyncID(newSyncID); @@ -907,7 +907,7 @@ BufferedBookmarksEngine.prototype = { let change = this._modified.changes[id]; if (!change) { this._log.error( - "Creating record for item ${id} not in strong " + "changeset", + "Creating record for item ${id} not in strong changeset", { id } ); throw new TypeError("Can't create record for unchanged item"); diff --git a/services/sync/modules/keys.js b/services/sync/modules/keys.js index 57b114f47baf..70b09f7dd850 100644 --- a/services/sync/modules/keys.js +++ b/services/sync/modules/keys.js @@ -169,7 +169,7 @@ BulkKeyBundle.prototype = { set keyPairB64(value) { if (!Array.isArray(value) || value.length != 2) { throw new Error( - "BulkKeyBundle.keyPairB64 value must be an array of 2 " + "keys." + "BulkKeyBundle.keyPairB64 value must be an array of 2 keys." ); } diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 33cfbdff4be3..f2a1f9f1de73 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -1143,7 +1143,7 @@ Sync11Service.prototype = { this.status.sync = METARECORD_DOWNLOAD_FAIL; this.errorHandler.checkServerError(this.recordManager.response); this._log.warn( - "Unknown error while downloading metadata record. " + "Aborting sync." + "Unknown error while downloading metadata record. Aborting sync." ); return false; } diff --git a/services/sync/modules/stages/enginesync.js b/services/sync/modules/stages/enginesync.js index a32609806fbe..307e6bb24476 100644 --- a/services/sync/modules/stages/enginesync.js +++ b/services/sync/modules/stages/enginesync.js @@ -187,7 +187,7 @@ EngineSynchronizer.prototype = { // throwing an exception when trying to fetch metaURL. if (!this.service.clusterURL) { this._log.debug( - "Aborting sync, no cluster URL: " + "not uploading new meta/global." + "Aborting sync, no cluster URL: not uploading new meta/global." ); return; }