appbaseio/reactivesearch

View on GitHub

Showing 334 of 1,376 total issues

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

    render() {
        if (!this.state.currentValue || !this.state.range) {
            return null;
        }

Severity: Minor
Found in packages/web/src/components/range/DynamicRangeSlider.js - About 1 hr to fix

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

        render() {
            const styles = {
                height: 30,
                ...Platform.select({
                    ios: {
    Severity: Minor
    Found in packages/native/src/components/range/RangeSlider.js - About 1 hr to fix

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

          render() {
              const min = 0.8;
              const max = 3;
      
              if (this.props.isLoading && this.props.loader) {
      Severity: Minor
      Found in packages/web/src/components/basic/TagCloud.js - About 1 hr to fix

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

            render() {
                return (
                    <Container class={this.$props.className}>
                        {this.$props.title && (
                            <Title class={getClassName(this.$props.innerClass, 'title')}>
        Severity: Minor
        Found in packages/vue/src/components/range/MultiRange.jsx - About 1 hr to fix

          Function componentDidMount has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              componentDidMount() {
                  this.props.addComponent(this.internalComponent);
                  this.props.addComponent(this.props.componentId);
          
                  if (this.props.stream) {
          Severity: Minor
          Found in packages/maps/src/components/result/ReactiveMap.js - About 1 hr to fix

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

                render() {
                    return (
                        <ReactiveBase
                            app="carstore-dataset"
                            credentials="4HWI27QmA:58c731f7-79ab-4f55-a590-7e15c7e36721"
            Severity: Minor
            Found in packages/web/examples/ReactiveComponent/src/index.js - About 1 hr to fix

              Function getInputEvents has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                      getInputEvents({
                          onInput,
                          onBlur,
                          onFocus,
                          onKeyPress,
              Severity: Minor
              Found in packages/vue/src/components/basic/DownShift.jsx - About 1 hr 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 render has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  render() {
                      let markedDates = {};
                      const current = this.state.currentDate
                          ? this.state.currentDate.dateString
                          : this.props.initialMonth || Date();
              Severity: Minor
              Found in packages/native/src/components/date/DatePicker.js - About 1 hr 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 connector has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              ) => component => {
                  const mapState = normalizeMapState(_mapState);
              
                  return {
                      name: `connect-${component.name}`,
              Severity: Minor
              Found in packages/vue/src/utils/connector.js - About 1 hr to fix

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

                    render() {
                        return (
                            <ReactiveBase
                                app="good-books-ds"
                                credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
                Severity: Minor
                Found in packages/web/examples/DataController/src/index.js - About 1 hr to fix

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

                      render() {
                          return (
                              <ReactiveBase
                                  app="meetup_app"
                                  credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
                  Severity: Minor
                  Found in packages/web/examples/SingleDataList/src/index.js - About 1 hr to fix

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

                        render() {
                            return (
                                <ReactiveBase
                                    app="meetup_app"
                                    credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
                    Severity: Minor
                    Found in packages/web/examples/MultiDataList/src/index.js - About 1 hr to fix

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

                          render() {
                              return (
                                  <Slider primary style={this.props.style} className={this.props.className}>
                                      {this.props.title && (
                                          <Title className={getClassName(this.props.innerClass, 'title') || null}>
                      Severity: Minor
                      Found in packages/maps/src/components/basic/GeoDistanceSlider.js - About 1 hr to fix

                        Function componentWillReceiveProps has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            componentWillReceiveProps(nextProps) {
                                checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
                                checkPropChange(this.props.options, nextProps.options, () => {
                                    const { showLoadMore, dataField } = nextProps;
                                    const { options } = this.state;
                        Severity: Minor
                        Found in packages/web/src/components/list/SingleDropdownList.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (
                                      this.state.searchAsMove !== nextState.searchAsMove
                                      || this.state.markerOnTop !== nextState.markerOnTop
                                      || this.props.showMapStyles !== nextProps.showMapStyles
                                      || this.props.autoCenter !== nextProps.autoCenter
                          Severity: Critical
                          Found in packages/maps/src/components/result/ReactiveMap.js - About 1 hr to fix

                            Function componentWillReceiveProps has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                componentWillReceiveProps(nextProps) {
                                    checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
                                    if (!isEqual(this.props.defaultSelected, nextProps.defaultSelected)) {
                                        this.handleDateChange(nextProps.defaultSelected, false, nextProps);
                                    } else {
                            Severity: Minor
                            Found in packages/web/src/components/date/DateRange.js - About 1 hr to fix

                              Function renderAsCard has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      renderAsCard({ item, triggerClickAnalytics }) {
                                          const onData = this.$props.onData || this.$scopedSlots.onData;
                                          const result = onData(item);
                                          if (result) {
                                              return (
                              Severity: Minor
                              Found in packages/vue/src/components/result/ResultCard.jsx - About 1 hr to fix

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

                                    render() {
                                        return (
                                            <ReactiveBase
                                                app="meetup_app"
                                                credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
                                Severity: Minor
                                Found in packages/web/examples/ToggleButton/src/index.js - About 1 hr to fix

                                  Function mapStateToProps has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const mapStateToProps = (state, props) => {
                                      let options
                                          = state.aggregations[props.componentId]
                                          && state.aggregations[props.componentId][props.dataField];
                                      let range = state.aggregations[`${props.componentId}__range__internal`];
                                  Severity: Minor
                                  Found in packages/web/src/components/range/DynamicRangeSlider.js - About 1 hr to fix

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

                                        render() {
                                            return (
                                                <ReactiveBase
                                                    app="meetup_app"
                                                    credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
                                    Severity: Minor
                                    Found in site/demos/polygon/src/index.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language