toggle-corp/react-store

View on GitHub

Showing 42 of 110 total issues

Function MultiSelectInputBase has 295 lines of code (exceeds 100 allowed). Consider refactoring.
Open

function MultiSelectInputBase<T, K extends OptionKey = string>(props: MultiSelectInputBaseProps<T, K>) {
    const {
        autoFocus,
        className: classNameFromProps,
        disabled,
Severity: Major
Found in v2/Input/MultiSelectInputBase/index.tsx - About 1 day to fix

    Function SelectInputBase has 292 lines of code (exceeds 100 allowed). Consider refactoring.
    Open

    function SelectInputBase<T, K extends OptionKey = string>(props: SelectInputBaseProps<T, K>) {
        const {
            autoFocus,
            className: classNameFromProps,
            disabled,
    Severity: Major
    Found in v2/Input/SelectInputBase/index.tsx - About 1 day to fix

      Function wrapViz has 225 lines of code (exceeds 100 allowed). Consider refactoring.
      Open

      const wrapViz = (WrappedComponent) => {
          const WrapperComponent = class extends React.PureComponent {
              static propTypes = propTypes;
      
              static defaultProps = defaultProps;
      Severity: Major
      Found in components/Visualization/VizWrapper/index.js - About 6 hrs to fix

        Function Calendar has 209 lines of code (exceeds 100 allowed). Consider refactoring.
        Open

        const Calendar = (props: CalendarProps) => {
            const {
                className,
                disabled,
                onChange,
        Severity: Major
        Found in v2/Input/NepaliDateInput/Calendar/index.tsx - About 5 hrs to fix

          Function render has 195 lines of code (exceeds 100 allowed). Consider refactoring.
          Open

              render() {
                  const {
                      className: classNameFromProps,
                      data,
                      boundingClientRect,
          Severity: Major
          Found in components/Visualization/SimpleHorizontalBarChart/index.js - About 4 hrs to fix

            Function Input has 181 lines of code (exceeds 100 allowed). Consider refactoring.
            Open

            const Input = (props: Props) => {
                const {
                    className,
                    disabled,
                    value: valueMiti,
            Severity: Major
            Found in v2/Input/NepaliDateInput/Input/index.tsx - About 4 hrs to fix

              Function renderChart has 178 lines of code (exceeds 100 allowed). Consider refactoring.
              Open

                  renderChart() {
                      const {
                          boundingClientRect,
                          idSelector,
                          groupSelector,
              Severity: Major
              Found in components/Visualization/ForceDirectedGraph/index.js - About 4 hrs to fix

                Function render has 177 lines of code (exceeds 100 allowed). Consider refactoring.
                Open

                    render() {
                        const {
                            error,
                            hint,
                            keySelector,
                Severity: Major
                Found in components/Input/MultiSelectInput/index.js - About 4 hrs to fix

                  Function render has 175 lines of code (exceeds 100 allowed). Consider refactoring.
                  Open

                      render() {
                          const {
                              error,
                              hint,
                              keySelector,
                  Severity: Major
                  Found in components/Input/SearchMultiSelectInput/index.js - About 4 hrs to fix

                    Function ColorInput has 174 lines of code (exceeds 100 allowed). Consider refactoring.
                    Open

                    function ColorInput(props) {
                        const {
                            onChange,
                            showHintAndError,
                            label,
                    Severity: Major
                    Found in components/Input/ColorInput/index.js - About 3 hrs to fix

                      Function render has 159 lines of code (exceeds 100 allowed). Consider refactoring.
                      Open

                          render() {
                              const {
                                  className: classNameFromProps,
                                  data,
                                  boundingClientRect,
                      Severity: Major
                      Found in components/Visualization/SimpleVerticalBarChart/index.js - About 3 hrs to fix

                        Function Input has a Cognitive Complexity of 28 (exceeds 10 allowed). Consider refactoring.
                        Open

                        const Input = (props: Props) => {
                            const {
                                className,
                                disabled,
                                value: valueMiti,
                        Severity: Minor
                        Found in v2/Input/NepaliDateInput/Input/index.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 SelectInputBase has a Cognitive Complexity of 28 (exceeds 10 allowed). Consider refactoring.
                        Open

                        function SelectInputBase<T, K extends OptionKey = string>(props: SelectInputBaseProps<T, K>) {
                            const {
                                autoFocus,
                                className: classNameFromProps,
                                disabled,
                        Severity: Minor
                        Found in v2/Input/SelectInputBase/index.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 NepaliDateInput has 154 lines of code (exceeds 100 allowed). Consider refactoring.
                        Open

                        const NepaliDateInput = (props: Props) => {
                            const {
                                className,
                                disabled,
                                error,
                        Severity: Major
                        Found in v2/Input/NepaliDateInput/index.tsx - About 3 hrs to fix

                          Function MultiSelectInputBase has a Cognitive Complexity of 27 (exceeds 10 allowed). Consider refactoring.
                          Open

                          function MultiSelectInputBase<T, K extends OptionKey = string>(props: MultiSelectInputBaseProps<T, K>) {
                              const {
                                  autoFocus,
                                  className: classNameFromProps,
                                  disabled,
                          Severity: Minor
                          Found in v2/Input/MultiSelectInputBase/index.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 render has 151 lines of code (exceeds 100 allowed). Consider refactoring.
                          Open

                              render() {
                                  const {
                                      error,
                                      hint,
                                      keySelector,
                          Severity: Major
                          Found in components/Input/SelectInput/index.js - About 3 hrs to fix

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

                            class DateInput extends React.PureComponent {
                                static propTypes = propTypes;
                            
                                static defaultProps = defaultProps;
                            
                            
                            Severity: Minor
                            Found in components/Input/DateInput/index.js - About 2 hrs to fix

                              Function render has 140 lines of code (exceeds 100 allowed). Consider refactoring.
                              Open

                                  render() {
                                      const {
                                          error,
                                          hint,
                                          keySelector,
                              Severity: Major
                              Found in components/Input/SearchSelectInput/index.js - About 2 hrs to fix

                                Function TreeNode has 139 lines of code (exceeds 100 allowed). Consider refactoring.
                                Open

                                function TreeNode<T, K extends OptionKey>(props: TreeNodeProps<T, K>) {
                                    const {
                                        className,
                                        disabled,
                                        readOnly,
                                Severity: Major
                                Found in v2/Input/TreeInput/index.tsx - About 2 hrs to fix

                                  Function ReCaptcha has 130 lines of code (exceeds 100 allowed). Consider refactoring.
                                  Open

                                  function ReCaptcha(props) {
                                      const {
                                          className,
                                          showHintAndError,
                                          error,
                                  Severity: Major
                                  Found in components/Input/ReCaptcha/index.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language