nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

Function renderCards has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    renderCards() {
        const {
            forms,
            dataViews,
            layouts,
Severity: Major
Found in library/pages/ComponentsPage/index.js - About 2 hrs to fix

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

        it('should render the label passed', () => {
            const component = mount(
                <ActivityTimeline variant="accordion">
                    <AccordionTimelineMarker label="testing label on TimelineMarker" />
                </ActivityTimeline>,
    src/components/TimelineMarker/__test__/accordionTimelineMarker.spec.js on lines 63..70
    src/components/TimelineMarker/__test__/accordionTimelineMarker.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 83.

    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

        const {
            id,
            className,
            style,
            locale,
    Severity: Major
    Found in src/components/DatePickerModal/index.js and 2 other locations - About 2 hrs to fix
    src/components/DateTimePicker/pickerModal.js on lines 15..31
    src/components/InternalDropdown/index.js on lines 45..61

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

    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

        const {
            id,
            isOpen,
            title,
            value,
    Severity: Major
    Found in src/components/DateTimePicker/pickerModal.js and 2 other locations - About 2 hrs to fix
    src/components/DatePickerModal/index.js on lines 7..23
    src/components/InternalDropdown/index.js on lines 45..61

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

    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

        const {
            isLoading,
            children,
            value,
            onChange,
    Severity: Major
    Found in src/components/InternalDropdown/index.js and 2 other locations - About 2 hrs to fix
    src/components/DatePickerModal/index.js on lines 7..23
    src/components/DateTimePicker/pickerModal.js on lines 15..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 83.

    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 render the datetime passed', () => {
            const component = mount(
                <ActivityTimeline variant="accordion">
                    <AccordionTimelineMarker datetime="Yesterday" />
                </ActivityTimeline>,
    src/components/TimelineMarker/__test__/accordionTimelineMarker.spec.js on lines 55..62
    src/components/TimelineMarker/__test__/accordionTimelineMarker.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 83.

    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 render the description passed', () => {
            const component = mount(
                <ActivityTimeline variant="accordion">
                    <AccordionTimelineMarker description="testing description on TimelineMarker" />,
                </ActivityTimeline>,
    src/components/TimelineMarker/__test__/accordionTimelineMarker.spec.js on lines 55..62
    src/components/TimelineMarker/__test__/accordionTimelineMarker.spec.js on lines 63..70

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

    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 have the container ul element a role tree', () => {
            const component = mount(<Tree data={data} />);
            const container = component.find('ul').at(0);
            expect(container.prop('role')).toBe('tree');
        });
    Severity: Major
    Found in src/components/Tree/__test__/tree.spec.js and 1 other location - About 2 hrs to fix
    src/components/Tree/__test__/tree.spec.js on lines 93..97

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

    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 return the right formatted date', () => {
            expect(formatDateTime(new Date(2019, 3, 24, 11, 34, 43))).toBe('04/24/2019, 11:34 AM');
            expect(formatDateTime(new Date('04/24/2019 13:23'))).toBe('04/24/2019, 01:23 PM');
            expect(formatDateTime('04/24/2019 20:48')).toBe('04/24/2019, 08:48 PM');
        });
    src/components/DateTimePicker/helpers/__test__/extractTime.spec.js on lines 14..18

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 83.

    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 return the right time', () => {
            expect(extractTime(new Date(2019, 3, 24, 11, 34, 43))).toBe('11:34 AM');
            expect(extractTime(new Date('04/24/2019 13:23'))).toBe('01:23 PM');
            expect(extractTime('04/24/2019 20:48')).toBe('08:48 PM');
        });
    src/components/DateTimePicker/helpers/__test__/formatDateTime.spec.js on lines 14..18

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 83.

    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 have the role group in the child ul element', () => {
            const component = mount(<Tree data={data} />);
            const container = component.find('ul').at(1);
            expect(container.prop('role')).toBe('group');
        });
    Severity: Major
    Found in src/components/Tree/__test__/tree.spec.js and 1 other location - About 2 hrs to fix
    src/components/Tree/__test__/tree.spec.js on lines 88..92

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

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

        render() {
            const {
                title,
                style,
                className,
    Severity: Major
    Found in src/components/Modal/index.js - About 2 hrs to fix

      Function render has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render() {
              const { isOpen } = this.state;
              const { componentLibraryVersion, prismicLibraryVersion } = this.state;
              return (
                  <ul
      Severity: Major
      Found in library/styleguideComponents/ProjectSelector/index.js - About 2 hrs to fix

        Function User has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function render has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              render() {
                  const {
                      style,
                      label,
                      children,
          Severity: Major
          Found in src/components/Button/index.js - About 2 hrs to fix

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

                ${props =>
                    props.checked &&
                    `
                        background-color: ${props.palette.background.main};
                        border: 1px solid ${props.palette.brand.main};
            Severity: Major
            Found in src/components/ButtonOption/styled/text.js and 3 other locations - About 2 hrs to fix
            src/components/CarouselCard/styled/indicatorButton.js on lines 36..46
            src/components/FileSelector/styled/index.js on lines 101..112
            src/components/StripeCardInput/styled/cardInput.js on lines 32..46

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

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

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

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

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

            Refactorings

            Further Reading

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

                ${props =>
                    props.isSelected &&
                    `
                        background: ${props.palette.brand.main};
                        border: 1px solid ${props.palette.brand.main};
            Severity: Major
            Found in src/components/CarouselCard/styled/indicatorButton.js and 3 other locations - About 2 hrs to fix
            src/components/ButtonOption/styled/text.js on lines 116..127
            src/components/FileSelector/styled/index.js on lines 101..112
            src/components/StripeCardInput/styled/cardInput.js on lines 32..46

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

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

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

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

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

            Refactorings

            Further Reading

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

                ${props =>
                    props.disabled &&
                    `
                    background-color: ${props.palette.background.disabled} !important;
                    border: 1px solid ${props.palette.border.disabled} !important;
            Severity: Major
            Found in src/components/StripeCardInput/styled/cardInput.js and 3 other locations - About 2 hrs to fix
            src/components/ButtonOption/styled/text.js on lines 116..127
            src/components/CarouselCard/styled/indicatorButton.js on lines 36..46
            src/components/FileSelector/styled/index.js on lines 101..112

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

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

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

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

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

            Refactorings

            Further Reading

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

                ${props =>
                    props.disabled &&
                    `
                    color: ${props.palette.text.disabled};
                    border: dashed 1px ${props.palette.text.disabled};
            Severity: Major
            Found in src/components/FileSelector/styled/index.js and 3 other locations - About 2 hrs to fix
            src/components/ButtonOption/styled/text.js on lines 116..127
            src/components/CarouselCard/styled/indicatorButton.js on lines 36..46
            src/components/StripeCardInput/styled/cardInput.js on lines 32..46

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

            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

                    const {
                        title,
                        tabIndex,
                        onClick,
                        onFocus,
            Severity: Major
            Found in src/components/AvatarMenu/avatarButton.js and 1 other location - About 2 hrs to fix
            src/components/PrimitiveCheckbox/index.js on lines 53..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 82.

            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