nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

            scales: {
                xAxes: [
                    {
                        stacked: true,
                        gridLines: {
Severity: Major
Found in src/components/Chart/__test__/resolveOptions.spec.js and 1 other location - About 2 hrs to fix
src/components/Chart/__test__/resolveOptions.spec.js on lines 232..257

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

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 the right formatted date when formatStyle small', () => {
        expect(formatDateTime(new Date(2019, 3, 24, 11, 34, 43), 'small')).toBe(
            '4/24/19, 11:34 AM',
        );
        expect(formatDateTime(new Date('04/24/2019 13:23'), 'small')).toBe('4/24/19, 01:23 PM');
src/components/DateTimePicker/helpers/__test__/formatDateTime.spec.js on lines 19..27
src/components/DateTimePicker/helpers/__test__/formatDateTime.spec.js on lines 35..41

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

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 the right formatted date when formatStyle large', () => {
        expect(formatDateTime(new Date(2019, 3, 24, 11, 34, 43), 'large')).toBe(
            'Wednesday, 04/24/2019, 11:34 AM',
        );
        expect(formatDateTime(new Date('04/24/2019 13:23'), 'large')).toBe(
src/components/DateTimePicker/helpers/__test__/formatDateTime.spec.js on lines 28..34
src/components/DateTimePicker/helpers/__test__/formatDateTime.spec.js on lines 35..41

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

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(
            <Drawer isOpen>
                <p data-id="drawer-children">drawer content</p>
            </Drawer>,
Severity: Major
Found in src/components/Drawer/__test__/drawer.spec.js and 1 other location - About 2 hrs to fix
src/components/Modal/__test__/modal.spec.js on lines 31..38

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

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(
            <Modal isOpen>
                <p data-id="modal-children">modal content</p>
            </Modal>,
Severity: Major
Found in src/components/Modal/__test__/modal.spec.js and 1 other location - About 2 hrs to fix
src/components/Drawer/__test__/drawer.spec.js on lines 41..48

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

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

        expect(state.rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: false,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 999..1018

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

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

        values.forEach(value => {
            const component = mount(
                <ActionsCell columnChildren={columnChildren} rowsLength={value} rowIndex={1} />,
            );
            expect(component.find('ButtonMenu').prop('menuAlignment')).toBe('right');
Severity: Major
Found in src/components/Table/body/__test__/actionsCell.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/body/__test__/actionsCell.spec.js on lines 57..62

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

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

        values.forEach(value => {
            const component = mount(
                <ActionsCell columnChildren={columnChildren} rowsLength={value} rowIndex={3} />,
            );
            expect(component.find('ButtonMenu').prop('menuAlignment')).toBe('bottom-right');
Severity: Major
Found in src/components/Table/body/__test__/actionsCell.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/body/__test__/actionsCell.spec.js on lines 48..53

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

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

        expect(state.rows).toEqual([
            {
                inputType: 'checkbox',
                isDisabled: false,
                isSelected: false,
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/__test__/table.spec.js on lines 1031..1050

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

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 handlePlusMouseDown = event => {
        event.preventDefault();
        inputRef.current.focus();
        const val = getValue(Number(value));
        if (val < min) return onChange(getNormalizedValue(min));
Severity: Major
Found in src/components/CounterInput/index.js and 1 other location - About 2 hrs to fix
src/components/CounterInput/index.js on lines 82..88

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

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 handleMinusMouseDown = event => {
        event.preventDefault();
        inputRef.current.focus();
        const val = getValue(Number(value));
        if (val > max) return onChange(getNormalizedValue(max));
Severity: Major
Found in src/components/CounterInput/index.js and 1 other location - About 2 hrs to fix
src/components/CounterInput/index.js on lines 74..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 86.

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

File index.js has 272 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable react/no-unused-state */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Provider } from './context';
import RenderIf from '../RenderIf';
Severity: Minor
Found in src/components/Tabset/index.js - About 2 hrs to fix

    Function DesignDetails has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function DesignDetails(props) {
        const {
            title,
            category,
            description,
    Severity: Major
    Found in library/pages/components/DesignDetails/index.js - About 2 hrs to fix

      Function StartupIcon has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const StartupIcon = props => {
          const { className } = props;
          return (
              <svg className={className} width="20px" height="20px" viewBox="0 0 20 20" version="1.1">
                  <g id="re-design-layout" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
      Severity: Major
      Found in library/styleguideComponents/ComponentsList/icons/startupIcon.js - About 2 hrs to fix

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

        describe('<Spinner/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<Spinner />);
                const results = await axe(html);
        Severity: Major
        Found in src/components/Spinner/__test__/spinner.a11y.spec.js and 6 other locations - About 2 hrs to fix
        src/components/ImportRecordsFlow/__test__/footer.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepFour/__test__/stepFour.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepThree/__test__/stepThree.a11y.spec.js on lines 6..13
        src/components/MonthlyCalendar/__test__/monthlyCalendar.a11y.spec.js on lines 6..13
        src/components/PresenceMap/__test__/presenceMap.a11y.spec.js on lines 6..13
        src/components/WeeklyCalendar/__test__/weeklyCalendar.a11y.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 85.

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

        describe('<DirectionalFooter on ImportRecordsFlow/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<DirectionalFooter />);
                const results = await axe(html);
        src/components/ImportRecordsFlow/stepFour/__test__/stepFour.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepThree/__test__/stepThree.a11y.spec.js on lines 6..13
        src/components/MonthlyCalendar/__test__/monthlyCalendar.a11y.spec.js on lines 6..13
        src/components/PresenceMap/__test__/presenceMap.a11y.spec.js on lines 6..13
        src/components/Spinner/__test__/spinner.a11y.spec.js on lines 6..13
        src/components/WeeklyCalendar/__test__/weeklyCalendar.a11y.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 85.

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

        describe('<WeekyCalendar />', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<WeekyCalendar />);
                const results = await axe(html);
        src/components/ImportRecordsFlow/__test__/footer.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepFour/__test__/stepFour.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepThree/__test__/stepThree.a11y.spec.js on lines 6..13
        src/components/MonthlyCalendar/__test__/monthlyCalendar.a11y.spec.js on lines 6..13
        src/components/PresenceMap/__test__/presenceMap.a11y.spec.js on lines 6..13
        src/components/Spinner/__test__/spinner.a11y.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 85.

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

        describe('<MonthlyCalendar />', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<MonthlyCalendar />);
                const results = await axe(html);
        src/components/ImportRecordsFlow/__test__/footer.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepFour/__test__/stepFour.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepThree/__test__/stepThree.a11y.spec.js on lines 6..13
        src/components/PresenceMap/__test__/presenceMap.a11y.spec.js on lines 6..13
        src/components/Spinner/__test__/spinner.a11y.spec.js on lines 6..13
        src/components/WeeklyCalendar/__test__/weeklyCalendar.a11y.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 85.

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

        describe('<StepThree on ImportRecordsFlow/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<StepThree />);
                const results = await axe(html);
        src/components/ImportRecordsFlow/__test__/footer.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepFour/__test__/stepFour.a11y.spec.js on lines 6..13
        src/components/MonthlyCalendar/__test__/monthlyCalendar.a11y.spec.js on lines 6..13
        src/components/PresenceMap/__test__/presenceMap.a11y.spec.js on lines 6..13
        src/components/Spinner/__test__/spinner.a11y.spec.js on lines 6..13
        src/components/WeeklyCalendar/__test__/weeklyCalendar.a11y.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 85.

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

        describe('<PresenceMap/>', () => {
            it('should be accessible', async () => {
                expect.assertions(1);
                const html = ReactDOMServer.renderToString(<PresenceMap />);
                const results = await axe(html);
        src/components/ImportRecordsFlow/__test__/footer.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepFour/__test__/stepFour.a11y.spec.js on lines 6..13
        src/components/ImportRecordsFlow/stepThree/__test__/stepThree.a11y.spec.js on lines 6..13
        src/components/MonthlyCalendar/__test__/monthlyCalendar.a11y.spec.js on lines 6..13
        src/components/Spinner/__test__/spinner.a11y.spec.js on lines 6..13
        src/components/WeeklyCalendar/__test__/weeklyCalendar.a11y.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 85.

        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