refactor: replace TSLint with ESLint

This commit is contained in:
Wieland Schöbl
2021-06-30 13:53:44 +02:00
committed by Jovan Krunić
parent 67fb4a43c9
commit d696215d08
147 changed files with 5471 additions and 2704 deletions

View File

@@ -47,19 +47,19 @@ export class AppComponent {
* @param platform TODO
* @param statusBar TODO
* @param splashScreen TODO
* @param translateService TODO
* @param thingTranslateService TODO
* @param settingsProvider TODO
* @param configProvider TODO
* @param logger An angular logger
*/
constructor(private readonly platform: Platform,
private readonly statusBar: StatusBar,
private readonly splashScreen: SplashScreen,
private readonly settingsProvider: SettingsProvider,
private readonly configProvider: ConfigProvider,
private readonly logger: NGXLogger) {
this.initializeApp();
constructor(
private readonly platform: Platform,
private readonly statusBar: StatusBar,
private readonly splashScreen: SplashScreen,
private readonly settingsProvider: SettingsProvider,
private readonly configProvider: ConfigProvider,
private readonly logger: NGXLogger,
) {
void this.initializeApp();
}
/**
@@ -67,32 +67,32 @@ export class AppComponent {
*/
async initializeApp() {
// tslint:disable-next-line: no-floating-promises
this.platform.ready()
.then(async () => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.statusBar.styleDefault();
this.splashScreen.hide();
this.platform.ready().then(async () => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.statusBar.styleDefault();
this.splashScreen.hide();
// initialise the configProvider
try {
await this.configProvider.init();
} catch (error) {
if (typeof error.name !== 'undefined') {
if (error.name === 'ConfigInitError') {
// @TODO: Issue #43 handle initialisation error and inform user
}
}
this.logger.error(error);
// initialise the configProvider
try {
await this.configProvider.init();
} catch (error) {
if (
typeof error.name !== 'undefined' &&
error.name === 'ConfigInitError'
) {
// TODO: Issue #43 handle initialisation error and inform user
}
this.logger.error(error);
}
// set order of categories in settings
this.settingsProvider.setCategoriesOrder([
'profile',
'privacy',
'credentials',
'others',
]);
});
// set order of categories in settings
this.settingsProvider.setCategoriesOrder([
'profile',
'privacy',
'credentials',
'others',
]);
});
}
}