nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

Function InternalOverlay has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const InternalOverlay = props => {
    const {
        render: ContentComponent,
        isVisible,
        triggerElementRef,
Severity: Major
Found in src/components/InternalOverlay/index.js - About 2 hrs to fix

    Function Drop has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function Drop(props) {
        const { className, style } = props;
        return (
            <svg className={className} style={style} width="64" height="70" viewBox="0 0 64 70">
                <g fill="none">
    Severity: Major
    Found in src/components/ImportRecordsFlow/icons/drop.js - About 2 hrs to fix

      Function CompressArrow has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const CompressArrow = props => {
          const { className, style } = props;
          return (
              <svg
                  className={className}
      Severity: Major
      Found in library/exampleComponents/Icons/compressArrow.js - About 2 hrs to fix

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

            const avatars = [
                {
                    src: 'images/user/user1.jpg',
                    assistiveText: 'Jose Leandro',
                    title: 'Jose Leandro',
        Severity: Major
        Found in src/components/AvatarGroup/__test__/avatarGroup.spec.js and 4 other locations - About 2 hrs to fix
        src/components/AvatarGroup/__test__/avatarGroup.a11y.spec.js on lines 6..27
        src/components/AvatarGroup/__test__/avatars.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/counter.spec.js on lines 8..29
        src/components/PhoneInput/helpers/__test__/findCountryByIsoCode.spec.js on lines 3..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 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 5 locations. Consider refactoring.
        Open

        const countries = [
            {
                countryCode: '+44',
                country: 'United Kingdom',
                isoCode: 'gb',
        src/components/AvatarGroup/__test__/avatarGroup.a11y.spec.js on lines 6..27
        src/components/AvatarGroup/__test__/avatarGroup.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/avatars.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/counter.spec.js on lines 8..29

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

        const avatars = [
            {
                src: 'images/user/user1.jpg',
                assistiveText: 'Jose Leandro',
                title: 'Jose Leandro',
        src/components/AvatarGroup/__test__/avatarGroup.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/avatars.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/counter.spec.js on lines 8..29
        src/components/PhoneInput/helpers/__test__/findCountryByIsoCode.spec.js on lines 3..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 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 5 locations. Consider refactoring.
        Open

            const avatars = [
                {
                    src: 'images/user/user1.jpg',
                    assistiveText: 'Jose Leandro',
                    title: 'Jose Leandro',
        Severity: Major
        Found in src/components/AvatarGroup/__test__/avatars.spec.js and 4 other locations - About 2 hrs to fix
        src/components/AvatarGroup/__test__/avatarGroup.a11y.spec.js on lines 6..27
        src/components/AvatarGroup/__test__/avatarGroup.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/counter.spec.js on lines 8..29
        src/components/PhoneInput/helpers/__test__/findCountryByIsoCode.spec.js on lines 3..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 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 5 locations. Consider refactoring.
        Open

            const avatars = [
                {
                    src: 'images/user/user1.jpg',
                    assistiveText: 'Jose Leandro',
                    title: 'Jose Leandro',
        Severity: Major
        Found in src/components/AvatarGroup/__test__/counter.spec.js and 4 other locations - About 2 hrs to fix
        src/components/AvatarGroup/__test__/avatarGroup.a11y.spec.js on lines 6..27
        src/components/AvatarGroup/__test__/avatarGroup.spec.js on lines 7..28
        src/components/AvatarGroup/__test__/avatars.spec.js on lines 7..28
        src/components/PhoneInput/helpers/__test__/findCountryByIsoCode.spec.js on lines 3..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 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

            beforeEach(() => {
                Element.prototype.getClientRects = jest.fn(() => {
                    return [
                        {
                            bottom: 0,
        Severity: Major
        Found in src/components/PhoneInput/__tests__/phoneinput.spec.js and 1 other location - About 2 hrs to fix
        src/components/ColorInput/__test__/colorInput.spec.js on lines 9..22

        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

                                    <MenuItem
                                        label={<ColorBox label="Orange" color={orangeTheme.rainbow} />}
                                        icon={theme === orangeTheme && <StyledCheckIcon />}
                                        iconPosition="right"
                                        onClick={() => setTheme(orangeTheme)}
        Severity: Major
        Found in library/styleguideComponents/Wrapper/index.js and 3 other locations - About 2 hrs to fix
        library/styleguideComponents/Wrapper/index.js on lines 113..118
        library/styleguideComponents/Wrapper/index.js on lines 119..126
        library/styleguideComponents/Wrapper/index.js on lines 127..132

        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

            beforeEach(() => {
                Element.prototype.getClientRects = jest.fn(() => {
                    return [
                        {
                            bottom: 0,
        Severity: Major
        Found in src/components/ColorInput/__test__/colorInput.spec.js and 1 other location - About 2 hrs to fix
        src/components/PhoneInput/__tests__/phoneinput.spec.js on lines 8..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

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

                                    <MenuItem
                                        label={<ColorBox label="Yellow" color={yellowTheme.rainbow} />}
                                        icon={theme === yellowTheme && <StyledCheckIcon />}
                                        iconPosition="right"
                                        onClick={() => setTheme(yellowTheme)}
        Severity: Major
        Found in library/styleguideComponents/Wrapper/index.js and 3 other locations - About 2 hrs to fix
        library/styleguideComponents/Wrapper/index.js on lines 107..112
        library/styleguideComponents/Wrapper/index.js on lines 119..126
        library/styleguideComponents/Wrapper/index.js on lines 127..132

        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

                                    <MenuItem
                                        label={
                                            <ColorBox label="Deep Purple" color={deepPurpleTheme.rainbow} />
                                        }
                                        icon={theme === deepPurpleTheme && <StyledCheckIcon />}
        Severity: Major
        Found in library/styleguideComponents/Wrapper/index.js and 3 other locations - About 2 hrs to fix
        library/styleguideComponents/Wrapper/index.js on lines 107..112
        library/styleguideComponents/Wrapper/index.js on lines 113..118
        library/styleguideComponents/Wrapper/index.js on lines 127..132

        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

                                    <MenuItem
                                        label={<ColorBox label="Cyan Dark" color={cyanDarkTheme.rainbow} />}
                                        icon={theme === cyanDarkTheme && <StyledCheckIcon />}
                                        iconPosition="right"
                                        onClick={() => setTheme(cyanDarkTheme)}
        Severity: Major
        Found in library/styleguideComponents/Wrapper/index.js and 3 other locations - About 2 hrs to fix
        library/styleguideComponents/Wrapper/index.js on lines 107..112
        library/styleguideComponents/Wrapper/index.js on lines 113..118
        library/styleguideComponents/Wrapper/index.js on lines 119..126

        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

            it('should render the close button by default', () => {
                const component = mount(
                    <Modal isOpen>
                        <p />
                    </Modal>,
        Severity: Major
        Found in src/components/Modal/__test__/modal.spec.js and 1 other location - About 2 hrs to fix
        src/components/Drawer/__test__/drawer.spec.js on lines 179..186

        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

            it('should render the Spinner when isLoading is true', () => {
                const component = mount(
                    <MenuContent isLoading>
                        <span />
                    </MenuContent>,
        Severity: Major
        Found in src/components/PrimitiveMenu/__test__/menuContent.spec.js and 1 other location - About 2 hrs to fix
        src/components/RenderIf/__test__/renderIf.spec.js on lines 14..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

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

            it('should render an error text when error prop is passed', () => {
                const component = mount(
                    <StripeCardInput
                        apiKey="STRIPE_API_KEY"
                        isScriptLoaded
        src/components/StripeCardInput/__test__/stripeCardInput.spec.js on lines 108..118

        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

            it('should pass the right isFilled when the value passed is float', () => {
                const component = mount(<RatingItems value="3.5" />);
                const star = component.childAt(3);
                expect(star.props().isFilled).toBe(true);
            });
        Severity: Major
        Found in src/components/Rating/__test__/ratingItems.spec.js and 1 other location - About 2 hrs to fix
        src/components/Rating/__test__/ratingItems.spec.js on lines 27..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 2 locations. Consider refactoring.
        Open

            it('should render bottom help text when bottomHelpText prop is passed', () => {
                const component = mount(
                    <StripeCardInput
                        apiKey="STRIPE_API_KEY"
                        isScriptLoaded
        src/components/StripeCardInput/__test__/stripeCardInput.spec.js on lines 120..130

        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

            it('should render the close button by default', () => {
                const component = mount(
                    <Drawer isOpen>
                        <p />
                    </Drawer>,
        Severity: Major
        Found in src/components/Drawer/__test__/drawer.spec.js and 1 other location - About 2 hrs to fix
        src/components/Modal/__test__/modal.spec.js on lines 198..205

        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

        Severity
        Category
        Status
        Source
        Language