Showing 56 of 169 total issues
File Table.tsx
has 967 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/label-has-associated-control */
// @ts-nocheck
import React, {
Function Select
has 385 lines of code (exceeds 100 allowed). Consider refactoring. Open
const Select = (props: React.PropsWithChildren<SelectProps>): JSX.Element => {
const {
width,
height = 280,
closeAfterSelect = false,
File DateRangePicker.style.ts
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
import styled, { createGlobalStyle } from 'styled-components';
type Wrapper = {
name?: string;
hasValidationError?: boolean;
Function Table
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
const Table = ({
data = [],
columns = [],
isLoading,
pageSize: controlledPageSize = 10,
- 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 DatePicker.style.ts
has 499 lines of code (exceeds 250 allowed). Consider refactoring. Open
import styled, { createGlobalStyle } from 'styled-components';
type Wrapper = {
name?: string;
hasValidationError?: boolean;
File Select.tsx
has 447 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable no-nested-ternary */
import React, {
ChangeEvent,
UIEventHandler,
useCallback,
Function FormBuilder
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
const FormBuilder = ({
initialValues,
disableCurrency = false,
formInstance,
onSubmit,
- 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 Editor.tsx
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
forwardRef,
LegacyRef,
useCallback,
useContext,
File empty.ts
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
export const empty = {
v: '4.8.0',
meta: { g: 'LottieFiles AE ', a: '', k: '', d: '', tc: '' },
fr: 25,
ip: 0,
Function Select
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
const Select = (props: React.PropsWithChildren<SelectProps>): JSX.Element => {
const {
width,
height = 280,
closeAfterSelect = false,
- 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 FormBuilder.tsx
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useCallback, useContext, useMemo } from 'react';
import Form, { useForm, FormInstance } from 'rc-field-form';
import { Rule } from 'rc-field-form/lib/interface';
import { FormConfig } from './FormBuilderConfig';
Function Upload
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const Upload = ({
label,
onChange,
accept,
multiple = false,
- 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 Navigation.style.ts
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
import styled, { css } from 'styled-components';
import { motion } from 'framer-motion';
interface MenuProps {
mode?: 'vertical' | 'horizontal';
Function MultipleSelect
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const MultipleSelect = ({
language,
searchText,
options,
loader,
- 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 SelectV2.tsx
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
ReactNode,
useContext,
useEffect,
useRef,
Function Drawer
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
(
{
width = 700,
isOpen,
defaultOpen = false,
- 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 useDrawerForm
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
const useDrawerForm = (config: UseDrawerFormConfig) => {
const drawerFormConfig = config || ({} as UseDrawerFormConfig);
const {
defaultOpen = false,
autoSubmitClose = 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 DateRangePicker
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
const DateRangePicker = (
{
picker = 'date',
showToday = false,
showTime = {
- 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 Editor
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const Editor = (
{
onChange,
id = uuidv4(),
toolbarType = 'simple',
- 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 MultipleSelect.tsx
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useMemo, useState } from 'react';
import { Space, Loader, Checkbox } from '../../../..';
import Body from '../../../atoms/Typography/Body';
import Subtitle from '../../../atoms/Typography/Subtitle';