department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function ApplicationDownloadLink has 80 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ApplicationDownloadLink = () => {
  const [loading, isLoading] = useState(false);
  const [errors, setErrors] = useState([]);

  // define local use variables
Severity: Major
Found in src/applications/caregivers/components/ApplicationDownloadLink.jsx - About 3 hrs to fix

    Function saveDraftHandler has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        async (type, e) => {
          const {
            messageValid,
            signatureValid,
            checkboxValid,

      Function ClosestCityStatePage has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function ClosestCityStatePage() {
        const pageTitle = useSelector(state => getPageTitle(state, pageKey));
      
        const uiSchema = {
          communityCareSystemId: {

        Function parseLabsAndTests has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const parseLabsAndTests = (records, index = 1) => {
          return `
        ${index}) Lab and test results
        
        If your results are outside the reference range, this doesn't automatically mean you have a health problem. Your provider will explain what your results mean for your health.
        Severity: Major
        Found in src/applications/mhv-medical-records/util/txtHelpers/labsAndTests.js - About 3 hrs to fix

          File RoutedSavableApp.jsx has 299 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from 'react';
          import PropTypes from 'prop-types';
          import { withRouter } from 'react-router';
          import { connect } from 'react-redux';
          
          
          Severity: Minor
          Found in src/platform/forms/save-in-progress/RoutedSavableApp.jsx - About 3 hrs to fix

            File ObjectField.jsx has 299 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import PropTypes from 'prop-types';
            import React from 'react';
            import classNames from 'classnames';
            import groupBy from 'lodash/groupBy';
            import {
            Severity: Minor
            Found in src/platform/forms-system/src/js/fields/ObjectField.jsx - About 3 hrs to fix

              File index.js has 299 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // Node modules.
              import React from 'react';
              import PropTypes from 'prop-types';
              import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
              // Relative imports.

                File IntroductionPage.jsx has 299 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { useEffect } from 'react';
                import PropTypes from 'prop-types';
                
                import { focusElement } from 'platform/utilities/ui';
                import FormTitle from 'platform/forms-system/src/js/components/FormTitle';
                Severity: Minor
                Found in src/applications/pensions/components/IntroductionPage.jsx - About 3 hrs to fix

                  Function fetchInProgressForm has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function fetchInProgressForm(
                    formId,
                    migrations,
                    prefill = false,
                    prefillTransformer = null,
                  Severity: Major
                  Found in src/platform/forms/save-in-progress/actions.js - About 3 hrs to fix

                    Function DuplicateContactInfoModal has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function DuplicateContactInfoModal(props) {
                      useEffect(
                        () => {
                          const allPotentialDuplicates = props?.duplicateEmail?.concat(
                            props?.duplicatePhone,

                      Function App has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function App(props) {
                        const { location, children } = props;
                        const { chapterTitles, findPageFromPath } = setupPages(formConfig);
                        const currentPath = location.pathname;
                        const { chapterIndex } = findPageFromPath(currentPath);
                      Severity: Major
                      Found in src/applications/appeals/testing/nod-new/containers/App.jsx - About 3 hrs to fix

                        Function DuplicateContactInfoModal has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function DuplicateContactInfoModal(props) {
                          useEffect(
                            () => {
                              const allPotentialDuplicates = props?.duplicateEmail?.concat(
                                props?.duplicatePhone,
                        Severity: Major
                        Found in src/applications/toe/components/DuplicateContactInfoModal.jsx - About 3 hrs to fix

                          Function DuplicateContactInfoModal has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function DuplicateContactInfoModal(props) {
                            useEffect(
                              () => {
                                const allPotentialDuplicates = props?.duplicateEmail?.concat(
                                  props?.duplicatePhone,

                            Function ConfirmationFAQ has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const ConfirmationFAQ = () => {
                              const directoryLink = (
                                <va-link
                                  text="Go to our Caregiver Support Program Teams directory"
                                  href="https://www.caregiver.va.gov/support/New_CSC_Page.asp"

                              Function getAppointmentSlots has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function getAppointmentSlots(startDate, endDate, forceFetch = false) {
                                return async (dispatch, getState) => {
                                  const state = getState();
                                  const siteId = getSiteIdFromFacilityId(getFormData(state).vaFacility);
                                  const newAppointment = getNewAppointment(state);
                              Severity: Major
                              Found in src/applications/vaos/new-appointment/redux/actions.js - About 3 hrs to fix

                                Function SelectOrganization has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const SelectOrganization = props => {
                                  const { formData, setFormData, goBack, goForward, goToPath } = props;
                                  const [error, setError] = useState(null);
                                  const organizations =
                                    formData['view:selectedRepresentative']?.attributes?.accreditedOrganizations

                                  File contactMethod.js has 298 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React from 'react';
                                  import { createSelector } from 'reselect';
                                  
                                  import TextNotificationsDisclaimer from '../../../../components/TextNotificationsDisclaimer';
                                  import { formFields } from '../../../../constants';

                                    File results-set-1-page-1-dynamic-content.jsx has 297 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import React, { Fragment } from 'react';
                                    import { RESPONSES, SHORT_NAME_MAP } from './question-data-map';
                                    import { locationList as BurnPit211Locations } from '../containers/questions/burn-pit/BurnPit-2-1-1';
                                    import { locationList as BurnPit212Locations } from '../containers/questions/burn-pit/BurnPit-2-1-2';
                                    import { locationList as BurnPit213Locations } from '../containers/questions/burn-pit/BurnPit-2-1-3';

                                      File reducer.js has 297 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import moment from 'moment';
                                      import set from 'platform/utilities/data/set';
                                      
                                      import {
                                        FETCH_FUTURE_APPOINTMENTS,
                                      Severity: Minor
                                      Found in src/applications/vaos/appointment-list/redux/reducer.js - About 3 hrs to fix

                                        Function Column has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const Column = props => {
                                          const {
                                            mobileMediaQuery,
                                            data,
                                            keyName,
                                        Severity: Major
                                        Found in src/platform/site-wide/mega-menu/components/Column.jsx - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language