nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

                <g fill="#EACE24" fillRule="nonzero" stroke="#806600">
                    <path d="M13.014 12.872c.01-.095.005-.275-.044-.357-.017-.027-.057-.06-.088-.058-.031.001-.074.01-.088.039a.252.252 0 00-.02.11c.005.04.051.124.051.124s-.164-.034-.22-.078a.414.414 0 01-.132-.195c-.006-.024-.03-.1 0-.192a.439.439 0 01.11-.161c.104-.093.307-.066.35-.043.054.03.121.096.144.156a1.898 1.898 0 01.094.474c.006.07.02.132.006.2-.007.038-.017.122-.038.178-.02.056-.053.084-.081.108-.057.051-.24.078-.24.078s.1-.13.127-.188c.03-.069.061-.12.069-.195M13.46 12.872c-.01-.095-.005-.275.044-.357.016-.027.057-.06.088-.058.031.001.074.01.088.039a.25.25 0 01.019.11c-.004.04-.05.124-.05.124s.164-.034.22-.078a.414.414 0 00.132-.195c.006-.024.03-.1 0-.192a.44.44 0 00-.11-.161c-.104-.093-.308-.066-.35-.043a.352.352 0 00-.144.156 1.904 1.904 0 00-.094.474c-.006.07-.021.132-.007.2.008.038.018.122.039.178.02.056.053.084.08.108.058.051.24.078.24.078s-.1-.13-.126-.188c-.03-.069-.061-.12-.069-.195" />
                    <path d="M13.236 13.58s.147-.124.171-.264c.022-.127-.075-.275-.083-.335-.03-.238.033-.556.039-.582.022-.103.05-.147.065-.18.011-.025.042-.073.073-.12.018-.027.057-.077.077-.128a.415.415 0 00.002-.271.284.284 0 00-.11-.139l-.131-.083c-.064-.041-.102-.177-.103-.177-.001 0-.04.136-.103.177-.02.013-.067.044-.13.083a.283.283 0 00-.109.139.412.412 0 00.002.27c.02.052.06.102.077.129.03.047.062.095.072.12.015.033.044.077.066.18.006.026.068.344.039.582-.008.06-.107.208-.086.335.025.14.172.265.172.265" />
                    <path d="M13.566 12.965l-.07-.25h-.517l-.071.25.07.25h.517z" />
                </g>
Severity: Major
Found in src/components/PhoneInput/flags/SaintBarthelemy.js and 5 other locations - About 1 hr to fix
library/exampleComponents/Icons/application.js on lines 20..24
library/exampleComponents/Icons/photographer.js on lines 49..57
library/pages/components/FeatureList/images/testing.js on lines 129..133
src/components/PhoneInput/flags/SaintBarthelemy.js on lines 476..480
src/components/PhoneInput/flags/SaintBarthelemy.js on lines 486..490

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

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

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

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

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

Refactorings

Further Reading

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

                <g fill="#EACE24" fillRule="nonzero" stroke="#806600">
                    <path d="M15.795 12.872c.01-.095.004-.275-.044-.357-.017-.027-.057-.06-.089-.058-.03.001-.073.01-.088.039a.252.252 0 00-.019.11c.005.04.05.124.05.124s-.164-.034-.22-.078a.414.414 0 01-.132-.195c-.006-.024-.03-.1 0-.192a.439.439 0 01.11-.161c.105-.093.308-.066.35-.043.055.03.122.096.144.156a1.898 1.898 0 01.094.474c.006.07.021.132.007.2-.008.038-.017.122-.038.178-.021.056-.054.084-.082.108-.056.051-.239.078-.239.078s.1-.13.126-.188c.03-.069.062-.12.07-.195M16.24 12.872c-.01-.095-.004-.275.045-.357.016-.027.056-.06.088-.058.03.001.073.01.088.039a.25.25 0 01.019.11c-.005.04-.05.124-.05.124s.164-.034.22-.078a.414.414 0 00.132-.195c.006-.024.03-.1 0-.192a.44.44 0 00-.11-.161c-.105-.093-.308-.066-.35-.043a.352.352 0 00-.144.156 1.904 1.904 0 00-.094.474c-.006.07-.021.132-.007.2.008.038.017.122.038.178.021.056.054.084.082.108.056.051.239.078.239.078s-.1-.13-.126-.188c-.03-.069-.062-.12-.07-.195" />
                    <path d="M16.016 13.58s.147-.124.172-.264c.022-.127-.076-.275-.083-.335-.03-.238.033-.556.038-.582.023-.103.051-.147.066-.18.01-.025.042-.073.073-.12.017-.027.057-.077.077-.128a.415.415 0 00.002-.271.284.284 0 00-.11-.139l-.132-.083c-.063-.041-.102-.177-.103-.177 0 0-.04.136-.102.177l-.13.083a.283.283 0 00-.11.139.412.412 0 00.002.27c.02.052.06.102.077.129.031.047.062.095.073.12.015.033.043.077.066.18.005.026.068.344.038.582-.007.06-.107.208-.085.335.024.14.171.265.171.265" />
                    <path d="M16.347 12.965l-.071-.25h-.517l-.07.25.07.25h.517z" />
                </g>
Severity: Major
Found in src/components/PhoneInput/flags/SaintBarthelemy.js and 5 other locations - About 1 hr to fix
library/exampleComponents/Icons/application.js on lines 20..24
library/exampleComponents/Icons/photographer.js on lines 49..57
library/pages/components/FeatureList/images/testing.js on lines 129..133
src/components/PhoneInput/flags/SaintBarthelemy.js on lines 481..485
src/components/PhoneInput/flags/SaintBarthelemy.js on lines 486..490

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

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

        expect(getNormalizedOptions(options)).toEqual([
            { label: 'European Cities', type: 'header' },
            { label: 'Paris', description: 'An awesome city' },
            { label: 'Madrid' },
            { label: 'American Cities', type: 'header' },
src/components/Lookup/helpers/__test__/getOptionsLength.spec.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 66.

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

            [HOME_KEY]: () => {
                const result = moveFocusedDay(-focusedDate.getDay());
                return {
                    day: result.day,
                    month: shouldUpdateCurrentMonth(result.day) ? result.month : undefined,
src/components/Calendar/doubleCalendar/hooks/useHandleKeyDown.js on lines 111..117

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

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

    it(' should set isTrue in RenderIf to false when onDelete is not passed', () => {
        const component = mount(<Chip label="testing Chip" />);
        expect(component.find('RenderIf').prop('isTrue')).toBe(false);
    });
Severity: Major
Found in src/components/Chip/__test__/chip.spec.js and 3 other locations - About 1 hr to fix
src/components/Table/head/__test__/header.spec.js on lines 43..46
src/components/Table/head/__test__/selectableHeader.spec.js on lines 23..26
src/components/Table/head/__test__/selectableHeader.spec.js on lines 31..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 66.

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

    ${props =>
        props.variant === 'brand' &&
        `
            color: ${props.palette.getContrastText(props.palette.brand.main)};
            background-color: ${props.palette.brand.main};
Severity: Major
Found in src/components/Badge/styled/container.js and 3 other locations - About 1 hr to fix
src/components/Badge/styled/container.js on lines 72..77
src/components/Badge/styled/container.js on lines 78..83
src/components/Badge/styled/container.js on lines 84..89

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

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

    it('should set isResizable to true in ResizeBar component', () => {
        const component = mount(<Header sortDirection="asc" />);
        expect(component.find('ResizeBar').prop('isResizable')).toBe(true);
    });
Severity: Major
Found in src/components/Table/head/__test__/header.spec.js and 3 other locations - About 1 hr to fix
src/components/Chip/__test__/chip.spec.js on lines 20..23
src/components/Table/head/__test__/selectableHeader.spec.js on lines 23..26
src/components/Table/head/__test__/selectableHeader.spec.js on lines 31..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 66.

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

    it('should set checked to true in PrimitiveCheckbox component when bulkSelection is "all"', () => {
        const component = mount(<SelectableHeader bulkSelection="all" />);
        expect(component.find('PrimitiveCheckbox').prop('checked')).toBe(true);
    });
src/components/Chip/__test__/chip.spec.js on lines 20..23
src/components/Table/head/__test__/header.spec.js on lines 43..46
src/components/Table/head/__test__/selectableHeader.spec.js on lines 23..26

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

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

    async isNextMonthButtonFocused() {
        const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[1];
        return (await buttonEl.isExisting()) && (await buttonEl.isFocused());
    }
Severity: Major
Found in src/components/Calendar/pageObject/doubleCalendar.js and 3 other locations - About 1 hr to fix
src/components/Calendar/pageObject/doubleCalendar.js on lines 62..65
src/components/Calendar/pageObject/doubleCalendar.js on lines 191..194
src/components/ColorPicker/pageObject/index.js on lines 139..142

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

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

        const options = [
            { label: 'European Cities', type: 'header' },
            { label: 'Paris', description: 'An awesome city' },
            { label: 'Madrid' },
            { label: 'American Cities', type: 'header' },
src/components/Lookup/helpers/__test__/getNormalizedOptions.spec.js on lines 27..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 66.

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

    it('should set checked to false in PrimitiveCheckbox component when bulkSelection is "none"', () => {
        const component = mount(<SelectableHeader bulkSelection="none" />);
        expect(component.find('PrimitiveCheckbox').prop('checked')).toBe(false);
    });
src/components/Chip/__test__/chip.spec.js on lines 20..23
src/components/Table/head/__test__/header.spec.js on lines 43..46
src/components/Table/head/__test__/selectableHeader.spec.js on lines 31..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 66.

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

    ${props =>
        props.variant === 'warning' &&
        `
            color: ${props.palette.getContrastText(props.palette.warning.main)};
            background-color: ${props.palette.warning.main};
Severity: Major
Found in src/components/Badge/styled/container.js and 3 other locations - About 1 hr to fix
src/components/Badge/styled/container.js on lines 53..58
src/components/Badge/styled/container.js on lines 78..83
src/components/Badge/styled/container.js on lines 84..89

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

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

    ${props =>
        props.variant === 'error' &&
        `
            color: ${props.palette.getContrastText(props.palette.error.main)};
            background-color: ${props.palette.error.main};
Severity: Major
Found in src/components/Badge/styled/container.js and 3 other locations - About 1 hr to fix
src/components/Badge/styled/container.js on lines 53..58
src/components/Badge/styled/container.js on lines 72..77
src/components/Badge/styled/container.js on lines 78..83

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

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

    async isPrevMonthButtonFocused() {
        const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[0];
        return (await buttonEl.isExisting()) && (await buttonEl.isFocused());
    }
Severity: Major
Found in src/components/Calendar/pageObject/doubleCalendar.js and 3 other locations - About 1 hr to fix
src/components/Calendar/pageObject/doubleCalendar.js on lines 72..75
src/components/Calendar/pageObject/doubleCalendar.js on lines 191..194
src/components/ColorPicker/pageObject/index.js on lines 139..142

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

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

            [HOME_KEY]: () => {
                const result = moveFocusedDay(-focusedDate.getDay());
                return {
                    day: result.day,
                    month: shouldUpdateCurrentMonth(result.day) ? result.month : undefined,
src/components/Calendar/doubleCalendar/hooks/useHandleKeyDown.js on lines 68..74

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

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

    ${props =>
        props.variant === 'success' &&
        `
            color: ${props.palette.getContrastText(props.palette.success.main)};
            background-color: ${props.palette.success.main};
Severity: Major
Found in src/components/Badge/styled/container.js and 3 other locations - About 1 hr to fix
src/components/Badge/styled/container.js on lines 53..58
src/components/Badge/styled/container.js on lines 72..77
src/components/Badge/styled/container.js on lines 84..89

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

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

    async isAlphaFocused() {
        const rangeEl = (await $(this.rootElement).$$('input[type=range]'))[1];
        return (await rangeEl.isExisting()) && (await rangeEl.isFocused());
    }
Severity: Major
Found in src/components/ColorPicker/pageObject/index.js and 3 other locations - About 1 hr to fix
src/components/Calendar/pageObject/doubleCalendar.js on lines 62..65
src/components/Calendar/pageObject/doubleCalendar.js on lines 72..75
src/components/Calendar/pageObject/doubleCalendar.js on lines 191..194

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

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

    async isLeftYearSelectFocused() {
        const selectEl = (await $(this.rootElement).$$('select'))[0];
        return (await selectEl.isExisting()) && (await selectEl.isFocused());
    }
Severity: Major
Found in src/components/Calendar/pageObject/doubleCalendar.js and 3 other locations - About 1 hr to fix
src/components/Calendar/pageObject/doubleCalendar.js on lines 62..65
src/components/Calendar/pageObject/doubleCalendar.js on lines 72..75
src/components/ColorPicker/pageObject/index.js on lines 139..142

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

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

    ${props =>
        props.disabled &&
        `
            background-color: ${props.palette.background.disabled};
            border: solid 1px ${props.palette.border.disabled};
Severity: Major
Found in src/components/Textarea/styled/textareaContainer.js and 2 other locations - About 1 hr to fix
src/components/ImportRecordsFlow/stepOne/styled/optionPicker.js on lines 22..34
src/components/Table/head/styled/th.js on lines 64..87

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

    ${props =>
        props.variant === 'brand' &&
        `
            background-color: ${props.palette.brand.main};
            color: ${props.palette.getContrastText(props.palette.brand.main)};
Severity: Major
Found in src/components/BadgeOverlay/styled/badge.js and 2 other locations - About 1 hr to fix
src/components/BadgeOverlay/styled/badge.js on lines 25..30
src/components/BadgeOverlay/styled/badge.js on lines 31..36

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

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