department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

Function TogglesTab has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const TogglesTab = () => {
  const {
    preferences,
    updateDevLoading,
    updateLocalToggles,

    Function renderYellowRibbon has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const renderYellowRibbon = () => {
        if (!displayedInputs.yellowRibbon) return null;
    
        let {
          yellowRibbonDegreeLevelOptions,
    Severity: Major
    Found in src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx - About 4 hrs to fix

      Function RecordList has 102 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const RecordList = props => {
        const { records, type, perPage = 10, hidePagination, domainOptions } = props;
        const totalEntries = records?.length;
      
        const history = useHistory();

        File TravelPayStatusApp.jsx has 335 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { useState, useEffect, useCallback, useRef } from 'react';
        import { useDispatch, useSelector } from 'react-redux';
        import {
          isProfileLoading,
          isLoggedIn,
        Severity: Minor
        Found in src/applications/travel-pay/containers/TravelPayStatusApp.jsx - About 4 hrs to fix

          Function threadDetailsReducer has 101 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const threadDetailsReducer = (state = initialState, action) => {
            switch (action.type) {
              case Actions.Thread.GET_THREAD:
                return {
                  ...initialState,
          Severity: Major
          Found in src/applications/mhv-secure-messaging/reducers/threadDetails.js - About 4 hrs to fix

            Function GettingStartedWithBenefits has 101 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const GettingStartedWithBenefits = () => {
              return (
                <div>
                  <div className="vads-u-margin-top--neg1p5 vads-u-padding-left--2p5 small-screen-font">
                    <div className="vads-u-margin-y--2p5">
            Severity: Major
            Found in src/applications/gi/components/profile/GettingStartedWithBenefits.jsx - About 4 hrs to fix

              File DeselectableObjectField.jsx has 334 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import PropTypes from 'prop-types';
              import React from 'react';
              import classNames from 'classnames';
              import groupBy from 'lodash/groupBy';
              import {

                File Modals.jsx has 334 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React, { useState } from 'react';
                import {
                  VaModal,
                  VaButton,
                } from '@department-of-veterans-affairs/web-components/react-bindings';

                  File helpers.js has 334 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import { isEmpty } from 'lodash';
                  import { createInitialState } from '@department-of-veterans-affairs/platform-forms-system/state/helpers';
                  import { format } from 'date-fns';
                  import { apiRequest } from 'platform/utilities/api';
                  import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                  Severity: Minor
                  Found in src/applications/simple-forms/21-0966/config/helpers.js - About 4 hrs to fix

                    Function arrayBuilderYesNoUI has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const arrayBuilderYesNoUI = (
                      arrayBuilderOptions,
                      yesNoOptions,
                      yesNoOptionsMore,
                    ) => {

                      Function EnrollmentStatusFAQ has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const EnrollmentStatusFAQ = () => {
                        const { statusCode } = useSelector(selectEnrollmentStatus);
                      
                        // Declare content blocks for use
                        const {

                        Function DependentSummary has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const DependentSummary = props => {
                          const {
                            data,
                            goBack,
                            goForward,
                        Severity: Major
                        Found in src/applications/hca/components/FormPages/DependentSummary.jsx - About 4 hrs to fix

                          Function FileUpload has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const FileUpload = props => {
                            const {
                              acceptFileTypes = '.pdf,.jpeg,.png,.jpg',
                              buttonText = 'Upload file',
                              error,
                          Severity: Major
                          Found in src/applications/ask-va/components/FileUpload.jsx - About 4 hrs to fix

                            Function letters has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function letters(state = initialState, action) {
                              switch (action.type) {
                                case GET_LETTERS_SUCCESS: {
                                  const letterDownloadStatus = {};
                                  action.data.letters.forEach(letter => {
                            Severity: Major
                            Found in src/applications/letters/reducers/index.js - About 4 hrs to fix

                              Function ThirdFAQSection has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const ThirdFAQSection = () => {
                                return (
                                  <>
                                    <h3 className="dhp-faq-section-header">Troubleshooting</h3>
                                    <va-accordion
                              Severity: Major
                              Found in src/applications/dhp-connected-devices/components/FAQSections.jsx - About 4 hrs to fix

                                Function SelectedAccreditedRepresentativeReview has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const SelectedAccreditedRepresentativeReview = props => {
                                  const { data, goToPath } = props;
                                  const {
                                    'view:selectedRepresentative': { attributes: selectedRep },
                                  } = data;

                                  Function ContactAccreditedRepresentative has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const ContactAccreditedRepresentative = props => {
                                    const { formData, goBack, goForward, goToPath } = props;
                                    const rep = props?.formData?.['view:selectedRepresentative'];
                                    const repAttributes = rep?.attributes;
                                    const addressData = getEntityAddressAsObject(repAttributes);

                                    File StatusDropdown.jsx has 332 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import React from 'react';
                                    import PropTypes from 'prop-types';
                                    import { dispStatusObj } from '../../util/constants';
                                    
                                    const StatusDropdown = props => {
                                    Severity: Minor
                                    Found in src/applications/mhv-medications/components/shared/StatusDropdown.jsx - About 4 hrs to fix

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

                                        render() {
                                          const { idSchema, formContext, formData, uiSchema, schema } = this.props;
                                          const id = idSchema.$id;
                                      
                                          // wrap matching text in a <span> element
                                      Severity: Major
                                      Found in src/platform/forms-system/src/js/fields/AutosuggestField.jsx - About 3 hrs to fix

                                        Function DependentSummary has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const DependentSummary = props => {
                                          const {
                                            data,
                                            goBack,
                                            goForward,
                                        Severity: Major
                                        Found in src/applications/ezr/components/FormPages/DependentSummary.jsx - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language