Showing 60 of 123 total issues
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return dispatch(changePage(pageTypes.LOGIN))
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return dispatch(loginError())
Avoid too many return
statements within this function. Open
return dispatch(loginError())
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return dispatch(loginError())
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return newState
Avoid too many return
statements within this function. Open
return dispatch(changePage(pageTypes.LOGIN))
Avoid too many return
statements within this function. Open
return newState
Function auth
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function auth(state = initialState, action) {
switch (action.type) {
case types.AUTH_LOGIN_SUBMIT:
var newState = Object.assign({}, state)
newState.loginLoading = true
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function config(state = initialState, action) {
switch (action.type) {
case types.CONFIG_SET_PAGE:
if (pageTypes[action.page] != null) {
var newState = Object.assign({}, state)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function left
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
left: (props, state, context) => {
if (props.state.sideBar.show === true && props.state.config.singlePageView !== true) {
if (props.state.responsive.device.tablet === true) {
return props.state.sideBar.smallSize
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {bauhaus} = this.props
var props = Object.assign({}, this.props)
props.bauhaus._state = props.bauhaus._contentState[this._bauhausId] || {}
props.bauhaus._setState = this.createSetStateAction(this._bauhausId)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"