bufferapp/ui

View on GitHub

Showing 63 of 333 total issues

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

/* eslint-disable no-unused-expressions, react/no-unused-state */
import React from 'react'
import PropTypes from 'prop-types'
import helper from 'immutability-helper'
import SearchIcon from '../Icon/Icons/Search'
Severity: Major
Found in src/components/Select/Select.tsx - About 1 day to fix

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

    /* eslint-disable react/jsx-filename-extension */
    import React from 'react'
    // @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'enzy... Remove this comment to see the full error message
    import Enzyme, { shallow, mount } from 'enzyme'
    import Adapter from '@wojtekmaj/enzyme-adapter-react-17'
    Severity: Minor
    Found in src/components/Select/Select.test.tsx - About 5 hrs to fix

      File webpack.config.prod.js has 364 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict'
      
      const fs = require('fs')
      const path = require('path')
      const webpack = require('webpack')
      Severity: Minor
      Found in scripts/config/webpack.config.prod.js - About 4 hrs to fix

        File NavBar.tsx has 335 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React from 'react'
        import PropTypes from 'prop-types'
        import styled from 'styled-components'
        import {
          Cross,
        Severity: Minor
        Found in src/components/NavBar/NavBar.tsx - About 4 hrs to fix

          Function render has 91 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              const {
                // @ts-expect-error TS(2339) FIXME: Property 'products' does not exist on type 'Readon... Remove this comment to see the full error message
                products,
                // @ts-expect-error TS(2339) FIXME: Property 'activeProduct' does not exist on type 'R... Remove this comment to see the full error message
          Severity: Major
          Found in src/components/NavBar/NavBar.tsx - About 3 hrs to fix

            Select has 29 functions (exceeds 20 allowed). Consider refactoring.
            Open

            export default class Select extends React.Component {
              // @ts-expect-error TS(7006) FIXME: Parameter 'itemsA' implicitly has an 'any' type.
              static sameItems = (itemsA, itemsB) =>
                itemsA.length === itemsB.length &&
                itemsA.every(
            Severity: Minor
            Found in src/components/Select/Select.tsx - About 3 hrs to fix

              File generateIconComponents.js has 302 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /* eslint-disable no-console */
              
              require('dotenv').config()
              
              const fs = require('fs')
              Severity: Minor
              Found in scripts/generateIconComponents.js - About 3 hrs to fix

                Function ModalTest has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function ModalTest() {
                  const [modalOpen, openModal] = useState(false)
                  return (
                    <div style={{ width: '100%', height: '400px', position: 'relative' }}>
                      <Button
                Severity: Major
                Found in src/documentation/examples/Modal/with-carousel.tsx - About 2 hrs to fix

                  File style.ts has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* eslint-disable no-confusing-arrow */
                  import style, { css } from 'styled-components'
                  import {
                    grayDarker,
                    blue,
                  Severity: Minor
                  Found in src/components/Button/style.ts - About 2 hrs to fix

                    Function main has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    async function main() {
                      let spinner
                      try {
                        spinner = ora(`Loading BDS Icons Figma file: ${figmaIconFileUrl}`).start()
                        const figmaFile = await getFigmaFile(figmaIconFileId)
                    Severity: Major
                    Found in scripts/generateIconComponents.js - About 2 hrs to fix

                      Function render has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        render() {
                          const { left, currentSlideIndex } = this.state
                          // @ts-expect-error TS(2339) FIXME: Property 'width' does not exist on type 'Readonly<... Remove this comment to see the full error message
                          const { children, width, rightNavigation, withIndicators } = this.props
                      
                      
                      Severity: Major
                      Found in src/components/Carousel/Carousel.tsx - About 2 hrs to fix

                        Function ExampleSimpleModal has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function ExampleSimpleModal() {
                          const [modalOpen, openModal] = useState(false)
                          const [changed, setChanged] = useState(false)
                          const [showingModal, setShowingModal] = useState(false)
                        
                        
                        Severity: Major
                        Found in src/documentation/examples/SimpleModal/SimpleModal.tsx - About 2 hrs to fix

                          Function render has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            render() {
                              const {
                                children,
                                // @ts-expect-error TS(2339) FIXME: Property 'background' does not exist on type 'Read... Remove this comment to see the full error message
                                background,
                          Severity: Major
                          Found in src/components/Modal/Modal.tsx - About 2 hrs to fix

                            Function render has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render() {
                                const {
                                  // @ts-expect-error TS(2339) FIXME: Property 'disabled' does not exist on type 'Readon... Remove this comment to see the full error message
                                  disabled,
                                  // @ts-expect-error TS(2339) FIXME: Property 'hasError' does not exist on type 'Readon... Remove this comment to see the full error message
                            Severity: Major
                            Found in src/components/Input/Input.tsx - About 2 hrs to fix

                              File webpack.config.dev.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              'use strict'
                              
                              const fs = require('fs')
                              const path = require('path')
                              const resolve = require('resolve')
                              Severity: Minor
                              Found in scripts/config/webpack.config.dev.js - About 2 hrs to fix

                                Function ExampleSimpleModal has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function ExampleSimpleModal() {
                                  const [changed, setChanged] = useState(false)
                                
                                  useEffect(() => {
                                    setTimeout(() => {
                                Severity: Major
                                Found in src/documentation/examples/AnimationWrapper/AnimationWrapperHook.tsx - About 2 hrs to fix

                                  Function createPackageFile has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function createPackageFile() {
                                    return new Promise((resolve) => {
                                      // read from package.json
                                      fse.readFile(
                                        path.resolve(__dirname, '../package.json'),
                                  Severity: Major
                                  Found in scripts/copyBuildFiles.js - About 2 hrs to fix

                                    Function ExampleSimpleModal has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function ExampleSimpleModal() {
                                      const [changed, setChanged] = useState(false)
                                    
                                      useEffect(() => {
                                        setTimeout(() => {
                                    Severity: Major
                                    Found in src/documentation/examples/AnimationWrapper/AnimationWrapper.tsx - About 2 hrs to fix

                                      Function ExampleOnOpn has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function ExampleOnOpn() {
                                        return (
                                          <Select
                                            onSelectClick={() => console.info('Main select clicked')}
                                            label="Click Me"
                                      Severity: Major
                                      Found in src/documentation/examples/Select/SelectWithOnOpen.tsx - About 2 hrs to fix

                                        Function render has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          render() {
                                            // @ts-expect-error TS(2339) FIXME: Property 'navigationLinks' does not exist on type ... Remove this comment to see the full error message
                                            const { navigationLinks } = this.state
                                            // @ts-expect-error TS(2339) FIXME: Property 'route' does not exist on type 'Readonly<... Remove this comment to see the full error message
                                            const { route } = this.props
                                        Severity: Major
                                        Found in src/documentation/app/layout/sidebar/Sidebar.tsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language