sammi/bootstrap-jss

View on GitHub

Showing 15 of 455 total issues

File CustomForms.test.js has 532 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { transition } from '../Mixins/transition'
import { size } from '../Functions/size'
import {
  customFormsTransition,
  customRangeThumbFocusBoxShadow,
Severity: Major
Found in src/Classes/CustomForms.test.js - About 1 day to fix

    File CustomForms.js has 447 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { transition } from '../Mixins/transition'
    import { size } from '../Functions/size'
    import {
      customFormsTransition,
      customRangeThumbFocusBoxShadow,
    Severity: Minor
    Found in src/Classes/CustomForms.js - About 6 hrs to fix

      File Forms.test.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
        inputPaddingY, inputPaddingX, inputLineHeight,
        inputColor, inputBg, inputBorderWidth, inputBorderColor,
        inputBorderRadius, inputBoxShadow, inputTransition,
        inputPlaceholderColor, inputDisabledBg,
      Severity: Minor
      Found in src/Classes/Forms.test.js - About 4 hrs to fix

        File buttons.test.js has 347 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { darken } from '../Functions/darken'
        import { rgba } from '../Functions/rgba'
        import { colorYiq } from '../Functions/colorYiq'
        import { gradientBg } from './gradients'
        import { boxShadow } from './boxShadow'
        Severity: Minor
        Found in src/Mixins/buttons.test.js - About 4 hrs to fix

          Function formValidationState has 84 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const formValidationState = (state, color) => {
            const expectValue = {}
          
            expectValue[`${state}Feedback`] = {
              display: 'none',
          Severity: Major
          Found in src/Mixins/forms.js - About 3 hrs to fix

            File Card.test.js has 295 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import {
              cardBg, cardBorderWidth, cardBorderColor,
              cardBorderRadius, cardSpacerX, cardSpacerY,
              cardCapBg, cardInnerBorderRadius,
              cardImgOverlayPadding,
            Severity: Minor
            Found in src/Classes/Card.test.js - About 3 hrs to fix

              File Carousel.test.js has 291 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import {
                carouselTransition,
                carouselControlWidth,
                carouselControlColor,
                carouselControlOpacity,
              Severity: Minor
              Found in src/Classes/Carousel.test.js - About 3 hrs to fix

                File button.js has 261 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React from 'react'
                import { storiesOf } from '@storybook/react'
                import { Reboot, Classes } from 'bootstrap-jss'
                import { replace } from 'lodash'
                import injectSheet, { ThemeProvider } from 'react-jss'
                Severity: Minor
                Found in stories/src/button.js - About 2 hrs to fix

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

                  const cardGroup = (isEnableRounded = enableRounded) => {
                    const isEnableRoundedValue = isEnableRounded => ({
                      '&:first-child': {
                        ...borderRightRadius(0),
                        '&$cardImgTop,&$cardHeader': {
                  Severity: Major
                  Found in src/Classes/Card.js - About 2 hrs to fix

                    File Card.js has 253 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import {
                      cardBg, cardBorderWidth, cardBorderColor,
                      cardBorderRadius, cardSpacerX, cardSpacerY,
                      cardCapBg, cardInnerBorderRadius,
                      cardImgOverlayPadding,
                    Severity: Minor
                    Found in src/Classes/Card.js - About 2 hrs to fix

                      Function makeGridColumns has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const makeGridColumns = (columns = gridColumns, gutter = gridGutterWidth, breakpoints = gridBreakpoints) => {
                      
                        const gutterSize = size(gutter)
                      
                        const gridColumn = {
                      Severity: Major
                      Found in src/Mixins/gridFramework.js - About 2 hrs to fix

                        Function navbarExpand has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const navbarExpand = () => {
                          const navbarExpandValue = {}
                          for (const [breakpoint] of Object.entries(gridBreakpoints)) {
                            const next = breakpointNext(breakpoint, gridBreakpoints)
                            const infix = breakpointInfix(next, gridBreakpoints)
                        Severity: Minor
                        Found in src/Classes/Navbar.js - About 1 hr to fix

                          Function buttonOutlineVariant has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const buttonOutlineVariant = (color, colorHover, ativeBackgroundColor, activeBorderColor, mybtnFocusWidth, myEnableShadows) => {
                            colorHover = colorHover || colorYiq(color)
                            ativeBackgroundColor = ativeBackgroundColor || color
                            activeBorderColor = activeBorderColor || color
                            mybtnFocusWidth = mybtnFocusWidth || btnFocusWidth
                          Severity: Minor
                          Found in src/Mixins/buttons.js - About 1 hr to fix

                            Function dropdownItem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const dropdownItem = (isEnableGradients = enableGradients) => {
                              const backgroundImageValue = isEnableGradients ? {
                                backgroundImage: 'none'
                              } : null
                            
                            
                            Severity: Minor
                            Found in src/Classes/Dropdown.js - About 1 hr to fix

                              Function breakpointNext has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              const breakpointNext = (name, breakpoints) => {
                                let breakPointList = []
                                Object.keys(breakpoints).forEach(name => { breakPointList.push({ name, value: breakpoints[name] }) })
                                const sortBreakPointList = breakPointList.sort((a, b) => size(a.value).value > size(b.value).value).map(d => d.value === 0 ? { name: d.name, value: '0px' } : d)
                              
                              
                              Severity: Minor
                              Found in src/Mixins/breakpoints.js - About 25 mins 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

                              Severity
                              Category
                              Status
                              Source
                              Language