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

export const StyledFlagIcon = styled.svg`
    width: 28px !important;
    height: 28px !important;
    vertical-align: middle;
    ${props =>
Severity: Major
Found in src/components/PhoneInput/styled/index.js and 2 other locations - About 1 hr to fix
src/components/DatePickerModal/styled/index.js on lines 35..49
src/components/PhoneInput/styled/index.js on lines 3..17

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

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 set isVisible to false in Marker when there is a disabled option selected initially', () => {
        const component = mount(<RadioButtonGroup options={options} value="admin" />);
        expect(component.find('Marker').prop('isVisible')).toBe(false);
    });
src/components/RadioButtonGroup/__test__/radioButtonGroup.spec.js on lines 13..16
src/components/RadioButtonGroup/__test__/radioButtonGroup.spec.js on lines 21..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 73.

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

            <g clipPath="url(#clip1_350_14601)">
                <path
                    d="M16.8101 4.04336L15.5443 2.77754L16.8101 1.51172"
                    stroke="currentColor"
                    strokeLinecap="round"
Severity: Major
Found in src/components/ImportRecordsFlow/icons/mergeFiles.js and 2 other locations - About 1 hr to fix
src/components/ImportRecordsFlow/icons/csvIcon.js on lines 19..32
src/components/ImportRecordsFlow/icons/mergeFiles.js on lines 39..52

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

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

            <g clipPath="url(#clip0_350_14601)">
                <path
                    d="M7.94946 16.9551L9.21529 18.2209L7.94946 19.4867"
                    stroke="currentColor"
                    strokeLinecap="round"
Severity: Major
Found in src/components/ImportRecordsFlow/icons/mergeFiles.js and 2 other locations - About 1 hr to fix
src/components/ImportRecordsFlow/icons/csvIcon.js on lines 19..32
src/components/ImportRecordsFlow/icons/mergeFiles.js on lines 53..66

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

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 component = mount(
            <ProgressIndicator currentStepName="step-1" onClick={onClickMockFn}>
                <ProgressStep name="step-1" />
                <ProgressStep name="step-2" />
                <ProgressStep name="step-3" />
src/components/ActivityTimeline/__test__/activityTimeline.spec.js on lines 19..25

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

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 StyledWrapper = attachThemeAttrs(styled.div)`
    outline: none;
    position: absolute;
    top: 0;
    height: 44px;
Severity: Major
Found in src/components/Table/head/styled/wrapper.js and 1 other location - About 1 hr to fix
src/components/Table/styled/table.js on lines 4..17

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

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 StyledTable = attachThemeAttrs(styled.table)`
    table-layout: fixed;
    border-collapse: separate;
    background-color: ${props => props.palette.background.main};
    border-spacing: 0;
Severity: Major
Found in src/components/Table/styled/table.js and 1 other location - About 1 hr to fix
src/components/Table/head/styled/wrapper.js on lines 4..17

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

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

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

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

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

Refactorings

Further Reading

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

    it('should render the SelectableCell component when columnType is "SELECTABLE_CHECKBOX"', () => {
        const component = mount(<Cell value="cell-1" isFirst columnType="SELECTABLE_CHECKBOX" />);
        expect(component.find('SelectableCell').exists()).toBe(true);
    });
Severity: Major
Found in src/components/Table/body/__test__/cell.spec.js and 1 other location - About 1 hr to fix
src/components/Table/body/__test__/cell.spec.js on lines 131..134

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

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

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

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

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

Refactorings

Further Reading

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

    it('should render the children passed', () => {
        const component = mount(
            <Breadcrumbs>
                <span />
            </Breadcrumbs>,
Severity: Major
Found in src/components/Breadcrumbs/__test__/breadcrumbs.spec.js and 1 other location - About 1 hr to fix
src/components/RenderIf/__test__/renderIf.spec.js on lines 6..13

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

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 not render the children when isTrue is false', () => {
        const component = mount(
            <RenderIf>
                <svg />
            </RenderIf>,
Severity: Major
Found in src/components/RenderIf/__test__/renderIf.spec.js and 1 other location - About 1 hr to fix
src/components/Breadcrumbs/__test__/breadcrumbs.spec.js on lines 16..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 73.

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

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

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

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

Refactorings

Further Reading

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

    it('should render the EnumerableCell component when columnType is "WITH_ENUMERABLE"', () => {
        const component = mount(<Cell value="cell-1" isFirst columnType="WITH_ENUMERABLE" />);
        expect(component.find('EnumerableCell').exists()).toBe(true);
    });
Severity: Major
Found in src/components/Table/body/__test__/cell.spec.js and 1 other location - About 1 hr to fix
src/components/Table/body/__test__/cell.spec.js on lines 127..130

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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 component = mount(
            <ActivityTimeline variant="accordion" onToggleSection={onToggleSectionFN}>
                <TimelineMarker name="marker1" />
                <TimelineMarker name="marker2" />
                <TimelineMarker name="marker3" />
src/components/ProgressIndicator/__test__/progressIndicator.spec.js on lines 61..67

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

    render() {
        const {
            name,
            value,
            onChange,
Severity: Minor
Found in src/components/Input/inputRadio/radio.js - About 1 hr to fix

    Function Header has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function Header() {
        return (
            <header className="rainbow-flex rainbow-align_center rainbow-p-vertical_small rainbow-p-horizontal_large rainbow-admin_header rainbow-background-color_white">
                <img
                    src="./assets/images/rainbow-logo.svg"
    Severity: Minor
    Found in examples/create-react-app/src/pages/Admin/header.js - About 1 hr to fix

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

          render() {
              const {
                  style,
                  className,
                  label,
      Severity: Minor
      Found in src/components/MenuItem/index.js - About 1 hr to fix

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

            render() {
                const {
                    name,
                    value,
                    onChange,
        Severity: Minor
        Found in src/components/Input/inputCheckbox/checkbox.js - About 1 hr to fix

          Function constructor has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              constructor(props) {
                  super(props);
                  const {
                      children,
                      showCheckboxColumn,
          Severity: Minor
          Found in src/components/Table/index.js - About 1 hr to fix

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

                render() {
                    const { activeTabName, fullWidth, variant, children, style, className, id } = this.props;
                    const { areButtonsVisible } = this.state;
                    const { screenWidth } = this;
                    const showButtons = areButtonsVisible || screenWidth < 600;
            Severity: Minor
            Found in src/components/Tabset/index.js - About 1 hr to fix

              Function DashboardPurple has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const DashboardPurple = props => {
                  const { className, style } = props;
                  return (
                      <svg
                          className={className}
              Severity: Minor
              Found in library/exampleComponents/Icons/dashboardPurple.js - About 1 hr to fix

                Function SearchIcon has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const SearchIcon = props => {
                    const { className } = props;
                    return (
                        <svg
                            className={className}
                Severity: Minor
                Found in library/pages/ComponentsPage/searchIcon.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language