Showing 198 of 9,127 total issues
Avoid too many return
statements within this function. Confirmed
return 1;
Avoid too many return
statements within this function. Confirmed
return 0;
Avoid too many return
statements within this function. Open
return 'generator';
Avoid too many return
statements within this function. Open
if (isDate(val)) return 'date';
Avoid too many return
statements within this function. Open
if (isArray(val)) return 'array';
Avoid too many return
statements within this function. Open
if (isRegexp(val)) return 'regexp';
Avoid too many return
statements within this function. Open
if (type === 'symbol') return 'symbol';
Avoid too many return
statements within this function. Open
if (isError(val)) return 'error';
Avoid too many return
statements within this function. Open
return `{${out.join(',')}${indent}}`;
Avoid too many return
statements within this function. Open
if (type === 'number') return 'number';
Avoid too many return
statements within this function. Open
if (isArguments(val)) return 'arguments';
Avoid too many return
statements within this function. Open
if (isBuffer(val)) return 'buffer';
Avoid too many return
statements within this function. Open
return isGeneratorFn(val) ? 'generatorfunction' : 'function';
Function checkAuthorizedHost
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function checkAuthorizedHost({ license, req }) {
const authorizedUrls = license.metadata?.domains ?? [];
if (authorizedUrls.length === 0) {
return 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 callActionLoop
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
async callActionLoop({ actions, arrayIndices, block, event, progress, responses }) {
for (const [index, action] of actions.entries()) {
try {
if (action.async === true) {
this.callAsyncAction({
- 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 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 initLowdefyContext
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
function initLowdefyContext({ auth, Components, config, lowdefy, router, stage, types, window }) {
if (!lowdefy._internal?.initialised) {
lowdefy._internal = {
actions: types.actions,
blockComponents: types.blocks,
- 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 PageHeaderMenu
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const PageHeaderMenu = ({
basePath,
blockId,
components: { Icon, Link },
content,
- 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 handler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async function handler({ context, req, res }) {
if (authJson.configured !== true) {
return res.status(404).json({
message: 'Auth not configured',
});
- 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"