Showing 8 of 14 total issues
Function accumulateValues
has a Cognitive Complexity of 19 (exceeds 10 allowed). Consider refactoring. Open
export const accumulateValues = (obj, schema = {}, settings = {}) => {
const {
noFalsyValues = false,
falsyValue = undefined,
} = settings;
- 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 accumulateDifferentialErrors
has a Cognitive Complexity of 17 (exceeds 10 allowed). Consider refactoring. Open
export const accumulateDifferentialErrors = (
oldObj, newObj, oldError, schema = {},
) => {
if (oldObj === newObj) {
return oldError;
- 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 accumulateErrors
has a Cognitive Complexity of 14 (exceeds 10 allowed). Consider refactoring. Open
export const accumulateErrors = (obj, schema = {}) => {
const {
member,
fields,
validation,
- 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 exclusiveInBetweenCondition
has a Cognitive Complexity of 14 (exceeds 10 allowed). Consider refactoring. Open
export const exclusiveInBetweenCondition = (min, max) => (value) => {
const ok = isFalsy(value)
|| (isFalsy(min) && isFalsy(max))
|| (isFalsy(min) && value < max)
|| (isFalsy(max) && value > min)
- 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 getHandler
has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring. Open
getHandler() {
return {
...super.getHandler(),
input: {
getPropsFromApi: ({ faramElementName, faramInfo, ...otherProps }) => ({
- 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 inclusiveInBetweenCondition
has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring. Open
export const inclusiveInBetweenCondition = (min, max) => (value) => {
const ok = isFalsy(value)
|| (isFalsy(min) && isFalsy(max))
|| (isFalsy(min) && value <= max)
|| (isFalsy(max) && value >= min)
- 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
Avoid too many return
statements within this function. Open
return values;
Avoid too many return
statements within this function. Open
return undefined;