appbaseio/reactivesearch

View on GitHub

Showing 1,042 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/dynamicrangeslider.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/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/reactivelist.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/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/datasearch.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/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/singlelist.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/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/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/daterange.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/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/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/ratingsfilter.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/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/rangeslider.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/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/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/multilist.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/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/singledropdownlist.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/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/multidropdownrange.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/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/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

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

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

Severity
Category
Status
Source
Language