Showing 445 of 2,739 total issues
File table.spec.js
has 1625 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { mount } from 'enzyme';
import Table from '../index';
import Column from '../../Column';
import { ESCAPE_KEY, ENTER_KEY } from '../../../libs/constants';
File countries.js
has 1455 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as Flags from './flags';
export default [
{
flagIcon: Flags.Afghanistan,
File SaintBarthelemy.js
has 937 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
function SvgSaintBarthelemy({ className, style }) {
return (
File rainbowLegacyStyles.js
has 774 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { createGlobalStyle } from 'styled-components';
import { isServer } from '../../libs/utils';
const fontsCDN = 'https://fonts.react-rainbow.io';
Function InternalDropdown
has 358 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InternalDropdown = forwardRef((props, reference) => {
const {
isLoading,
children,
value,
Function InternalDropdown
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
Open
const InternalDropdown = forwardRef((props, reference) => {
const {
isLoading,
children,
value,
- 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 timeSelect.spec.js
has 666 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { mount } from 'enzyme';
import TimeSelect from '../timeSelect';
import {
LEFT_KEY,
File index.js
has 601 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react/sort-comp */
/* eslint-disable react/no-did-update-set-state, react/no-did-mount-set-state */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import RenderIf from '../RenderIf';
Function MultiSelect
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MultiSelect = React.forwardRef((props, ref) => {
const {
id,
className,
style,
File index.js
has 571 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react/no-unused-prop-types */
import React, { useRef, useImperativeHandle, useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { useOutsideClick, useScrollingIntent } from '@rainbow-modules/hooks';
import Label from '../Input/label';
Function DoubleCalendar
has 242 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function DoubleCalendar(props) {
const {
id,
className,
style,
Function PhoneInput
has 234 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PhoneInput = React.forwardRef((props, ref) => {
const {
value,
name,
placeholder,
Function ColorInput
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ColorInput = props => {
const {
id,
className,
style,
Function render
has 221 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { activeTabName } = this.state;
return (
<div className="react-rainbow-getting-started_top-container">
<Tabset
Function CustomizationPage
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function CustomizationPage(props) {
const { examples, name, exampleMode, codeRevision } = props;
const [activeTab, setActiveTab] = useState('overview');
const example5Ref = useRef();
const example7Ref = useRef();
File timePicker-1.spec.js
has 529 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const PageTimePicker = require('../../../src/components/TimePicker/pageObject');
const {
ARROW_LEFT_KEY,
ARROW_RIGHT_KEY,
ARROW_UP_KEY,
File index.js
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react/sort-comp */
/* eslint-disable no-console */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ThemeProvider } from 'styled-components';
Function ImportRecordsFlow
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ImportRecordsFlow(props) {
const {
className,
style,
isOpen,
Function FileSelector
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FileSelector = React.forwardRef((props, ref) => {
const {
className,
style,
id,
File timeSelect.js
has 470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react/sort-comp */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ButtonIcon from '../ButtonIcon';
import AmPmSelect from './ampmSelect';