Replace tslint by eslint

This commit is contained in:
Jonas Lochmann
2022-01-17 01:00:00 +01:00
parent b43059f8e2
commit f028b99bbc
24 changed files with 2498 additions and 311 deletions
+3 -5
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -18,13 +18,11 @@
import { ChildAction } from './basetypes'
export class ChildSignInAction extends ChildAction {
static instance = new ChildSignInAction()
constructor () {
super()
}
static parse = (_: SerializedChildSignInAction) => (
new ChildSignInAction()
)
}
export interface SerializedChildSignInAction {
+1 -3
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -23,8 +23,6 @@ export class ForceSyncAction extends AppLogicAction {
private constructor () {
super()
}
static parse = (_: SerializedForceSyncAction) => ForceSyncAction.instance
}
export interface SerializedForceSyncAction {
+3 -3
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -48,13 +48,13 @@ export const parseAppLogicAction = (serialized: SerializedAppLogicAction): AppLo
} else if (serialized.type === 'ADD_INSTALLED_APPS') {
return AddInstalledAppsAction.parse(serialized)
} else if (serialized.type === 'FORCE_SYNC') {
return ForceSyncAction.parse(serialized)
return ForceSyncAction.instance
} else if (serialized.type === 'MARK_TASK_PENDING') {
return MarkTaskPendingAction.parse(serialized)
} else if (serialized.type === 'REMOVE_INSTALLED_APPS') {
return RemoveInstalledAppsAction.parse(serialized)
} else if (serialized.type === 'SIGN_OUT_AT_DEVICE') {
return SignOutAtDeviceAction.parse(serialized)
return SignOutAtDeviceAction.instance
} else if (serialized.type === 'TRIED_DISABLING_DEVICE_ADMIN') {
return new TriedDisablingDeviceAdminAction()
} else if (serialized.type === 'UPDATE_APP_ACTIVITIES') {
+2 -2
View File
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -25,7 +25,7 @@ export const parseChildAction = (serialized: SerializedChildAction) => {
if (serialized.type === 'CHILD_CHANGE_PASSWORD') {
return ChildChangePasswordAction.parse(serialized)
} else if (serialized.type === 'CHILD_SIGN_IN') {
return ChildSignInAction.parse(serialized)
return ChildSignInAction.instance
} else {
throw new UnknownActionTypeException({ group: 'child' })
}
-2
View File
@@ -23,8 +23,6 @@ export class SignOutAtDeviceAction extends AppLogicAction {
private constructor () {
super()
}
static parse = (_: SerializedSignOutAtDeviceAction) => SignOutAtDeviceAction.instance
}
export interface SerializedSignOutAtDeviceAction {