department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,736 of 12,833 total issues

Function OperationStatus has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function OperationStatus(props) {
  const { operatingStatus, website, facilityType } = props;
  const visitText = useMemo(
    () => {
      if (facilityType === FacilityType.VA_CEMETERY) {

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

    export const IntroductionPage = props => {
      useEffect(() => {
        focusElement('h1');
        scrollTo('topContentElement');
      });
    Severity: Major
    Found in src/applications/appeals/testing/hlr/containers/IntroductionPage.jsx - About 2 hrs to fix

      Function renderMedicalRecordInfo has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const renderMedicalRecordInfo = formValues => {
        if (['1', '2', '4'].indexOf(formValues['4_reason']) > -1) {
          let requestQuestion;
          if (parseInt(formValues['2_dischargeYear'], 10) >= 1992) {
            requestQuestion = (
      Severity: Major
      Found in src/applications/discharge-wizard/components/gpSteps/StepTwo.jsx - About 2 hrs to fix

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

          render() {
            const { submission, data } = this.props.form;
            const { response } = submission;
            const name = data.applicantFullName;
        
        

          Function transform has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function transform(formConfig, form) {
            // Copy over sponsor data if the claimant is the veteran.
            const populateSponsorData = application =>
              isVeteran({ application })
                ? merge({}, application, {
          Severity: Major
          Found in src/applications/pre-need/utils/helpers.js - About 2 hrs to fix

            Function onForwardButtonClick has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                () => {
                  if (!enrollmentVerification) {
                    return;
                  }
            
            

              Function SearchResultReducer has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const SearchResultReducer = (state = INITIAL_STATE, action) => {
                switch (action.type) {
                  case FETCH_REPRESENTATIVES:
                  case SEARCH_COMPLETE:
                    return {
              Severity: Major
              Found in src/applications/representative-search/reducers/searchResult.js - About 2 hrs to fix

                Function getInitialFormValues has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const getInitialFormValues = options => {
                  const { fieldName, data, modalData } = options;
                
                  if (fieldName === FIELD_NAMES.EMAIL) {
                    return data ? { ...data } : { emailAddress: '' };

                  Function NotFound has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const NotFound = () => {
                    const content = {
                      heading: 'We couldn’t verify your identity',
                      alertText: (
                        <div>

                    Function _override has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      _override: (error, fullError) => {
                        const errorMapping = {
                          questions: {
                            chapterKey: 'bankruptcyAttestationChapter',
                            pageKey: 'bankruptcyHistory',
                    Severity: Major
                    Found in src/applications/financial-status-report/constants/reviewErrors.js - About 2 hrs to fix

                      Function saveDraftHandler has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          async (type, e) => {
                            // Prevents 'auto' from running if isModalVisible is open
                            if (type === 'auto' && isModalVisible) {
                              return;
                            }

                        Function fsrApi has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const fsrApi = (state = initialState, action) => {
                          switch (action.type) {
                            case FSR_API_ERROR:
                              return {
                                ...state,
                        Severity: Major
                        Found in src/applications/financial-status-report/reducers/index.js - About 2 hrs to fix

                          Function VideoInstructions has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function VideoInstructions() {
                            return (
                              <va-additional-info
                                trigger="How to setup your device"
                                disableBorder="true"
                          Severity: Major
                          Found in src/applications/vaos/components/VideoInstructions.jsx - About 2 hrs to fix

                            Function updateFacilitySortMethod has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function updateFacilitySortMethod(sortMethod, uiSchema) {
                              return async (dispatch, getState) => {
                                let location = null;
                                const facilities = getTypeOfCareFacilities(getState());
                                const cernerSiteIds = selectRegisteredCernerFacilityIds(getState());
                            Severity: Major
                            Found in src/applications/vaos/new-appointment/redux/actions.js - About 2 hrs to fix

                              Function requestProvidersList has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function requestProvidersList(address) {
                                return async (dispatch, getState) => {
                                  try {
                                    const featureFacilitiesServiceV2 = selectFeatureFacilitiesServiceV2(
                                      getState(),
                              Severity: Major
                              Found in src/applications/vaos/new-appointment/redux/actions.js - About 2 hrs to fix

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

                                  render() {
                                    const { claim, loading } = this.props;
                                    let content;
                                    if (loading) {
                                      content = (
                                Severity: Major
                                Found in src/applications/claims-status/containers/StemClaimStatusPage.jsx - About 2 hrs to fix

                                  Function transform has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function transform(formConfig, form) {
                                    // Copy over sponsor data if the claimant is the veteran.
                                    const populateSponsorData = application =>
                                      isVeteran({ application })
                                        ? merge({}, application, {
                                  Severity: Major
                                  Found in src/applications/pre-need-integration/utils/helpers.js - About 2 hrs to fix

                                    Function App has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function App() {
                                      const isLoading = useSelector(state => state?.user?.profile?.loading);
                                      const isLoggedIn = useSelector(state => state?.user.login.currentlyLoggedIn);
                                      const pageContent = isLoggedIn ? (
                                        <AuthenticatedPageContent />
                                    Severity: Major
                                    Found in src/applications/dhp-connected-devices/containers/App.jsx - About 2 hrs to fix

                                      File EnhancedVehicleRecord.jsx has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import React, { useState } from 'react';
                                      import PropTypes from 'prop-types';
                                      import { VaTextInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                                      import { isValidCurrency } from '../../utils/validations';
                                      import ButtonGroup from '../shared/ButtonGroup';

                                        File transformers.js has 251 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import moment from 'moment';
                                        import { isEmpty } from 'lodash';
                                        import {
                                          APPOINTMENT_TYPES,
                                          TYPE_OF_VISIT,
                                        Severity: Minor
                                        Found in src/applications/vaos/services/appointment/transformers.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language