Showing 12 of 40 total issues
Function extractCallbackData
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
function extractCallbackData () {
let baseKindArguments = Array.from(arguments)
const argumentsLastIndex = baseKindArguments.length >= 2 ? baseKindArguments.length - 1 : false
const argumentsOneBeforeLastIndex = baseKindArguments.length >= 3 ? argumentsLastIndex - 1 : false
let trueCaseFunction = false
- 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 exports
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (results, factories, services, parameters, composedStore) =>
new Proxy(results, {
get: (obj, prop) => {
if(prop instanceof Promise){
- 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 exports
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (notHiddenVariablesReaches) => (baseProxy, containerKindData, registeredKeys) => new Proxy(baseProxy,{
get: (obj, prop) => {
const hidden = prop?.startsWith('_')
!hidden && (()=>notHiddenVariablesReaches[prop] = notHiddenVariablesReaches[prop] ?
notHiddenVariablesReaches[prop] + 1 : 1)()
- 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 exports
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (baseObject, returnObject) => {
return kind =>
function () {
const {
baseKindArguments,
- 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 update
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const update = async (dependencies) => {
if (dependencies) {
const currentBranch = require('./lib/get-current-branch')()
const dependencyNames = Object.keys(dependencies)
let allFine = 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 update
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
const update = async (dependencies) => {
if (dependencies) {
const currentBranch = require('./lib/get-current-branch')()
const dependencyNames = Object.keys(dependencies)
let allFine = true
Function extractCallbackData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extractCallbackData () {
let baseKindArguments = Array.from(arguments)
const argumentsLastIndex = baseKindArguments.length >= 2 ? baseKindArguments.length - 1 : false
const argumentsOneBeforeLastIndex = baseKindArguments.length >= 3 ? argumentsLastIndex - 1 : false
let trueCaseFunction = false
Function get
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
get: (obj, prop) => {
const hidden = prop?.startsWith('_')
!hidden && (()=>notHiddenVariablesReaches[prop] = notHiddenVariablesReaches[prop] ?
notHiddenVariablesReaches[prop] + 1 : 1)()
if (hidden) {
Function init
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: () => {
const baseKind = getBaseKind(baseObject, returnObject)
baseObject.has = baseKind('some')
baseObject.get = baseKind('filter')
Avoid too many return
statements within this function. Open
return usedSoFar.map((usedKey) => allKeys.indexOf(usedKey) < 0 ? usedKey : false)
.filter((k) => k !== false)}}
Avoid too many return
statements within this function. Open
if (!thisIsAFactory || !thisIsAService) return obj[prop]
Avoid too many return
statements within this function. Open
return obj[prop]}})