department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function EmploymentWorkDates has 189 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const EmploymentWorkDates = props => {
  const { goToPath, setFormData, data } = props;

  const RETURN_PATH = '/enhanced-employment-records';

    Function PayrollDeductionInputList has 188 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const PayrollDeductionInputList = props => {
      const { goToPath, goBack, setFormData } = props;
    
      const editIndex = getJobIndex();
    
    

      File SaveInProgressIntro.jsx has 479 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      import { connect } from 'react-redux';
      import { Link } from 'react-router';
      import PropTypes from 'prop-types';
      import { fromUnixTime, isBefore } from 'date-fns';
      Severity: Minor
      Found in src/platform/forms/save-in-progress/SaveInProgressIntro.jsx - About 7 hrs to fix

        Function template has 187 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const template = (props, title, content, submissionMessage, messageType) => {
          const { fullName, disabilities, submittedAt, isSubmittingBDD } = props;
          const { first, last, middle, suffix } = fullName;
          // This is easier than passing down props and checking if the form type
          const pageTitle = document.title.includes('Benefits')

          Function ConfirmationPageView has 187 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const ConfirmationPageView = props => {
            const alertRef = useRef(null);
            const {
              confirmationNumber,
              formConfig,

            Function uiSchema has 187 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function uiSchema(
              label = 'Address',
              useStreet3 = false,
              isRequired = null,
              ignoreRequired = false,
            Severity: Major
            Found in src/applications/pre-need-integration/definitions/address.js - About 7 hrs to fix

              File FileField.jsx has 475 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // This Component is a close duplicate of the FileField provided by Platform.
              /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
              import PropTypes from 'prop-types';
              import React from 'react';
              import { connect } from 'react-redux';
              Severity: Minor
              Found in src/applications/lgy/coe/form/config/chapters/documents/FileField.jsx - About 7 hrs to fix

                Function PrintDownload has 185 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const PrintDownload = props => {
                  const { onDownload, isSuccess, list, onPrint, onText } = props;
                  const [isError, setIsError] = useState(false);
                
                  const [menuOpen, setMenuOpen] = useState(false);
                Severity: Major
                Found in src/applications/mhv-medications/components/shared/PrintDownload.jsx - About 7 hrs to fix

                  Function buildVAPrescriptionPDFList has 184 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    File healthInsuranceInformation.js has 473 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import React from 'react';
                    import {
                      titleUI,
                      titleSchema,
                      textUI,

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

                      import moment from 'moment-timezone';
                      import { expect } from 'chai';
                      import {
                        addUniqueEventsToList,
                        deriveDefaultSelectedOption,
                      Severity: Minor
                      Found in src/applications/static-pages/events/helpers/index.unit.spec.js - About 7 hrs to fix

                        File address-schema.js has 473 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * The intent for this module is to provide a flexible, reusable address schema and widget that can be used in any form throughout VA.gov.
                         * The address uiSchema should be flexible enough to handle these cases:
                         * 1. Top level address property (schema.properties.address)
                         * 2. Nested address property (schema.properties.someProperty.properties.address)

                          Function uiSchema has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function uiSchema() {
                            const topicChangeSelector = createSelector(
                              ({ formData }) => get(['topic'].concat('levelOne'), formData),
                              ({ formData }) => get(['topic'].concat('levelTwo'), formData),
                              ({ topicSchema }) => topicSchema,
                          Severity: Major
                          Found in src/applications/ask-a-question/form/inquiry/topic/topic.js - About 7 hrs to fix

                            File inboxMessages.js has 470 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            const { sub, formatISO } = require('date-fns');
                            
                            const inboxMessages = {
                              data: [
                                {
                            Severity: Minor
                            Found in src/platform/mhv/api/mocks/secure-messaging/messages/inboxMessages.js - About 7 hrs to fix

                              File address-schema.js has 470 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /**
                               * The intent for this module is to provide a flexible, reusable address schema and widget that can be used in any form throughout VA.gov.
                               * The address uiSchema should be flexible enough to handle these cases:
                               * 1. Top level address property (schema.properties.address)
                               * 2. Nested address property (schema.properties.someProperty.properties.address)

                                Function ConfirmationPage has 182 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const ConfirmationPage = props => {
                                  useLayoutEffect(() => {
                                    focusElement('h2', null, 'va-alert');
                                    scrollToTop('topScrollElement');
                                  }, []);
                                Severity: Major
                                Found in src/applications/simple-forms/21-0966/containers/ConfirmationPage.jsx - About 7 hrs to fix

                                  File actions.js has 470 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import {
                                    selectVAPResidentialAddress,
                                    selectVAPEmailAddress,
                                    selectVAPHomePhoneString,
                                    selectVAPMobilePhoneString,
                                  Severity: Minor
                                  Found in src/applications/vaos/covid-19-vaccine/redux/actions.js - About 7 hrs to fix

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

                                      render() {
                                        const { route, userIdVerified, userLoggedIn } = this.props;
                                        const { formConfig, pageList } = route;
                                    
                                        return (
                                    Severity: Major
                                    Found in src/applications/simple-forms/21-0966/containers/IntroductionPage.jsx - About 7 hrs to fix

                                      Function PrimaryAddressWithAutofill has 181 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const PrimaryAddressWithAutofill = props => {
                                        const {
                                          errorSchema,
                                          formContext,
                                          formData,

                                        File V3BasePage.jsx has 467 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        /**
                                         * This page is for testing the compatibility of running v3 components without Formation styling.
                                         */
                                        
                                        import React, { useState } from 'react';
                                        Severity: Minor
                                        Found in src/applications/ds-v3-playground/pages/V3BasePage.jsx - About 7 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language