department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

File ToeApp.jsx has 288 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { isArray } from 'lodash';
import PropTypes from 'prop-types';
import { VaBreadcrumbs } from '@department-of-veterans-affairs/web-components/react-bindings';
Severity: Minor
Found in src/applications/toe/containers/ToeApp.jsx - About 2 hrs to fix

    File pdfAddress.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // pdf-address.js
    // customized version of src/platform/forms/definitions/address.js,
    // with support added for PDF-specific maxLengths [street, street2, & city].
    import { createSelector } from 'reselect';
    import {
    Severity: Minor
    Found in src/applications/simple-forms/shared/definitions/pdfAddress.js - About 2 hrs to fix

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

      import environment from '@department-of-veterans-affairs/platform-utilities/environment';
      import footerContent from 'platform/forms/components/FormFooter';
      import getHelp from '../../shared/components/GetFormHelp';
      
      import manifest from '../manifest.json';
      Severity: Minor
      Found in src/applications/simple-forms/20-10206/config/form.js - About 2 hrs to fix

        File householdIncomeChapter.js has 287 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
          benefits,
          additionalIncomeValues,
          spouseBenefits,
          spouseBenefitRecords,

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

            render() {
              const { route } = this.props;
              const { formConfig, pageList } = route;
          
              return (
          Severity: Major
          Found in src/applications/edu-benefits/10282/containers/IntroductionPage.jsx - About 2 hrs to fix

            Function expandAllEnrollments has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  const expandAllEnrollments = () => {
                    /*
                      make sure the begin date and end date are in the same month,
                      if not then expand the enrollment period for each month
                      between the begin and end dates of the enrollment

              Function DeactivatedMHVIds has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const DeactivatedMHVIds = () => {
                const content = {
                  heading: 'Your My HealtheVet account is inactive',
                  alertText: (
                    <div>

                Function DependencyVerificationModal has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const DependencyVerificationModal = props => {
                  const nodeToWatch = document.getElementsByTagName('body')[0];
                  const [otherModal, setOtherModal] = useState(null);
                
                  const openModal = () => {

                  Function Wrapper has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const Wrapper = props => {
                    const {
                      children,
                      pageTitle,
                      titleOverride,
                  Severity: Major
                  Found in src/applications/check-in/components/layout/Wrapper.jsx - About 2 hrs to fix

                    Function Appeals has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const Appeals = () => {
                      useEffect(() => {
                        recordEvent({
                          event: 'howToWizard-alert-displayed',
                          'reason-for-alert':
                    Severity: Major
                    Found in src/applications/financial-status-report/wizard/pages/Appeals.jsx - About 2 hrs to fix

                      Function inquiriesGridView has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const inquiriesGridView = category => {
                          const filteredInquiries = filterAndSortInquiries(category);
                          const indexOfLastItem = currentPage * itemsPerPage;
                          const indexOfFirstItem = indexOfLastItem - itemsPerPage;
                          const currentInquiries = filteredInquiries.slice(
                      Severity: Major
                      Found in src/applications/ask-va/containers/DashboardCards.jsx - About 2 hrs to fix

                        Function FacilityList has 72 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 renderLocationInputField has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const renderLocationInputField = () => {
                              return (
                                <div>
                                  <div id="location-input-field">
                                    <label
                          Severity: Major
                          Found in src/applications/ask-va/components/search/SearchControls.jsx - About 2 hrs to fix

                            Function transformFormToCCRequest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function transformFormToCCRequest(state) {
                              const data = getFormData(state);
                              const provider = data.communityCareProvider;
                              let preferredProviders = [];
                            
                            

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

                                render() {
                                  const crumbs = [
                                    {
                                      href: `../status`,
                                      label: 'Status details',
                              Severity: Major
                              Found in src/applications/claims-status/containers/ClaimEstimationPage.jsx - About 2 hrs to fix

                                Function renderCalendar has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const renderCalendar = () => {
                                    if (!displayedInputs.calendar) return null;
                                
                                    const dependentDropdowns = (
                                      <div>
                                Severity: Major
                                Found in src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx - About 2 hrs to fix

                                  Function LabsAndTests has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const LabsAndTests = () => {
                                    const dispatch = useDispatch();
                                    const updatedRecordList = useSelector(
                                      state => state.mr.labsAndTests.updatedList,
                                    );
                                  Severity: Major
                                  Found in src/applications/mhv-medical-records/containers/LabsAndTests.jsx - About 2 hrs to fix

                                    Function buildVAPrescriptionTXT has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const buildVAPrescriptionTXT = prescription => {
                                      const refillHistory = [...(prescription?.rxRfRecords || [])];
                                      const originalFill = createOriginalFillRecord(prescription);
                                      refillHistory.push(originalFill);
                                    
                                    
                                    Severity: Major
                                    Found in src/applications/mhv-medications/util/txtConfigs.js - About 2 hrs to fix

                                      File VAPServiceProfileField.jsx has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import React from 'react';
                                      import PropTypes from 'prop-types';
                                      import { connect } from 'react-redux';
                                      import { focusElement } from 'platform/utilities/ui';
                                      
                                      

                                        File supportingDocuments.js has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import React from 'react';
                                        import { titleUI } from 'platform/forms-system/src/js/web-component-patterns';
                                        import { useFeatureToggle } from 'platform/utilities/feature-toggles';
                                        
                                        export const childAttendsCollege = child => child.attendingCollege;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language