nexxtway/react-rainbow

View on GitHub

Showing 445 of 2,739 total issues

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

          Function constructor has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              constructor(props) {
                  super(props);
                  this.inputId = uniqueId('picklist-input');
                  this.errorMessageId = uniqueId('error-message');
                  this.listboxId = uniqueId('listbox');
          Severity: Minor
          Found in src/components/Picklist/index.js - About 1 hr to fix

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

                render() {
                    const { className, style, latitude, longitude, icon } = this.props;
                    const { label, description } = this.state;
            
                    if (latitude && longitude) {
            Severity: Minor
            Found in src/components/MapMarker/index.js - About 1 hr to fix

              Function StarHalf has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function StarHalf() {
                  return (
                      <svg width="19px" height="18px" viewBox="0 0 19 18">
                          <defs>
                              <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
              Severity: Minor
              Found in src/components/Rating/starHalf.js - About 1 hr to fix

                Function Cancel has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function Cancel(props) {
                    const { className, style } = props;
                    return (
                        <svg
                            width="16px"
                Severity: Minor
                Found in src/components/Table/body/icons/cancel.js - About 1 hr to fix

                  Function useMoveFocusedDayFunction has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function useMoveFocusedDayFunction(focusedDate, currentMonth, minDate, maxDate) {
                      return useCallback(
                          increment => {
                              const { minCalendarDate, maxCalendarDate } = getCalendarBounds(minDate, maxDate);
                              const nextFocusedDate = addDays(focusedDate, increment);
                  Severity: Minor
                  Found in src/components/Calendar/doubleCalendar/hooks/useMoveFocusedDay.js - About 1 hr to fix

                    Function Month has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function Month(props) {
                        const { firstDayMonth, value, minDate, maxDate, onChange } = props;
                    
                        const date = new Date(firstDayMonth);
                        const lastDayMonth = getLastDayMonth(firstDayMonth);
                    Severity: Minor
                    Found in src/components/Calendar/month.js - About 1 hr to fix

                      Function Notification has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function Notification(props) {
                          const { className, style, icon, title, description, onRequestClose, hideCloseButton } = props;
                      
                          return (
                              <StyledContainer className={className} style={style}>
                      Severity: Minor
                      Found in src/components/Notification/index.js - About 1 hr to fix

                        Function getTotalWidthsMetadata has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function getTotalWidthsMetadata(params) {
                            const { columns, minColumnWidth, maxColumnWidth } = params;
                            const initial = {
                                totalFixedWidth: 0,
                                totalFixedColumns: 0,
                        Severity: Minor
                        Found in src/components/Table/helpers/resizer/getTotalWidthsMetadata.js - About 1 hr to fix

                          Function Header has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const Header = React.forwardRef((props, ref) => {
                              const { week, today, locale } = props;
                              const formattedWeekDay = useFormatedWeekDay(locale);
                              const formattedNumberDay = useFormattedNumberDay(locale);
                          
                          
                          Severity: Minor
                          Found in src/components/WeeklyCalendar/header/index.js - About 1 hr to fix

                            Function MenuItems has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function MenuItems(props) {
                                const { items, onClick, focusedItemIndex, onHover } = props;
                            
                                return items.map((item, index) => {
                                    const { label, description, icon, type } = item;
                            Severity: Minor
                            Found in src/components/Lookup/options/index.js - About 1 hr to fix

                              Function SearchIcon has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const SearchIcon = props => {
                                  const { className } = props;
                                  return (
                                      <svg
                                          className={className}
                              Severity: Minor
                              Found in src/components/InternalDropdown/icons/searchIcon.js - About 1 hr to fix

                                Function Day has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function Day(props) {
                                    const { date, firstDayMonth, isSelected, minDate, maxDate, onSelect } = props;
                                    const { dateComponent } = useContext(MonthCalendarContext);
                                    const day = date.getDate();
                                    const isAdjacentDate = date.getMonth() !== firstDayMonth.getMonth();
                                Severity: Minor
                                Found in src/components/MonthlyCalendar/day.js - About 1 hr to fix

                                  Function Coin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Consider simplifying this complex logical expression.
                                    Open

                                        if (
                                            (focusedNode && name === focusedNode) ||
                                            (isSelected && !focusedNode) ||
                                            (isFirstNode && !selectedNode && !focusedNode)
                                        ) {
                                    Severity: Major
                                    Found in src/components/Tree/helpers/getTabIndex.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                              if (type === 'hsv' && Array.isArray(values) && values.length === 3) {
                                                  return (
                                                      values.filter(
                                                          (value, index) =>
                                                              (index === 0 && value >= 0 && value <= 360) || (value >= 0 && value <= 100),
                                      Severity: Major
                                      Found in src/styles/helpers/color/isHsvColor.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                if (
                                                    (currentHour && currentMinutes && ampm && !hour24) ||
                                                    (currentHour && currentMinutes && hour24)
                                                ) {
                                                    onChange(time);
                                        Severity: Major
                                        Found in src/components/TimePicker/timeSelect.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language