Showing 545 of 2,098 total issues
Function Menu
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
const Menu = forwardRef((props, ref) => {
const {
a11yTitle,
'aria-label': ariaLabel,
children,
- 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 FileInput
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. Open
(
{
a11yTitle,
background,
border,
- 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 Video
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
(
{
alignSelf,
autoPlay,
children,
- 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 Tabs
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
(
{
alignControls,
children,
flex,
- 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
File Calendar-test.tsx
has 671 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import 'jest-styled-components';
import 'jest-axe/extend-expect';
import 'regenerator-runtime/runtime';
Function Box
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
(
{
a11yTitle,
background: backgroundProp,
border,
- 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
File WorldMap.js
has 661 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { forwardRef } from 'react';
import { ThemeContext } from 'styled-components';
import { Drop } from '../Drop';
import { defaultProps } from '../../default-props';
File DataChart.js
has 651 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { forwardRef, useContext, useMemo, useState } from 'react';
import { ThemeContext } from 'styled-components';
import { Box } from '../Box';
import { Chart, calcs, calcBounds } from '../Chart';
import { Grid } from '../Grid';
File Chart.js
has 648 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useContext, useEffect, useMemo, useState } from 'react';
import { ThemeContext } from 'styled-components';
import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
import { defaultProps } from '../../default-props';
File List.js
has 643 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
Fragment,
cloneElement,
useContext,
useMemo,
File TextInput-test.tsx
has 631 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import 'jest-styled-components';
import 'regenerator-runtime/runtime';
import { fireEvent, render, waitFor } from '@testing-library/react';
import { getByText, screen } from '@testing-library/dom';
File Form.js
has 626 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
forwardRef,
useCallback,
useContext,
useEffect,
Function SelectMultipleContainer
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
(
{
allOptions,
children = null,
disabled: disabledProp,
- 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
File Select-multiple-test.js
has 602 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import { act, render, fireEvent, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { axe } from 'jest-axe';
import 'jest-axe/extend-expect';
Function SelectMultiple
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
(
{
a11yTitle,
'aria-label': ariaLabel,
alignSelf,
- 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 RangeSelector
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
(
{
color,
defaultValues = [],
direction = 'horizontal',
- 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
File SelectMultipleContainer.js
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
forwardRef,
useCallback,
useContext,
useEffect,
File Data-test.tsx
has 566 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import '@testing-library/jest-dom';
import { act, fireEvent, render, screen } from '@testing-library/react';
import 'jest-styled-components';
File Video.js
has 562 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
forwardRef,
useCallback,
useContext,
useEffect,
Function DateInput
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
(
{
buttonProps, // when no format and not inline
calendarProps,
defaultValue,
- 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"