department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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 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 alertsBuildShow has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function alertsBuildShow() {
        // This controls the text expanders.
        function expanderFire() {
          // Toggle aria-expanded for the button
          const ariaExpanded =
      Severity: Major
      Found in src/applications/static-pages/widget-creators/alerts-dismiss-view.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 WizardContainer has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            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 LessThanFive has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

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

                export const getAllExpenses = formData => {
                  const {
                    expenses: {
                      creditCardBills = [],
                      expenseRecords = [],
                Severity: Major
                Found in src/applications/financial-status-report/utils/calculateExpenses.js - About 2 hrs to fix

                  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 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 utilities.js has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /* eslint-disable camelcase */
                          import environment from 'platform/utilities/environment';
                          import recordEvent from 'platform/monitoring/record-event';
                          import { teardownProfileSession } from 'platform/user/profile/utilities';
                          import { updateLoggedInStatus } from 'platform/user/authentication/actions';
                          Severity: Minor
                          Found in src/platform/utilities/oauth/utilities.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

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

                                import React from 'react';
                                
                                import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
                                
                                import DownloadPDF from '../components/DownloadPDF';

                                  File careSummariesAndNotes.js has 262 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,

                                    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

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

                                        export function NotEligible(name) {
                                          return (
                                            <>
                                              <div>
                                                <va-alert
                                        Severity: Major
                                        Found in src/applications/fry-dea/components/ConfirmationResponses.jsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language