nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

Function Event has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function Event(props) {
    const { onEventClick, locale, ...event } = props;
    const { title, startDate, endDate, color, backgroundColor } = event;
    const eventId = useUniqueIdentifier('calendar-event');
    const duration = useEventDuration(startDate, endDate);
Severity: Minor
Found in src/components/WeeklyCalendar/week/event.js - About 1 hr to fix

    Function VerticalNavigation has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function VerticalNavigation(props) {
        const {
            id,
            ariaLabel,
            style,
    Severity: Minor
    Found in src/components/VerticalNavigation/index.js - About 1 hr to fix

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

          render() {
              const { src, initials, title, icon, assistiveText, initialsVariant } = this.props;
      
              const { imageFailed } = this.state;
              if (src && !imageFailed) {
      Severity: Minor
      Found in src/components/Avatar/avatarContent.js - About 1 hr to fix

        Function UserAvatar has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function buildUnionTypeList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function buildUnionTypeList(data) {
              return Object.keys(data).map(index => {
                  const type = data[index].name;
                  const value = data[index].value;
          
          

            Function getCardElementOptions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function getCardElementOptions(theme, disabled, size) {
                const fontSize = SIZES[size] || SIZES.medium;
                return {
                    style: {
                        base: {
            Severity: Minor
            Found in src/components/StripeCardInput/helpers/getCardElementOptions.js - About 1 hr to fix

              Function Checkmark has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const Checkmark = props => {
                  const { className, style } = props;
                  const {
                      rainbow: { palette },
                  } = useTheme();
              Severity: Minor
              Found in src/components/PathStep/icons/checkMark.js - About 1 hr to fix

                Function Picture has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function Upload has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function Upload(props) {
                      const { className, style } = props;
                      return (
                          <svg
                              className={className}
                  Severity: Minor
                  Found in library/exampleComponents/Icons/upload.js - About 1 hr to fix

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

                                bottom: {
                                    top: trigger.leftBottomAnchor.y + margin,
                                    left: trigger.rightBottomAnchor.x - content.width / 2 - trigger.width / 2,
                                },
                    src/components/InternalOverlay/helpers/resolverBottomCenter.js on lines 8..11

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

                    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={[]} showCheckboxColumn keyField="id">
                                    <Column field="name" header="Name" />
                                </Table>,
                            );
                    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 990..994

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

                    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

                            return {
                                top: trigger.leftUpAnchor.y + trigger.height / 2 - content.height / 2,
                                left: trigger.rightUpAnchor.x + margin,
                            };
                    src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 84..87

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

                    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

                                right: {
                                    top: trigger.leftUpAnchor.y + trigger.height / 2 - content.height / 2,
                                    left: trigger.rightUpAnchor.x + margin,
                                },
                    src/components/InternalOverlay/helpers/resolverCenterLeft.js on lines 8..11

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

                    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

                        constructor(props) {
                            super(props);
                            this.state = {
                                searchTerm: '',
                            };
                    Severity: Major
                    Found in library/pages/ComponentsPage/index.js and 3 other locations - About 1 hr to fix
                    examples/create-react-app/src/pages/Admin/sideNavigation.js on lines 12..18
                    examples/create-react-app/src/pages/Home/index.js on lines 11..17
                    library/styleguideComponents/ReactComponent/index.js on lines 34..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 56.

                    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

                                    {
                                        name: nodeName,
                                        label: nodeLabel,
                                        level,
                                        nodePath,
                    Severity: Major
                    Found in src/components/Tree/helpers/buildPlainListFromTree.js and 1 other location - About 1 hr to fix
                    src/components/Tree/helpers/buildPlainListFromTree.js on lines 27..34

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

                    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

                                {
                                    name: nodeName,
                                    label: nodeLabel,
                                    level,
                                    nodePath,
                    Severity: Major
                    Found in src/components/Tree/helpers/buildPlainListFromTree.js and 1 other location - About 1 hr to fix
                    src/components/Tree/helpers/buildPlainListFromTree.js on lines 14..21

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

                    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

                        constructor(props) {
                            super(props);
                            this.state = { activeTabName: 'examples' };
                            this.handleOnSelect = this.handleOnSelect.bind(this);
                        }
                    Severity: Major
                    Found in library/styleguideComponents/ReactComponent/index.js and 3 other locations - About 1 hr to fix
                    examples/create-react-app/src/pages/Admin/sideNavigation.js on lines 12..18
                    examples/create-react-app/src/pages/Home/index.js on lines 11..17
                    library/pages/ComponentsPage/index.js on lines 17..23

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

                    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

                            return {
                                top: trigger.leftBottomAnchor.y + margin,
                                left: trigger.rightBottomAnchor.x - content.width / 2 - trigger.width / 2,
                            };
                    src/components/InternalTooltip/helpers/__test__/tooltipPositionResolver.spec.js on lines 76..79

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

                    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 render anything when columnChildren is not passed', () => {
                            const component = mount(<ActionsCell />);
                            expect(component.children().length).toBe(0);
                        });
                    Severity: Major
                    Found in src/components/Table/body/__test__/actionsCell.spec.js and 3 other locations - About 1 hr to fix
                    src/components/Badge/__tests__/badge.spec.js on lines 14..17
                    src/components/Rating/__test__/ratingItems.spec.js on lines 18..21
                    src/components/Table/head/__test__/head.spec.js on lines 12..15

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

                    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

                        constructor(props) {
                            super(props);
                            this.state = {
                                selectedItem: '',
                            };
                    Severity: Major
                    Found in examples/create-react-app/src/pages/Home/index.js and 3 other locations - About 1 hr to fix
                    examples/create-react-app/src/pages/Admin/sideNavigation.js on lines 12..18
                    library/pages/ComponentsPage/index.js on lines 17..23
                    library/styleguideComponents/ReactComponent/index.js on lines 34..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 56.

                    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