From f420d01fb870651bf8b01d000965e748afb3bdc9 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Date: Wed, 2 Jun 2021 11:19:44 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20lint=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix lint errors --- addons/api/addon/services/storage.js | 5 +++-- addons/auth/addon/authenticators/base.js | 7 +++---- addons/core/addon/authenticators/oidc.js | 4 ++-- addons/core/addon/authenticators/password.js | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/api/addon/services/storage.js b/addons/api/addon/services/storage.js index ea1b7138d..d9b7aa495 100644 --- a/addons/api/addon/services/storage.js +++ b/addons/api/addon/services/storage.js @@ -76,8 +76,9 @@ export default class StorageService extends Service { const inMemory = get(config, 'storage.memory'); // Get the global context object (window) via service lookup, // because just reaching for a global is icky - const globalContext = getOwner(this).lookup('service:-document') - .documentElement.parentNode.defaultView; + const globalContext = + getOwner(this).lookup('service:-document').documentElement.parentNode + .defaultView; // If memory storage enabled, return the memory storage instance, // otherwise return localStorage. return inMemory ? this.#memoryStorage : globalContext.localStorage; diff --git a/addons/auth/addon/authenticators/base.js b/addons/auth/addon/authenticators/base.js index bdc69d504..deeea5a0d 100644 --- a/addons/auth/addon/authenticators/base.js +++ b/addons/auth/addon/authenticators/base.js @@ -72,10 +72,9 @@ export default class BaseAuthenticator extends SimpleAuthBaseAuthenticator { */ async restore(data) { if (!data) return reject(); - return this.validateToken( - data.attributes.token, - data.attributes.id - ).then(() => this.normalizeData(data)); + return this.validateToken(data.attributes.token, data.attributes.id).then( + () => this.normalizeData(data) + ); } /** diff --git a/addons/core/addon/authenticators/oidc.js b/addons/core/addon/authenticators/oidc.js index f159fa87f..245dc97cd 100644 --- a/addons/core/addon/authenticators/oidc.js +++ b/addons/core/addon/authenticators/oidc.js @@ -76,8 +76,8 @@ export default class OIDCAuthenticator extends BaseOIDCAuthenticator { * @param {string} token */ addTokenToAuthorization(token) { - const adapterPrototype = this.store.adapterFor('application').constructor - .prototype; + const adapterPrototype = + this.store.adapterFor('application').constructor.prototype; const headers = adapterPrototype?.headers; if (!headers) adapterPrototype.headers = {}; adapterPrototype.headers.Authorization = null; diff --git a/addons/core/addon/authenticators/password.js b/addons/core/addon/authenticators/password.js index 186731a7d..a2dfc8131 100644 --- a/addons/core/addon/authenticators/password.js +++ b/addons/core/addon/authenticators/password.js @@ -91,8 +91,8 @@ export default class PasswordAuthenticator extends BasePasswordAuthenticator { * @param {string} token */ addTokenToAuthorization(token) { - const adapterPrototype = this.store.adapterFor('application').constructor - .prototype; + const adapterPrototype = + this.store.adapterFor('application').constructor.prototype; const headers = adapterPrototype?.headers; if (!headers) adapterPrototype.headers = {}; adapterPrototype.headers.Authorization = null;