department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

function IntroductionProcessList() {
  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 ConfirmationPage has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const ConfirmationPage = () => {
      const alertRef = useRef(null);
      const form = useSelector(state => state.form || {});
      const { submission, formId, data = {} } = form;
      const { fullName } = data;

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

                      const ChemHemResults = props => {
                        const { results } = props;
                      
                        return (
                          <ul className="result-cards">

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

                        export default function NextStepsPage() {
                          const { data: formData } = useSelector(state => state.form);
                          const selectedEntity = formData['view:selectedRepresentative'];
                          const repType = getRepType(selectedEntity);
                          const entityAttributes = selectedEntity?.attributes;
                        Severity: Major
                        Found in src/applications/representative-appoint/containers/NextStepsPage.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';

                            File CautionaryInformation.jsx has 266 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

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

                              import React, { useEffect, useRef } from 'react';
                              import PropTypes from 'prop-types';
                              import { useSelector } from 'react-redux';
                              
                              import scrollTo from '@department-of-veterans-affairs/platform-utilities/scrollTo';
                              Severity: Minor
                              Found in src/applications/appeals/10182/components/ConfirmationPageV2.jsx - About 2 hrs to fix

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

                                import React from 'react';
                                
                                import PropTypes from 'prop-types';
                                import { connect } from 'react-redux';
                                
                                
                                Severity: Minor
                                Found in src/applications/edu-benefits/10203/containers/IntroductionPage.jsx - About 2 hrs to fix

                                  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 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 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

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

                                        const IntroductionPage = props => {
                                          const { route } = props;
                                          const { formConfig, pageList } = route;
                                        
                                          return (
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language