Showing 445 of 2,739 total issues
File index.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { uniqueId } from '../../../libs/utils';
import Label from '../label';
import RenderIf from '../../RenderIf';
PageLookup
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class PageLookup {
/**
* Create a new Lookup page object.
* @constructor
* @param {string} rootElement - The selector of the Lookup root element.
Function CalendarIcon
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
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">
Function UserPhoneVerified
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function UserPhoneVerified(props) {
const { className, style } = props;
return (
<svg
className={className}
Function CalendarIcon
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
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">
File input.js
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import styled from 'styled-components';
import {
BORDER_RADIUS_2,
BORDER_RADIUS_SQUARE,
BORDER_RADIUS_SEMI_SQUARE,
Function ExpandArrow
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ExpandArrow = props => {
const { className, style } = props;
return (
<svg
className={className}
Function renderValue
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
function renderValue(value, caption, row) {
const { description, type } = row;
if (value === 'undefined' || value === 'null') {
return '';
- 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 MergeFiles
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function MergeFiles(props) {
const { className, style } = props;
return (
<svg
width="24"
Function StepOne
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function StepOne(props) {
const {
schemaFields,
actionOption,
onChangeAction,
Function Cancel
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Cancel(props) {
const { className, style } = props;
return (
<svg
className={className}
Function EditableCell
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
File index.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
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';
Function DesignDetails
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function DesignDetails(props) {
const {
title,
category,
description,
Function StartupIcon
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
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">
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
label,
value,
onChange,
Function Hangouts
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Hangouts = props => {
const { className, style } = props;
return (
<svg
className={className}
File index.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
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';
Function render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
style,
className,
label,
Function MenuContent
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function MenuContent(props) {
const { children, isLoading, ariaLabel, onRequestClose } = props;
const childrenRefs = useRef([]);
const containerRef = useRef();
const [childCount, setChildCount] = useState(0);