Showing 76 of 358 total issues
Avoid too many return
statements within this function. Open
return Date(this.props, template)
Avoid too many return
statements within this function. Open
return YesNo(this.props, true)
Avoid too many return
statements within this function. Open
return Capitalize(this.props)
Avoid too many return
statements within this function. Open
return Empty(this.props)
Avoid too many return
statements within this function. Open
return this._handleFailure()
Function previous
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const previous = (state, action) => ({
...state,
month: state.month !== null ? (state.month === 0 ? 11 : state.month - 1) : null,
year: state.year !== null ? (state.month === 0 ? state.year - 1 : state.year) : null
})
- 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 _scrollListener
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_scrollListener() {
const { signpost } = this.state
const { notificationPercent, onReachBottom } = this.props
const bottomPosition = this.scrollpane.scrollHeight - (this.scrollpane.scrollTop + this.scrollpane.offsetHeight)
const percentRemaining = (bottomPosition / this.scrollpane.scrollHeight) * 100
- 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 _getClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_getClass() {
const { component, basic, className, color, disabled, mobile, status } = this.props
if(component) return ''
const classes = className ? className.split(' ') : ['ui', color, 'fluid', 'button']
classes.push('reframe-button')
- 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 { active, infinite, slides, total } = this.props
return (
<div className="reframe-carousel">
{ total > 0 &&
- 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 _getBodyClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_getBodyClass(column) {
let classes = []
if(column.primary === true) classes.push('mobile')
if(column.format === 'check' || column.collapsing === true) classes.push('collapsing')
if(column.format === 'check' || column.centered === true) classes.push('centered')
- 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 _getMenuClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_getMenuClass() {
const { active, animating } = this.state
const classes = ['menu','transition']
if(!animating && !active) classes.push('hidden')
if(animating || active) classes.push('visible')
- 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 next
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const next = (state, action) => ({
...state,
month: state.month !== null ? (state.month === 11 ? 0 : state.month + 1) : null,
year: state.year !== null ? (state.month === 11 ? state.year + 1 : state.year) : null
})
- 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 { component, content, empty, items, title } = this.props
return (
<div className="reframe-list-section">
{ title &&
- 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 _handleSubmit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_handleSubmit() {
const { action, filtered, isBusy, isValid, method, onSubmit, onSubmitForm, onValidateForm, validateResults } = this.props
if(isBusy) return
if(!isValid) return onValidateForm(validateResults)
if(action) return onSubmitForm(method, action, filtered)
- 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 _handleTasks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_handleTasks(id) {
const { recordTasks } = this.props
const tasks = recordTasks.map(task => ({
...task,
handler: task.handler ? () => task.handler(id) : null,
- 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 _getConfirmChildContext
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_getConfirmChildContext() {
const { onOpen, onClose } = this.props
return {
open: (message, yes = null, no = null) => onOpen(message, null, [
{
- 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"