mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-09 11:12:48 +00:00
refactor: upgrade typescript-eslint and start the stylistic migration
This commit is contained in:
@@ -69,6 +69,7 @@ export class FavoriteButtonComponent {
|
||||
event.stopPropagation();
|
||||
|
||||
this.isFavorite$.pipe(take(1)).subscribe(enabled => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
enabled ? this.favoritesService.delete(this.item) : this.favoritesService.put(this.item);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ export class OfflineNoticeComponent {
|
||||
|
||||
retry() {
|
||||
this.spinIcon.nativeElement.classList.remove('spin');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
this.spinIcon.nativeElement.offsetWidth;
|
||||
this.spinIcon.nativeElement.classList.add('spin');
|
||||
this.offlineProvider.retry();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
||||
/*
|
||||
* Copyright (C) 2020-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
|
||||
@@ -74,7 +74,7 @@ export class ThingTranslateService {
|
||||
/**
|
||||
* Returns the parsed result of the translations
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/ban-types
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-empty-object-type
|
||||
getParsedResult(target: object, key: string): any {
|
||||
return this.parser.getValueFromKeyPath(target, key);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ export class ThingTranslateService {
|
||||
public get(
|
||||
thing: SCThings,
|
||||
keyPath: string | string[],
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
): string | number | boolean | object {
|
||||
if (!isDefined(keyPath) || keyPath.length === 0) {
|
||||
throw new Error(`Parameter "keyPath" required`);
|
||||
|
||||
@@ -37,7 +37,7 @@ export class TranslateSimplePipe implements PipeTransform {
|
||||
|
||||
destroy$ = inject(DestroyRef);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
private updateValue() {
|
||||
try {
|
||||
this.value =
|
||||
|
||||
Reference in New Issue
Block a user