appbaseio/reactivesearch

View on GitHub

Showing 334 of 1,376 total issues

Function render has 605 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render() {
        const {
            config,
            theme: { secondary, primaryDark, textDark },
        } = this.props;
Severity: Major
Found in site/src/components/Tools.js - About 3 days to fix

    File ReactiveMap.js has 938 lines of code (exceeds 250 allowed). Consider refactoring.
    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 {
    Severity: Major
    Found in packages/maps/src/components/result/ReactiveMap.js - About 2 days to fix

      Function render has 416 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render() {
              const {
                  config,
                  theme: { secondary, primary },
              } = this.props;
      Severity: Major
      Found in site/src/components/Home.js - About 2 days to fix

        File CategorySearch.js has 708 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { Component } from 'react';
        import Downshift from 'downshift';
        import { withTheme } from 'emotion-theming';
        
        import {
        Severity: Major
        Found in packages/web/src/components/search/CategorySearch.js - About 1 day to fix

          File ReactiveMap.js has 683 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React, { Component } from 'react';
          import { View, StyleSheet, Text } from 'react-native';
          import { Button, Icon } from 'native-base';
          import { MapView } from 'expo';
          
          
          Severity: Major
          Found in packages/maps-native/src/components/maps/ReactiveMap.js - About 1 day to fix

            File Tools.js has 667 lines of code (exceeds 250 allowed). Consider refactoring.
            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';
            Severity: Major
            Found in site/src/components/Tools.js - About 1 day to fix

              File ReactiveList.js has 628 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import React, { Component } from 'react';
              
              import {
                  addComponent,
                  removeComponent,
              Severity: Major
              Found in packages/web/src/components/result/ReactiveList.js - About 1 day to fix

                File DataSearch.js has 622 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { Component } from 'react';
                import Downshift from 'downshift';
                import { withTheme } from 'emotion-theming';
                
                import {
                Severity: Major
                Found in packages/web/src/components/search/DataSearch.js - About 1 day to fix

                  File DataSearch.jsx has 621 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import {
                      Actions,
                      helper,
                      suggestions as getSuggestions,
                      causes
                  Severity: Major
                  Found in packages/vue/src/components/search/DataSearch.jsx - About 1 day to fix

                    File DataSearch.js has 613 lines of code (exceeds 250 allowed). Consider refactoring.
                    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 {
                    Severity: Major
                    Found in packages/native/src/components/search/DataSearch.js - About 1 day to fix

                      File ReactiveList.jsx has 554 lines of code (exceeds 250 allowed). Consider refactoring.
                      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';
                      Severity: Major
                      Found in packages/vue/src/components/result/ReactiveList.jsx - About 1 day to fix

                        File ReactiveList.js has 548 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import React, { Component } from 'react';
                        import { View } from 'react-native';
                        import { Text, Spinner, Button, Icon } from 'native-base';
                        
                        import {
                        Severity: Major
                        Found in packages/native/src/components/result/ReactiveList.js - About 1 day to fix

                          File GeoDistanceSlider.js has 533 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React, { Component } from 'react';
                          import Downshift from 'downshift';
                          import { withTheme } from 'emotion-theming';
                          
                          import {
                          Severity: Major
                          Found in packages/maps/src/components/basic/GeoDistanceSlider.js - About 1 day to fix

                            File MultiList.js has 513 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import React, { Component } from 'react';
                            
                            import {
                                addComponent,
                                removeComponent,
                            Severity: Major
                            Found in packages/web/src/components/list/MultiList.js - About 1 day to fix

                              Function componentWillReceiveProps has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  componentWillReceiveProps(nextProps) {
                                      const totalPages = Math.ceil(nextProps.total / nextProps.size) || 0;
                              
                                      if (
                                          !isEqual(this.props.sortOptions, nextProps.sortOptions)
                              Severity: Minor
                              Found in packages/web/src/components/result/ReactiveList.js - About 1 day to fix

                              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

                              export default function initReactivesearch(componentCollection, searchState, settings) {
                                  return new Promise((resolve, reject) => {
                                      const credentials = settings.url && settings.url.trim() !== '' && !settings.credentials
                                          ? null
                                          : settings.credentials;
                              Severity: Major
                              Found in packages/web/src/server/index.js - About 1 day to fix

                                File DynamicRangeSlider.js has 498 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import React, { Component } from 'react';
                                import {
                                    addComponent,
                                    removeComponent,
                                    watchComponent,
                                Severity: Minor
                                Found in packages/web/src/components/range/DynamicRangeSlider.js - About 7 hrs to fix

                                  File GeoDistanceDropdown.js has 495 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React, { Component } from 'react';
                                  import Downshift from 'downshift';
                                  import { withTheme } from 'emotion-theming';
                                  
                                  import {
                                  Severity: Minor
                                  Found in packages/maps/src/components/basic/GeoDistanceDropdown.js - About 7 hrs to fix

                                    Function render has 195 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        render() {
                                            let markedDates = {};
                                            const current = this.state.currentDate
                                                ? this.state.currentDate.start.dateString
                                                : this.props.startDate || Date();
                                    Severity: Major
                                    Found in packages/native/src/components/date/DateRange.js - About 7 hrs to fix

                                      File Home.js has 489 lines of code (exceeds 250 allowed). Consider refactoring.
                                      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';
                                      Severity: Minor
                                      Found in site/src/components/Home.js - About 7 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language