nexxtway/react-rainbow

View on GitHub

Showing 445 of 2,739 total issues

Function Google has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Google = props => {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Major
Found in library/exampleComponents/Icons/google.js - About 2 hrs to fix

    File modal-11.spec.js has 251 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const PageModal = require('../../../src/components/Modal/pageObject');
    const PageLookup = require('../../../src/components/Lookup/pageObject');
    const PageDatePicker = require('../../../src/components/DatePicker/pageObject');
    const PageTimePicker = require('../../../src/components/TimePicker/pageObject');
    const { ESCAPE_KEY, ENTER_KEY, ARROW_DOWN_KEY } = require('../../constants');
    Severity: Minor
    Found in integration/specs/Modal/modal-11.spec.js - About 2 hrs to fix

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

          render() {
              const {
                  className,
                  style,
                  value,
      Severity: Minor
      Found in src/components/Input/inputRadio/index.js - About 2 hrs to fix

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

            render() {
                const {
                    className,
                    style,
                    label,
        Severity: Minor
        Found in src/components/Input/pickerInput/index.js - About 2 hrs to fix

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

              render() {
                  const {
                      className,
                      style,
                      value,
          Severity: Minor
          Found in src/components/Input/inputCheckbox/index.js - About 2 hrs to fix

            Function Application has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const Application = props => {
                const { className, style } = props;
                return (
                    <svg
                        className={className}
            Severity: Minor
            Found in library/exampleComponents/Icons/application.js - About 2 hrs to fix

              Function Examples has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function Examples(_ref1, _ref2) {
                  const { examples, name, exampleMode } = _ref1;
                  const codeRevision = _ref2.codeRevision;
              
                  if (name === 'Customization') {
              Severity: Minor
              Found in library/styleguideComponents/Examples/index.js - About 2 hrs to fix

                Function ButtonMenuExample has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

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

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

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

                        render() {
                            const { isFocused, tabIndex, onFocus, value, onClick } = this.props;
                    
                            if (isFocused) {
                                return (
                    Severity: Minor
                    Found in src/components/TimePicker/ampmSelect.js - About 1 hr to fix

                      Function StatsCard has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function StatsCard(props) {
                          const { validRecords, invalidRecords, borderRadius } = props;
                          const invalidCount = invalidRecords.length;
                          const validCount = validRecords.length;
                          const totalRecords = invalidCount + validCount;
                      Severity: Minor
                      Found in src/components/ImportRecordsFlow/stepFour/statsCard.js - About 1 hr to fix

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

                            render() {
                                const {
                                    data,
                                    columns,
                                    rows,
                        Severity: Minor
                        Found in src/components/Table/body/index.js - About 1 hr to fix

                          Function PhoneSolid has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Function Internationalization has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const Internationalization = props => {
                                const { className } = props;
                                return (
                                    <svg
                                        className={className}
                            Severity: Minor
                            Found in library/pages/components/FeatureList/images/internationalization.js - About 1 hr to fix

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

                                  render() {
                                      const { selectedItem } = this.state;
                                      return (
                                          <Application theme={theme}>
                                              <ReactTypeformEmbed
                              Severity: Minor
                              Found in library/styleguideComponents/ComponentsList/index.js - About 1 hr to fix

                                Function UserFirstPost has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Function Icon has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  export default function Icon({ files, error, isDragOver, value, uploadIcon }) {
                                      if (value !== null) {
                                          if (!isDragOver) {
                                              if (error) {
                                                  return <ErrorIcon />;
                                  Severity: Minor
                                  Found in src/components/FileSelector/icon.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 render has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      render() {
                                          const {
                                              name,
                                              value,
                                              onChange,
                                  Severity: Minor
                                  Found in src/components/Input/inputRadio/radio.js - About 1 hr to fix

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

                                    export default function Header() {
                                        return (
                                            <header className="rainbow-flex rainbow-align_center rainbow-p-vertical_small rainbow-p-horizontal_large rainbow-admin_header rainbow-background-color_white">
                                                <img
                                                    src="./assets/images/rainbow-logo.svg"
                                    Severity: Minor
                                    Found in examples/create-react-app/src/pages/Admin/header.js - About 1 hr to fix

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

                                          render() {
                                              const {
                                                  style,
                                                  className,
                                                  label,
                                      Severity: Minor
                                      Found in src/components/MenuItem/index.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language