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 {CLEAR_USER_ACTION_TYPE, ClearUserAction, SET_USER_ACTION_TYPE, SetUserAction, UserState} from "./types";
import {store} from "../../utils/store";
import { CLEAR_USER_ACTION_TYPE, ClearUserAction, SET_USER_ACTION_TYPE, SetUserAction, UserState } from './types'
import { store } from '../../utils/store'
export const setUser = (state: UserState) => {
const action: SetUserAction = {
type: SET_USER_ACTION_TYPE,
payload: {
state
}
export const setUser: (state: UserState) => void = (state: UserState) => {
const action: SetUserAction = {
type: SET_USER_ACTION_TYPE,
payload: {
state
}
store.dispatch(action);
}
store.dispatch(action)
}
export const clearUser = () => {
const action: ClearUserAction = {
type: CLEAR_USER_ACTION_TYPE,
payload: {},
}
store.dispatch(action);
}
export const clearUser: () => void = () => {
const action: ClearUserAction = {
type: CLEAR_USER_ACTION_TYPE,
payload: null
}
store.dispatch(action)
}