department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,760 of 12,760 total issues

Function navigateForward has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const navigateForward = (SHORT_NAME, formResponses, router) => {
  const roadmap = makeRoadmap(getServicePeriodResponse(formResponses));

  if (roadmap?.length) {
    const CURRENT_INDEX = roadmap?.indexOf(SHORT_NAME);
Severity: Minor
Found in src/applications/pact-act/utilities/page-navigation.js - About 1 hr to fix

    Function ConfirmCancelModal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const ConfirmCancelModal = props => {
      const { activeSection, closeModal, onHide, isVisible } = props;
    
      // return null to avoid even having the web component in dom
      // when not needed (this makes testing easier as well)

      Function checkResponses has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const checkResponses = (formResponses, displayConditionsForPath) => {
        const questionRequirements = Object.keys(displayConditionsForPath);
      
        for (const questionShortName of questionRequirements) {
          const formResponse = formResponses?.[questionShortName];
      Severity: Minor
      Found in src/applications/pact-act/utilities/display-logic-questions.js - About 1 hr to fix

        Function phoneUiSchema has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const phoneUiSchema = fieldName => {
          return {
            inputPhoneNumber: {
              'ui:title': `${fieldName} (U.S. numbers only)`,
              'ui:webComponentField': VaTextInputField,

          Function recordSearchResultsEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const recordSearchResultsEvents = (props, results) => {
            const dataPush = { event: 'fl-search-results' };
            const { currentQuery, pagination, resultTime } = props;
          
            if (currentQuery) {
          Severity: Minor
          Found in src/applications/facility-locator/utils/analytics.js - About 1 hr to fix

            Function renderMarkers has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const renderMarkers = locations => {
                if (locations.length === 0) return;
            
                const locationBounds = new mapboxgl.LngLatBounds();
            
            
            Severity: Minor
            Found in src/applications/facility-locator/containers/FacilitiesMap.jsx - About 1 hr to fix

              Function DisasterAlert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const DisasterAlert = () => {
                return (
                  <va-alert-expandable
                    trigger="Need help with VA Debt after a natural disaster?"
                    status="info"

                Function fetchResultsThunk has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const fetchResultsThunk = () => async dispatch => {
                  // Change the `fetching` state in our store.
                  dispatch(
                    fetchResultsAction({
                      hideFetchingState: true,
                Severity: Minor
                Found in src/applications/third-party-app-directory/actions/index.js - About 1 hr to fix

                  Function AreaOfDisagreementReviewField has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const AreaOfDisagreementReviewField = props => {
                    const { defaultEditButton, formData } = props;
                  
                    if (!getIssueName(formData)) {
                      return null;
                  Severity: Minor
                  Found in src/applications/appeals/shared/content/areaOfDisagreement.jsx - About 1 hr to fix

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

                      render() {
                        const { user, form } = this.props;
                        const contentBeforeButtons = (
                          <SaveFormLink
                            locationPathname={this.props.location.pathname}

                      Function formatMenuItems has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const formatMenuItems = menuItems => {
                          const formattedMenuItems = [];
                      
                          if (menuItems && isArray(menuItems)) {
                            return menuItems;

                        Function mockData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const mockData = (state = INITIAL_STATE, action) => {
                          switch (action.type) {
                            case UPDATE_PENDING_VERIFICATIONS:
                              // this delets all pending verifications award_ids
                              return {
                        Severity: Minor
                        Found in src/applications/verify-your-enrollment/reducers/mockData.js - About 1 hr to fix

                          Function fileUploadUi has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function fileUploadUi(content) {
                            return {
                              ...fileUiSchema(content.label, {
                                buttonText: 'Upload file',
                                addAnotherLabel: 'Upload another file',
                          Severity: Minor
                          Found in src/applications/pre-need/utils/upload.js - About 1 hr to fix

                            Function prepareAddressData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const prepareAddressData = formData => {
                              let addressData = {
                                veteranName: formData.fullName,
                                addressLine1: formData.addressLine1,
                                addressLine2: formData.addressLine2,
                            Severity: Minor
                            Found in src/applications/verify-your-enrollment/helpers.jsx - About 1 hr to fix

                              Function DependentListLoopForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const DependentListLoopForm = props => {
                                const { children, data, page, onChange, onSubmit } = props;
                                const { isLoggedIn } = useSelector(selectAuthStatus);
                                const { fullName = {} } = data || {};
                              
                              

                                Function TravelQuestion has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const TravelQuestion = props => {
                                  const { router } = props;
                                  const { t } = useTranslation();
                                
                                  const additionalInfoItems = [
                                Severity: Minor
                                Found in src/applications/check-in/day-of/pages/TravelQuestion.jsx - About 1 hr to fix

                                  Function updateFormPages has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const updateFormPages = (
                                    patientDemographicsStatus,
                                    pages,
                                    URLS,
                                    isTravelReimbursementEnabled = false,
                                  Severity: Minor
                                  Found in src/applications/check-in/utils/navigation/index.js - About 1 hr to fix

                                    Function withError has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const withError = Component => {
                                      const WrappedComponent = props => {
                                        const selectError = useMemo(makeSelectError, []);
                                        const { error } = useSelector(selectError);
                                    
                                    
                                    Severity: Minor
                                    Found in src/applications/check-in/containers/withError.jsx - About 1 hr to fix

                                      Function TravelVehicle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const TravelVehicle = props => {
                                        const { router } = props;
                                        const { t } = useTranslation();
                                        const { updateError } = useUpdateError();
                                        const additionalInfoItems = [

                                        Function makeSchema has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function makeSchema(itemId) {
                                          return {
                                            type: 'object',
                                            properties: {
                                              toxicExposure: {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language