department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function IntroductionProcessListV2 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function IntroductionProcessListV2() {
  return (
    <va-process-list>
      <va-process-list-item header="Check your eligibility">
        <p>Make sure you meet our eligibility requirements before you apply.</p>

    Function debtsReducer has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const debtsReducer = (state = debtInitialState, action) => {
      switch (action.type) {
        case DEBTS_FETCH_INITIATED:
          return {
            ...state,
    Severity: Major
    Found in src/applications/combined-debt-portal/combined/reducers/index.js - About 2 hrs to fix

      Function createDirectDepositPage has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function createDirectDepositPage() {
        const bankAccountProperties = {
          type: 'object',
          properties: {
            accountType: {
      Severity: Major
      Found in src/applications/edu-benefits/1990/pages/DirectDeposit.jsx - About 2 hrs to fix

        Function createDirectDepositPageUpdate has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function createDirectDepositPageUpdate() {
          const bankAccountProperties = {
            type: 'object',
            properties: {
              accountType: {
        Severity: Major
        Found in src/applications/edu-benefits/5490/content/directDepositUpdate.jsx - About 2 hrs to fix

          Function Declined has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function Declined() {
            const shouldRedirectToMobile =
              sessionStorage.getItem(COOKIES.CI) === CLIENT_IDS.VAMOBILE;
            const dispatch = useDispatch();
            const openSignInModal = useCallback(
          Severity: Major
          Found in src/applications/terms-of-use/components/Declined.jsx - About 2 hrs to fix

            Function geocodeUserAddress has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const geocodeUserAddress = query => {
              // Prevent empty search request to Mapbox, which would result in error.
              if (!query.locationInputString) {
                return {
                  type: GEOCODE_FAILED,

              Function useTravelPayFlags has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const useTravelPayFlags = appointment => {
                const [travelPayClaimSent, setTravelPayClaimSent] = useState();
                const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
                const context = useSelector(selectCurrentContext);
                const { token } = context;
              Severity: Major
              Found in src/applications/check-in/hooks/useTravelPayFlags.jsx - About 2 hrs to fix

                Function transform5490Form has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function transform5490Form(_formConfig, form) {
                  const formFieldUserFullName = form?.data?.fullName;
                  const viewComponentUserFullName = form?.loadedData?.formData?.fullName;
                  // const formFieldDateOfBirth = form?.data?.dateOfBirth;
                  // const viewComponentDateOfBirth = form?.loadedData?.formData.dateOfBirth;

                  Function DebtError has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function OrientationWizardContainer has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const OrientationWizardContainer = props => {
                      const [showOrientation, setShowOrientation] = useState(false);
                      const { wizardStateHandler } = props;
                      // pass this down to wizard children so showOrientation can be updated once
                      // a user makes it through a valid wizard flow

                      Function dismissNotificationById has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const dismissNotificationById = id => async dispatch => {
                        const dismissNotification = () => {
                          const options = {
                            method: 'PATCH',
                            credentials: 'include',
                      Severity: Major
                      Found in src/applications/personalization/common/actions/notifications.js - About 2 hrs to fix

                        Function renderResultsInformation has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          renderResultsInformation() {
                            const {
                              currentPage,
                              perPage,
                              totalPages,
                        Severity: Major
                        Found in src/applications/search/containers/SearchApp.jsx - About 2 hrs to fix

                          File DashboardCardsMock.jsx has 266 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import {
                            VaPagination,
                            VaSelect,
                          } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                          import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
                          Severity: Minor
                          Found in src/applications/ask-va/containers/DashboardCardsMock.jsx - About 2 hrs to fix

                            File CreditCardBill.jsx has 266 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

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

                              Function getBoardExplanation has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const getBoardExplanation = formResponses => {
                                const reason = formResponses[SHORT_NAME_MAP.REASON];
                                const noPrevApp =
                                  formResponses[SHORT_NAME_MAP.PREV_APPLICATION] === RESPONSES.NO;
                                const prevAppType = formResponses[SHORT_NAME_MAP.PREV_APPLICATION_TYPE];
                              Severity: Major
                              Found in src/applications/discharge-wizard/helpers/index.jsx - About 2 hrs to fix

                                Function BenefitSelectionWarning has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function BenefitSelectionWarning(chapter, relationship) {
                                  let warningText = '';
                                  if (chapter === 'chapter33') {
                                    // Fry
                                    if (relationship === 'child') {

                                  Function CustomAttestation has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function CustomAttestation(signatureProps) {
                                    const { formData } = signatureProps;
                                    const isBeneficiary = get('certifierRole', formData) === 'applicant';
                                  
                                    const pp = (

                                    Function IsUserLoggedIn has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const IsUserLoggedIn = () => {
                                      const user = useSelector(selectUser);
                                      const isUserLOA1 = useSelector(isLOA1);
                                      const response = useSelector(state => state.personalInfo);
                                      const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
                                    Severity: Major
                                    Found in src/applications/verify-your-enrollment/routes.jsx - About 2 hrs to fix

                                      File TermsOfUse.jsx has 265 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import React, { useState, useEffect } from 'react';
                                      import { useSelector } from 'react-redux';
                                      import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/exports';
                                      import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                                      import {
                                      Severity: Minor
                                      Found in src/applications/terms-of-use/containers/TermsOfUse.jsx - About 2 hrs to fix

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

                                          render() {
                                            const { form } = this.props;
                                            const { submission, /* formId, */ data } = form;
                                            const submitDate = submission.timestamp;
                                            const confirmationNumber = submission.response?.confirmationNumber;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language