appbaseio/reactivesearch

View on GitHub
packages/vue/src/components/list/SingleList.jsx

Summary

Maintainability
F
6 days
Test Coverage

File SingleList.jsx has 391 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Actions, helper } from '@appbaseio/reactivecore';
import VueTypes from 'vue-types';
import Title from '../../styles/Title';
import Input from '../../styles/Input';
import Container from '../../styles/Container';
Severity: Minor
Found in packages/vue/src/components/list/SingleList.jsx - About 5 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 defaultQuery has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      SingleList.defaultQuery = (value, props) => {
          if (props.selectAllLabel && props.selectAllLabel === value) {
              if (props.showMissing) {
                  return { match_all: {} };
              }
      Severity: Minor
      Found in packages/vue/src/components/list/SingleList.jsx - About 1 hr to fix

        Function defaultQuery has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        SingleList.defaultQuery = (value, props) => {
            if (props.selectAllLabel && props.selectAllLabel === value) {
                if (props.showMissing) {
                    return { match_all: {} };
                }
        Severity: Minor
        Found in packages/vue/src/components/list/SingleList.jsx - About 35 mins 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 7 (exceeds 5 allowed). Consider refactoring.
        Open

            render() {
                const { selectAllLabel, renderListItem } = this.$props;
                const renderListItemCalc
                    = this.$scopedSlots.renderListItem || renderListItem;
                if (this.modifiedOptions.length === 0) {
        Severity: Minor
        Found in packages/vue/src/components/list/SingleList.jsx - About 35 mins 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

        Avoid too many return statements within this function.
        Open

            return null;
        Severity: Major
        Found in packages/vue/src/components/list/SingleList.jsx - About 30 mins to fix

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

              beforeMount() {
                  this.addComponent(this.internalComponent);
                  this.addComponent(this.$props.componentId);
                  this.updateQueryHandlerOptions(this.$props);
                  this.setReact(this.$props);
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 2 other locations - About 4 hrs to fix
          packages/vue/src/components/list/MultiList.jsx on lines 75..86
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 76..87

          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 133.

          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

          SingleList.generateQueryOptions = props => {
              const queryOptions = getQueryOptions(props);
              queryOptions.size = 0;
              queryOptions.aggs = {
                  [props.dataField]: {
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 1 other location - About 4 hrs to fix
          packages/vue/src/components/list/MultiList.jsx on lines 471..486

          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 129.

          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

                  renderSearch() {
                      if (this.$props.showSearch) {
                          return (
                              <Input
                                  class={getClassName(this.$props.innerClass, 'input') || ''}
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 1 other location - About 4 hrs to fix
          packages/vue/src/components/list/MultiList.jsx on lines 376..393

          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 128.

          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

                  generateQueryOptions(props) {
                      const queryOptions = getQueryOptions(props);
                      queryOptions.size = 0;
                      queryOptions.aggs = {
                          [props.dataField]: {
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 1 other location - About 4 hrs to fix
          packages/vue/src/components/list/MultiList.jsx on lines 346..364

          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 121.

          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 6 locations. Consider refactoring.
          Open

                              {itemsToRender
                                  .filter(item => {
                                      if (String(item.key).length) {
                                          if (this.$props.showSearch && this.$data.searchTerm) {
                                              return String(item.key)
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 5 other locations - About 3 hrs to fix
          packages/vue/src/components/list/MultiList.jsx on lines 183..240
          packages/vue/src/components/shared/DropDown.jsx on lines 113..194
          packages/web/src/components/shared/Dropdown.js on lines 155..231
          packages/web/src/components/list/MultiList.js on lines 413..466
          packages/web/src/components/list/SingleList.js on lines 323..377

          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 113.

          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 6 locations. Consider refactoring.
          Open

                  updateQueryHandler(value, props) {
                      const query = props.customQuery || SingleList.defaultQuery;
                      this.updateQuery({
                          componentId: props.componentId,
                          query: query(value, props),
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 5 other locations - About 3 hrs to fix
          packages/vue/src/components/list/MultiDropdownList.jsx on lines 302..313
          packages/vue/src/components/list/MultiList.jsx on lines 333..344
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 239..250
          packages/vue/src/components/range/MultiRange.jsx on lines 91..102
          packages/vue/src/components/range/SingleRange.jsx on lines 145..156

          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 97.

          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 5 locations. Consider refactoring.
          Open

                  setReact(props) {
                      const { react } = props;
          
                      if (react) {
                          const newReact = pushToAndClause(react, this.internalComponent);
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 4 other locations - About 2 hrs to fix
          packages/vue/src/components/list/MultiDropdownList.jsx on lines 216..227
          packages/vue/src/components/list/MultiList.jsx on lines 247..258
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 203..214
          packages/vue/src/components/result/ReactiveList.jsx on lines 411..422

          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 91.

          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 4 locations. Consider refactoring.
          Open

                          {this.$props.title && (
                              <Title class={getClassName(this.$props.innerClass, 'title') || ''}>
                                  {this.$props.title}
                              </Title>
                          )}
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 3 other locations - About 1 hr to fix
          packages/vue/src/components/list/MultiDropdownList.jsx on lines 176..180
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 163..167
          packages/vue/src/components/search/DataSearch.jsx on lines 398..402

          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 62.

          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 7 locations. Consider refactoring.
          Open

              created() {
                  const onQueryChange = (...args) => {
                      this.$emit('queryChange', ...args);
                  };
                  this.setQueryListener(this.$props.componentId, onQueryChange, null);
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 6 other locations - About 1 hr to fix
          packages/vue/src/components/list/MultiDropdownList.jsx on lines 72..77
          packages/vue/src/components/list/MultiList.jsx on lines 69..74
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 70..75
          packages/vue/src/components/range/MultiRange.jsx on lines 122..127
          packages/vue/src/components/range/RangeSlider.jsx on lines 125..130
          packages/vue/src/components/range/SingleRange.jsx on lines 38..43

          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 58.

          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

                                      <li
                                          key={item.key}
                                          class={`${
                                              this.$data.currentValue === String(item.key) ? 'active' : ''
                                          }`}
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 1 other location - About 1 hr to fix
          packages/web/src/components/list/SingleList.js on lines 336..376

          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 58.

          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 4 locations. Consider refactoring.
          Open

                      const performUpdate = () => {
                          this.currentValue = value;
                          this.updateQueryHandler(value, props);
                          this.locked = false;
                          this.$emit('valueChange', value);
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 3 other locations - About 1 hr to fix
          packages/vue/src/components/list/MultiDropdownList.jsx on lines 287..292
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 224..229
          packages/vue/src/components/range/SingleRange.jsx on lines 130..135

          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 58.

          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

                  options(newVal) {
                      this.modifiedOptions = newVal[this.$props.dataField]
                          ? newVal[this.$props.dataField].buckets
                          : [];
                  },
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 1 other location - About 1 hr to fix
          packages/vue/src/components/list/MultiList.jsx on lines 95..99

          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 55.

          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 3 locations. Consider refactoring.
          Open

                      modifiedOptions:
                          props.options && props.options[props.dataField]
                              ? props.options[props.dataField].buckets
                              : [],
          Severity: Minor
          Found in packages/vue/src/components/list/SingleList.jsx and 2 other locations - About 40 mins to fix
          packages/vue/src/components/list/MultiList.jsx on lines 59..62
          packages/web/src/components/basic/TagCloud.js on lines 36..39

          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 48.

          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 4 locations. Consider refactoring.
          Open

                  dataField() {
                      this.updateQueryHandlerOptions(this.$props);
                      this.updateQueryHandler(this.$data.currentValue, this.$props);
                  },
          Severity: Major
          Found in packages/vue/src/components/list/SingleList.jsx and 3 other locations - About 35 mins to fix
          packages/vue/src/components/list/MultiDropdownList.jsx on lines 146..149
          packages/vue/src/components/list/MultiList.jsx on lines 106..109
          packages/vue/src/components/list/SingleDropdownList.jsx on lines 128..131

          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 47.

          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 3 locations. Consider refactoring.
          Open

                                  <li
                                      key={selectAllLabel}
                                      class={`${
                                          this.$data.currentValue === selectAllLabel ? 'active' : ''
                                      }`}
          Severity: Minor
          Found in packages/vue/src/components/list/SingleList.jsx and 2 other locations - About 35 mins to fix
          packages/web/src/components/list/SingleDataList.js on lines 267..288
          packages/web/src/components/list/SingleList.js on lines 299..321

          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 46.

          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

          There are no issues that match your filters.

          Category
          Status