appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/numberbox.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/singledatalist.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/singledropdownrange.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/multirange.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/categorysearch.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/rangeinput.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/textfield.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/singlerange.js on lines 42..82
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

export default class Main extends Component {
    static async getInitialProps() {
        return {
            store: await initReactivesearch(
                [
Severity: Major
Found in packages/web/examples/ssr/pages/singlerange.js and 21 other locations - About 1 day to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 39..79
packages/web/examples/ssr/pages/datasearch.js on lines 34..74
packages/web/examples/ssr/pages/datepicker.js on lines 66..106
packages/web/examples/ssr/pages/daterange.js on lines 76..116
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 40..80
packages/web/examples/ssr/pages/multidropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/multidropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/multilist.js on lines 34..74
packages/web/examples/ssr/pages/multirange.js on lines 37..77
packages/web/examples/ssr/pages/numberbox.js on lines 39..79
packages/web/examples/ssr/pages/rangeinput.js on lines 43..83
packages/web/examples/ssr/pages/rangeslider.js on lines 48..88
packages/web/examples/ssr/pages/ratingsfilter.js on lines 45..85
packages/web/examples/ssr/pages/reactivelist.js on lines 41..81
packages/web/examples/ssr/pages/resultlist.js on lines 41..80
packages/web/examples/ssr/pages/singledatalist.js on lines 47..87
packages/web/examples/ssr/pages/singledropdownlist.js on lines 39..79
packages/web/examples/ssr/pages/singledropdownrange.js on lines 42..82
packages/web/examples/ssr/pages/singlelist.js on lines 34..74
packages/web/examples/ssr/pages/textfield.js on lines 33..73
packages/web/examples/ssr/pages/togglebutton.js on lines 41..80

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

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

    static defaultQuery = (values, props) => {
        const generateRangeQuery = (dataField, items) => {
            if (items.length > 0) {
                return items.map(value => ({
                    range: {
Severity: Major
Found in packages/web/src/components/range/MultiDropdownRange.js and 1 other location - About 1 day to fix
packages/web/src/components/range/MultiRange.js on lines 83..121

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

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

    static defaultQuery = (values, props) => {
        const generateRangeQuery = (dataField, items) => {
            if (items.length > 0) {
                return items.map(value => ({
                    range: {
Severity: Major
Found in packages/web/src/components/range/MultiRange.js and 1 other location - About 1 day to fix
packages/web/src/components/range/MultiDropdownRange.js on lines 82..120

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

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

File MultiList.js has 513 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Component } from 'react';

import {
    addComponent,
    removeComponent,
Severity: Major
Found in packages/web/src/components/list/MultiList.js - About 1 day to fix

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

        handleChange = (currentValue, props = this.props) => {
            // ignore state updates when component is locked
            if (props.beforeValueChange && this.locked) {
                return;
            }
    Severity: Major
    Found in packages/native/src/components/range/RangeSlider.js and 1 other location - About 1 day to fix
    packages/web/src/components/range/RangeSlider.js on lines 200..233

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

    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

        render() {
            return (
                <ReactiveBase
                    app="airbeds-test-app"
                    credentials="X8RsOu0Lp:9b4fe1a4-58c6-4089-a042-505d86d9da30"
    Severity: Major
    Found in packages/web/examples/DatePicker/src/index.js and 1 other location - About 1 day to fix
    packages/web/examples/DateRange/src/index.js on lines 50..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 200.

    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

        render() {
            return (
                <ReactiveBase
                    app="airbeds-test-app"
                    credentials="X8RsOu0Lp:9b4fe1a4-58c6-4089-a042-505d86d9da30"
    Severity: Major
    Found in packages/web/examples/DateRange/src/index.js and 1 other location - About 1 day to fix
    packages/web/examples/DatePicker/src/index.js on lines 10..44

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

    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

        handleChange = (currentValue, props = this.props) => {
            // ignore state updates when component is locked
            if (props.beforeValueChange && this.locked) {
                return;
            }
    Severity: Major
    Found in packages/web/src/components/range/RangeSlider.js and 1 other location - About 1 day to fix
    packages/native/src/components/range/RangeSlider.js on lines 167..200

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

    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 Flex = styled.div`
        display: flex;
    
        ${props => props.justifyContent && css`
            justify-content: ${props.justifyContent};
    Severity: Major
    Found in site/demos/gitxplore/src/styles/Flex.js and 3 other locations - About 1 day to fix
    site/demos/ecommerce/src/styles/Flex.js on lines 36..60
    site/demos/gitxplore-dark/src/styles/Flex.js on lines 29..53
    site/demos/producthunt/src/styles/Flex.js on lines 42..76

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

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

        loadMore = () => {
            if (
                this.props.hits
                && !this.props.pagination
                && this.props.total !== this.props.hits.length
    Severity: Major
    Found in packages/maps-native/src/components/maps/ReactiveMap.js and 2 other locations - About 1 day to fix
    packages/maps/src/components/result/ReactiveMap.js on lines 495..521
    packages/native/src/components/result/ReactiveList.js on lines 251..277

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

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

        loadMore = () => {
            if (
                this.props.hits
                && !this.props.pagination
                && this.props.total !== this.props.hits.length
    Severity: Major
    Found in packages/native/src/components/result/ReactiveList.js and 2 other locations - About 1 day to fix
    packages/maps-native/src/components/maps/ReactiveMap.js on lines 279..305
    packages/maps/src/components/result/ReactiveMap.js on lines 495..521

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

    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 Flex = styled.div`
        display: flex;
    
        ${props => props.justifyContent && css`
            justify-content: ${props.justifyContent};
    Severity: Major
    Found in site/demos/ecommerce/src/styles/Flex.js and 3 other locations - About 1 day to fix
    site/demos/gitxplore-dark/src/styles/Flex.js on lines 29..53
    site/demos/gitxplore/src/styles/Flex.js on lines 29..53
    site/demos/producthunt/src/styles/Flex.js on lines 42..76

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

    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 Flex = styled.div`
        display: flex;
    
        ${props =>
            props.justifyContent
    Severity: Major
    Found in site/demos/producthunt/src/styles/Flex.js and 3 other locations - About 1 day to fix
    site/demos/ecommerce/src/styles/Flex.js on lines 36..60
    site/demos/gitxplore-dark/src/styles/Flex.js on lines 29..53
    site/demos/gitxplore/src/styles/Flex.js on lines 29..53

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

    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

    Severity
    Category
    Status
    Source
    Language