Showing 334 of 1,376 total issues
Function componentWillReceiveProps
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
if (
!isEqual(this.props.sortOptions, nextProps.sortOptions)
|| this.props.sortBy !== nextProps.sortBy
|| this.props.size !== nextProps.size
Function render
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
render(createElement, context) {
const { props } = context;
const start = getStartPage(props.pages, props.currentPage);
const pages = [];
Function exports
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (env) => {
const isProd = env && env.production;
return {
entry: {
File TagCloud.js
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from 'react';
import {
addComponent,
removeComponent,
Function render
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { selectAllLabel, showCount, renderListItem } = this.props;
const { options } = this.state;
if (options.length === 0) {
File RangeSlider.js
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from 'react';
import { View, Platform } from 'react-native';
import MultiSlider from '@ptomasroos/react-native-multi-slider';
import {
File DownShift.jsx
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { scrollIntoView } from './utils';
export default {
// eslint-disable-next-line
props: [
Function render
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { onData, size } = this.props;
const { currentPage } = this.state;
const results = parseHits(this.props.hits) || [];
const streamResults = parseHits(this.props.streamHits) || [];
Function componentWillReceiveProps
has a Cognitive Complexity of 24 (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 render
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let style = {};
if (this.props.showIcon) {
if (this.props.iconPosition === 'left') {
File MultiDropdownRange.js
has 308 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable */
import React, { Component } from 'react';
import { View, Modal, ListView, TouchableWithoutFeedback } from 'react-native';
import { CheckBox, Text, Body, Item, Header, Left, Button, Icon, Title, Right } from 'native-base';
Function render
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { config, theme } = this.props;
const { primary } = theme;
return (
<ThemeProvider
Function render
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
render() {
let markedDates = {};
const current = this.state.currentDate
? this.state.currentDate.start.dateString
: this.props.startDate || Date();
- 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 defaultQuery
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
MultiDropdownList.defaultQuery = (value, props) => {
let query = null;
const type = props.queryFormat === 'or' ? 'terms' : 'term';
if (!Array.isArray(value) || value.length === 0) {
- 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 componentWillReceiveProps
has 81 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)
CategorySearch
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class CategorySearch extends Component {
constructor(props) {
super(props);
this.state = {
Function render
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let style = {};
if (this.props.showIcon) {
if (this.props.iconPosition === 'left') {
Function defaultQuery
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
MultiDropdownList.defaultQuery = (value, props) => {
let query = null;
const type = props.queryFormat === 'or' ? 'terms' : 'term';
if (!Array.isArray(value) || value.length === 0) {
Consider simplifying this complex logical expression. Open
if (this.state.currentDate.end) {
const range = this.getDateRange(
new XDate(this.state.currentDate.start.timestamp),
new XDate(this.state.currentDate.end.timestamp),
);
DataSearch
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class DataSearch extends Component {
constructor(props) {
super(props);
this.state = {