department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function renderWhyMightIHaveThisDebt has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const renderWhyMightIHaveThisDebt = deductionCode => {
  switch (deductionCode) {
    case '30':
      return (
        <section>

    Function renderLocationInputField has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const renderLocationInputField = () => {
        const {
          locationChanged,
          searchString,
          geolocationInProgress,
    Severity: Major
    Found in src/applications/facility-locator/components/SearchControls.jsx - About 2 hrs to fix

      File EvidenceVaRecords.jsx has 285 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React, { useState, useEffect } from 'react';
      import { VaTextInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
      
      import { EVIDENCE_VA_PATH } from '../constants';
      import { content } from '../content/evidenceVaRecords';
      Severity: Minor
      Found in src/applications/appeals/995/components/EvidenceVaRecords.jsx - About 2 hrs to fix

        Function BuildPage has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const BuildPage = props => {
          const { title, field, id, goToPath, subTitle } = props;
        
          const headerRef = useRef(null);
        
        

          File form.js has 285 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import {
            CategoryEducation,
            CHAPTER_1,
            CHAPTER_2,
            CHAPTER_3,
          Severity: Minor
          Found in src/applications/ask-va/config/form.js - About 2 hrs to fix

            Function selectConfirmedAppointmentData has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function selectConfirmedAppointmentData(state, appointment) {
              const comment = selectComment(appointment);
              const isCommunityCare = appointment?.vaos?.isCommunityCare;
              const appointmentTypePrefix = isCommunityCare ? 'cc' : 'va';
            
            
            Severity: Major
            Found in src/applications/vaos/appointment-list/redux/selectors.js - About 2 hrs to fix

              Function CCRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function CCRequest() {
                const pageTitle = useSelector(state => getPageTitle(state, pageKey));
              
                const { data, pageChangeInProgress } = useSelector(
                  state => getFormPageInfo(state, pageKey),

                File CalendarWidget.jsx has 285 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Shared calendar widget component used by the VAOS application.
                 * @module components/calendar
                 */
                import React, { useState } from 'react';
                Severity: Minor
                Found in src/applications/vaos/components/calendar/CalendarWidget.jsx - About 2 hrs to fix

                  Function claimDetailReducer has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function claimDetailReducer(state = initialState, action) {
                    switch (action.type) {
                      case RESET_UPLOADS: {
                        return initialState;
                      }
                  Severity: Major
                  Found in src/applications/claims-status/reducers/uploads.js - About 2 hrs to fix

                    Function FirstFAQSection has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const FirstFAQSection = () => {
                      return (
                        <>
                          <h3 className="dhp-faq-section-header">DHP Fitbit Pilot</h3>
                          <va-accordion
                    Severity: Major
                    Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 2 hrs to fix

                      File address.js has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import { createSelector } from 'reselect';
                      import set from '../../utilities/data/set';
                      import get from '../../utilities/data/get';
                      import unset from '../../utilities/data/unset';
                      import { validateWhiteSpace } from '../validations';
                      Severity: Minor
                      Found in src/platform/forms/definitions/address.js - About 2 hrs to fix

                        File ContestableIssuesWidget.jsx has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import React, { useEffect, useState } from 'react';
                        import PropTypes from 'prop-types';
                        import { connect } from 'react-redux';
                        import { Link } from 'react-router';
                        import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';

                          File EditContactList.jsx has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React, { useCallback, useEffect, useMemo, useState } from 'react';
                          import { useDispatch, useSelector } from 'react-redux';
                          import { getVamcSystemNameFromVhaId } from 'platform/site-wide/drupal-static-data/source-files/vamc-ehr/utils';
                          import { selectEhrDataByVhaId } from 'platform/site-wide/drupal-static-data/source-files/vamc-ehr/selectors';
                          import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
                          Severity: Minor
                          Found in src/applications/mhv-secure-messaging/containers/EditContactList.jsx - About 2 hrs to fix

                            File YourClaimsPageV2.jsx has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import React from 'react';
                            import { connect } from 'react-redux';
                            import { VaPagination } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                            import PropTypes from 'prop-types';
                            
                            
                            Severity: Minor
                            Found in src/applications/claims-status/containers/YourClaimsPageV2.jsx - About 2 hrs to fix

                              File ChangeOfAddressForm.jsx has 284 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import React, { useEffect, useState } from 'react';
                              import PropTypes from 'prop-types';
                              import ADDRESS_DATA from 'platform/forms/address/data';
                              import { validateAsciiCharacters } from 'platform/user/profile/vap-svc/util';
                              import SchemaForm from '@department-of-veterans-affairs/platform-forms-system/SchemaForm';

                                Function onAddFile has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const onAddFile = async (event, index = null, password) => {
                                    if (event.target?.files?.length) {
                                      const currentFile = event.target.files[0];
                                      const allFiles = props.formData || [];
                                      const addUiOptions = props.uiSchema['ui:options'];
                                Severity: Major
                                Found in src/platform/forms-system/src/js/fields/FileField.jsx - About 2 hrs to fix

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

                                    render() {
                                      const { id, disabled, options = {} } = this.props;
                                      const { month, day, year } = this.state.value;
                                      let daysForSelectedMonth;
                                  
                                  
                                  Severity: Major
                                  Found in src/platform/forms-system/src/js/widgets/DateWidget.jsx - About 2 hrs to fix

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

                                      render() {
                                        return (
                                          <div className="schemaform-intro">
                                            <FormTitle title="Mock SIP Form" />
                                            <p>Equal to VA Form XX-123 (Mock SIP Form).</p>
                                    Severity: Major
                                    Found in src/applications/mock-sip-form/containers/IntroductionPage.jsx - About 2 hrs to fix

                                      Function PlotAllowance has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function PlotAllowance(props) {
                                        const formikContext = useFormikContext();
                                      
                                        return (
                                          <div className="vads-u-margin-x--1p5">
                                      Severity: Major
                                      Found in src/applications/burial-poc-v6/pages/PlotAllowance.jsx - About 2 hrs to fix

                                        Function sponsorInfo has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function sponsorInfo(schema) {
                                          const { fields, required } = {
                                            ...defaults(),
                                          };
                                          const possibleProperties = {
                                        Severity: Major
                                        Found in src/applications/edu-benefits/1995/pages/sponsorInfomartion.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language