nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

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

    Function InputItems has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const InputItems = React.forwardRef((props, ref) => {
        const {
            value,
            disabled,
            required,
    Severity: Minor
    Found in src/components/CodeInput/inputItems.js - About 1 hr to fix

      Function Hours has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Hours = React.forwardRef((props, ref) => {
          const { today, setToday, locale } = props;
          const clock = useTimer();
          useEffect(() => {
              if (!isSameDay(today, clock)) {
      Severity: Minor
      Found in src/components/WeeklyCalendar/hours.js - About 1 hr to fix

        Function CellValue has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function CellValue(props) {
            const {
                component: CellComponent,
                value,
                rowData,
        Severity: Minor
        Found in src/components/Table/body/cell.js - About 1 hr to fix

          Function WeekDayItems has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const WeekDayItems = React.forwardRef((props, ref) => {
              const {
                  name,
                  value,
                  availableDates,
          Severity: Minor
          Found in src/components/WeekDayPicker/weekDayItems.js - About 1 hr to fix

            Function ButtonOption has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function ButtonOption(props) {
                const inputId = useUniqueIdentifier('button-option');
                const { className, style, name, label, disabled, onClick } = props;
            
                const {
            Severity: Minor
            Found in src/components/ButtonOption/index.js - About 1 hr to fix

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

                  const {
                      label,
                      icon,
                      name,
                      href,
              Severity: Major
              Found in src/components/VerticalItem/index.js and 4 other locations - About 1 hr to fix
              src/components/Calendar/doubleCalendar/index.js on lines 39..52
              src/components/Drawer/index.js on lines 36..49
              src/components/PresenceMap/component.js on lines 10..23
              src/components/SidebarItem/index.js on lines 16..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 68.

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

                  const {
                      label,
                      icon,
                      selectedIcon,
                      name,
              Severity: Major
              Found in src/components/SidebarItem/index.js and 4 other locations - About 1 hr to fix
              src/components/Calendar/doubleCalendar/index.js on lines 39..52
              src/components/Drawer/index.js on lines 36..49
              src/components/PresenceMap/component.js on lines 10..23
              src/components/VerticalItem/index.js on lines 15..28

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 68.

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

                  const {
                      id,
                      isOpen,
                      hideCloseButton,
                      onRequestClose,
              Severity: Major
              Found in src/components/Drawer/index.js and 4 other locations - About 1 hr to fix
              src/components/Calendar/doubleCalendar/index.js on lines 39..52
              src/components/PresenceMap/component.js on lines 10..23
              src/components/SidebarItem/index.js on lines 16..29
              src/components/VerticalItem/index.js on lines 15..28

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 68.

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

                  const {
                      id,
                      className,
                      style,
                      locale,
              Severity: Major
              Found in src/components/Calendar/doubleCalendar/index.js and 4 other locations - About 1 hr to fix
              src/components/Drawer/index.js on lines 36..49
              src/components/PresenceMap/component.js on lines 10..23
              src/components/SidebarItem/index.js on lines 16..29
              src/components/VerticalItem/index.js on lines 15..28

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 68.

              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

                  value: PropTypes.oneOfType([
                      PropTypes.shape({
                          label: PropTypes.string,
                          description: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
                          icon: PropTypes.node,
              Severity: Major
              Found in src/components/Lookup/selectedValue.js and 1 other location - About 1 hr to fix
              src/components/Lookup/index.js on lines 606..613

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

              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 render StyledReadonlyInput when readOnly is passed', () => {
                      const component = mount(<Input label="Input label" readOnly />);
                      expect(component.find(StyledReadonlyInput).exists()).toBe(true);
                  });
              Severity: Major
              Found in src/components/Input/pickerInput/__test__/input.spec.js and 3 other locations - About 1 hr to fix
              src/components/Button/__test__/button.spec.js on lines 55..58
              src/components/Notification/__test__/notification.spec.js on lines 19..22
              src/components/Table/body/__test__/cell.spec.js on lines 82..85

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

              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 render the Spinner when isLoading is passed', () => {
                      const component = mount(<Button label="Button Label" isLoading />);
                      expect(component.find(Spinner).exists()).toBe(true);
                  });
              Severity: Major
              Found in src/components/Button/__test__/button.spec.js and 3 other locations - About 1 hr to fix
              src/components/Input/pickerInput/__test__/input.spec.js on lines 86..89
              src/components/Notification/__test__/notification.spec.js on lines 19..22
              src/components/Table/body/__test__/cell.spec.js on lines 82..85

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

              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 render EditableCell when pass isEditable to true', () => {
                      const component = mount(<Cell value="cell-1" isEditable />);
                      expect(component.find(EditableCell).exists()).toBe(true);
                  });
              Severity: Major
              Found in src/components/Table/body/__test__/cell.spec.js and 3 other locations - About 1 hr to fix
              src/components/Button/__test__/button.spec.js on lines 55..58
              src/components/Input/pickerInput/__test__/input.spec.js on lines 86..89
              src/components/Notification/__test__/notification.spec.js on lines 19..22

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 68.

              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

                  value: PropTypes.oneOfType([
                      PropTypes.shape({
                          label: PropTypes.string,
                          description: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
                          icon: PropTypes.node,
              Severity: Major
              Found in src/components/Lookup/index.js and 1 other location - About 1 hr to fix
              src/components/Lookup/selectedValue.js on lines 145..152

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

              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

              function getInitialBorder(props) {
                  if (props.error) {
                      return `2px solid ${props.palette.error.main}`;
                  }
                  return `1px solid ${props.palette.border.divider}`;
              Severity: Major
              Found in src/components/Input/inputRadio/styled/radio.js and 1 other location - About 1 hr to fix
              src/components/Input/inputCheckbox/styled/checkbox.js on lines 8..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 68.

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

                  const {
                      showTraffic,
                      showTransit,
                      center,
                      zoom,
              Severity: Major
              Found in src/components/PresenceMap/component.js and 4 other locations - About 1 hr to fix
              src/components/Calendar/doubleCalendar/index.js on lines 39..52
              src/components/Drawer/index.js on lines 36..49
              src/components/SidebarItem/index.js on lines 16..29
              src/components/VerticalItem/index.js on lines 15..28

              Duplicated Code

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

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

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

              Tuning

              This issue has a mass of 68.

              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

                          [END_KEY]: () => {
                              const result = moveFocusedDay(6 - focusedDate.getDay());
                              return {
                                  day: result.day,
                                  month: shouldUpdateCurrentMonth(result.day) ? result.month : undefined,
              src/components/Calendar/doubleCalendar/hooks/useHandleKeyDown.js on lines 75..81

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

              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

              function getInitialBorder(props) {
                  if (props.error) {
                      return `2px solid ${props.palette.error.main}`;
                  }
                  return `1px solid ${props.palette.border.divider}`;
              Severity: Major
              Found in src/components/Input/inputCheckbox/styled/checkbox.js and 1 other location - About 1 hr to fix
              src/components/Input/inputRadio/styled/radio.js on lines 7..12

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

              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 not display the close button when hideCloseButton props is true', () => {
                      const component = mount(<Notification title="Notification test" hideCloseButton />);
                      expect(component.find(ButtonIcon).exists()).toBe(false);
                  });
              Severity: Major
              Found in src/components/Notification/__test__/notification.spec.js and 3 other locations - About 1 hr to fix
              src/components/Button/__test__/button.spec.js on lines 55..58
              src/components/Input/pickerInput/__test__/input.spec.js on lines 86..89
              src/components/Table/body/__test__/cell.spec.js on lines 82..85

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

              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