Showing 334 of 1,376 total issues
Function render
has 605 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
config,
theme: { secondary, primaryDark, textDark },
} = this.props;
File ReactiveMap.js
has 938 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import { withGoogleMap, GoogleMap, Marker, InfoWindow } from 'react-google-maps';
import MarkerClusterer from 'react-google-maps/lib/components/addons/MarkerClusterer';
import { MarkerWithLabel } from 'react-google-maps/lib/components/addons/MarkerWithLabel';
import {
Function render
has 416 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
config,
theme: { secondary, primary },
} = this.props;
File CategorySearch.js
has 708 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import Downshift from 'downshift';
import { withTheme } from 'emotion-theming';
import {
File ReactiveMap.js
has 683 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import { Button, Icon } from 'native-base';
import { MapView } from 'expo';
File Tools.js
has 667 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import { ThemeProvider } from 'emotion-theming';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import { css } from 'emotion';
File ReactiveList.js
has 628 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import {
addComponent,
removeComponent,
File DataSearch.js
has 622 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import Downshift from 'downshift';
import { withTheme } from 'emotion-theming';
import {
File DataSearch.jsx
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Actions,
helper,
suggestions as getSuggestions,
causes
File DataSearch.js
has 613 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import { Platform, View, Modal, TouchableWithoutFeedback } from 'react-native';
import { Input, Item, List, ListItem, Text, Button, Header, Left, Right, Icon } from 'native-base';
import {
File ReactiveList.jsx
has 554 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Actions, helper } from '@appbaseio/reactivecore';
import VueTypes from 'vue-types';
import Pagination from './addons/Pagination.jsx';
import PoweredBy from './addons/PoweredBy.jsx';
import { connect } from '../../utils/index';
File ReactiveList.js
has 548 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import { View } from 'react-native';
import { Text, Spinner, Button, Icon } from 'native-base';
import {
File GeoDistanceSlider.js
has 533 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import Downshift from 'downshift';
import { withTheme } from 'emotion-theming';
import {
File MultiList.js
has 513 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import {
addComponent,
removeComponent,
Function componentWillReceiveProps
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
Open
componentWillReceiveProps(nextProps) {
const totalPages = Math.ceil(nextProps.total / nextProps.size) || 0;
if (
!isEqual(this.props.sortOptions, nextProps.sortOptions)
- 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 initReactivesearch
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function initReactivesearch(componentCollection, searchState, settings) {
return new Promise((resolve, reject) => {
const credentials = settings.url && settings.url.trim() !== '' && !settings.credentials
? null
: settings.credentials;
File DynamicRangeSlider.js
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import {
addComponent,
removeComponent,
watchComponent,
File GeoDistanceDropdown.js
has 495 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import Downshift from 'downshift';
import { withTheme } from 'emotion-theming';
import {
Function render
has 195 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let markedDates = {};
const current = this.state.currentDate
? this.state.currentDate.start.dateString
: this.props.startDate || Date();
File Home.js
has 489 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from 'react';
import { Navbar, Logo, Button, H3, Title, Flex, GithubButton, Grid } from '@appbaseio/designkit';
import { Link } from 'react-router-dom';
import { css } from 'emotion';
import { ThemeProvider } from 'emotion-theming';