department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

const IntroductionPage = props => {
  const { route } = props;
  const { formConfig, pageList } = route;

  useEffect(
Severity: Major
Found in src/applications/ivc-champva/10-7959C/containers/IntroductionPage.jsx - About 2 hrs to fix

    Function SearchQueryReducer has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const SearchQueryReducer = (state = INITIAL_STATE, action) => {
      switch (action.type) {
        case SEARCH_STARTED:
          return {
            ...state,
    Severity: Major
    Found in src/applications/representative-search/reducers/searchQuery.js - About 2 hrs to fix

      Function WarningHeadline has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const WarningHeadline = () => {
        const { statusCode } = useSelector(selectEnrollmentStatus);
      
        // Declare enrollment status content dictionary
        const contentDictionary = [

        Function submit has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const submit = form => {
          const currentAddress = form.data['view:currentAddress'];
          const itemQuantities = form.data?.order?.length;
          const { order, permanentAddress, temporaryAddress, vetEmail } = form.data;
          const useVeteranAddress = currentAddress === 'permanentAddress';
        Severity: Major
        Found in src/applications/disability-benefits/2346/config/form.js - About 2 hrs to fix

          Function TypeOfVisitPage has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function TypeOfVisitPage() {
            const pageTitle = useSelector(state => getPageTitle(state, pageKey));
          
            const { schema, data, pageChangeInProgress } = useSelector(
              state => getFormPageInfo(state, pageKey),
          Severity: Major
          Found in src/applications/vaos/new-appointment/components/TypeOfVisitPage.jsx - About 2 hrs to fix

            Function claimsV2Reducer has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function claimsV2Reducer(state = initialState, action) {
              switch (action.type) {
                case FETCH_CLAIMS_PENDING:
                  return set('claimsLoading', true, state);
                case FETCH_CLAIMS_SUCCESS:
            Severity: Major
            Found in src/applications/claims-status/reducers/claimsV2.js - About 2 hrs to fix

              Function content has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const content = () => {
                  if (activeAlert && activeAlert.type === ALERT_TYPE_ERROR) {
                    return (
                      <>
                        <h1 className="vads-u-margin-bottom--0p5">Vaccine:</h1>
              Severity: Major
              Found in src/applications/mhv-medical-records/containers/VaccineDetails.jsx - About 2 hrs to fix

                Function CareSummariesAndNotesListItem has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const CareSummariesAndNotesListItem = props => {
                  const { record } = props;
                  const isDischargeSummary = record.type === loincCodes.DISCHARGE_SUMMARY;
                
                  const admDate = dischargeSummarySortFields.ADMISSION_DATE;

                  Function items has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              .map((entry, i) => {
                                const { shape, color, backImprint, frontImprint } = entry;
                                const index = refillHistory.length - i - 1;
                                const phone =
                                  entry.cmopDivisionPhone || entry.dialCmopDivisionPhone;
                  Severity: Major
                  Found in src/applications/mhv-medications/util/pdfConfigs.js - About 2 hrs to fix

                    File ResponseInboxPage.jsx has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import {
                      VaAlert,
                      VaButton,
                      VaFileInputMultiple,
                      VaIcon,
                    Severity: Minor
                    Found in src/applications/ask-va/containers/ResponseInboxPage.jsx - About 2 hrs to fix

                      File SearchControls.jsx has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React from 'react';
                      import PropTypes from 'prop-types';
                      import classNames from 'classnames';
                      import {
                        VaModal,

                        File SettingsPage.jsx has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import React, { useEffect, useState } from 'react';
                        import { useDispatch, useSelector } from 'react-redux';
                        import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
                        import { updatePageTitle } from '@department-of-veterans-affairs/mhv/exports';
                        import { mhvUrl } from '~/platform/site-wide/mhv/utilities';
                        Severity: Minor
                        Found in src/applications/mhv-medical-records/containers/SettingsPage.jsx - About 2 hrs to fix

                          File DownloadRecordsPage.jsx has 277 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React, { useCallback, useEffect, useState } from 'react';
                          import { useDispatch, useSelector } from 'react-redux';
                          import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
                          import { formatDateLong } from '@department-of-veterans-affairs/platform-utilities/exports';
                          import PropTypes from 'prop-types';

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

                              render() {
                                const { formConfig, buttonOnly, devOnly } = this.props;
                                const devOnlyForceShowFormControls =
                                  environment.isLocalhost() &&
                                  !window.Cypress &&
                            Severity: Major
                            Found in src/platform/forms/save-in-progress/SaveInProgressIntro.jsx - About 2 hrs to fix

                              Function ITFBanner has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const ITFBanner = props => {
                                const [messageDismissed, setMessageDismissed] = useState(false);
                                const [reviewInitialFocus, setReviewInitialFocus] = useState(false);
                              
                                const goHome = () => {
                              Severity: Major
                              Found in src/applications/appeals/995/components/ITFBanner.jsx - About 2 hrs to fix

                                Function ITFBanner has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const ITFBanner = props => {
                                  const [messageDismissed, setMessageDismissed] = useState(false);
                                  const [reviewInitialFocus, setReviewInitialFocus] = useState(false);
                                
                                  const goHome = () => {
                                Severity: Major
                                Found in src/applications/appeals/testing/sc/components/ITFBanner.jsx - About 2 hrs to fix

                                  Function createDirectDepositPage has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function createDirectDepositPage() {
                                    const bankAccountProperties = {
                                      type: 'object',
                                      properties: {
                                        accountType: {
                                  Severity: Major
                                  Found in src/applications/edu-benefits/5490/content/directDeposit.jsx - About 2 hrs to fix

                                    Function createMockAddressValidationSuccessResponse has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const createMockAddressValidationSuccessResponse = _data => {
                                      return {
                                        data: {
                                          messages: [
                                            {

                                      Function CommunityCareProviderSelectionPage has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function CommunityCareProviderSelectionPage() {
                                        const pageTitle = useSelector(state => getPageTitle(state, pageKey));
                                      
                                        const dispatch = useDispatch();
                                        const { data, pageChangeInProgress, schema } = useSelector(

                                        Function useUnavailableItems has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const useUnavailableItems = () => {
                                            const { groups, items, channels } = getEntities(communicationPreferences);
                                        
                                            const excludedGroupIds = [
                                              // Always exclude QUICK_SUBMIT and GENERAL
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language