Showing 52 of 282 total issues
Function convert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ uriObj, method: rawMethod, fullUrl, postData, allHeaders }, options = {}) => {
const { insecureSkipVerify = false } = options;
const { push, blank, join } = new CodeBuilder();
- 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 concatValues
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
concatType: 'array' | 'object',
values: any,
pretty: boolean,
indentation: string,
indentLevel: number,
Avoid too many return
statements within this function. Open
return escapeChar + 'f';
Avoid too many return
statements within this function. Open
return escapeChar + 'r';
Avoid too many return
statements within this function. Open
return c; // Don't just continue, or this is caught by < \u0020
Avoid too many return
statements within this function. Open
return JSON.stringify(c).slice(1, -1);
Avoid too many return
statements within this function. Open
return escapeChar + escapeChar;
Avoid too many return
statements within this function. Open
return c;
Avoid too many return
statements within this function. Open
return escapeChar + delimiter;
Function convert
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ method, fullUrl, uriObj, httpVersion, allHeaders, postData }, options) => {
const opts = {
absoluteURI: false,
autoContentLength: true,
autoHost: 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 concatValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function concatValues(
concatType: 'array' | 'object',
values: any,
pretty: boolean,
indentation: string,
- 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 convert
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
convert: ({ fullUrl, allHeaders, postData, method }, options) => {
const opts = {
indent: ' ',
...options,
};
- 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"