nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

Function ErrorIcon has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function ErrorIcon() {
    return (
        <svg
            width="20px"
            height="20px"
Severity: Minor
Found in src/components/ProgressStep/errorIcon.js - About 1 hr to fix

    Function resolveCustomBackground has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function resolveCustomBackground(background) {
        if (background && isValidColor(background)) {
            const dark = isDark(background);
            const mainText = getContrastText(background);
            const theme = {
    Severity: Minor
    Found in src/styles/helpers/normalizeTheme.js - About 1 hr to fix

      Function Pagination has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function Pagination(props) {
          const { pages, activePage, onChange, className, style, variant } = props;
      
          const isFirstItemSelected = activePage === 1;
          const isLastItemSelected = activePage === pages;
      Severity: Minor
      Found in src/components/Pagination/index.js - About 1 hr to fix

        Function SocialIconsSet has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function SocialIconsSet() {
            return (
                <DesignDetails
                    category="library"
                    title="Rainbow Social Icons"
        Severity: Minor
        Found in library/pages/Designs/SocialIconsSet/index.js - About 1 hr to fix

          Function resolveCustomShadows has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function resolveCustomShadows(colors, background) {
              let shadows = {};
              if (colors.brand) {
                  shadows.brand = `0 0 2px ${colors.brand.main}`;
              }
          Severity: Minor
          Found in src/styles/helpers/normalizeTheme.js - About 1 hr to fix

            Function rgbToHsv has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function rgbToHsv(color) {
                const { type, values } = decomposeColor(color);
                if (!type || !values || type.indexOf('rgb') === -1) {
                    return '';
                }
            Severity: Minor
            Found in src/styles/helpers/color/rgbToHsv.js - About 1 hr to fix

              Function updateRows has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  updateRows() {
                      const { keyField, selectedRows, onRowSelection, data } = this.props;
                      const maxRowSelection = this.getMaxRowSelection();
                      const newRows = getRows({
                          keyField,
              Severity: Minor
              Found in src/components/Table/index.js - About 1 hr to fix

                Function getSearchParams has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function getSearchParams(searchOptions) {
                    let searchParams = {};
                
                    if (searchOptions) {
                        const { bounds, country, location, ...otherSearchOptions } = searchOptions;
                Severity: Minor
                Found in src/components/GoogleAddressLookup/helpers/getSearchParams.js - About 1 hr to fix

                  Function Week has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function Week(props) {
                      const {
                          value,
                          startDate,
                          endDate,
                  Severity: Minor
                  Found in src/components/Calendar/week.js - About 1 hr to fix

                    Function Dashboard has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

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

                      export default function FindBook() {
                          return (
                              <DesignDetails
                                  category="websites"
                                  title="Rainbow Algolia Search"
                      Severity: Major
                      Found in library/pages/Designs/FindBook/index.js and 3 other locations - About 1 hr to fix
                      library/pages/Designs/ComingSoon/index.js on lines 4..17
                      library/pages/Designs/CreateProfile/index.js on lines 4..17
                      library/pages/Designs/Team/index.js on lines 4..17

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 59.

                      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 StyledLabel = styled(Label)`
                          padding-left: 0;
                          padding-right: 0;
                          text-align: ${props =>
                              Object.prototype.hasOwnProperty.call(labelAlignmentMap, props.labelAlignment)
                      Severity: Major
                      Found in src/components/CheckboxGroup/styled/label.js and 1 other location - About 1 hr to fix
                      src/components/RadioGroup/styled/label.js on lines 9..16

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

                      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

                      export default function ComingSoon() {
                          return (
                              <DesignDetails
                                  category="websites"
                                  title="Rainbow Coming Soon"
                      Severity: Major
                      Found in library/pages/Designs/ComingSoon/index.js and 3 other locations - About 1 hr to fix
                      library/pages/Designs/CreateProfile/index.js on lines 4..17
                      library/pages/Designs/FindBook/index.js on lines 4..17
                      library/pages/Designs/Team/index.js on lines 4..17

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 59.

                      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

                                      <StyledAnchor
                                          data-id="vertical-item-clickable-element"
                                          className="rainbow-vertical-item_action"
                                          href={href}
                                          onClick={hanldeOnClick}
                      Severity: Major
                      Found in src/components/VerticalItem/index.js and 1 other location - About 1 hr to fix
                      src/components/VerticalItem/index.js on lines 76..89

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

                      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

                      export default function Team() {
                          return (
                              <DesignDetails
                                  category="websites"
                                  title="Rainbow Team"
                      Severity: Major
                      Found in library/pages/Designs/Team/index.js and 3 other locations - About 1 hr to fix
                      library/pages/Designs/ComingSoon/index.js on lines 4..17
                      library/pages/Designs/CreateProfile/index.js on lines 4..17
                      library/pages/Designs/FindBook/index.js on lines 4..17

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 59.

                      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

                      export default function CreateProfile() {
                          return (
                              <DesignDetails
                                  category="websites"
                                  title="Rainbow Create Profile"
                      Severity: Major
                      Found in library/pages/Designs/CreateProfile/index.js and 3 other locations - About 1 hr to fix
                      library/pages/Designs/ComingSoon/index.js on lines 4..17
                      library/pages/Designs/FindBook/index.js on lines 4..17
                      library/pages/Designs/Team/index.js on lines 4..17

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 59.

                      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

                                      <StyledButton
                                          data-id="vertical-item-clickable-element"
                                          className="rainbow-vertical-item_action"
                                          onClick={hanldeOnClick}
                                          aria-describedby={entityHeaderId}
                      Severity: Major
                      Found in src/components/VerticalItem/index.js and 1 other location - About 1 hr to fix
                      src/components/VerticalItem/index.js on lines 59..73

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

                      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 StyledLabel = styled(Label)`
                          padding-left: 0;
                          padding-right: 0;
                          text-align: ${props =>
                              Object.prototype.hasOwnProperty.call(labelAlignmentMap, props.labelAlignment)
                      Severity: Major
                      Found in src/components/RadioGroup/styled/label.js and 1 other location - About 1 hr to fix
                      src/components/CheckboxGroup/styled/label.js on lines 9..16

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

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

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

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

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

                      Refactorings

                      Further Reading

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

                          it('should return rgba converted value from hex color format', () => {
                              const colors = ['#ffffff', '#fff'];
                              colors.forEach(color => {
                                  expect(colorToRgba(color)).toBe('rgba(255, 255, 255, 1)');
                              });
                      Severity: Major
                      Found in src/styles/helpers/color/__test__/colorToRgba.spec.js and 2 other locations - About 1 hr to fix
                      src/styles/helpers/color/__test__/colorToRgba.spec.js on lines 16..21
                      src/styles/helpers/color/__test__/colorToRgba.spec.js on lines 22..27

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

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

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

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

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

                      Refactorings

                      Further Reading

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

                                  [PAGEUP_KEY]: () => {
                                      const result = moveFocusedMonth(-1);
                                      return {
                                          day: result.day,
                                          month: shouldUpdateCurrentMonth(result.month) ? result.month : undefined,
                      src/components/Calendar/doubleCalendar/hooks/useHandleKeyDown.js on lines 40..46
                      src/components/Calendar/doubleCalendar/hooks/useHandleKeyDown.js on lines 54..60

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

                      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