nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

describe('<Input/>', () => {
    it('should be focusable', () => {
        const component = mount(<Input label="Input Label" />);
        expect(component).toBeFocusable();
    });
Severity: Major
Found in src/components/Input/__test__/input.focusable.spec.js and 15 other locations - About 1 hr to fix
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<InputCheckbox/>', () => {
    it('should be focusable', () => {
        const component = mount(<InputCheckbox label="Input Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<TimePicker/>', () => {
    it('should be focusable', () => {
        const component = mount(<TimePicker label="TimePicker Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10

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

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

describe('<Lookup/>', () => {
    it('should be focusable', () => {
        const component = mount(<Lookup label="Lookup Label" />);
        expect(component).toBeFocusable();
    });
Severity: Major
Found in src/components/Lookup/__test__/lookup.focusable.spec.js and 15 other locations - About 1 hr to fix
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<Select/>', () => {
    it('should be focusable', () => {
        const component = mount(<Select label="Select Label" />);
        expect(component).toBeFocusable();
    });
Severity: Major
Found in src/components/Select/__test__/select.focusable.spec.js and 15 other locations - About 1 hr to fix
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<InputRadio/>', () => {
    it('should be focusable', () => {
        const component = mount(<InputRadio label="Input Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<Textarea/>', () => {
    it('should be focusable', () => {
        const component = mount(<Textarea label="Textarea Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<InputBase/>', () => {
    it('should be focusable', () => {
        const component = mount(<InputBase label="Input Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<PickerInput/>', () => {
    it('should be focusable', () => {
        const component = mount(<Input label="Input Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<AvatarButton/>', () => {
    it('should be focusable', () => {
        const component = mount(<AvatarButton label="AvatarButton label" />);
        expect(component).toBeFocusable();
    });
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

describe('<DatePicker/>', () => {
    it('should be focusable', () => {
        const component = mount(<DatePicker label="DatePicker Label" />);
        expect(component).toBeFocusable();
    });
src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
src/components/Button/__test__/button.focusable.spec.js on lines 5..10
src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
src/components/Input/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
src/components/Select/__test__/select.focusable.spec.js on lines 5..10
src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

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

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <Table data={data} keyField="name">
                <Column field="name" header="Name" isEditable onChange={onChangeMockFn} />
            </Table>,
        );
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 2 other locations - About 1 hr to fix
src/components/Table/__test__/table.spec.js on lines 1588..1592
src/components/Table/__test__/table.spec.js on lines 1608..1612

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

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <Table data={data} keyField="name">
                <Column field="name" header="Name" isEditable onChange={onChangeMockFn} />
            </Table>,
        );
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 2 other locations - About 1 hr to fix
src/components/Table/__test__/table.spec.js on lines 1553..1557
src/components/Table/__test__/table.spec.js on lines 1608..1612

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

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <Table data={data} keyField="name">
                <Column field="name" header="Name" isEditable onChange={onChangeMockFn} />
            </Table>,
        );
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 2 other locations - About 1 hr to fix
src/components/Table/__test__/table.spec.js on lines 1553..1557
src/components/Table/__test__/table.spec.js on lines 1588..1592

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

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <Table
                data={tableData}
                showCheckboxColumn
                onRowSelection={onRowSelectionMockFn}
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 1 other location - About 1 hr to fix
src/components/Table/__test__/table.spec.js on lines 820..829

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

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('should return true when isMinOrMax', () => {
        const isMinOrMax = true;
        const disabled = false;
        const readOnly = false;

src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 13..20
src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 22..29
src/components/CounterInput/helpers/__test__/isButtonDisabled.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 62.

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('should return false', () => {
        const isMinOrMax = false;
        const disabled = false;
        const readOnly = false;

src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 4..11
src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 13..20
src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 22..29

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

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

function sortChildren(childrenRefs, nodes) {
    const [...newChildrenRefs] = childrenRefs;
    newChildrenRefs.sort(
        (refA, refB) => getRefIndex(nodes, refA.ref) - getRefIndex(nodes, refB.ref),
    );
Severity: Major
Found in src/components/CarouselCard/indicators/utils.js and 3 other locations - About 1 hr to fix
src/components/InternalDropdown/helpers/insertChildOrderly.js on lines 5..11
src/components/CarouselCard/utils.js on lines 16..22
src/components/Tabset/utils.js on lines 12..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 62.

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

        const {
            id,
            options,
            required,
            label,
Severity: Major
Found in src/components/CheckboxGroup/index.js and 3 other locations - About 1 hr to fix
src/components/Table/body/index.js on lines 19..30
src/components/Modal/index.js on lines 146..157
src/components/Rating/index.js on lines 54..65

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

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('should return true when readOnly', () => {
        const isMinOrMax = false;
        const disabled = false;
        const readOnly = true;

src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 4..11
src/components/CounterInput/helpers/__test__/isButtonDisabled.spec.js on lines 13..20
src/components/CounterInput/helpers/__test__/isButtonDisabled.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 62.

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