nexxtway/react-rainbow

View on GitHub

Showing 445 of 2,739 total issues

Function cells has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const cells = columns.map((column, index) => {
        const {
            header,
            component,
            field,
Severity: Minor
Found in src/components/Table/body/row.js - About 1 hr to fix

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

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

      Function Avatar has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Avatar = props => {
          const { className } = props;
          return (
              <svg className={className} width="20px" height="20px" viewBox="0 0 20 20" version="1.1">
                  <g id="pages" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
      Severity: Minor
      Found in library/exampleComponents/Icons/avatar.js - About 1 hr to fix

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

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

          Function FolderClose has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const FolderClose = props => {
              const { className, style } = props;
              return (
                  <svg className={className} style={style} width="20px" height="16px" viewBox="0 0 20 16">
                      <g id="components" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
          Severity: Minor
          Found in library/exampleComponents/Icons/folderClose.js - About 1 hr to fix

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

                render() {
                    const { liveUrl, previewUrl } = this.props;
                    const { isVisible } = this.state;
            
                    return (
            Severity: Minor
            Found in library/pages/components/DesignDetails/innerImg.js - About 1 hr to fix

              Function SelectableHeader has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function SelectableHeader(props) {
                  const {
                      onSelectAllRows,
                      onDeselectAllRows,
                      tableId,
              Severity: Minor
              Found in src/components/Table/head/selectableHeader.js - About 1 hr to fix

                Function Marker has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

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

                      render() {
                          const { children, toc } = this.props;
                          const { components } = toc.props.sections[1];
                  
                          return (
                  Severity: Minor
                  Found in library/styleguideComponents/StyleGuide/index.js - About 1 hr to fix

                    Function filterCountries has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function filterCountries(query, countries, country) {
                        if (query === '' || query === '+') {
                            const filteredCountries = countries.filter(value => value.isoCode !== country.isoCode);
                            filteredCountries.unshift(country);
                            return filteredCountries;

                      Function manageTab has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function manageTab(node, event) {
                          const tabbable = findTabbableElements(node);
                      
                          if (!tabbable.length) {
                              event.preventDefault();
                      Severity: Minor
                      Found in src/libs/manageTab/index.js - About 1 hr to fix

                        Function DownloadCsv has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function DownloadCsv(props) {
                            const { className, style } = props;
                            return (
                                <svg
                                    className={className}
                        Severity: Minor
                        Found in src/components/ImportRecordsFlow/icons/downloadCsv.js - About 1 hr to fix

                          Function CsvIcon has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function CsvIcon(props) {
                              const { className, style } = props;
                              return (
                                  <svg
                                      className={className}
                          Severity: Minor
                          Found in src/components/ImportRecordsFlow/icons/csvIcon.js - About 1 hr to fix

                            Function CheckCircle has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function CheckCircle(props) {
                                const { className, style } = props;
                                return (
                                    <svg
                                        className={className}
                            Severity: Minor
                            Found in src/components/ImportRecordsFlow/icons/checkCircle.js - About 1 hr to fix

                              Function Building has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Function Facebook has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Function AvatarMenu has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function AvatarMenu(props) {
                                      const {
                                          src,
                                          initials,
                                          icon,
                                  Severity: Minor
                                  Found in src/components/AvatarMenu/index.js - About 1 hr to fix

                                    Function enableBodyScroll has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    export function enableBodyScroll(targetElement) {
                                        if (isIosDevice) {
                                            if (!targetElement) {
                                                // eslint-disable-next-line no-console
                                                console.error(
                                    Severity: Minor
                                    Found in src/libs/scrollController/index.js - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function AccordionTimelineMarker has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    export default function AccordionTimelineMarker(props) {
                                        const {
                                            icon,
                                            name,
                                            isLoading,
                                    Severity: Minor
                                    Found in src/components/TimelineMarker/accordionMarker.js - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Function SelectableCell has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    export default function SelectableCell(props) {
                                        const { isSelected, isDisabled, tableId, onSelectRow, onDeselectRow, inputType } = props;
                                        const name = `${tableId}-options`;
                                        const isRadio = inputType === 'radio';
                                    
                                    
                                    Severity: Minor
                                    Found in src/components/Table/body/selectableCell.js - About 1 hr to fix

                                    Cognitive Complexity

                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                    A method's cognitive complexity is based on a few simple rules:

                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                    • Code is considered more complex for each "break in the linear flow of the code"
                                    • Code is considered more complex when "flow breaking structures are nested"

                                    Further reading

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language