department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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 HealthConditions has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const HealthConditions = () => {
      const dispatch = useDispatch();
      const updatedRecordList = useSelector(
        state => state.mr.conditions.updatedList,
      );
    Severity: Major
    Found in src/applications/mhv-medical-records/containers/HealthConditions.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

        DEFAULT_ARRAY_BUILDER_TEXT has 27 functions (exceeds 20 allowed). Consider refactoring.
        Open

        export const DEFAULT_ARRAY_BUILDER_TEXT = {
          alertItemUpdated: props => {
            const itemName = props.getItemName(props.itemData);
            return itemName
              ? `${itemName}’s information has been updated`

          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 MessageActionButtons has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const MessageActionButtons = props => {
                      const {
                        threadId,
                        hideReplyButton,
                        handleReplyButton,

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

                        const moveToFolderModal = () => {
                          return (
                            <div
                              className="message-actions-buttons-modal"
                              data-testid="message-actions-buttons-modal"

                        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 content has 79 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">Allergy:</h1>
                          Severity: Major
                          Found in src/applications/mhv-medical-records/containers/AllergyDetails.jsx - About 3 hrs to fix

                            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 index.js has 298 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /**
                               * Functions related to patient specific information
                               * @module services/Patient
                               */
                              import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                              Severity: Minor
                              Found in src/applications/vaos/services/patient/index.js - About 3 hrs to fix

                                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 IntroductionPage.jsx has 297 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

                                    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

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

                                        const ErrorLinks = props => {
                                          const { appType, testId, errors } = props;
                                          const errorRef = useRef(null);
                                          const [hadErrors, setHadErrors] = useState(false);
                                        
                                        
                                        Severity: Major
                                        Found in src/platform/forms-system/src/js/review/submit-states/ErrorLinks.jsx - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language