appbaseio/reactivesearch

View on GitHub

Showing 1,042 of 1,376 total issues

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

    constructor(props) {
        super(props);

        this.state = {
            currentValue: null,
Severity: Major
Found in packages/web/src/components/range/SingleRange.js and 1 other location - About 2 hrs to fix
packages/web/src/components/range/SingleDropdownRange.js on lines 26..35

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

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

                                <label
                                    className={getClassName(this.props.innerClass, 'label') || null}
                                    htmlFor={`${this.props.componentId}-${item.label}`}
                                >
                                    {item.label}
Severity: Major
Found in packages/web/src/components/range/SingleRange.js and 1 other location - About 2 hrs to fix
packages/web/src/components/range/MultiRange.js on lines 214..219

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

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

    async componentWillMount() {
        await Expo.Font.loadAsync({
            Roboto: require('native-base/Fonts/Roboto.ttf'), // eslint-disable-line global-require
            Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'), // eslint-disable-line global-require
            Ionicons: require('@expo/vector-icons/fonts/Ionicons.ttf'), // eslint-disable-line global-require
Severity: Major
Found in packages/native/example/App.js and 1 other location - About 2 hrs to fix
packages/maps-native/example/App.js on lines 13..21

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

        } else if (
            nextProps.selectedValue
            && nextProps.selectedValue.distance
            && nextProps.selectedValue.location
            && !isEqual(this.state.currentLocation, nextProps.selectedValue.location)
Severity: Major
Found in packages/maps/src/components/basic/GeoDistanceSlider.js and 1 other location - About 2 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 100..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 76.

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

                            <label
                                className={getClassName(this.props.innerClass, 'label') || null}
                                htmlFor={`${this.props.componentId}-${item.label}`}
                            >
                                {item.label}
Severity: Major
Found in packages/web/src/components/range/MultiRange.js and 1 other location - About 2 hrs to fix
packages/web/src/components/range/SingleRange.js on lines 169..174

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

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

                            data={[
                                {
                                    start: 4,
                                    end: 5,
                                    label: '★★★★ & up',
Severity: Major
Found in site/demos/goodbooks/src/App.js and 3 other locations - About 2 hrs to fix
packages/native/example/App.js on lines 137..142
packages/native/example/App.js on lines 149..154
packages/web/examples/RatingsFilter/src/index.js on lines 26..31

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

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

                            data={[
                                { start: 0, end: 100, label: 'Cheap' },
                                { start: 101, end: 200, label: 'Moderate' },
                                { start: 201, end: 500, label: 'Pricey' },
                                { start: 501, end: 1000, label: 'First Date' },
Severity: Major
Found in packages/native/example/App.js and 3 other locations - About 2 hrs to fix
packages/native/example/App.js on lines 137..142
packages/web/examples/RatingsFilter/src/index.js on lines 26..31
site/demos/goodbooks/src/App.js on lines 64..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 76.

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

    async componentWillMount() {
        await Expo.Font.loadAsync({
            Roboto: require('native-base/Fonts/Roboto.ttf'), // eslint-disable-line global-require
            Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'), // eslint-disable-line global-require
            Ionicons: require('@expo/vector-icons/fonts/Ionicons.ttf'), // eslint-disable-line global-require
Severity: Major
Found in packages/maps-native/example/App.js and 1 other location - About 2 hrs to fix
packages/native/example/App.js on lines 26..34

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

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

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

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

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

Refactorings

Further Reading

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

SelectedFilters.propTypes = {
    selectedValues: types.selectedValues,
    setValue: types.func,
    clearValues: types.func,
    components: types.components,
Severity: Major
Found in packages/native/src/components/basic/SelectedFilters.js and 2 other locations - About 2 hrs to fix
packages/native/src/components/basic/ReactiveBase.js on lines 52..60
packages/native/src/components/shared/CheckboxItem.js on lines 50..58

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

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

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

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

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

Refactorings

Further Reading

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

CheckboxItem.propTypes = {
    checked: types.bool,
    onPress: types.func,
    label: types.string,
    value: types.string,
Severity: Major
Found in packages/native/src/components/shared/CheckboxItem.js and 2 other locations - About 2 hrs to fix
packages/native/src/components/basic/ReactiveBase.js on lines 52..60
packages/native/src/components/basic/SelectedFilters.js on lines 105..113

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

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

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

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

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

Refactorings

Further Reading

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

ReactiveBase.propTypes = {
    type: types.string,
    url: types.string,
    credentials: types.string,
    headers: types.headers,
Severity: Major
Found in packages/native/src/components/basic/ReactiveBase.js and 2 other locations - About 2 hrs to fix
packages/native/src/components/basic/SelectedFilters.js on lines 105..113
packages/native/src/components/shared/CheckboxItem.js on lines 50..58

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

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr-with-react-dom/server/server.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

                            classNames={{
                                container:
                                    getClassName(this.props.innerClass, 'daypicker-container')
                                    || 'DayPickerInput',
                                overlayWrapper:
Severity: Major
Found in packages/web/src/components/date/DateRange.js and 2 other locations - About 1 hr to fix
packages/web/src/components/date/DatePicker.js on lines 196..206
packages/web/src/components/date/DateRange.js on lines 386..398

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

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr-with-react-dom/client/index.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/singlerange.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

                            classNames={{
                                container:
                                    getClassName(this.props.innerClass, 'daypicker-container')
                                    || 'DayPickerInput',
                                overlayWrapper:
Severity: Major
Found in packages/web/src/components/date/DateRange.js and 2 other locations - About 1 hr to fix
packages/web/src/components/date/DatePicker.js on lines 196..206
packages/web/src/components/date/DateRange.js on lines 335..347

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

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

                        classNames={{
                            container:
                                getClassName(this.props.innerClass, 'daypicker-container')
                                || 'DayPickerInput',
                            overlayWrapper:
Severity: Major
Found in packages/web/src/components/date/DatePicker.js and 2 other locations - About 1 hr to fix
packages/web/src/components/date/DateRange.js on lines 335..347
packages/web/src/components/date/DateRange.js on lines 386..398

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

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/dynamicrangeslider.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/rangeslider.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/ratingsfilter.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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