plugins/q/src/data/util.js
Showing 3 of 3 total issues
Function findField
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
export function findField(query, { cache }) { if (typeof query === 'number') { return cache.fields[query]; }
- Read upRead up
Function flattenTree
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function flattenTree(children, steps, arrIndexAtTargetDepth) { let arr = []; if (!children || !children.length) { return arr; }
- Read upRead up
Avoid too many return
statements within this function. Open
Open
return query;