department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

  render() {
    const { form } = this.props;
    const { name } = form.data.application.claimant;
    const submittedAt = moment(form.submission.submittedAt);

Severity: Major
Found in src/applications/pre-need-integration/containers/ConfirmationPage.jsx - About 3 hrs to fix

    File form.js has 328 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // this form does NOT use JSON schema for its data model
    import environment from '@department-of-veterans-affairs/platform-utilities/environment';
    import footerContent from 'platform/forms/components/FormFooter';
    
    import manifest from '../manifest.json';
    Severity: Minor
    Found in src/applications/simple-forms/21-0845/config/form.js - About 3 hrs to fix

      File LocationSearchForm.jsx has 328 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable react-hooks/exhaustive-deps */
      /* eslint-disable react/jsx-no-bind */
      /* eslint-disable react/jsx-wrap-multilines */
      /* eslint-disable react/prop-types */
      import React, { useEffect, useState, createRef } from 'react';
      Severity: Minor
      Found in src/applications/gi/containers/search/LocationSearchForm.jsx - About 3 hrs to fix

        Function UnderReview has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function UnderReview(response, name) {
          return (
            <>
              <div>
                <va-alert
        Severity: Major
        Found in src/applications/fry-dea/components/ConfirmationResponses.jsx - About 3 hrs to fix

          Function createAppointments has 96 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const createAppointments = (
            token = defaultUUID,
            demographicsNeedsUpdate = false,
            demographicsConfirmedAt = null,
            nextOfKinNeedsUpdate = false,
          Severity: Major
          Found in src/applications/check-in/api/local-mock-api/mocks/v2/shared/get.js - About 3 hrs to fix

            Function StepComponent has 96 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const StepComponent = props => {
              const { step, clickHandler } = props;
              const data = orientationSteps[step];
              let content;
            
            
            Severity: Major
            Found in src/applications/vre/28-1900/orientation/StepComponent.jsx - About 3 hrs to fix

              Function adaptPayload has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const adaptPayload = formData => {
                const payload = {};
                const {
                  fullName: { firstName: first, lastName: last },
                  date,

                Function PathologyDetails has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const PathologyDetails = props => {
                  const { record, fullState, runningUnitTest } = props;
                  const user = useSelector(state => state.user.profile);
                  const allowTxtDownloads = useSelector(
                    state =>

                  Function NonVaPrescription has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const NonVaPrescription = prescription => {
                    const content = () => {
                      const status = prescription?.dispStatus?.toString();
                      return (
                        <div className="medication-details-div vads-u-border-top--1px vads-u-border-color--gray-lighter vads-u-margin-top--3 medium-screen:vads-u-margin-top--4 vads-u-margin-bottom--3">

                    File ChangeOfAddressWrapper.jsx has 326 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import React, { useState, useEffect, useCallback } from 'react';
                    import PropTypes from 'prop-types';
                    import '../sass/change-of-address-wrapper.scss';
                    import { useDispatch, useSelector } from 'react-redux';
                    import { useLocation } from 'react-router-dom';

                      Function ReviewPage has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const ReviewPage = props => {
                        const [privacyCheckbox, setPrivacyCheckbox] = useState(false);
                        const [submitted, setSubmitted] = useState(false);
                      
                        const { chapterTitles, getChapterPagesFromChapterIndex } = setupPages();
                      Severity: Major
                      Found in src/applications/appeals/testing/nod-new/components/ReviewPage2.jsx - About 3 hrs to fix

                        Function BurialIntroduction has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function BurialIntroduction(props) {
                          return (
                            <>
                              <Page {...props}>
                                <div className="schemaform-intro">
                        Severity: Major
                        Found in src/applications/burial-poc-v6/pages/BurialIntroduction.jsx - About 3 hrs to fix

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

                            render() {
                              const { submission, data } = this.props.form;
                              const { response } = submission;
                              const name = data.claimantFullName;
                          
                          
                          Severity: Major
                          Found in src/applications/edu-benefits/0993/containers/ConfirmationPage.jsx - About 3 hrs to fix

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

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

                              Function prefillTransformer has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function prefillTransformer(pages, formData, metadata, state) {
                                const bankInformation = state.data?.bankInformation || {};
                                const claimant = state.data?.formData?.data?.attributes?.claimant || {};
                                const contactInfo = claimant?.contactInfo || {};
                                const stateUser = state.user;

                                Function HomeAcreageValueInput has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const HomeAcreageValueInput = props => {
                                  const {
                                    goBack,
                                    goForward,
                                    onReviewPage = false,
                                Severity: Major
                                Found in src/applications/pensions/components/HomeAcreageValueInput.jsx - About 3 hrs to fix

                                  File SearchBenefits.jsx has 325 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import React, { useState } from 'react';
                                  import { useFeatureToggle } from 'platform/utilities/feature-toggles';
                                  import EbenefitsLink from 'platform/site-wide/ebenefits/containers/EbenefitsLink';
                                  import recordEvent from 'platform/monitoring/record-event';
                                  import PropTypes from 'prop-types';
                                  Severity: Minor
                                  Found in src/applications/gi/components/SearchBenefits.jsx - About 3 hrs to fix

                                    Function default has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function(state = INITIAL_STATE, action) {
                                      switch (action.type) {
                                        case ADD_COMPARE_INSTITUTION:
                                          if (state.selected.length < 3) {
                                            return {
                                    Severity: Major
                                    Found in src/applications/gi/reducers/compare.js - About 3 hrs to fix

                                      Function CopyAddressModal has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const CopyAddressModal = props => {
                                        const {
                                          mailingAddress = null,
                                          homeAddress,
                                          transaction,

                                        File constants.js has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import constants from 'vets-json-schema/dist/constants.json';
                                        import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';
                                        
                                        const { pciuStates: PCIU_STATES } = constants;
                                        
                                        
                                        Severity: Minor
                                        Found in src/applications/disability-benefits/all-claims/constants.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language