department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,672 total issues

Function applicantInsuranceTypeSchema has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function applicantInsuranceTypeSchema(isPrimary) {
  const keyname = isPrimary
    ? 'applicantPrimaryInsuranceType'
    : 'applicantSecondaryInsuranceType';
  return {

    Function IntroductionPage has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const IntroductionPage = props => {
      const { route } = props;
      const { formConfig, pageList } = route;
    
      useEffect(

      File ChangeOfAddressForm.jsx has 260 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React, { useEffect, useState } from 'react';
      import PropTypes from 'prop-types';
      import ADDRESS_DATA from 'platform/forms/address/data';
      import { validateAsciiCharacters } from 'platform/user/profile/vap-svc/util';
      import SchemaForm from '@department-of-veterans-affairs/platform-forms-system/SchemaForm';

        Function IdentityVerificationAlert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const IdentityVerificationAlert = () => {
          const onVerifyEvent = recordEvent({ event: AUTH_EVENTS.VERIFY });
          return (
            <div className="vads-u-margin-top--6 vads-u-margin-bottom--8 vads-l-grid-container large-screen:vads-u-padding-x--0">
              <va-alert

          Function WarningExplanation has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function CantFindYourTeam has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const CantFindYourTeam = () => {
              const ssoe = useSelector(isAuthenticatedWithSSOe);
            
              const mhvSecureMessagingEditContactList = useSelector(
                state =>

              Function getListOfThreads has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              ) => async (dispatch, getState) => {
                if (!update) {
                  dispatch({ type: Actions.Thread.IS_LOADING, payload: true });
                }
                try {
              Severity: Major
              Found in src/applications/mhv-secure-messaging/actions/threads.js - About 2 hrs to fix

                Function RemoveAttachmentModal has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const RemoveAttachmentModal = props => {
                  return (
                    <VaModal
                      id={`remove-attachment-modal${
                        props.draftSequence ? `-${props.draftSequence}` : ''

                  File CautionaryInformation.jsx has 260 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import PropTypes from 'prop-types';
                  import React from 'react';
                  import CautionFlagDetails from './CautionFlagDetails';
                  import SchoolClosingDetails from './SchoolClosingDetails';
                  import LearnMoreLabel from '../LearnMoreLabel';
                  Severity: Minor
                  Found in src/applications/gi/components/profile/CautionaryInformation.jsx - About 2 hrs to fix

                    Function fetchConfirmedFutureAppointments has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function fetchConfirmedFutureAppointments() {
                      return async dispatch => {
                        dispatch({
                          type: FETCH_CONFIRMED_FUTURE_APPOINTMENTS,
                        });
                    Severity: Major
                    Found in src/applications/personalization/appointments/actions/index.js - About 2 hrs to fix

                      Function vitalReducer has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const vitalReducer = (state = initialState, action) => {
                        switch (action.type) {
                          case Actions.Vitals.GET: {
                            return {
                              ...state,
                      Severity: Major
                      Found in src/applications/mhv-medical-records/reducers/vitals.js - About 2 hrs to fix

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

                          render() {
                            const { enrollmentData } = this.props;
                            let introText;
                            let printButton;
                            if (enrollmentData.veteranIsEligible) {
                        Severity: Major
                        Found in src/applications/post-911-gib-status/containers/StatusPage.jsx - About 2 hrs to fix

                          File EnhancedSpouseEmploymentRecord.jsx has 259 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React, { useState } from 'react';
                          import { connect } from 'react-redux';
                          import PropTypes from 'prop-types';
                          import { setData } from 'platform/forms-system/src/js/actions';
                          import {

                            Function initUserMock has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function initUserMock(token, level) {
                              mock(token, {
                                path: '/v0/user',
                                verb: 'get',
                                value: {
                            Severity: Major
                            Found in src/platform/testing/e2e-puppeteer/auth.js - About 2 hrs to fix

                              Function ReviewFieldTemplate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function ReviewFieldTemplate(props) {
                                const { children, uiSchema, schema, formContext } = props;
                                const label = uiSchema['ui:title'] || props.label;
                                const description = uiSchema['ui:description'];
                                const textDescription = typeof description === 'string' ? description : null;
                              Severity: Major
                              Found in src/platform/forms-system/src/js/review/ReviewFieldTemplate.jsx - About 2 hrs to fix

                                Function checkValidSchema has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function checkValidSchema(schema, errors = [], path = ['root']) {
                                  if (typeof schema.type !== 'string') {
                                    errors.push(`Missing type in ${path.join('.')} schema.`);
                                  }
                                
                                
                                Severity: Major
                                Found in src/platform/forms-system/src/js/helpers.js - About 2 hrs to fix

                                  Function fetchPersonalInformation has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function fetchPersonalInformation(
                                    forceCacheClear = false,
                                    recordAnalyticsEvent = recordEvent,
                                  ) {
                                    return async dispatch => {
                                  Severity: Major
                                  Found in src/platform/user/profile/vap-svc/actions/personalInformation.js - About 2 hrs to fix

                                    Function fetchLocations has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const fetchLocations = async (
                                      address = null,
                                      bounds,
                                      locationType,
                                      serviceType,
                                    Severity: Major
                                    Found in src/applications/facility-locator/actions/locations/fetchLocations.js - About 2 hrs to fix

                                      Function BenefitRelinquishmentDate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const BenefitRelinquishmentDate = props => {
                                        const { formData, setFormData } = props;
                                      
                                        const aYearAgo = moment(new Date()).subtract(1, 'y');
                                        const populateDate = () => {

                                        Function createAdditionalConsiderations has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function createAdditionalConsiderations(submissionForm) {
                                          if (submissionForm?.mebExclusionPeriodEnabled) {
                                            const exclusionPeriods = submissionForm.exclusionPeriods || [];
                                            const mapping = {
                                              academyRotcScholarship: {
                                        Severity: Major
                                        Found in src/applications/my-education-benefits/utils/form-submit-transform.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language