appbaseio/reactivesearch

View on GitHub

Showing 334 of 1,376 total issues

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

    componentWillReceiveProps(nextProps) {
        checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));

        checkSomePropChange(this.props, nextProps, ['dataField', 'nestedField'], () => {
            this.updateQuery(this.state.currentDistance, nextProps);
Severity: Minor
Found in packages/maps/src/components/basic/GeoDistanceSlider.js - About 1 hr to fix

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

        componentWillReceiveProps(nextProps) {
            checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
    
            checkSomePropChange(this.props, nextProps, ['dataField', 'nestedField'], () => {
                this.updateQuery(this.state.currentDistance, nextProps);
    Severity: Minor
    Found in packages/maps/src/components/basic/GeoDistanceDropdown.js - About 1 hr to fix

      Function render has 32 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/CategorySearch/src/index.js - About 1 hr to fix

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

            render() {
                return (
                    <ReactiveBase
                        app="airbeds-test-app"
                        credentials="X8RsOu0Lp:9b4fe1a4-58c6-4089-a042-505d86d9da30"
        Severity: Minor
        Found in packages/web/examples/DatePicker/src/index.js - About 1 hr to fix

          Function render has 32 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/DataSearch/src/index.js - About 1 hr to fix

            Function getButtonProps has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                    getButtonProps({ onClick, onKeyDown, onKeyUp, onBlur }) {
                        return {
                            click: event => {
                                this.setState({
                                    isOpen: true,
            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 componentWillReceiveProps has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                componentWillReceiveProps(nextProps) {
                    checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
            
                    let startDate = null;
                    let endDate = null;
            Severity: Minor
            Found in packages/native/src/components/date/DateRange.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 componentWillReceiveProps has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                componentWillReceiveProps(nextProps) {
                    checkPropChange(this.props.react, nextProps.react, () => {
                        this.setReact(nextProps);
                    });
            
            
            Severity: Minor
            Found in packages/web/src/components/basic/ToggleButton.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 componentWillReceiveProps has a Cognitive Complexity of 11 (exceeds 5 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

            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 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                componentWillReceiveProps(nextProps) {
                    checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
                    checkSomePropChange(this.props, nextProps, ['showHistogram', 'interval'], () =>
                        this.updateQueryOptions(nextProps),
                    );
            Severity: Minor
            Found in packages/native/src/components/range/RangeSlider.js - About 1 hr to fix

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

                  componentWillReceiveProps(nextProps) {
                      checkSomePropChange(
                          this.props,
                          nextProps,
                          ['highlight', 'dataField', 'highlightField'],
              Severity: Minor
              Found in packages/native/src/components/search/DataSearch.js - About 1 hr to fix

                Function render has 31 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/ReactiveList/src/index.js - About 1 hr to fix

                  Function render has 31 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/SelectedFilters/src/index.js - About 1 hr to fix

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

                        componentWillReceiveProps(nextProps) {
                            checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
                            checkSomePropChange(this.props, nextProps, ['showHistogram', 'interval'], () =>
                                this.updateQueryOptions(nextProps),
                            );
                    Severity: Minor
                    Found in packages/web/src/components/range/RangeSlider.js - About 1 hr to fix

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

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

                        Function renderFilters has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                renderFilters() {
                                    const { selectedValues } = this;
                                    return Object.keys(selectedValues)
                                        .filter(
                                            id => this.components.includes(id) && selectedValues[id].showFilter
                        Severity: Minor
                        Found in packages/vue/src/components/basic/SelectedFilters.jsx - About 1 hr to fix

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

                              render() {
                                  if (this.$scopedSlots.default) {
                                      return this.$scopedSlots.default(this.$props);
                                  }
                                  const filtersToRender = this.renderFilters();
                          Severity: Minor
                          Found in packages/vue/src/components/basic/SelectedFilters.jsx - About 1 hr to fix

                            Function renderSuggestions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                renderSuggestions() {
                                    let suggestionsList = [];
                            
                                    if (
                                        !this.state.currentValue
                            Severity: Minor
                            Found in packages/native/src/components/search/DataSearch.js - About 1 hr to fix

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

                                  render() {
                                      return (
                                          <Container
                                              style={this.props.style}
                                              className={`${toggleButtons} ${this.props.className || ''}`}
                              Severity: Minor
                              Found in packages/web/src/components/basic/ToggleButton.js - About 1 hr to fix

                                Function render has 30 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/MultiList/src/index.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language