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,38 +1,38 @@
import {Reducer} from 'redux';
import {BackendConfigActions, BackendConfigState, SET_BACKEND_CONFIG_ACTION_TYPE} from './types';
import { Reducer } from 'redux'
import { BackendConfigActions, BackendConfigState, SET_BACKEND_CONFIG_ACTION_TYPE } from './types'
export const initialState: BackendConfigState = {
allowAnonymous: true,
authProviders: {
facebook: false,
github: false,
twitter: false,
gitlab: false,
dropbox: false,
ldap: false,
google: false,
saml: false,
oauth2: false,
email: false,
openid: false
},
customAuthNames: {
ldap: "",
oauth2: "",
saml: ""
},
specialLinks: {
privacy: "",
termsOfUse: "",
imprint: "",
}
};
allowAnonymous: true,
authProviders: {
facebook: false,
github: false,
twitter: false,
gitlab: false,
dropbox: false,
ldap: false,
google: false,
saml: false,
oauth2: false,
email: false,
openid: false
},
customAuthNames: {
ldap: '',
oauth2: '',
saml: ''
},
specialLinks: {
privacy: '',
termsOfUse: '',
imprint: ''
}
}
export const BackendConfigReducer: Reducer<BackendConfigState, BackendConfigActions> = (state: BackendConfigState = initialState, action: BackendConfigActions) => {
switch (action.type) {
case SET_BACKEND_CONFIG_ACTION_TYPE:
return action.payload.state;
default:
return state;
}
};
switch (action.type) {
case SET_BACKEND_CONFIG_ACTION_TYPE:
return action.payload.state
default:
return state
}
}