appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

DataSearch.shouldQuery = (value, dataFields, props) => {
    const fields = dataFields.map(
        (field, index) =>
            `${field}${
                Array.isArray(props.fieldWeights) && props.fieldWeights[index]
Severity: Minor
Found in packages/vue/src/components/search/DataSearch.jsx - About 1 hr to fix

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

            renderAsList({ 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/ResultList.jsx - About 1 hr to fix

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

          render() {
              const tooltipTrigger
                  = this.$props.tooltipTrigger === 'none' ? false : this.$props.tooltipTrigger;
              return (
                  <Container class={this.$props.className}>
      Severity: Minor
      Found in packages/vue/src/components/range/RangeSlider.jsx - About 1 hr to fix

        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

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                                          <label
                                              class={getClassName(this.$props.innerClass, 'label')}
                                              for={`${this.$props.componentId}-${item.label}`}
                                          >
                                              {item.label}
          Severity: Major
          Found in packages/vue/src/components/range/SingleRange.jsx and 1 other location - About 1 hr to fix
          packages/vue/src/components/range/MultiRange.jsx on lines 176..181

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                                          <label
                                              class={getClassName(this.$props.innerClass, 'label')}
                                              for={`${this.$props.componentId}-${item.label}`}
                                          >
                                              {item.label}
          Severity: Major
          Found in packages/vue/src/components/range/MultiRange.jsx and 1 other location - About 1 hr to fix
          packages/vue/src/components/range/SingleRange.jsx on lines 100..105

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          const SearchSvg = () => (
              <svg
                  alt="Search"
                  className="search-icon"
                  height="14"
          Severity: Major
          Found in packages/web/src/components/shared/SearchSvg.js and 1 other location - About 1 hr to fix
          packages/vue/src/components/shared/SearchSvg.js on lines 1..19

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  if (this.props.selectedValue) {
                      const currentDate = {
                          dateString: new XDate(this.props.selectedValue).toString('yyyy-MM-dd'),
                          timestamp: new XDate(this.props.selectedValue).getTime(),
                      };
          Severity: Major
          Found in packages/native/src/components/date/DatePicker.js and 1 other location - About 1 hr to fix
          packages/native/src/components/date/DatePicker.js on lines 49..55

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          export const ToggleButton = styled.div`
              ${button};
              ${card};
              display: none;
              color: white;
          Severity: Major
          Found in site/demos/producthunt/src/styles/Button.js and 1 other location - About 1 hr to fix
          site/demos/ecommerce/src/styles/Button.js on lines 15..40

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          export const ToggleButton = styled.div`
              ${button};
              ${card};
              display: none;
              color: white;
          Severity: Major
          Found in site/demos/ecommerce/src/styles/Button.js and 1 other location - About 1 hr to fix
          site/demos/producthunt/src/styles/Button.js on lines 15..40

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  } else if (this.props.defaultSelected) {
                      const currentDate = {
                          dateString: new XDate(this.props.defaultSelected).toString('yyyy-MM-dd'),
                          timestamp: new XDate(this.props.defaultSelected).getTime(),
                      };
          Severity: Major
          Found in packages/native/src/components/date/DatePicker.js and 1 other location - About 1 hr to fix
          packages/native/src/components/date/DatePicker.js on lines 43..55

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          const SearchSvg = () => (
              <svg
                  alt="Search"
                  class="search-icon"
                  height="14"
          Severity: Major
          Found in packages/vue/src/components/shared/SearchSvg.js and 1 other location - About 1 hr to fix
          packages/web/src/components/shared/SearchSvg.js on lines 3..21

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 72.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          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

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      if (this.props.defaultQuery) {
                          this.defaultQuery = this.props.defaultQuery();
                          if (this.defaultQuery.sort) {
                              options.sort = this.defaultQuery.sort;
                          }
              Severity: Major
              Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 1 hr to fix
              packages/native/src/components/result/ReactiveList.js on lines 80..85

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 71.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                      if (this.props.defaultQuery) {
                          this.defaultQuery = this.props.defaultQuery();
                          if (this.defaultQuery.sort) {
                              options.sort = this.defaultQuery.sort;
                          }
              Severity: Major
              Found in packages/native/src/components/result/ReactiveList.js and 1 other location - About 1 hr to fix
              packages/web/src/components/result/ReactiveList.js on lines 79..84

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 71.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                                  <div className="col">
                                      <RangeSlider
                                          dataField="ratings_count"
                                          componentId="BookSensor"
                                          range={{
              Severity: Major
              Found in packages/web/examples/RangeSlider/src/index.js and 1 other location - About 1 hr to fix
              packages/web/examples/RangeInput/src/index.js on lines 16..29

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 71.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                                  <div className="col">
                                      <RangeInput
                                          dataField="ratings_count"
                                          componentId="BookSensor"
                                          range={{
              Severity: Major
              Found in packages/web/examples/RangeInput/src/index.js and 1 other location - About 1 hr to fix
              packages/web/examples/RangeSlider/src/index.js on lines 16..29

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 71.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              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
                  Severity
                  Category
                  Status
                  Source
                  Language