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>
                        <g fill="#FBF90B">
                            <path d="M32.288 3.5c0 1.311-.828 1.987-1.261 2.376-.48-.402-1.217-1.065-1.217-2.376 0-1.312.693-2.898 1.217-2.898.524 0 1.261 1.586 1.261 2.898z" />
                            <path d="M31.027 3.795c.253 0 .458.853.458 1.904 0 1.05-.205 1.903-.458 1.903-.122 0-.238-.2-.324-.558A6.075 6.075 0 0130.57 5.7c0-1.051.205-1.904.458-1.904" />
                            <path d="M33.442 4.213c-.412-.018-.883.219-1.228.66-.49.63-1.136 2.091-.777 2.562-.064-.365.155-.902.576-1.337.53-.548 1.179-.728 1.45-.403.21.254.129.74-.168 1.201.239-.184.448-.382.588-.562.51-.654.55-1.512.09-1.915a.847.847 0 00-.531-.206zM28.612 4.26c.412-.017.884.22 1.228.661.49.629 1.136 2.09.777 2.562.064-.366-.155-.903-.576-1.338-.53-.547-1.179-.728-1.45-.403-.21.254-.129.74.168 1.202a3.412 3.412 0 01-.588-.562c-.51-.654-.55-1.512-.09-1.915a.847.847 0 01.532-.207z" />
Severity: Major
Found in src/components/PhoneInput/flags/Guadeloupe.js and 1 other location - About 4 hrs to fix
src/components/PhoneInput/flags/Guadeloupe.js on lines 45..59

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

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 pages to Pagination', () => {
        const pageSizes = [2, 3];
        const expectedPages = [7, 5];
        pageSizes.forEach((pageSize, index) => {
            const component = mount(
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 110..119

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

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

InputRadio.defaultProps = {
    value: undefined,
    label: undefined,
    name: undefined,
    bottomHelpText: null,
Severity: Major
Found in src/components/Input/inputRadio/index.js and 1 other location - About 4 hrs to fix
src/components/Input/inputCheckbox/index.js on lines 133..151

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

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

InputCheckbox.defaultProps = {
    value: undefined,
    label: undefined,
    name: undefined,
    bottomHelpText: null,
Severity: Major
Found in src/components/Input/inputCheckbox/index.js and 1 other location - About 4 hrs to fix
src/components/Input/inputRadio/index.js on lines 133..151

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

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 pages to Options', () => {
        const pageSizes = [1, 2];
        const expectedPages = [14, 7];
        pageSizes.forEach((pageSize, index) => {
            const component = mount(
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 94..103

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

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>
                        <g fill="#FBF90B">
                            <path d="M17.204 3.5c0 1.311-.828 1.987-1.261 2.376-.48-.402-1.217-1.065-1.217-2.376 0-1.312.693-2.898 1.217-2.898.524 0 1.261 1.586 1.261 2.898z" />
                            <path d="M15.943 3.795c.253 0 .458.853.458 1.904 0 1.05-.205 1.903-.458 1.903-.121 0-.238-.2-.324-.558a6.075 6.075 0 01-.134-1.345c0-1.051.205-1.904.458-1.904" />
                            <path d="M18.358 4.213c-.412-.018-.883.219-1.228.66-.49.63-1.136 2.091-.777 2.562-.064-.365.156-.902.576-1.337.53-.548 1.179-.728 1.45-.403.21.254.13.74-.168 1.201.239-.184.448-.382.588-.562.51-.654.55-1.512.09-1.915a.847.847 0 00-.531-.206zM13.529 4.26c.411-.017.883.22 1.227.661.49.629 1.136 2.09.777 2.562.064-.366-.155-.903-.576-1.338-.53-.547-1.179-.728-1.45-.403-.21.254-.129.74.168 1.202a3.412 3.412 0 01-.588-.562c-.51-.654-.55-1.512-.089-1.915a.847.847 0 01.53-.207z" />
Severity: Major
Found in src/components/PhoneInput/flags/Guadeloupe.js and 1 other location - About 4 hrs to fix
src/components/PhoneInput/flags/Guadeloupe.js on lines 60..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 122.

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 StrongPasswordInput has 108 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const StrongPasswordInput = React.forwardRef((props, ref) => {
    const {
        id,
        className,
        style,
Severity: Major
Found in src/components/StrongPasswordInput/index.js - About 4 hrs to fix

    Function Paris has 108 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function Design has 108 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Design = props => {
          const { className, style } = props;
          return (
              <svg className={className} style={style} width="49px" height="53px" viewBox="0 0 49 53">
                  <g id="components" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
      Severity: Major
      Found in library/exampleComponents/Icons/design.js - About 4 hrs to fix

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

            it('should move to the first item when last focusable item is active and press arrow down', async () => {
                const buttonMenu = new PageButtonMenu(MENU_BTN);
                await buttonMenu.click();
                const lastFocusableMenuItem = await buttonMenu.getItem(3);
                const firstMenuItem = await buttonMenu.getItem(0);
        Severity: Major
        Found in integration/specs/ButtonMenu/buttonMenu-13.spec.js and 4 other locations - About 4 hrs to fix
        integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 71..79
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 52..60
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 60..68
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 69..77

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

            it('should move to the previous focusabled item when press arrow up', async () => {
                const buttonMenu = new PageButtonMenu(MENU_BTN);
                await buttonMenu.click();
                const thirdMenuItem = await buttonMenu.getItem(2);
                const fourthMenuItem = await buttonMenu.getItem(3);
        Severity: Major
        Found in integration/specs/ButtonMenu/buttonMenu-13.spec.js and 4 other locations - About 4 hrs to fix
        integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 71..79
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 15..23
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 60..68
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 69..77

        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

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

        export default function formatDate(date, formatStyle = 'medium', locale = 'en-US') {
            if (date) {
                try {
                    const options = FORMATS[formatStyle] || FORMATS.medium;
                    const value = typeof date === 'string' ? new Date(date) : date;
        Severity: Major
        Found in src/components/DatePicker/helpers/formatDate.js and 1 other location - About 4 hrs to fix
        src/components/Calendar/helpers/formatDate.js on lines 8..20

        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

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

        export default function formatDate(date, formatStyle = 'medium', locale = 'en-US') {
            if (date) {
                try {
                    const options = FORMATS[formatStyle] || FORMATS.medium;
                    const value = typeof date === 'string' ? new Date(date) : date;
        Severity: Major
        Found in src/components/Calendar/helpers/formatDate.js and 1 other location - About 4 hrs to fix
        src/components/DatePicker/helpers/formatDate.js on lines 8..20

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

            it('should move to the previous item when press arrow up', async () => {
                const buttonMenu = new PageButtonMenu(MENU_BTN);
                await buttonMenu.click();
                const secondMenuItem = await buttonMenu.getItem(1);
                const thirdMenuItem = await buttonMenu.getItem(2);
        Severity: Major
        Found in integration/specs/ButtonMenu/buttonMenu-5.spec.js and 4 other locations - About 4 hrs to fix
        integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 71..79
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 15..23
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 52..60
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 69..77

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

            it('should move to the first item when last item is active and press arrow down', async () => {
                const buttonMenu = new PageButtonMenu(MENU_BTN);
                await buttonMenu.click();
                const secondMenuItem = await buttonMenu.getItem(1);
                const thirdMenuItem = await buttonMenu.getItem(2);
        Severity: Major
        Found in integration/specs/ButtonMenu/buttonMenu-5.spec.js and 4 other locations - About 4 hrs to fix
        integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 71..79
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 15..23
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 52..60
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 60..68

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

            it('should move to the first item when last item is active and press arrow down', async () => {
                const avatarMenu = new PageAvatarMenu(AVATAR_MENU);
                await avatarMenu.click();
                const firstMenuItem = await avatarMenu.getItem(0);
                const lastMenuItem = await avatarMenu.getItem(1);
        Severity: Major
        Found in integration/specs/AvatarMenu/avatarMenu-1.spec.js and 4 other locations - About 4 hrs to fix
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 15..23
        integration/specs/ButtonMenu/buttonMenu-13.spec.js on lines 52..60
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 60..68
        integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 69..77

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

                it('should return true when screen width is more than 600px and first tab is visible', () => {
                    const activeTabName = 'onion';
                    const tabsetChildren = [
                        { name: 'pizza', ref: {} },
                        { name: 'onion', ref: {} },
        Severity: Major
        Found in src/components/Tabset/__test__/utils.spec.js and 2 other locations - About 4 hrs to fix
        src/components/Tabset/__test__/utils.spec.js on lines 185..202
        src/components/Tabset/__test__/utils.spec.js on lines 221..238

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

                it('should return true when screen width is less than 600px and first tab is active', () => {
                    const activeTabName = 'pizza';
                    const tabsetChildren = [
                        { name: 'pizza', ref: {} },
                        { name: 'onion', ref: {} },
        Severity: Major
        Found in src/components/Tabset/__test__/utils.spec.js and 2 other locations - About 4 hrs to fix
        src/components/Tabset/__test__/utils.spec.js on lines 203..220
        src/components/Tabset/__test__/utils.spec.js on lines 221..238

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

                it('should return false when screen width is more than 600px and first tab is not visible', () => {
                    const activeTabName = 'onion';
                    const tabsetChildren = [
                        { name: 'pizza', ref: {} },
                        { name: 'onion', ref: {} },
        Severity: Major
        Found in src/components/Tabset/__test__/utils.spec.js and 2 other locations - About 4 hrs to fix
        src/components/Tabset/__test__/utils.spec.js on lines 185..202
        src/components/Tabset/__test__/utils.spec.js on lines 203..220

        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 isSameMonth(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.getMonth() === value2.getMonth());
        Severity: Major
        Found in src/components/Calendar/helpers/isSameMonth.js and 1 other location - About 4 hrs to fix
        src/components/Calendar/helpers/isSameYear.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

        Severity
        Category
        Status
        Source
        Language