department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

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

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

          export default function transformForSubmit(formConfig, form) {
            const transformedData = JSON.parse(
              formsSystemTransformForSubmit(formConfig, form),
            );
          
          
          Severity: Major
          Found in src/applications/ivc-champva/10-7959f-1/config/submitTransformer.js - About 2 hrs to fix

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

              render() {
                if (this.state.loading) {
                  return <va-loading-indicator message="Loading facilities..." />;
                }
            
            
            Severity: Major
            Found in src/applications/static-pages/facilities/OtherFacilityListWidget.jsx - About 2 hrs to fix

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

              const TravelEligibilityAdditionalInfo = () => {
                const boldComponent = [
                  <span key="bold" className="vads-u-font-weight--bold" />,
                ];
                return (

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

                  const renderLocationInputField = () => {
                    return (
                      <div>
                        <div id="location-input-field">
                          <label
                Severity: Major
                Found in src/applications/ask-va/components/search/SearchControls.jsx - About 2 hrs to fix

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

                  const Waivers = () => {
                    useEffect(() => {
                      recordEvent({
                        event: 'howToWizard-alert-displayed',
                        'reason-for-alert':
                  Severity: Major
                  Found in src/applications/financial-status-report/wizard/pages/Waivers.jsx - About 2 hrs to fix

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

                    export function getPastAppointmentDateRangeOptions(today = moment()) {
                      const startOfToday = today.clone().startOf('day');
                    
                      // Past 3 months
                      const options = [

                      Function POST /vaos/v2/appointments has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        'POST /vaos/v2/appointments': (req, res) => {
                          const {
                            practitioners = [{ identifier: [{ system: null, value: null }] }],
                          } = req.body;
                          const selectedClinic = clinicsV2.data.filter(
                      Severity: Major
                      Found in src/applications/vaos/services/mocks/index.js - About 2 hrs to fix

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

                        export const AccountUpdateView = props => {
                          // all props used come from the result of the useDirectDeposit hook
                          const {
                            formData,
                            formSubmit,

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

                          function SearchReducer(state = initialState, action) {
                            switch (action.type) {
                              case FETCH_SEARCH_RESULTS: {
                                return {
                                  ...state,
                          Severity: Major
                          Found in src/applications/search/reducers/index.js - About 2 hrs to fix

                            File royaltiesAndOtherPropertyPages.js has 258 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import React from 'react';
                            import merge from 'lodash/merge';
                            import {
                              arrayBuilderItemFirstPageTitleUI,
                              arrayBuilderItemSubsequentPageTitleUI,

                              File MoveMessageToFolderBtn.jsx has 258 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import React, { useState, useEffect } from 'react';
                              import PropTypes from 'prop-types';
                              import {
                                VaModal,
                                VaRadio,

                                File AdditionalInstructions.jsx has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import React from 'react';
                                import PropTypes from 'prop-types';
                                import { board } from '../../helpers';
                                
                                const AdditionalInstructions = ({ formValues }) => {

                                  File MilitaryInformation.jsx has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React, { useEffect } from 'react';
                                  import PropTypes from 'prop-types';
                                  import { some } from 'lodash';
                                  import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
                                  import { connect } from 'react-redux';

                                    SearchDropdownComponent has 21 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class SearchDropdownComponent extends React.Component {
                                      static propTypes = {
                                        /**
                                         * A boolean value for whether the submit button should be rendered or not.
                                         * */

                                      SearchDropdownComponent has 21 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class SearchDropdownComponent extends React.Component {
                                        static propTypes = {
                                          /**
                                           * A boolean value for whether the submit button should be rendered or not.
                                           * */
                                      Severity: Minor
                                      Found in src/platform/site-wide/user-nav/components/SearchDropdownComponent.js - About 2 hrs to fix

                                        CallToActionWidget has 21 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        export class CallToActionWidget extends Component {
                                          static propTypes = {
                                            // Directly passed in props.
                                            appId: PropTypes.string,
                                            children: PropTypes.node,
                                        Severity: Minor
                                        Found in src/applications/static-pages/cta-widget/index.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language