department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Consider simplifying this complex logical expression.
Open

    if (
      (isUrgentCare && (!serviceType || serviceType === 'AllUrgentCare')) ||
      (isEmergencyCare && (!serviceType || serviceType === 'AllEmergencyCare'))
    ) {
      const allCare = await returnAllCare({
Severity: Major
Found in src/applications/facility-locator/actions/locations/fetchLocations.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

              if (
                modifiedData.application.applicant &&
                modifiedData.application.applicant['view:applicantInfo'] &&
                modifiedData.application.applicant['view:applicantInfo']
                  .mailingAddress &&
    Severity: Major
    Found in src/applications/pre-need/definitions/address.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

            if (
              !startDateMonth ||
              !startDateDay ||
              !startDateYear ||
              !endDateMonth ||
      Severity: Major
      Found in src/applications/static-pages/events/components/Search/index.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

          if (
            !isCheckInDataLoading &&
            (!isTravelReimbursementEnabled ||
              !travelPayEligible ||
              (travelPayClaimRequested === false || travelPayClaimSent) ||

          Consider simplifying this complex logical expression.
          Open

                if (
                  isLoading ||
                  !isTravelReimbursementEnabled ||
                  travelPayClaimSent ||
                  !travelPayEligible ||
          Severity: Major
          Found in src/applications/check-in/hooks/useSendTravelPayClaim.jsx - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if (
                      !street &&
                      !city &&
                      !state &&
                      !country &&
            Severity: Major
            Found in src/applications/disability-benefits/2346/schemas/2346UI.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                          if (isEditing) {
                            return (
                              <div key={index} className="va-growable-background">
                                <Element name={`table_${itemIdPrefix}`} />
                                <div className="row small-collapse">

                Consider simplifying this complex logical expression.
                Open

                  if (
                    loggedIn &&
                    showWizard &&
                    ((!hasSavedForm && wizardStatus !== WIZARD_STATUS_COMPLETE) ||
                      (hasSavedForm && wizardStatus === WIZARD_STATUS_RESTARTING))
                Severity: Major
                Found in src/applications/disability-benefits/all-claims/Form526EZApp.jsx - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                    if (
                      isClaimingTECondition(formData) &&
                      formData?.toxicExposure[checkboxObjectName]
                    ) {
                      const checkboxes = formData?.toxicExposure[checkboxObjectName];

                    Consider simplifying this complex logical expression.
                    Open

                          if (mailingAddress) {
                            const onMilitaryBase = MILITARY_CITIES.includes(mailingAddress.city);
                            newData.mailingAddress = {
                              // strip out any extra data. Maybe left over from v1?
                              // see https://github.com/department-of-veterans-affairs/va.gov-team/issues/19423
                    Severity: Major
                    Found in src/applications/disability-benefits/all-claims/prefill-transformer.js - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                        if (
                          fromDate &&
                          toDate &&
                          isDateComplete(fromDate) &&
                          isDateComplete(toDate)
                      Severity: Major
                      Found in src/applications/financial-status-report/utils/helpers.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if (
                                  (messageValid && !isSignatureRequired) ||
                                  (isSignatureRequired && signatureValid && checkboxValid && !saveError)
                                ) {
                                  setNavigationError(null);

                          Consider simplifying this complex logical expression.
                          Open

                                if (
                                  lastPathName !== 'Messages' &&
                                  !foldersViewPage &&
                                  !threadViewPage &&
                                  !contactListPage &&

                            Consider simplifying this complex logical expression.
                            Open

                              if (selectIsCommunityCare(appointment)) {
                                // NOTE: appointment.communityCareProvider is populated for booked CC only
                                const { providerName, name } = appointment.communityCareProvider || {
                                  providerName: null,
                                  name: null,
                            Severity: Major
                            Found in src/applications/vaos/appointment-list/redux/selectors.js - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                    if (typeOfCareId) {
                                      const siteIds = selectSystemIds(initialState);
                                      const cernerSiteIds = selectRegisteredCernerFacilityIds(initialState);
                                      let typeOfCareFacilities = getTypeOfCareFacilities(initialState);
                                      let siteId = null;
                              Severity: Major
                              Found in src/applications/vaos/new-appointment/redux/actions.js - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                  if (
                                    (isInPersonVAAppointment(appointment) && !isPendingAppointment) ||
                                    isCOVIDVaccine ||
                                    isCompAndPenAppointment ||
                                    isClinicVideoAppointment(appointment) ||
                                Severity: Major
                                Found in src/applications/vaos/components/AppointmentCard/AppointmentCardIcon.jsx - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                    } else if (claimAvailable(claim)) {
                                      breadcrumbs = [
                                        {
                                          href: '../status',
                                          label: generateClaimTitle(claim, 'breadcrumb', currentTab),
                                  Severity: Major
                                  Found in src/applications/claims-status/components/ClaimDetailLayout.jsx - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                        if (
                                          (togglesLoaded && !prevProps.togglesLoaded && shouldFetchDirectDeposit) ||
                                          (togglesLoaded &&
                                            shouldFetchDirectDeposit &&
                                            !prevProps.shouldFetchDirectDeposit)
                                    Severity: Major
                                    Found in src/applications/personalization/profile/components/Profile.jsx - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                if (
                                                  modifiedData.application.applicant &&
                                                  modifiedData.application.applicant['view:applicantInfo'] &&
                                                  modifiedData.application.applicant['view:applicantInfo']
                                                    .mailingAddress &&
                                      Severity: Major
                                      Found in src/applications/pre-need-integration/definitions/address.js - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                            if (response.error || response.errors) {
                                              const errorStatus =
                                                response.errors?.[0]?.status || response?.status || '';
                                              const errorCodeOrMessage =
                                                response.errors?.[0]?.code || response?.error || 'unknown-error';
                                        Severity: Major
                                        Found in src/applications/personalization/profile/actions/directDeposit.js - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language