department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

  render() {
    const { user, form, formConfig, route } = this.props;
    const finishAppLaterMessage =
      formConfig?.customText?.finishAppLaterMessage ||
      FINISH_APP_LATER_DEFAULT_MESSAGE;
Severity: Minor
Found in src/platform/forms/save-in-progress/RoutedSavablePage.jsx - About 1 hr to fix

    Function schema has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const schema = optionalFields => {
      const s = {
        type: 'object',
        properties: {
          bankAccount: {
    Severity: Minor
    Found in src/platform/forms-system/src/js/definitions/directDeposit.jsx - About 1 hr to fix

      Function determineResultsPage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const determineResultsPage = (formResponses, router) => {
        const responseToServicePeriod = getServicePeriodResponse(formResponses);
        const { RESULTS_4 } = SHORT_NAME_MAP;
      
        const resultsPages = DISPLAY_CONDITIONS?.RESULTS;
      Severity: Minor
      Found in src/applications/pact-act/utilities/display-logic-results.js - About 1 hr to fix

        Function createExternalApplicationUrl has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const createExternalApplicationUrl = () => {
          const { application, to } = getQueryParams();
          if (!application) {
            return null;
          }
        Severity: Minor
        Found in src/platform/user/authentication/utilities.js - About 1 hr to fix

          Function transform has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function transform(formConfig, form) {
            // https://dev-developer.va.gov/explore/appeals/docs/decision_reviews?version=current
            const mainTransform = formData => {
              const { informalConferenceChoice } = formData;
              // v2 value may still be in the save-in-progress form data (informalConference)
          Severity: Minor
          Found in src/applications/appeals/996/config/submit-transformer.js - About 1 hr to fix

            Function schema has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function schema(currentSchema, topicProperty = 'topic') {
              const topicSchema = currentSchema.properties[topicProperty];
              return {
                type: 'object',
                required: ['levelOne', 'levelTwo'],
            Severity: Minor
            Found in src/applications/ask-a-question/form/inquiry/topic/topic.js - About 1 hr to fix

              Function recurseField has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const recurseField = (key, field, rank = 0) => {
                if (
                  field.value === '' ||
                  field.value === 0 ||
                  field.value === null ||
              Severity: Minor
              Found in src/applications/burial-poc-v6/pages/ReviewPage.jsx - About 1 hr to fix

                Function InitialConfirmEligibilityView has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function InitialConfirmEligibilityView(props) {
                  if (props.onReviewPage) {
                    return null;
                  }
                  captureEvents.ineligibilityAlert(props);

                  Function isOutsideListLoopReturn has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const isOutsideListLoopReturn = (
                    chapter,
                    outerField,
                    uiTitle,
                    formChapter,
                  Severity: Minor
                  Found in src/applications/686c-674/config/helpers.js - About 1 hr to fix

                    Function buildSubmitEventData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const buildSubmitEventData = formData => {
                      const yesNoOrUndefined = value => {
                        if (value === undefined) {
                          return undefined;
                        }
                    Severity: Minor
                    Found in src/applications/edu-benefits/1995/helpers.jsx - About 1 hr to fix

                      Function addFocusBehaviorToCrisisLineModal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const addFocusBehaviorToCrisisLineModal = () => {
                        const overlay = document?.getElementById('ts-modal-crisisline');
                        const modal = document?.querySelector('.vcl-crisis-panel.va-modal-inner');
                      
                        if (modal) {
                      Severity: Minor
                      Found in src/applications/proxy-rewrite/utilities/vcl-modal-behavior.js - About 1 hr to fix

                        Function fetchRepresentatives has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const fetchRepresentatives = async (
                          address,
                          lat,
                          long,
                          name,

                          Function addressReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function addressReducer(state = initialState, action) {
                            switch (action.type) {
                              case ADDRESS_VALIDATION_START:
                                return {
                                  ...state,

                            Function AuthContext has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const AuthContext = () => {
                              const {
                                useToggleValue,
                                useToggleLoadingValue,
                                TOGGLE_NAMES,
                            Severity: Minor
                            Found in src/applications/static-pages/BTSSS-login/AuthContext/index.jsx - About 1 hr to fix

                              Function TravelPayOMB has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const TravelPayOMB = () => {
                                return (
                                  <va-omb-info
                                    exp-date={EXP_DATE}
                                    omb-number={OMB_NUMBER}
                              Severity: Minor
                              Found in src/applications/check-in/components/TravelPayOMB.jsx - About 1 hr to fix

                                Function TravelAddress has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const TravelAddress = props => {
                                  const { router } = props;
                                  const { t } = useTranslation();
                                  const selectVeteranData = useMemo(makeSelectVeteranData, []);
                                  const { demographics } = useSelector(selectVeteranData);
                                Severity: Minor
                                Found in src/applications/check-in/day-of/pages/TravelAddress.jsx - About 1 hr to fix

                                  Function AppointmentResources has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const AppointmentResources = props => {
                                    const { router } = props;
                                    const { goBack } = router;
                                    const { t } = useTranslation();
                                  
                                  

                                    Function fetchFormStatus has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const fetchFormStatus = () => async dispatch => {
                                      dispatch(initiateApiCall());
                                      const sessionExpiration = localStorage.getItem('sessionExpiration');
                                      const remainingSessionTime = moment(sessionExpiration).diff(moment());
                                      if (!remainingSessionTime) {
                                    Severity: Minor
                                    Found in src/applications/disability-benefits/2346/actions/index.js - About 1 hr to fix

                                      Function isOutsideListLoopReturn has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const isOutsideListLoopReturn = (
                                        chapter,
                                        outerField,
                                        uiTitle,
                                        formChapter,
                                      Severity: Minor
                                      Found in src/applications/disability-benefits/686c-674/config/helpers.js - About 1 hr to fix

                                        Function LandingPage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const LandingPage = () => {
                                          const profile = useSelector(selectUserProfile);
                                          const isLoading = useSelector(selectIsUserLoading);
                                        
                                          if (isLoading) {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language