appbaseio/reactivesearch

View on GitHub

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
Severity: Major
Found in packages/web/src/components/search/DataSearch.js - About 4 hrs to fix

    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 || '';
    Severity: Major
    Found in packages/web/src/components/date/DateRange.js - About 4 hrs to fix

      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)
      Severity: Major
      Found in packages/maps/src/components/result/ReactiveMap.js - About 4 hrs to fix

        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) {
        Severity: Major
        Found in packages/vue/src/components/list/SingleList.jsx - About 4 hrs to fix

          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;
          Severity: Major
          Found in packages/web/src/components/list/SingleList.js - About 4 hrs to fix

            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 ? (
            Severity: Major
            Found in packages/native/src/components/range/MultiDropdownRange.js - About 4 hrs to fix

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

                  render() {
                      let selectAll = [];
              
                      if (this.state.options.length === 0) {
                          return null;
              Severity: Major
              Found in packages/native/src/components/list/MultiDropdownList.js - About 4 hrs to fix

                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;
                Severity: Major
                Found in packages/web/src/components/list/MultiList.js - About 4 hrs to fix

                  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;
                  Severity: Major
                  Found in packages/vue/src/components/list/MultiList.jsx - About 4 hrs to fix

                    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) => {
                    Severity: Major
                    Found in packages/web/src/components/result/addons/Pagination.js - About 4 hrs to fix

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

                          render() {
                              if (!this.state.isReady) {
                                  return <Text>Loading...</Text>;
                              }
                      
                      
                      Severity: Major
                      Found in packages/native/example/App.js - About 4 hrs to fix

                        ReactiveMap has 33 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class ReactiveMap extends Component {
                            constructor(props) {
                                super(props);
                        
                                this.mapStyles = [
                        Severity: Minor
                        Found in packages/maps/src/components/result/ReactiveMap.js - About 4 hrs to fix

                          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)
                          Severity: Minor
                          Found in packages/maps/src/components/result/ReactiveMap.js - About 4 hrs 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 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) => {
                          Severity: Minor
                          Found in packages/web/src/components/result/addons/Pagination.js - About 4 hrs 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

                          File SingleDropdownList.js has 333 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

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

                            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';
                            Severity: Minor
                            Found in packages/vue/src/components/list/SingleDropdownList.jsx - About 3 hrs to fix

                              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) || [];
                              Severity: Major
                              Found in packages/vue/src/components/result/ReactiveList.jsx - About 3 hrs to fix

                                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 = [];
                                
                                
                                Severity: Minor
                                Found in packages/vue/src/components/result/addons/Pagination.jsx - About 3 hrs 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

                                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';
                                
                                
                                Severity: Minor
                                Found in packages/native/src/components/date/DatePicker.js - About 3 hrs to fix

                                  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) {
                                  Severity: Major
                                  Found in packages/web/src/components/list/SingleDataList.js - About 3 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language