department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function onSubmitHandler has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const onSubmitHandler = event => {
    event.preventDefault();

    let filterList;

Severity: Major
Found in src/applications/static-pages/events/components/Search/index.js - About 2 hrs to fix

    Function VetCenterInfoSection has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function VetCenterInfoSection(props) {
      const attrs = {
        opStatus: props.vetCenter.fieldOperatingStatusFacility,
        opStatusExtra: props.vetCenter.fieldOperatingStatusMoreInfo,
      };

      Function HouseholdFinancialOnboarding has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const HouseholdFinancialOnboarding = props => {
        const {
          goBack,
          goForward,
          contentBeforeButtons,
      Severity: Major
      Found in src/applications/hca/components/FormPages/FinancialOnboarding.jsx - About 2 hrs to fix

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

          render() {
            const { itf, title } = this.props;
        
            if (this.shouldBlockITF(this.props.location.pathname)) {
              return this.props.children;

          Function WizardContainer has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const WizardContainer = () => {
            useEffect(() => {
              focusElement('va-breadcrumbs');
              scrollToTop();
            });

            Function LessThanFive has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const LessThanFive = () => {
              useEffect(() => {
                recordEvent({
                  event: 'howToWizard-alert-displayed',
                  'reason-for-alert':

              Function renderLetterHistory has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const renderLetterHistory = diaryCode => {
                switch (diaryCode) {
                  case '100':
                  case '101':
                  case '102':

                Function handleFiles has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const handleFiles = event => {
                    const currentTotalSize = attachments.reduce((currentSize, item) => {
                      return currentSize + item.size;
                    }, 0);
                    const selectedFile = event.target.files[0];

                  Function fetchPendingAppointments has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function fetchPendingAppointments() {
                    return async (dispatch, getState) => {
                      try {
                        dispatch({
                          type: FETCH_PENDING_APPOINTMENTS,
                  Severity: Major
                  Found in src/applications/vaos/appointment-list/redux/actions.js - About 2 hrs to fix

                    Function SchoolAndEmployers has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const SchoolAndEmployers = () => {
                      const [currentTab, setCurrentTab] = useState(0);
                      const tabPanelClassList =
                        'vads-u-border-bottom--1px vads-u-border-left--1px vads-u-border-right--1px vads-u-border-color--primary medium-screen:vads-u-padding--4 mobile:vads-u-padding--2';
                      const baseTabClassList =
                    Severity: Major
                    Found in src/applications/gi/updated-gi/containers/SchoolsAndEmployers.jsx - About 2 hrs to fix

                      Function convertHtmlForDownload has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const convertHtmlForDownload = (html, option) => {
                        const $ = cheerio.load(html);
                        const contentElements = [
                          'address',
                          'blockquote',
                      Severity: Major
                      Found in src/applications/mhv-medications/util/helpers.js - About 2 hrs to fix

                        File BlockedTriageGroupAlert.jsx has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import React, { useEffect, useState } from 'react';
                        import PropTypes from 'prop-types';
                        import { useSelector } from 'react-redux';
                        import { getVamcSystemNameFromVhaId } from 'platform/site-wide/drupal-static-data/source-files/vamc-ehr/utils';
                        import { datadogRum } from '@datadog/browser-rum';

                          File DocumentRequestPage.jsx has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React from 'react';
                          import { merge } from 'lodash';
                          import { connect } from 'react-redux';
                          import PropTypes from 'prop-types';
                          import { Toggler } from '~/platform/utilities/feature-toggles';
                          Severity: Minor
                          Found in src/applications/claims-status/containers/DocumentRequestPage.jsx - About 2 hrs to fix

                            File careSummariesAndNotes.js has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import { formatDateLong } from '@department-of-veterans-affairs/platform-utilities/exports';
                            import { Actions } from '../util/actionTypes';
                            import {
                              EMPTY_FIELD,
                              loincCodes,

                              File veteran_status.js has 262 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /**
                               * Proof of Veteran Status PDF template.
                               *
                               * NB: The order in which items are added to the document is important,
                               * and thus PDFKit requires performing operations synchronously.
                              Severity: Minor
                              Found in src/platform/pdf/templates/veteran_status.js - About 2 hrs to fix

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

                                // Node modules.
                                import React from 'react';
                                import PropTypes from 'prop-types';
                                import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
                                // Relative imports.

                                  File Batteries.jsx has 262 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import PropTypes from 'prop-types';
                                  import React, { Component } from 'react';
                                  import { connect } from 'react-redux';
                                  
                                  import classnames from 'classnames';
                                  Severity: Minor
                                  Found in src/applications/disability-benefits/2346/components/Batteries.jsx - About 2 hrs to fix

                                    Function generateResultsContent has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const generateResultsContent = async (doc, parent, data) => {
                                      const results = doc.struct('Sect', {
                                        title: 'Results',
                                      });
                                      parent.add(results);
                                    Severity: Major
                                    Found in src/platform/pdf/templates/self_entered_info.js - About 2 hrs to fix

                                      Function UNSAFE_componentWillReceiveProps has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        UNSAFE_componentWillReceiveProps(newProps) {
                                          // When a user is logged in, the profile finishes loading after the component
                                          //  has mounted, so we check here.
                                          // If we're done loading the profile, check to see if we should load or redirect
                                          if (
                                      Severity: Major
                                      Found in src/platform/forms/save-in-progress/RoutedSavableApp.jsx - About 2 hrs to fix

                                        Function createInitialState has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function createInitialState(formConfig) {
                                          let initialState = {
                                            submission: {
                                              status: false,
                                              errorMessage: false,
                                        Severity: Major
                                        Found in src/platform/forms-system/src/js/state/helpers.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language