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 (element) {
    const rect = element.getBoundingClientRect();

    // Check if the element is out of the viewport
    const inViewport =
Severity: Major
Found in src/applications/mhv-secure-messaging/util/helpers.js - About 40 mins to fix

    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 (
                        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

                Consider simplifying this complex logical expression.
                Open

                                if (
                                  (route.requiresLOA3 && !this.props.isLOA3) ||
                                  (route.requiresMVI && !this.props.isInMVI) ||
                                  (route.requiresLOA3 && this.props.isBlocked)
                                ) {
                Severity: Major
                Found in src/applications/personalization/profile/components/Profile.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 (isRefillable) {
                        return (
                          <div className="rx-fill-refill-button" data-testid="fill-refill">
                            {success && (
                              <va-alert status="success" setFocus aria-live="polite" uswds>
                    Severity: Major
                    Found in src/applications/mhv-medications/components/shared/FillRefillButton.jsx - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                            } else if (
                              ((prescriptionsFullList?.length &&
                                pdfTxtGenerateStatus.format !== PRINT_FORMAT.PRINT) ||
                                (paginatedPrescriptionsList?.length &&
                                  pdfTxtGenerateStatus.format === PRINT_FORMAT.PRINT)) &&
                      Severity: Major
                      Found in src/applications/mhv-medications/containers/Prescriptions.jsx - About 40 mins to fix

                        Function setSaveFormStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          saveType,
                          status,
                          lastSavedDate = null,
                          expirationDate = null,
                          inProgressFormId = null,
                        Severity: Minor
                        Found in src/platform/forms/save-in-progress/actions.js - About 35 mins to fix

                          Function validateNameSymbols has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          export function validateNameSymbols(errors, value, uiSchema, schema, messages) {

                            Function validateRoutingNumber has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              errors,
                              routingNumber,
                              formData,
                              schema,
                              errorMessages,
                            Severity: Minor
                            Found in src/platform/forms/definitions/bankAccount.js - About 35 mins to fix

                              Function apiRequest has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                resource,
                                optionalSettings,
                                success,
                                error,
                                env = environment,
                              Severity: Minor
                              Found in src/platform/utilities/api/index.js - About 35 mins to fix

                                Function addressUiSchema has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  path = 'address',
                                  checkBoxTitle = 'I live on a United States military base outside of the U.S.',
                                  uiRequiredCallback = () => false,
                                  newSchemaKeys = {},
                                  onlyAllowUSAddresses = false,
                                Severity: Minor
                                Found in src/platform/forms-system/src/js/definitions/profileAddress.js - About 35 mins to fix

                                  Function validateCurrentOrPastMemorableDate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    errors,
                                    dateString,
                                    formData,
                                    schema,
                                    errorMessages = {},
                                  Severity: Minor
                                  Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                                    Function showReviewField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      propName,
                                      schema,
                                      uiSchema,
                                      formData,
                                      formContext,
                                    Severity: Minor
                                    Found in src/platform/forms-system/src/js/helpers.js - About 35 mins to fix

                                      Function validateDateRangeAllowSameMonth has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                        errors,
                                        dateRange,
                                        formData,
                                        schema,
                                        errorMessages,
                                      Severity: Minor
                                      Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix

                                        Function validateBooleanGroup has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                          errors,
                                          userGroup,
                                          form,
                                          schema,
                                          errorMessages = {},
                                        Severity: Minor
                                        Found in src/platform/forms-system/src/js/validation.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language