nexxtway/react-rainbow

View on GitHub

Showing 445 of 2,739 total issues

File index.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { uniqueId } from '../../../libs/utils';
import Label from '../label';
import RenderIf from '../../RenderIf';
Severity: Minor
Found in src/components/Input/inputBase/index.js - About 2 hrs to fix

    PageLookup has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class PageLookup {
        /**
         * Create a new Lookup page object.
         * @constructor
         * @param {string} rootElement - The selector of the Lookup root element.
    Severity: Minor
    Found in src/components/Lookup/pageObject/index.js - About 2 hrs to fix

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

      export default function CalendarIcon(props) {
          const { className, style } = props;
      
          return (
              <svg className={className} style={style} width="20px" height="20px" viewBox="0 0 20 20">
      Severity: Major
      Found in src/components/DatePicker/calendarIcon.js - About 2 hrs to fix

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

        export default function UserPhoneVerified(props) {
            const { className, style } = props;
            return (
                <svg
                    className={className}
        Severity: Major
        Found in library/exampleComponents/Icons/userPhoneVerified.js - About 2 hrs to fix

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

          export default function CalendarIcon(props) {
              const { className, style } = props;
          
              return (
                  <svg className={className} style={style} width="20px" height="20px" viewBox="0 0 20 20">
          Severity: Major
          Found in library/exampleComponents/Icons/calendar.js - About 2 hrs to fix

            File input.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import styled from 'styled-components';
            import {
                BORDER_RADIUS_2,
                BORDER_RADIUS_SQUARE,
                BORDER_RADIUS_SEMI_SQUARE,
            Severity: Minor
            Found in src/components/Input/styled/input.js - About 2 hrs to fix

              Function ExpandArrow has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const ExpandArrow = props => {
                  const { className, style } = props;
                  return (
                      <svg
                          className={className}
              Severity: Major
              Found in library/exampleComponents/Icons/expandArrow.js - About 2 hrs to fix

                Function renderValue has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                function renderValue(value, caption, row) {
                    const { description, type } = row;
                
                    if (value === 'undefined' || value === 'null') {
                        return '';
                Severity: Minor
                Found in library/styleguideComponents/PropsTable/bodyRows.js - 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

                Function MergeFiles has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function MergeFiles(props) {
                    const { className, style } = props;
                    return (
                        <svg
                            width="24"
                Severity: Major
                Found in src/components/ImportRecordsFlow/icons/mergeFiles.js - About 2 hrs to fix

                  Function StepOne has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function StepOne(props) {
                      const {
                          schemaFields,
                          actionOption,
                          onChangeAction,
                  Severity: Major
                  Found in src/components/ImportRecordsFlow/stepOne/index.js - About 2 hrs to fix

                    Function Cancel has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function Cancel(props) {
                        const { className, style } = props;
                        return (
                            <svg
                                className={className}
                    Severity: Major
                    Found in src/components/ImportRecordsFlow/icons/cancel.js - About 2 hrs to fix

                      Function EditableCell has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function EditableCell(props) {
                          const { value, onChange, row, field } = props;
                          const [isEditMode, setIsEditMode] = useState(false);
                          const [internalValue, setInternalValue] = useState(value);
                          const inputRef = useRef(null);
                      Severity: Major
                      Found in src/components/Table/body/editableCell.js - About 2 hrs to fix

                        File index.js has 272 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* eslint-disable react/no-unused-state */
                        import React, { Component } from 'react';
                        import PropTypes from 'prop-types';
                        import { Provider } from './context';
                        import RenderIf from '../RenderIf';
                        Severity: Minor
                        Found in src/components/Tabset/index.js - About 2 hrs to fix

                          Function DesignDetails has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function DesignDetails(props) {
                              const {
                                  title,
                                  category,
                                  description,
                          Severity: Major
                          Found in library/pages/components/DesignDetails/index.js - About 2 hrs to fix

                            Function StartupIcon has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const StartupIcon = props => {
                                const { className } = props;
                                return (
                                    <svg className={className} width="20px" height="20px" viewBox="0 0 20 20" version="1.1">
                                        <g id="re-design-layout" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
                            Severity: Major
                            Found in library/styleguideComponents/ComponentsList/icons/startupIcon.js - About 2 hrs to fix

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

                                  render() {
                                      const {
                                          label,
                                          value,
                                          onChange,
                              Severity: Major
                              Found in src/components/Select/index.js - About 2 hrs to fix

                                Function Hangouts has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const Hangouts = props => {
                                    const { className, style } = props;
                                    return (
                                        <svg
                                            className={className}
                                Severity: Major
                                Found in library/exampleComponents/Icons/hangouts.js - About 2 hrs to fix

                                  File index.js has 269 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /* eslint-disable react/no-unescaped-entities, import/no-extraneous-dependencies */
                                  import React, { Component } from 'react';
                                  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
                                  import { faArrowRight } from '@fortawesome/free-solid-svg-icons';
                                  import Tabset from '../../../src/components/Tabset';
                                  Severity: Minor
                                  Found in library/pages/GettingStartedPage/index.js - About 2 hrs to fix

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

                                        render() {
                                            const {
                                                style,
                                                className,
                                                label,
                                    Severity: Major
                                    Found in src/components/RadioButtonGroup/index.js - About 2 hrs to fix

                                      Function MenuContent has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function MenuContent(props) {
                                          const { children, isLoading, ariaLabel, onRequestClose } = props;
                                          const childrenRefs = useRef([]);
                                          const containerRef = useRef();
                                          const [childCount, setChildCount] = useState(0);
                                      Severity: Major
                                      Found in src/components/PrimitiveMenu/menuContent.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language