department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

Function VitalDetails has 354 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VitalDetails = props => {
  const { runningUnitTest } = props;
  const records = useSelector(state => state.mr.vitals.vitalDetails);
  const vitalsList = useSelector(state => state.mr.vitals.vitalsList);
  const user = useSelector(state => state.user.profile);
Severity: Major
Found in src/applications/mhv-medical-records/containers/VitalDetails.jsx - About 1 day to fix

    Function addressUISchema has 351 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const addressUISchema = (
      isMilitaryBaseAddress = false,
      path,
      callback,
    ) => {

      Function addressUISchema has 351 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const addressUISchema = (
        isMilitaryBaseAddress = false,
        path,
        callback,
      ) => {

        Function ReviewPage has 350 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function ReviewPage(props) {
          const state = useFormikContext();
          const location = useLocation();
        
          useLayoutEffect(() => scrollToSection(location), [location]);
        Severity: Major
        Found in src/applications/burial-poc-v6/pages/ReviewPage.jsx - About 1 day to fix

          Function getAlertContent has 349 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function getAlertContent(alert, appealIsActive) {
            const { type, details } = alert;
          
            switch (type) {
              case ALERT_TYPES.form9Needed: {
          Severity: Major
          Found in src/applications/claims-status/utils/appeals-v2-helpers.jsx - About 1 day to fix

            Function returnAddressUI has 346 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              return (function returnAddressUI() {
                return {
                  [MILITARY_BASE_PATH]: {
                    'ui:title': `${checkBoxTitleState} receive mail outside of the United States on a U.S. military base.`,
                    'ui:options': {

              Function returnAddressUI has 346 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                return (function returnAddressUI() {
                  return {
                    [MILITARY_BASE_PATH]: {
                      'ui:title': `${checkBoxTitleState} receive mail outside of the United States on a U.S. military base.`,
                      'ui:options': {

                Function CustomPage has 343 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function CustomPage(props) {
                    const {
                      index: updateItemIndex,
                      nounSingular: updatedNounSingular,
                    } = getUpdatedItemFromPath();

                  File AppointmentDetails.unit.spec.jsx has 727 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* eslint-disable camelcase */
                  import React from 'react';
                  import sinon from 'sinon';
                  import { expect } from 'chai';
                  import { render } from '@testing-library/react';

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

                    import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';
                    
                    import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                    
                    import FormFooter from '@department-of-veterans-affairs/platform-forms/FormFooter';
                    Severity: Major
                    Found in src/applications/disability-benefits/all-claims/config/form.js - About 1 day to fix

                      File index.jsx has 722 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React from 'react';
                      import moment from 'moment';
                      import * as options from 'platform/static-data/options-for-select';
                      import {
                        questionLabels,
                      Severity: Major
                      Found in src/applications/discharge-wizard/helpers/index.jsx - About 1 day to fix

                        Function SearchControls has 332 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const SearchControls = props => {
                          const {
                            currentQuery,
                            onChange,
                            onSubmit,
                        Severity: Major
                        Found in src/applications/facility-locator/components/SearchControls.jsx - About 1 day to fix

                          File selectors.js has 708 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import { createSelector } from 'reselect';
                          import { selectIsCernerOnlyPatient } from 'platform/user/cerner-dsot/selectors';
                          import moment from 'moment';
                          import { selectCernerFacilityIds } from 'platform/site-wide/drupal-static-data/source-files/vamc-ehr/selectors';
                          import { lowerCase } from 'lodash';
                          Severity: Major
                          Found in src/applications/vaos/appointment-list/redux/selectors.js - About 1 day to fix

                            Function StatusDropdown has 323 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const StatusDropdown = props => {
                              const { status } = props;
                            
                              const content = () => {
                                switch (status) {
                            Severity: Major
                            Found in src/applications/mhv-medications/components/shared/StatusDropdown.jsx - About 1 day to fix

                              File polyfill-timezone-data.js has 704 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /**
                               * Everything in here is copied from @formatjs/intl-datetimeformat (add-all-tz
                               * and locale-data/en) and pared down as small as possible (in theory).
                               */
                              
                              
                              Severity: Major
                              Found in src/platform/polyfills/polyfill-timezone-data.js - About 1 day to fix

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

                                import React from 'react';
                                import * as Sentry from '@sentry/browser';
                                
                                import { recordEvent } from '@department-of-veterans-affairs/platform-monitoring/exports';
                                import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/exports';
                                Severity: Major
                                Found in src/applications/claims-status/actions/index.js - About 1 day to fix

                                  File selfEnteredData.js has 702 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import { format } from 'date-fns';
                                  import { Actions } from '../util/actionTypes';
                                  import * as Const from '../util/seiConstants';
                                  
                                  const initialState = {
                                  Severity: Major
                                  Found in src/applications/mhv-medical-records/reducers/selfEnteredData.js - About 1 day to fix

                                    File VideoLayout.unit.spec.js has 699 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import React from 'react';
                                    import { expect } from 'chai';
                                    import {
                                      createTestStore,
                                      renderWithStoreAndRouter,
                                    Severity: Major
                                    Found in src/applications/vaos/components/layout/VideoLayout.unit.spec.js - About 1 day to fix

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

                                        const content = () => {
                                          switch (status) {
                                            case dispStatusObj.active: {
                                              const dropdownContent = () => {
                                                return (
                                      Severity: Major
                                      Found in src/applications/mhv-medications/components/shared/StatusDropdown.jsx - About 1 day to fix

                                        Function SearchForm has 317 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const SearchForm = props => {
                                          const { folder, keyword, resultsCount, query, threadCount } = props;
                                          const mhvSecureMessagingFilterAccordion = useSelector(
                                            state =>
                                              state.featureToggles[
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language