Showing 5 of 5 total issues

File Editor.jsx has 491 lines of code (exceeds 400 allowed). Consider refactoring.
Open

import clsx from "clsx";
import {
  AtomicBlockUtils,
  CompositeDecorator,
  Editor as DraftJsEditor,
Severity: Minor
Found in packages/riipen-ui/src/components/Editor.jsx - About 4 hrs to fix

    File Button.jsx has 445 lines of code (exceeds 400 allowed). Consider refactoring.
    Open

    import clsx from "clsx";
    import PropTypes from "prop-types";
    import React, { useState } from "react";
    import _JSXStyle from "styled-jsx/style";
    
    
    Severity: Minor
    Found in packages/riipen-ui/src/components/Button.jsx - About 3 hrs to fix

      Function MenuItem has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
      Open

      const MenuItem = ({
        children,
        classes,
        color,
        disabled,
      Severity: Minor
      Found in packages/riipen-ui/src/components/MenuItem.jsx - About 1 hr 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 manageScrollableParentEventListeners has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
      Open

        manageScrollableParentEventListeners(remove = true) {
          const { anchorEl, closeOnScrolled } = this.props;
          if (anchorEl) {
            const closestScrollableParent = getClosestScrollableParent(anchorEl);
            if (closestScrollableParent) {
      Severity: Minor
      Found in packages/riipen-ui/src/components/Popover.jsx - About 45 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

      Function Form has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
      Open

      const Form = ({
        children,
        classes,
        enter,
        error,
      Severity: Minor
      Found in packages/riipen-ui/src/components/Form.jsx - About 35 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