Showing 9,449 of 9,537 total issues
Function ButtonSelector
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const ButtonSelector = ({
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 RadioSelector
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const RadioSelector = ({
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 TagBlock
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const TagBlock = ({
blockId,
components: { Icon },
events,
methods,
- 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 render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { children, description, fallback, fullPage, message, name } = this.props;
const { hasError, error } = this.state;
if (hasError) {
if (fallback) {
- 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 Label
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
const Label = ({
blockId,
components: { Icon },
content,
methods,
- 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 layoutParamsToArea
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
const layoutParamsToArea = ({ areaKey, area = {}, layout = {} }) => {
if (areaKey !== 'content') {
return area;
}
area.align = type.isNone(area.align) ? layout.contentAlign : area.align;
- 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 formatArrayKey
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
function formatArrayKey({ index, object }) {
if (type.isObject(object) && (!type.isNone(object.id) || !type.isNone(object.type))) {
const objectId = type.isNone(object.id) ? '_ERROR_MISSING_ID_' : object.id;
const objectType = type.isNone(object.type) ? '_ERROR_MISSING_TYPE_' : object.type;
return `[${index}:${objectId}:${objectType}]`;
- 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 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;