department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function SecondFAQSection has 172 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const SecondFAQSection = () => {
  return (
    <>
      <h3 className="dhp-faq-section-header">
        Connecting Your Device & Data Sharing
Severity: Major
Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 6 hrs to fix

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

      render() {
        const {
          activeEditView,
          fieldName,
          isEmpty,

      Function DebtDetails has 171 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const DebtDetails = () => {
        const { selectedDebt, debts } = useSelector(
          ({ combinedPortal }) => combinedPortal.debtLetters,
        );
        const approvedLetterCodes = ['100', '101', '102', '109', '117', '123', '130'];

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

          render() {
            const {
              activeEditView,
              fieldName,
              isEmpty,

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

            render() {
              const { supplies, order, eligibility } = this.props;
              const currentDate = moment();
              const batterySupplies = supplies.filter(
                batterySupply => batterySupply.productGroup === BATTERY,
          Severity: Major
          Found in src/applications/disability-benefits/2346/components/Batteries.jsx - About 6 hrs to fix

            Function Navigation has 171 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const Navigation = () => {
              const [isMobile, setIsMobile] = useState(true);
              const [isNavigationOpen, setIsNavigationOpen] = useState(false);
              const location = useLocation();
              const activeFolder = useSelector(folder);
            Severity: Major
            Found in src/applications/mhv-secure-messaging/components/Navigation.jsx - About 6 hrs to fix

              Function submitFiles has 171 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function submitFiles(claimId, trackedItem, files) {
                let filesComplete = 0;
                let bytesComplete = 0;
                let hasError = false;
                const totalSize = files.reduce((sum, file) => sum + file.file.size, 0);
              Severity: Major
              Found in src/applications/claims-status/actions/index.js - About 6 hrs to fix

                File Dashboard.jsx has 451 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { useEffect, useState } from 'react';
                import PropTypes from 'prop-types';
                import { connect, useDispatch, useSelector } from 'react-redux';
                import isEmpty from 'lodash/isEmpty';
                
                
                Severity: Minor
                Found in src/applications/personalization/dashboard/components/Dashboard.jsx - About 6 hrs to fix

                  Function uiSchema has 170 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function uiSchema(
                    label = 'Address',
                    useStreet3 = false,
                    isRequired = null,
                    ignoreRequired = false,
                  Severity: Major
                  Found in src/platform/forms/definitions/address.js - About 6 hrs to fix

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

                    import React from 'react';
                    import get from '@department-of-veterans-affairs/platform-forms-system/get';
                    import fullSchemaBurials from 'vets-json-schema/dist/21P-530V2-schema.json';
                    import { externalServices } from '@department-of-veterans-affairs/platform-monitoring/DowntimeNotification';
                    import FormFooter from '@department-of-veterans-affairs/platform-forms/FormFooter';
                    Severity: Minor
                    Found in src/applications/burials-ez/config/form.js - About 6 hrs to fix

                      File pdfConfigs.js has 450 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import {
                        createNoDescriptionText,
                        createOriginalFillRecord,
                        dateFormat,
                        processList,
                      Severity: Minor
                      Found in src/applications/mhv-medications/util/pdfConfigs.js - About 6 hrs to fix

                        File ReviewCollapsibleChapter.jsx has 449 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import PropTypes from 'prop-types';
                        import React from 'react';
                        import { connect } from 'react-redux';
                        import { withRouter } from 'react-router';
                        import { Element } from 'react-scroll';
                        Severity: Minor
                        Found in src/platform/forms-system/src/js/review/ReviewCollapsibleChapter.jsx - About 6 hrs to fix

                          Function useStorage has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const useStorage = (app, local = false) => {
                            const STORAGE_KEYS = useMemo(
                              () => {
                                return createStorageKeys({ app });
                              },
                          Severity: Major
                          Found in src/applications/check-in/hooks/useStorage.jsx - About 6 hrs to fix

                            Function PastAppointmentsListNew has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function PastAppointmentsListNew() {
                              const history = useHistory();
                              const dispatch = useDispatch();
                              const [isInitialMount, setInitialMount] = useState(true);
                              const dateRangeOptions = getPastAppointmentDateRangeOptions();

                              Function ConditionDetails has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const ConditionDetails = props => {
                                const { runningUnitTest } = props;
                                const record = useSelector(state => state.mr.conditions.conditionDetails);
                                const conditionList = useSelector(
                                  state => state.mr.conditions.conditionsList,
                              Severity: Major
                              Found in src/applications/mhv-medical-records/containers/ConditionDetails.jsx - About 6 hrs to fix

                                File ReviewPage.jsx has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import React, { useLayoutEffect } from 'react';
                                import { useFormikContext } from 'formik';
                                import { Link, useLocation } from 'react-router-dom';
                                import { VaOnThisPage } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                                import {
                                Severity: Minor
                                Found in src/applications/burial-poc-v6/pages/ReviewPage.jsx - About 6 hrs to fix

                                  File YourHealthInformation.jsx has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React from 'react';
                                  import PropTypes from 'prop-types';
                                  import { useSelector } from 'react-redux';
                                  
                                  import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
                                  Severity: Minor
                                  Found in src/applications/avs/components/YourHealthInformation.jsx - About 6 hrs to fix

                                    responses has 48 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    const responses = {
                                      'GET /vaos/v0/appointments': (req, res) => {
                                        if (req.query.type === 'cc') {
                                          return res.json(confirmedCC);
                                        }
                                    Severity: Minor
                                    Found in src/applications/vaos/services/mocks/index.js - About 6 hrs to fix

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

                                      import merge from 'lodash/merge';
                                      import get from 'platform/utilities/data/get';
                                      import unset from 'platform/utilities/data/unset';
                                      
                                      import fullSchema1990 from 'vets-json-schema/dist/22-1990-schema.json';
                                      Severity: Minor
                                      Found in src/applications/edu-benefits/1990/config/form.js - About 6 hrs to fix

                                        Function uiSchema has 166 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function uiSchema(
                                          label = 'Address',
                                          useStreet3 = false,
                                          isRequired = null,
                                          ignoreRequired = false,
                                        Severity: Major
                                        Found in src/platform/forms-system/src/js/definitions/address.js - About 6 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language