FowApps/fow.ui

View on GitHub

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, {
Severity: Major
Found in src/components/molecules/Table/Table.tsx - About 2 days to fix

    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,
    Severity: Major
    Found in src/components/atoms/SelectV3/Select.tsx - About 1 day to fix

      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,
        Severity: Minor
        Found in src/components/molecules/Table/Table.tsx - About 1 day to fix

        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;
        Severity: Minor
        Found in src/components/molecules/DatePicker/styles/DatePicker.style.ts - About 1 day to fix

          File Select.tsx has 447 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* eslint-disable no-nested-ternary */
          import React, {
              ChangeEvent,
              UIEventHandler,
              useCallback,
          Severity: Minor
          Found in src/components/atoms/SelectV3/Select.tsx - About 6 hrs to fix

            Function FormBuilder has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
            Open

            const FormBuilder = ({
                initialValues,
                disableCurrency = false,
                formInstance,
                onSubmit,
            Severity: Minor
            Found in src/components/atoms/Form/FormBuilder.tsx - About 5 hrs to fix

            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,
            Severity: Minor
            Found in src/components/molecules/Editor/Editor.tsx - About 4 hrs to fix

              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,
              Severity: Minor
              Found in src/assets/lotties/empty.ts - About 4 hrs to fix

                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,
                Severity: Minor
                Found in src/components/atoms/SelectV3/Select.tsx - About 4 hrs to fix

                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';
                Severity: Minor
                Found in src/components/atoms/Form/FormBuilder.tsx - About 3 hrs to fix

                  Function Upload has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const Upload = ({
                      label,
                      onChange,
                      accept,
                      multiple = false,
                  Severity: Minor
                  Found in src/components/molecules/Upload/Upload.tsx - About 3 hrs to fix

                  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';
                  Severity: Minor
                  Found in src/components/molecules/Navigation/styles/Navigation.style.ts - About 3 hrs to fix

                    Function MultipleSelect has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                    Open

                    const MultipleSelect = ({
                        language,
                        searchText,
                        options,
                        loader,
                    Severity: Minor
                    Found in src/components/molecules/SelectV2/components/MultipleSelect.tsx - About 3 hrs to fix

                    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,
                    Severity: Minor
                    Found in src/components/molecules/SelectV2/SelectV2.tsx - About 3 hrs to fix

                      Function Drawer has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                      Open

                          (
                              {
                                  width = 700,
                                  isOpen,
                                  defaultOpen = false,
                      Severity: Minor
                      Found in src/components/molecules/Drawer/Drawer.tsx - About 3 hrs to fix

                      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,
                      Severity: Minor
                      Found in src/hooks/useDrawerForm/useDrawerForm.ts - About 3 hrs to fix

                      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 = {
                      Severity: Minor
                      Found in src/components/molecules/DateRangePicker/DateRangePicker.tsx - About 3 hrs to fix

                      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',
                      Severity: Minor
                      Found in src/components/molecules/Editor/Editor.tsx - About 2 hrs to fix

                      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';
                      Severity: Minor
                      Found in src/components/molecules/SelectV2/components/MultipleSelect.tsx - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language