nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

                        <section ref={example7Ref}>
                            <h3 className="react-rainbow-customization_section-heading">
                                How to do a variation with a specific color for only one component
                                on my app?
                            </h3>
Severity: Major
Found in library/pages/CustomizationPage/index.js and 2 other locations - About 4 hrs to fix
library/pages/CustomizationPage/index.js on lines 348..361
library/pages/CustomizationPage/index.js on lines 377..391

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

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

                        <section ref={example9Ref}>
                            <h3 className="react-rainbow-customization_section-heading">
                                How use the colors defined on the theme on my own elements of my
                                app?
                            </h3>
Severity: Major
Found in library/pages/CustomizationPage/index.js and 2 other locations - About 4 hrs to fix
library/pages/CustomizationPage/index.js on lines 348..361
library/pages/CustomizationPage/index.js on lines 362..376

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

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 close the time selector when press escape key while time selector is open', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await expect(await timePicker.isOpen()).toBe(true);
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/DatePicker/datepicker-1.spec.js on lines 34..42

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

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 close the DatePicker when esc key is pressed', async () => {
        const datePicker = new PageDatePicker(DATEPICKER);
        await datePicker.clickLabel();
        await datePicker.waitUntilOpen();
        await expect(await datePicker.isOpen()).toBe(true);
Severity: Major
Found in integration/specs/DatePicker/datepicker-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 37..45

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

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 open the time selector when space key is pressed while TimePicker is focused', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await browser.keys(ESCAPE_KEY);
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 81..90

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

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 close the time selector when press cancel button while time selector is open', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await expect(await timePicker.isOpen()).toBe(true);
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 46..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 124.

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 open the time selector when enter key is pressed while TimePicker is focused', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await browser.keys(ESCAPE_KEY);
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 71..80

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

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 close the time selector when press ok button while time selector is open', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await expect(await timePicker.isOpen()).toBe(true);
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 4 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 55..63

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

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

export default function Child(props) {
    const {
        label,
        isExpanded,
        isLoading,
Severity: Major
Found in src/components/Tree/child.js - About 4 hrs to fix

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

        it('renders correctly in vertical orientation (explicit)', () => {
            const options = [{ value: 'admin', label: 'Admin' }, { value: 'user', label: 'User' }];
    
            const component = mount(<CheckboxGroup options={options} orientation="vertical" />);
            const elem = component.find(CheckboxGroupStyledContentContainer);
    Severity: Major
    Found in src/components/CheckboxGroup/__test__/checkboxGroup.spec.js and 3 other locations - About 4 hrs to fix
    src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 46..53
    src/components/RadioGroup/__test__/radioGroup.spec.js on lines 19..28
    src/components/RadioGroup/__test__/radioGroup.spec.js on lines 30..37

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('renders correctly in vertical orientation (explicit)', () => {
            const options = [{ value: 'admin', label: 'Admin' }, { value: 'user', label: 'User' }];
    
            const component = mount(<RadioGroup options={options} orientation="vertical" />);
            const elem = component.find(RadioGroupStyledContentContainer);
    Severity: Major
    Found in src/components/RadioGroup/__test__/radioGroup.spec.js and 3 other locations - About 4 hrs to fix
    src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 35..44
    src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 46..53
    src/components/RadioGroup/__test__/radioGroup.spec.js on lines 30..37

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('renders correctly in horizontal orientation (explicit)', () => {
            const options = [{ value: 'admin', label: 'Admin' }, { value: 'user', label: 'User' }];
    
            const component = mount(<CheckboxGroup options={options} orientation="horizontal" />);
            const elem = component.find(CheckboxGroupStyledContentContainer);
    Severity: Major
    Found in src/components/CheckboxGroup/__test__/checkboxGroup.spec.js and 3 other locations - About 4 hrs to fix
    src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 35..44
    src/components/RadioGroup/__test__/radioGroup.spec.js on lines 19..28
    src/components/RadioGroup/__test__/radioGroup.spec.js on lines 30..37

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('renders correctly in horizontal orientation (explicit)', () => {
            const options = [{ value: 'admin', label: 'Admin' }, { value: 'user', label: 'User' }];
    
            const component = mount(<RadioGroup options={options} orientation="horizontal" />);
            const elem = component.find(RadioGroupStyledContentContainer);
    Severity: Major
    Found in src/components/RadioGroup/__test__/radioGroup.spec.js and 3 other locations - About 4 hrs to fix
    src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 35..44
    src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 46..53
    src/components/RadioGroup/__test__/radioGroup.spec.js on lines 19..28

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

    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 with a date as parameter when selectionType is single', () => {
            const value = new Date('04/24/2019');
            const mockChangeFn = jest.fn();
            const simpleCalendar = mount(<Calendar value={value} onChange={mockChangeFn} />);
            simpleCalendar
    Severity: Major
    Found in src/components/Calendar/__test__/calendar.spec.js and 1 other location - About 4 hrs to fix
    src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 99..109

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

    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

    describe('isScrollPositionAtMenuBottom', () => {
        it('should return true when scroll position is at bottom', () => {
            const menuRef = {
                scrollHeight: 925,
                scrollTop: 700,
    src/components/PhoneInput/countriesDropdown/helpers/__test__/isScrollPositionAtScrollable.spec.js on lines 3..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 123.

    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 set isOpen to false when close function is called', () => {
            const hook = renderHook(value => useDisclosure(value), {
                initialProps: true,
            });
            expect(hook.result.current.isOpen).toBe(true);
    Severity: Major
    Found in src/libs/hooks/__test__/useDisclosure.spec.js and 1 other location - About 4 hrs to fix
    src/libs/hooks/__test__/useDisclosure.spec.js on lines 5..14

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

    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 with a date as parameter', () => {
            const value = new Date('04/24/2019');
            const mockChangeFn = jest.fn();
            const component = mount(<DoubleCalendar value={value} onChange={mockChangeFn} />);
            component
    src/components/Calendar/__test__/calendar.spec.js on lines 76..86

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

    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 set isOpen to true when open function is called', () => {
            const hook = renderHook(value => useDisclosure(value), {
                initialProps: false,
            });
            expect(hook.result.current.isOpen).toBe(false);
    Severity: Major
    Found in src/libs/hooks/__test__/useDisclosure.spec.js and 1 other location - About 4 hrs to fix
    src/libs/hooks/__test__/useDisclosure.spec.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 123.

    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

    describe('isScrollPositionAtScrollable', () => {
        it('should return true when scroll position is at bottom', () => {
            const scrollableRef = {
                scrollHeight: 925,
                scrollTop: 700,
    src/components/InternalDropdown/helpers/__test__/isScrollPositionAtMenuBottom.spec.js on lines 3..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 123.

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

        render() {
            const { name, description, examples, tabBody } = this.props;
            const descriptionText = description ? description.props.text : null;
            const { activeTabName } = this.state;
    
    
    Severity: Major
    Found in library/styleguideComponents/ReactComponent/index.js - About 4 hrs to fix
      Severity
      Category
      Status
      Source
      Language