nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

            <g id="examples" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
                <g id="angle-down" transform="translate(-7.000000, -9.000000)" fillRule="nonzero">
                    <rect id="shape" x="0" y="0" width="24" height="24" />
                    <path
                        d="M7.21962617,10.9797508 C6.92679128,10.6869159 6.92679128,10.2133956 7.21962617,9.92367601 L7.92367601,9.21962617 C8.2165109,8.92679128 8.69003115,8.92679128 8.97975078,9.21962617 L11.982866,12.2227414 L14.9859813,9.21962617 C15.2788162,8.92679128 15.7523364,8.92679128 16.0420561,9.21962617 L16.7461059,9.92367601 C17.0389408,10.2165109 17.0389408,10.6900312 16.7461059,10.9797508 L12.5093458,15.2165109 C12.2227414,15.5093458 11.7492212,15.5093458 11.4563863,15.2165109 L7.21962617,10.9797508 Z"
Severity: Major
Found in src/components/VerticalSectionOverflow/rightArrow.js and 1 other location - About 4 hrs to fix
library/styleguideComponents/ProjectSelector/rightArrow.js on lines 13..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 121.

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

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

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

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

Refactorings

Further Reading

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

    it('should fire onChange `min` as argument when click in plusButton', () => {
        const onChangeMockFn = jest.fn();
        const component = mount(<CounterInput onChange={onChangeMockFn} value={5} min={10} />);
        const button = component.find('button');
        const plusButton = button.at(1);
Severity: Major
Found in src/components/CounterInput/__test__/counterInput.spec.js and 1 other location - About 4 hrs to fix
src/components/CounterInput/__test__/counterInput.spec.js on lines 40..47

Duplicated Code

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

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

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

Tuning

This issue has a mass of 121.

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

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

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

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

Refactorings

Further Reading

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

    it('should fire onChange `max` as argument when click in minusButton', () => {
        const onChangeMockFn = jest.fn();
        const component = mount(<CounterInput onChange={onChangeMockFn} value={101} max={100} />);
        const button = component.find('button');
        const plusButton = button.at(0);
Severity: Major
Found in src/components/CounterInput/__test__/counterInput.spec.js and 1 other location - About 4 hrs to fix
src/components/CounterInput/__test__/counterInput.spec.js on lines 31..38

Duplicated Code

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

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

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

Tuning

This issue has a mass of 121.

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

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

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

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

Refactorings

Further Reading

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

export default function isSameYear(date1, date2) {
    try {
        const value1 = typeof date1 === 'string' ? new Date(date1) : date1;
        const value2 = typeof date2 === 'string' ? new Date(date2) : date2;
        return !!(value1 && value2 && value1.getYear() === value2.getYear());
Severity: Major
Found in src/components/Calendar/helpers/isSameYear.js and 1 other location - About 4 hrs to fix
src/components/Calendar/helpers/isSameMonth.js on lines 1..11

Duplicated Code

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

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

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

Tuning

This issue has a mass of 121.

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

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

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

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

Refactorings

Further Reading

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

            <g id="examples" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
                <g id="angle-down" transform="translate(-7.000000, -9.000000)" fillRule="nonzero">
                    <rect id="shape" x="0" y="0" width="24" height="24" />
                    <path d="M7.21962617,10.9797508 C6.92679128,10.6869159 6.92679128,10.2133956 7.21962617,9.92367601 L7.92367601,9.21962617 C8.2165109,8.92679128 8.69003115,8.92679128 8.97975078,9.21962617 L11.982866,12.2227414 L14.9859813,9.21962617 C15.2788162,8.92679128 15.7523364,8.92679128 16.0420561,9.21962617 L16.7461059,9.92367601 C17.0389408,10.2165109 17.0389408,10.6900312 16.7461059,10.9797508 L12.5093458,15.2165109 C12.2227414,15.5093458 11.7492212,15.5093458 11.4563863,15.2165109 L7.21962617,10.9797508 Z" id="arrow" fill="#01B6F5" />
                </g>
Severity: Major
Found in library/styleguideComponents/ProjectSelector/rightArrow.js and 1 other location - About 4 hrs to fix
src/components/VerticalSectionOverflow/rightArrow.js on lines 15..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 121.

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

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

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

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

Refactorings

Further Reading

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 109,
                    y: 658,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 209,
                    y: 150,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 200,
                    y: 200,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..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 120.

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 939,
                    y: 175,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 109,
                    y: 175,
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 209,
                    y: 175,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 209,
                    y: 150,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/resolverCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

        const param = {
            trigger: {
                leftUpAnchor: {
                    x: 109,
                    y: 658,
src/components/InternalOverlay/helpers/__test__/resolverBottomCenter.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverCenterRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopLeft.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverTopRight.spec.js on lines 6..35
src/components/InternalOverlay/helpers/__test__/resolverUpCenter.spec.js on lines 6..35
src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 38..67

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

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

    it('should call stopPropagation and preventDefault when drag enter', () => {
        const event = {
            stopPropagation: jest.fn(),
            preventDefault: jest.fn(),
        };
src/components/ImportRecordsFlow/stepTwo/__test__/stepTwo.spec.js on lines 35..44

Duplicated Code

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

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

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

Tuning

This issue has a mass of 120.

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

        <DesignDetails
            category="library"
            title="Rainbow Social Icons"
            description="Rainbow Social Icons Set is a library with a variety of social icons and social login buttons. We are curious to see how you want to use it and also improve it, so let us know any feedback you have."
            viewsAmount="20"
Severity: Major
Found in library/pages/Designs/SocialIconsSet/index.js and 1 other location - About 4 hrs to fix
library/pages/Designs/RainbowComponents/index.js on lines 7..33

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

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

    it('should call stopPropagation and preventDefault when drag over', () => {
        const event = {
            stopPropagation: jest.fn(),
            preventDefault: jest.fn(),
        };
src/components/ImportRecordsFlow/stepTwo/__test__/stepTwo.spec.js on lines 45..54

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

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

        <DesignDetails
            category="library"
            title="Rainbow Components"
            description="Rainbow Components is a customizable and very easy to use library with more than 40 fully tested components."
            imageSrc="/images/designsImages/rainbow-components.png"
Severity: Major
Found in library/pages/Designs/RainbowComponents/index.js and 1 other location - About 4 hrs to fix
library/pages/Designs/SocialIconsSet/index.js on lines 6..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 120.

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

Function MapComponent has 106 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function MapComponent(props) {
    const {
        showTraffic,
        showTransit,
        center,
Severity: Major
Found in src/components/PresenceMap/component.js - About 4 hrs to fix

    File index.js has 343 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable react/no-unused-prop-types */
    import React, { useState, useRef, useImperativeHandle } from 'react';
    import PropTypes from 'prop-types';
    import { useOutsideClick } from '@rainbow-modules/hooks';
    import Label from '../Input/label';
    Severity: Minor
    Found in src/components/MultiSelect/index.js - About 4 hrs to fix

      File index.js has 343 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable react/no-unused-prop-types */
      import React, { useState, useRef, useCallback } from 'react';
      import PropTypes from 'prop-types';
      import { useScrollingIntent } from '@rainbow-modules/hooks';
      import Label from '../Input/label';
      Severity: Minor
      Found in src/components/ColorInput/index.js - About 4 hrs to fix
        Severity
        Category
        Status
        Source
        Language