Showing 445 of 2,739 total issues
Function MonthlyCalendar
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function MonthlyCalendar(props) {
const {
id,
className,
style,
Function render
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
id,
data,
sortedBy,
Function AccordionTimelineMarker
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function AccordionTimelineMarker(props) {
const {
icon,
name,
isLoading,
Function disableBodyScroll
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export function disableBodyScroll(targetElement, options) {
if (isIosDevice) {
// targetElement must be provided, and disableBodyScroll must not have been
// called on this targetElement before.
if (!targetElement) {
- 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 ColorInput
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
const ColorInput = props => {
const {
id,
className,
style,
- 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 render
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
style,
className,
onChange,
Function AddRecords
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function AddRecords(props) {
const { className, style } = props;
return (
<svg
className={className}
Function CarouselImage
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const CarouselImage = props => {
const { assistiveText, description, header, href, src, style, className } = props;
const {
register,
unregister,
- 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
File utils.spec.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
insertChildOrderly,
getChildTabNodes,
getTabIndexFromName,
getChildrenTotalWidth,
SingleCalendar
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class SingleCalendar extends Component {
constructor(props) {
super(props);
this.state = {
focusedDate: normalizeDate(props.value),
PageDoubleCalendar
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class PageDoubleCalendar {
/**
* Create a new PageCalendar page object.
* @constructor
* @param {string} rootElement - The selector of the PageCalendar root element.
Function render
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
value,
disabled,
readOnly,
Function SidebarItem
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SidebarItem(props) {
const {
label,
icon,
selectedIcon,
Function attachResizeEvent
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function attachResizeEvent(element, resizeListener) {
if (!element) {
return;
}
if (element.resizedAttached) {
Function Path
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function Path(props) {
const { currentStepName, onClick, children, id, className, style } = props;
const [hoveredStepName, setHoveredStepName] = useState(null);
const [stepsCount, setStepsCount] = useState(0);
const registeredSteps = useRef([]);
Function attachResizeEvent
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function attachResizeEvent(element, resizeListener) {
if (!element) {
return;
}
if (element.resizedAttached) {
- 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 render
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
content,
minColumnWidth,
maxColumnWidth,
Function CheckoutExample
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CheckoutExample() {
return (
<div className="rainbow-align-content_center rainbow-checkout_view-port">
<Card className="rainbow-checkout_card-container" icon={CARD_ICON} title="Checkout">
<div className="rainbow-p-horizontal_x-large rainbow-p-bottom_large rainbow-checkout_media-styles-container">
Function Rgba
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Rgba = React.forwardRef((_props, ref) => {
const { rgba, hsv, hex, tabIndex, onChange } = useContext(ColorPickerContext) || {};
const firstRef = useRef();
const lastRef = useRef();
Function SingleCalendarHeader
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function SingleCalendarHeader(props) {
const {
monthLabelId,
currentYear,
yearsRange,