department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function content has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const content = () => {
    if (accessAlert) {
      return (
        <AccessTroubleAlertBox
          alertType={accessAlertTypes.VITALS}
Severity: Major
Found in src/applications/mhv-medical-records/containers/Vitals.jsx - About 2 hrs to fix

    Function directDeposit has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function directDeposit(state = initialState, action) {
      switch (action.type) {
        case DIRECT_DEPOSIT_FETCH_SUCCEEDED:
        case DIRECT_DEPOSIT_SAVE_SUCCEEDED: {
          return {
    Severity: Major
    Found in src/applications/personalization/profile/reducers/directDeposit.js - About 2 hrs to fix

      Function mapStateToProps has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const mapStateToProps = state => {
        const { isReady: hasLoadedScheduledDowntime } = state.scheduledDowntime;
        const isLOA3 = isLOA3Selector(state);
        const isLOA1 = isLOA1Selector(state);
        const isVAPatient = isVAPatientSelector(state);
      Severity: Major
      Found in src/applications/personalization/dashboard/components/Dashboard.jsx - About 2 hrs to fix

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

          render() {
            const contentClasses = classNames(
              'form-expanding-group-open',
              'wizard-content',
              {
        Severity: Major
        Found in src/applications/post-911-gib-status/components/EducationWizard.jsx - About 2 hrs to fix

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

            render() {
              const { enrollment, id } = this.props;
              const amendments = enrollment.amendments || [];
              const yellowRibbonStatus = enrollment.yellowRibbonAmount > 0 && (
                <div className="yellow-ribbon-school">
          Severity: Major
          Found in src/applications/post-911-gib-status/components/EnrollmentPeriod.jsx - About 2 hrs to fix

            File FacilitySearch.jsx has 276 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React, { useMemo, useState } from 'react';
            import PropTypes from 'prop-types';
            import { useDispatch } from 'react-redux';
            import { VaSearchInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
            import { setData } from 'platform/forms-system/src/js/actions';
            Severity: Minor
            Found in src/applications/caregivers/components/FormFields/FacilitySearch.jsx - About 2 hrs to fix

              Function FormSaveErrorMessage has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function FormSaveErrorMessage(props) {
                const { route, formConfig, user, form, location, showLoginModal } = props;
              
                const savedStatus = form?.savedStatus;
                const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
              Severity: Major
              Found in src/platform/forms/components/review/FormSaveErrorMessage.jsx - About 2 hrs to fix

                Function SubmitButtons has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function SubmitButtons(props) {
                  const { onBack, onSubmit, submission, formConfig, formErrors = {} } = props;
                
                  const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
                  const buttonText =
                Severity: Major
                Found in src/platform/forms-system/src/js/review/SubmitButtons.jsx - About 2 hrs to fix

                  File form.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import { VA_FORM_IDS } from 'platform/forms/constants';
                  
                  import preSubmitInfo from 'platform/forms/preSubmitInfo';
                  import FormFooter from 'platform/forms/components/FormFooter';
                  import { externalServices as services } from 'platform/monitoring/DowntimeNotification';
                  Severity: Minor
                  Found in src/applications/appeals/995/config/form.js - About 2 hrs to fix

                    Function createContactInformationPage has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function createContactInformationPage(
                      schema,
                      addressField = 'veteranAddress',
                    ) {
                      const { homePhone, mobilePhone } = schema.properties;
                    Severity: Major
                    Found in src/applications/edu-benefits/pages/contactInformation.js - About 2 hrs to fix

                      Function sortTheResults has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const sortTheResults = (sortByPropertyName, indexA, indexB) => {
                        // -n (negative number) sorts indexA to the front of the array.
                        // n (positive number) sorts indexA to the back of the array.
                        // stayPut keeps both indexA and indexB right where they are.
                        const [
                      Severity: Major
                      Found in src/applications/find-forms/helpers/index.js - About 2 hrs to fix

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

                          render() {
                            if (this.props.loading || !Object.keys(this.props.facility).length) {
                              return (
                                <va-loading-indicator
                                  message={`Loading facility's ${

                          File employersPages.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import { arrayBuilderPages } from '~/platform/forms-system/src/js/patterns/array-builder';
                          import {
                            addressSchema,
                            addressUI,
                            arrayBuilderItemFirstPageTitleUI,

                            Function Dependents has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const Dependents = () => {
                              useEffect(() => {
                                recordEvent({
                                  event: 'howToWizard-alert-displayed',
                                  'reason-for-alert': 'request help with debt for spouses or dependents',
                            Severity: Major
                            Found in src/applications/financial-status-report/wizard/pages/Dependents.jsx - About 2 hrs to fix

                              Function MonetaryInputList has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const MonetaryInputList = props => {
                                const { errorSchema, formContext } = props;
                                const errorList = errorSchema?.monetaryAssets?.__errors;
                                const { submitted } = formContext;
                              
                              

                                Function OtherAssetsInputList has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const OtherAssetsInputList = props => {
                                  const { errorSchema, formContext } = props;
                                  const errorList = errorSchema?.otherAssets?.__errors;
                                  const { submitted } = formContext;
                                
                                

                                  Function updateFormData has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const updateFormData = () => {
                                      if (
                                        !isValidFromDate(employmentRecord.from) ||
                                        (!isValidToDate(employmentRecord.from, employmentRecord.to) &&
                                          !employmentRecord.isCurrent)

                                    Function EmergencyNote has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const EmergencyNote = props => {
                                      const { dropDownFlag } = props;
                                    
                                      const content = () => (
                                        <>
                                    Severity: Major
                                    Found in src/applications/mhv-secure-messaging/components/EmergencyNote.jsx - About 2 hrs to fix

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

                                        render() {
                                          let buttonText;
                                          let buttonDisabled;
                                          let message;
                                          switch (this.props.downloadStatus) {
                                      Severity: Major
                                      Found in src/applications/letters/components/DownloadLetterLink.jsx - About 2 hrs to fix

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

                                          render() {
                                            const {
                                              appeal,
                                              fullName,
                                              appealsLoading,
                                        Severity: Major
                                        Found in src/applications/claims-status/containers/AppealInfo.jsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language