Showing 199 of 9,537 total issues
Avoid too many return
statements within this function. Open
if (isDate(val)) return 'date';
Avoid too many return
statements within this function. Confirmed
return 0;
Avoid too many return
statements within this function. Open
return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
Avoid too many return
statements within this function. Open
if (type === 'number') return 'number';
Avoid too many return
statements within this function. Open
if (type === 'symbol') return 'symbol';
Avoid too many return
statements within this function. Open
return 'generator';
Avoid too many return
statements within this function. Open
if (isRegexp(val)) return 'regexp';
Avoid too many return
statements within this function. Open
if (isArguments(val)) return 'arguments';
Avoid too many return
statements within this function. Open
if (isError(val)) return 'error';
Avoid too many return
statements within this function. Open
return isGeneratorFn(val) ? 'generatorfunction' : 'function';
Avoid too many return
statements within this function. Confirmed
return 1;
Avoid too many return
statements within this function. Open
if (isArray(val)) return 'array';
Avoid too many return
statements within this function. Open
if (isBuffer(val)) return 'buffer';
Avoid too many return
statements within this function. Open
return `{${out.join(',')}${indent}}`;
Function ControlledListBlock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ControlledListBlock = ({
blockId,
components: { Icon, Link },
events,
list,
- 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 applyArrayIndices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const applyArrayIndices = (arrayIndices, name) => {
if (!type.isArray(arrayIndices)) return name;
if (arrayIndices.length === 0) return name;
if (type.isNumber(name)) return name;
const copy = JSON.parse(JSON.stringify(arrayIndices));
- 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 getSheetFromDoc
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
function getSheetFromDoc({ doc, sheetId, sheetIndex }) {
let sheet;
if (sheetId) {
sheet = doc.sheetsById[sheetId];
if (!sheet) {
- 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 _switch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
function _switch({ location, params }) {
if (!type.isArray(params.branches)) {
throw new Error(
`Operator Error: switch takes an array type as input for the branches. Received: ${JSON.stringify(
params
- 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 TextAreaBlock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
const TextAreaBlock = ({
blockId,
components,
events,
loading,
- 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 displayMessage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
displayMessage({ defaultMessage, duration, hideExplicitly, message, status }) {
let close = () => undefined;
if ((hideExplicitly && message !== false) || (!hideExplicitly && !type.isNone(message))) {
close = this.context._internal.lowdefy._internal.displayMessage({
content: type.isString(message) ? message : defaultMessage,
- 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"