department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function enterData has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function enterData(field) {
  switch (field.type) {
    // Select fields register as having type 'select-one'.
    case 'select-one':
      cy.wrap(field.element)
Severity: Major
Found in src/platform/testing/e2e/cypress/support/form-tester/index.js - About 2 hrs to fix

    Function eobUploadSchema has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const eobUploadSchema = isPrimary => {
      const keyName = isPrimary ? 'primaryEob' : 'secondaryEob';
      return {
        CustomPage: FileFieldWrapped,
        CustomPageReview: null,
    Severity: Major
    Found in src/applications/ivc-champva/10-7959a/chapters/claimInformation.js - About 2 hrs to fix

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

        import {
          individualsInvolved,
          individualsInvolvedFollowUp,
          incidentSupport,
          incidentDate,
        Severity: Minor
        Found in src/applications/disability-benefits/all-claims/config/781/index.js - About 2 hrs to fix

          Function FacilityList has 74 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const FacilityList = props => {
            const { facilities, onChange, query, value, error } = props;
            const reviewMode = props?.formContext?.reviewMode || false;
            const submitted = props?.formContext?.submitted || false;
          
          
          Severity: Major
          Found in src/applications/caregivers/components/FormFields/FacilityList.jsx - About 2 hrs to fix

            Function getPageFlow has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function getPageFlow(state) {
              const featureBreadcrumbUrlUpdate = selectFeatureBreadcrumbUrlUpdate(state);
            
              return {
                clinicChoice: {
            Severity: Major
            Found in src/applications/vaos/covid-19-vaccine/flow.js - About 2 hrs to fix

              Function BehalfOfSomeoneElseContent has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const BehalfOfSomeoneElseContent = () => {
                return (
                  <>
                    <p>
                      You can upload a copy of their sponsor’s DD214 or other separation

                Function pdfData has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    (rxList, allergiesList) => {
                      return {
                        subject: 'Full Medications List',
                        headerBanner: [
                          {
                Severity: Major
                Found in src/applications/mhv-medications/containers/Prescriptions.jsx - About 2 hrs to fix

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

                    const content = () => {
                      return (
                        <>
                          {allergies?.length > 0 ? (
                            <>

                    File form.js has 289 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

                      File FolderThreadListView.jsx has 289 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React, { useCallback, useEffect, useMemo } from 'react';
                      import { useSelector, useDispatch } from 'react-redux';
                      import { useLocation, useParams } from 'react-router-dom';
                      import PropTypes from 'prop-types';
                      import {

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

                        import React from 'react';
                        import { expect } from 'chai';
                        import {
                          createTestStore,
                          renderWithStoreAndRouter,
                        Severity: Minor
                        Found in src/applications/vaos/components/layouts/CCRequestLayout.unit.spec.js - About 2 hrs to fix

                          File VAFacilityPageV2.jsx has 289 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React, { useEffect } from 'react';
                          import { shallowEqual, useDispatch, useSelector } from 'react-redux';
                          import { useHistory } from 'react-router-dom';
                          import SchemaForm from 'platform/forms-system/src/js/components/SchemaForm';
                          import { usePrevious } from 'platform/utilities/react-hooks';

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

                            import React, { useEffect, useState, useRef } 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

                              Function makeMockApiRouter has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function makeMockApiRouter(opts) {
                                // mockResponses[token][verb][response]
                                const mockResponses = {};
                              
                                const router = express.Router(); // eslint-disable-line new-cap
                              Severity: Major
                              Found in src/platform/testing/e2e/mockapi.js - About 2 hrs to fix

                                Function createRichTextDetailItem has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const createRichTextDetailItem = async (doc, config, x, item) => {
                                  let titleText = item.title ?? '';
                                  const content = [];
                                
                                  if (titleText) {
                                Severity: Major
                                Found in src/platform/pdf/templates/utils.js - About 2 hrs to fix

                                  Function generateTitleSection has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const generateTitleSection = (doc, parent, data) => {
                                    const subTitleOptions = { lineGap: 6 };
                                  
                                    const titleSection = doc.struct('Sect', {
                                      title: 'Title',
                                  Severity: Major
                                  Found in src/platform/pdf/templates/blue_button_report.js - About 2 hrs to fix

                                    Function testForm has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const testForm = testConfig => {
                                      const {
                                        appName,
                                        arrayPages = [],
                                        dataPrefix,
                                    Severity: Major
                                    Found in src/platform/testing/e2e/cypress/support/form-tester/index.js - About 2 hrs to fix

                                      Function ConfirmationView has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const ConfirmationView = props => {
                                        const { formConfig, devOnly, children } = props;
                                        const { form } = useSelector(state => state);
                                        const [pdfUrl, setPdfUrl] = useState(props.pdfUrl);
                                        const [confirmationNumber, setConfirmationNumber] = useState(

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

                                          render() {
                                            const {
                                              addressFromUser,
                                              addressValidationError,
                                              confirmedSuggestions,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language