nexxtway/react-rainbow

View on GitHub

Showing 445 of 2,739 total issues

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

              Function handleChange has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  const handleChange = event => {
                      const { value: newValue, selectionStart } = event.target;
                      const cleanValue = clearValue(newValue, decimalSeparator);
                      const normalizeNewValue = normalizeValue({
                          value: cleanValue,
              Severity: Minor
              Found in src/components/CurrencyInput/index.js - About 1 hr to fix

                Function CardExample has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function CardExample() {
                    return (
                        <div className="rainbow-m-around_large">
                            <Card className="rainbow-align-content_center rainbow-m-around_large">
                                <img
                Severity: Minor
                Found in examples/create-react-app/src/pages/Card/index.js - About 1 hr to fix

                  Function withDebounce has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function withDebounce(WrappedComponent) {
                      return class extends Component {
                          constructor(props) {
                              super(props);
                              this.fieldRef = React.createRef();
                  Severity: Minor
                  Found in src/libs/hocs/withDebounce/index.js - About 1 hr to fix

                    Function handleChange has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        const handleChange = event => {
                            const { value: newValue, selectionStart } = event.target;
                            const cleanValue = clearValue(newValue, decimalSeparator);
                            const normalizeNewValue = normalizeValue({
                                value: cleanValue,
                    Severity: Minor
                    Found in src/components/PercentInput/index.js - About 1 hr to fix

                      Function renderInput has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          renderInput() {
                              const { props } = this;
                              const { readOnly, isCentered, valueAlignment } = props;
                              const alignment = getValueAlignment({ valueAlignment, isCentered });
                      
                      
                      Severity: Minor
                      Found in src/components/Input/pickerInput/index.js - About 1 hr to fix

                        Function componentDidUpdate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            componentDidUpdate(prevProps, prevState) {
                                const {
                                    options: prevOptions,
                                    preferredSelectedOption: prevPreferredSelectedOption,
                                } = prevProps;
                        Severity: Minor
                        Found in src/components/Lookup/index.js - About 1 hr to fix

                          Function Plus has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Function RainbowComponents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Function CancelIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function CancelIcon() {
                                  return (
                                      <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
                                          <title>cancel</title>
                                          <g
                              Severity: Minor
                              Found in src/components/FileSelector/icons/cancel.js - About 1 hr to fix

                                Function buildShapeAttrList has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Function EmailCustom has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Function handleChange has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            option => {
                                                const { icon, name, label, value: optionValue, only } = option;
                                                if (only) {
                                                    return onChange([
                                                        {
                                    Severity: Minor
                                    Found in src/components/InternalDropdown/index.js - About 1 hr to fix

                                      Function useHandleKeyDown has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          focusedDate,
                                          currentMonth,
                                          rightCalendarMonth,
                                          minDate,
                                          maxDate,
                                      Severity: Major
                                      Found in src/components/Calendar/doubleCalendar/hooks/useHandleKeyDown.js - About 1 hr to fix

                                        Function TreeChildren has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function TreeChildren(props) {
                                            const {
                                                data,
                                                onNodeCheck,
                                                onNodeExpand,
                                        Severity: Minor
                                        Found in src/components/Tree/treeChildren.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language