diff --git a/src/app/services/app.ts b/src/app/services/app.ts index 84d223281..115a33608 100644 --- a/src/app/services/app.ts +++ b/src/app/services/app.ts @@ -489,14 +489,11 @@ export class CoreAppProvider { this.ssoAuthenticationDeferred = CoreUtils.instance.promiseDefer(); // Resolve it automatically after 10 seconds (it should never take that long). - const cancelTimeout = setTimeout(() => { - this.finishSSOAuthentication(); - }, 10000); + const cancelTimeout = setTimeout(() => this.finishSSOAuthentication(), 10000); // If the promise is resolved because finishSSOAuthentication is called, stop the cancel promise. - this.ssoAuthenticationDeferred.promise.then(() => { - clearTimeout(cancelTimeout); - }); + // eslint-disable-next-line promise/catch-or-return + this.ssoAuthenticationDeferred.promise.then(() => clearTimeout(cancelTimeout)); } /** diff --git a/src/app/services/lang.ts b/src/app/services/lang.ts index 7a8d30cbb..2b89a0fd1 100644 --- a/src/app/services/lang.ts +++ b/src/app/services/lang.ts @@ -248,8 +248,7 @@ export class CoreLangProvider { return language; }).catch(() => // Error getting locale. Use default language. - this.defaultLanguage, - ); + this.defaultLanguage); } catch (err) { // Error getting locale. Use default language. return Promise.resolve(this.defaultLanguage); @@ -339,8 +338,8 @@ export class CoreLangProvider { // Convert old keys format to new one. const key = values[0].replace(/^mm\.core/, 'core').replace(/^mm\./, 'core.').replace(/^mma\./, 'addon.') - .replace(/^core\.sidemenu/, 'core.mainmenu').replace(/^addon\.grades/, 'core.grades') - .replace(/^addon\.participants/, 'core.user'); + .replace(/^core\.sidemenu/, 'core.mainmenu').replace(/^addon\.grades/, 'core.grades') + .replace(/^addon\.participants/, 'core.user'); this.loadString(this.customStrings, lang, key, values[1]); }); diff --git a/tsconfig.app.json b/tsconfig.app.json index b31726606..ae7b6267b 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -6,8 +6,8 @@ "cordova-plugin-file-transfer", "cordova-plugin-inappbrowser", "cordova", - "node", - "dom-mediacapture-record" + "dom-mediacapture-record", + "node" ], "paths": { "@/*": ["*"], diff --git a/tsconfig.json b/tsconfig.json index a3bacffb3..553929710 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,9 +21,9 @@ "cordova-plugin-file-transfer", "cordova-plugin-inappbrowser", "cordova", + "dom-mediacapture-record", "jest", - "node", - "dom-mediacapture-record" + "node" ], "paths": { "@/*": ["*"], diff --git a/tsconfig.test.json b/tsconfig.test.json index 810c0668d..25bf4d29a 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,14 +1,15 @@ { "extends": "./tsconfig.json", "compilerOptions": { + "outDir": "./out-tsc/tests", "allowJs": true, "esModuleInterop": true, "emitDecoratorMetadata": true, - "outDir": "./out-tsc/tests", "types": [ "cordova-plugin-file-transfer", "cordova-plugin-inappbrowser", "cordova", + "dom-mediacapture-record", "jest", "node" ], @@ -31,8 +32,7 @@ "src/polyfills.ts" ], "include": [ - "src/**/*.test.ts", - "src/**/*.d.ts", - "src/tests/**/*.ts" + "src/**/*.ts", + "src/**/*.d.ts" ] }