department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

File ContactInfo.jsx has 392 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useState, useRef } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
import { Element } from 'react-scroll';

    Function prefillTransformerV3 has 135 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function prefillTransformerV3(pages, formData, metadata, state) {
      const bankInformation = state.data?.bankInformation || {};
      const claimant = state.data?.formData?.data?.attributes?.claimant || {};
      const exclusionPeriods = Array.isArray(state.data?.exclusionPeriods)
        ? state.data?.exclusionPeriods
    Severity: Major
    Found in src/applications/my-education-benefits/helpers.js - About 5 hrs to fix

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

        render() {
          return (
            <div className="schemaform-intro">
              <FormTitle title="Apply for pre-need eligibility determination" />
              <p>
      Severity: Major
      Found in src/applications/pre-need/components/IntroductionPage.jsx - About 5 hrs to fix

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

        const TravelQuestion = props => {
          const { router } = props;
          const { t } = useTranslation();
          const { jumpToPage, goToNextPage } = useFormRouting(router);
          const selectVeteranData = useMemo(makeSelectVeteranData, []);
        Severity: Major
        Found in src/applications/check-in/day-of/pages/TravelReview.jsx - About 5 hrs to fix

          Function Edit has 135 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const Edit = () => {
            const dispatch = useDispatch();
            const history = useHistory();
            const query = useQuery();
          
          
          Severity: Major
          Found in src/applications/personalization/profile/components/edit/Edit.jsx - About 5 hrs to fix

            Function AdmissionAndDischargeDetails has 135 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const AdmissionAndDischargeDetails = props => {
              const { record, runningUnitTest } = props;
              const user = useSelector(state => state.user.profile);
              const allowTxtDownloads = useSelector(
                state =>

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

                render() {
                  const {
                    route,
                    params,
                    form,
              Severity: Major
              Found in src/platform/forms-system/src/js/containers/FormPage.jsx - About 5 hrs to fix

                File arrayBuilder.jsx has 390 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* eslint-disable no-unused-vars */
                import { getNextPagePath } from 'platform/forms-system/src/js/routing';
                import {
                  createArrayBuilderItemAddPath,
                  onNavForwardKeepUrlParams,

                  Function data has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    data: (state = initialState, action) => {
                      switch (action.type) {
                        case FETCH_PERSONAL_INFORMATION:
                          return {
                            ...state,
                  Severity: Major
                  Found in src/applications/toe/reducers.js - About 5 hrs to fix

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

                      render() {
                        const { route, userIdVerified, userLoggedIn } = this.props;
                        const { formConfig, pageList } = route;
                    
                        return (
                    Severity: Major
                    Found in src/applications/simple-forms/21-0845/containers/IntroductionPage.jsx - About 5 hrs to fix

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

                        render() {
                          return (
                            <div className="schemaform-intro">
                              <FormTitle title="Apply for pre-need eligibility determination" />
                              <p>
                      Severity: Major
                      Found in src/applications/pre-need-integration/components/IntroductionPage.jsx - About 5 hrs to fix

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

                          render() {
                            const { apps, loading, errors } = this.props;
                            const deletedApps = apps ? apps.filter(app => app.deleted) : [];
                            const activeApps = apps ? apps.filter(app => !app.deleted) : [];
                        
                        

                          Function IntroductionPage has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const IntroductionPage = props => {
                            const { route, loggedIn } = props;
                            const { formConfig, pageList } = route;
                            const store = useStore();
                          
                          

                            Function renderView has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const renderView = () => {
                                // This block renders the desktop and mobile view. It ensures that the desktop map
                                // gets re-loaded when resizing from mobile to desktop.
                                const {
                                  currentQuery,
                            Severity: Major
                            Found in src/applications/facility-locator/containers/FacilitiesMap.jsx - About 5 hrs to fix

                              Function TravelMileage has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const TravelMileage = props => {
                                const { router } = props;
                                const { t } = useTranslation();
                                const dispatch = useDispatch();
                              
                              
                              Severity: Major
                              Found in src/applications/check-in/travel-claim/pages/travel-mileage/index.jsx - About 5 hrs to fix

                                Function Vaccines has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const Vaccines = props => {
                                  const { runningUnitTest } = props;
                                  const dispatch = useDispatch();
                                  const updatedRecordList = useSelector(state => state.mr.vaccines.updatedList);
                                  const listState = useSelector(state => state.mr.vaccines.listState);
                                Severity: Major
                                Found in src/applications/mhv-medical-records/containers/Vaccines.jsx - About 5 hrs to fix

                                  File topic.js has 388 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import { flatten, orderBy } from 'lodash';
                                  import clone from 'platform/utilities/data/clone';
                                  import get from 'platform/utilities/data/get';
                                  import set from 'platform/utilities/data/set';
                                  import { createSelector } from 'reselect';
                                  Severity: Minor
                                  Found in src/applications/ask-a-question/form/inquiry/topic/topic.js - About 5 hrs to fix

                                    Function SipsDevModal has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const SipsDevModal = props => {
                                      const { pageList, form, locationPathname } = props || {};
                                      const { formId, version, data, submission } = form || {};
                                    
                                      const [isModalVisible, toggleModal] = useState(false);
                                    Severity: Major
                                    Found in src/platform/forms/save-in-progress/SaveInProgressDevModal.jsx - About 5 hrs to fix

                                      Function Description has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function Description(props) {
                                        const isClaimingBurialAllowance =
                                          props.formData['view:claimedBenefits'].burialAllowance;
                                        const serviceRequested =
                                          props.formData?.burialAllowanceRequested?.service === true;

                                        File helpers.js has 386 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import moment from 'moment-timezone';
                                        import cheerio from 'cheerio';
                                        import { generatePdf } from '@department-of-veterans-affairs/platform-pdf/exports';
                                        import * as Sentry from '@sentry/browser';
                                        import {
                                        Severity: Minor
                                        Found in src/applications/mhv-medications/util/helpers.js - About 5 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language