better linting (#72)

Improve linting and fix linting errors

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Philip Molares 2020-05-27 15:43:28 +02:00 committed by GitHub
parent efb6513205
commit eba59ae622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 2413 additions and 1867 deletions

View file

@ -1,20 +1,20 @@
import {getBackendConfig, getFrontendConfig} from "../api/config";
import {setFrontendConfig} from "../redux/frontend-config/methods";
import {setBackendConfig} from "../redux/backend-config/methods";
import {getAndSetUser} from "../utils/apiUtils";
import { getBackendConfig, getFrontendConfig } from '../api/config'
import { setFrontendConfig } from '../redux/frontend-config/methods'
import { setBackendConfig } from '../redux/backend-config/methods'
import { getAndSetUser } from '../utils/apiUtils'
export async function loadAllConfig() {
const frontendConfig = await getFrontendConfig();
if (!frontendConfig) {
return Promise.reject("Frontend config empty!");
}
setFrontendConfig(frontendConfig);
export const loadAllConfig: () => Promise<void> = async () => {
const frontendConfig = await getFrontendConfig()
if (!frontendConfig) {
return Promise.reject(new Error('Frontend config empty!'))
}
setFrontendConfig(frontendConfig)
const backendConfig = await getBackendConfig()
if (!backendConfig) {
return Promise.reject("Backend config empty!");
}
setBackendConfig(backendConfig)
const backendConfig = await getBackendConfig()
if (!backendConfig) {
return Promise.reject(new Error('Backend config empty!'))
}
setBackendConfig(backendConfig)
await getAndSetUser();
}
await getAndSetUser()
}