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,
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";
Function MenuItem
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
const MenuItem = ({
children,
classes,
color,
disabled,
- Read upRead up
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) {
- Read upRead up
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,
- Read upRead up
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"