department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

Consider simplifying this complex logical expression.
Open

  if (useOAuth && (isLogin || isSignup)) {
    return createOAuthRequest({
      acr,
      application,
      clientId,
Severity: Major
Found in src/platform/user/authentication/utilities.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

          if (
            (firstName &&
              !fetchedExclusionPeriods &&
              formData?.chosenBenefit &&
              meb160630Automation) ||
    Severity: Major
    Found in src/applications/my-education-benefits/containers/App.jsx - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

        if (
          (formattedOpeningHour.search(/Invalid date/i) !== 0 &&
            formattedClosingHour.search(/Invalid date/i) !== 0) ||
          (formattedOpeningHour.search(/Invalid date/i) !== 0 &&
            formattedClosingHour.search(/Invalid date/i) === 0) ||
      Severity: Major
      Found in src/applications/facility-locator/utils/helpers.jsx - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

          if (
            sanitizedOperatingHours.search(/ByAppointmentOnly/i) === 0 ||
            sanitizedOperatingHours.search(/AppointmentsOnly/i) === 0 ||
            sanitizedOperatingHours.search(/PleaseCallforHours/i) === 0 ||
            sanitizedOperatingHours.search(
        Severity: Major
        Found in src/applications/facility-locator/utils/helpers.jsx - About 40 mins to fix

          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 (
                          isClaimingTECondition(formData) &&
                          formData?.toxicExposure[checkboxObjectName]
                        ) {
                          const checkboxes = formData?.toxicExposure[checkboxObjectName];

                        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 (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 (
                                  (GuardianshipAndVRE || EducationAndVRE) &&
                                  (whoIsYourQuestionAbout === whoIsYourQuestionAboutLabels.SOMEONE_ELSE &&
                                    relationshipToVeteran === relationshipOptionsSomeoneElse.WORK &&
                                    isQuestionAboutVeteranOrSomeoneElse ===
                              Severity: Major
                              Found in src/applications/ask-va/config/helpers.jsx - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                  if (
                                    !(
                                      (formData.whoIsYourQuestionAbout === 'Someone else' &&
                                        formData.relationshipToVeteran ===
                                          "I'm connected to the Veteran through my work (for example, as a School Certifying Official or fiduciary)") ||

                                  Consider simplifying this complex logical expression.
                                  Open

                                    if (
                                      (GuardianshipAndVRE || EducationAndVRE) &&
                                      (whoIsYourQuestionAbout === whoIsYourQuestionAboutLabels.SOMEONE_ELSE &&
                                        relationshipToVeteran === relationshipOptionsSomeoneElse.FAMILY_MEMBER &&
                                        isQuestionAboutVeteranOrSomeoneElse ===
                                  Severity: Major
                                  Found in src/applications/ask-va/config/helpers.jsx - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                      if (
                                        (GuardianshipAndVRE || EducationAndVRE) &&
                                        (whoIsYourQuestionAbout === whoIsYourQuestionAboutLabels.SOMEONE_ELSE &&
                                          relationshipToVeteran === relationshipOptionsSomeoneElse.FAMILY_MEMBER &&
                                          isQuestionAboutVeteranOrSomeoneElse ===
                                    Severity: Major
                                    Found in src/applications/ask-va/config/helpers.jsx - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

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

                                        Consider simplifying this complex logical expression.
                                        Open

                                              if (
                                                (messageValid && !isSignatureRequired) ||
                                                (isSignatureRequired &&
                                                  messageValid &&
                                                  saveError !== null &&
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language