Showing 199 of 9,537 total issues
Function countOperators
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
function countOperators(obj, { counter }) {
function getOperatorsReviver(_, value) {
if (type.isObject(value) && Object.keys(value).length === 1) {
const key = Object.keys(value)[0];
const [op] = key.split('.');
- 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 deriveLayout
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
const deriveLayout = ({
flex,
offset,
order,
pull,
- 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 split
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function split(path, options) {
const id = createKey(path, options);
if (set.memo[id]) return set.memo[id];
const char = options && options.separator ? options.separator : '.';
- 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 getLowdefyYaml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
async function getLowdefyYaml({ configDirectory, requiresLowdefyYaml }) {
let lowdefyYaml = await readFile(path.join(configDirectory, 'lowdefy.yaml'));
if (!lowdefyYaml) {
lowdefyYaml = await readFile(path.join(configDirectory, 'lowdefy.yml'));
}
- 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 createSignInCallback
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
function createSignInCallback({ authConfig, plugins }) {
const signInCallbackPlugins = createCallbackPlugins({
authConfig,
plugins,
type: 'signIn',
- 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 null;
Avoid too many return
statements within this function. Open
return JSON.stringify(
json,
makeReplacer(options.replacer, options.isoStringDates),
options.space
);
Avoid too many return
statements within this function. Open
return options.default;
Avoid too many return
statements within this function. Open
return new Promise((resolve) => {
const timeout = setTimeout(async () => {
eventDescription.bouncer = null;
const res = await actionHandle();
resolve(res);
Avoid too many return
statements within this function. Confirmed
return newOriginLink({
...props,
url: `${protocol}${props.url}`,
query,
});
Avoid too many return
statements within this function. Confirmed
if (type.isNumber(params.index)) return array[params.index];
Avoid too many return
statements within this function. Confirmed
if (type.isString(params.value)) return array.find((item) => item[key] === params.value);
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return target;
Avoid too many return
statements within this function. Open
return noLink(props);
Avoid too many return
statements within this function. Open
if (type.isUndefined(this.operators[op])) return value;
Avoid too many return
statements within this function. Open
return res;
Avoid too many return
statements within this function. Open
return res;
Avoid too many return
statements within this function. Open
return res;
Avoid too many return
statements within this function. Open
return options.default;