Showing 334 of 1,376 total issues
Function render
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let suggestionsList = [];
if (
!this.state.currentValue
Function render
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { currentDate, dateHovered } = this.state;
const start = currentDate ? currentDate.start : '';
const end = currentDate ? currentDate.end : '';
const endDay = dateHovered || '';
Function componentWillReceiveProps
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
if (
this.props.sortBy !== nextProps.sortBy
|| this.props.size !== nextProps.size
|| !isEqual(this.props.dataField, nextProps.dataField)
Function render
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { selectAllLabel, renderListItem } = this.$props;
const renderListItemCalc
= this.$scopedSlots.renderListItem || renderListItem;
if (this.modifiedOptions.length === 0) {
Function render
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
selectAllLabel, renderListItem, showLoadMore, loadMoreLabel,
} = this.props;
const { isLastBucket } = this.state;
Function render
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let selectAll = [];
if (this.state.options.length === 0) {
return null;
Function render
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { color, ...checkBoxStyles } = getInnerKey(this.props.innerStyle, 'checkbox');
return (
<View>
{this.state.showModal ? (
Function render
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
selectAllLabel, renderListItem, showLoadMore, loadMoreLabel,
} = this.props;
const { isLastBucket } = this.state;
Function render
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { selectAllLabel, renderListItem } = this.$props;
const renderListItemCalc
= this.$scopedSlots.renderListItem || renderListItem;
Function Pagination
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function Pagination(props) {
const start = getStartPage(props.pages, props.currentPage);
const pages = [];
const onPrevPage = (e) => {
Function render
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (!this.state.isReady) {
return <Text>Loading...</Text>;
}
ReactiveMap
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class ReactiveMap extends Component {
constructor(props) {
super(props);
this.mapStyles = [
Function componentWillReceiveProps
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
if (
this.props.sortBy !== nextProps.sortBy
|| this.props.size !== nextProps.size
|| !isEqual(this.props.dataField, nextProps.dataField)
- 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 Pagination
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export default function Pagination(props) {
const start = getStartPage(props.pages, props.currentPage);
const pages = [];
const onPrevPage = (e) => {
- 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 SingleDropdownList.js
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from 'react';
import {
addComponent,
removeComponent,
File SingleDropdownList.jsx
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Actions, helper } from '@appbaseio/reactivecore';
import VueTypes from 'vue-types';
import types from '../../utils/vueTypes';
import { getAggsQuery, getCompositeAggsQuery } from './utils';
import Title from '../../styles/Title';
Function render
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { size } = this.$props;
const { hits } = this.$data;
const results = parseHits(hits) || [];
const streamResults = parseHits(this.$data.streamHits) || [];
Function render
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
render(createElement, context) {
const { props } = context;
const start = getStartPage(props.pages, props.currentPage);
const pages = [];
- 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 DatePicker.js
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from 'react';
import { View, Modal, TouchableWithoutFeedback, Platform } from 'react-native';
import { Calendar } from 'react-native-calendars';
import { Text, Body, Item, Header, Left, Button, Icon, Title, Right } from 'native-base';
Function render
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { selectAllLabel, showCount, renderListItem } = this.props;
const { options } = this.state;
if (options.length === 0) {