department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function ReplyForm has 166 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ReplyForm = props => {
  const {
    cannotReply,
    drafts,
    replyMessage,

    File get.js has 443 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* istanbul ignore file */
    const dateFns = require('date-fns');
    const { utcToZonedTime, zonedTimeToUtc, format } = require('date-fns-tz');
    const {
      singleAppointment,
    Severity: Minor
    Found in src/applications/check-in/api/local-mock-api/mocks/v2/shared/get.js - About 6 hrs to fix

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

        render() {
          const { showWizard } = this.props;
      
          if (showWizard === undefined) return null;
      
      
      Severity: Major
      Found in src/applications/edu-benefits/0994/containers/IntroductionPage.jsx - About 6 hrs to fix

        Function RequestedAppointmentDetailsPage has 165 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function RequestedAppointmentDetailsPage() {
          const { id } = useParams();
          const dispatch = useDispatch();
        
          useEffect(

          Function content has 165 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const content = () => {
              if (!isLoading) {
                return (
                  <div className="landing-page no-print">
                    <h1 data-testid="list-page-title" className="vads-u-margin-bottom--2">
          Severity: Major
          Found in src/applications/mhv-medications/containers/Prescriptions.jsx - About 6 hrs to fix

            File index.jsx has 441 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React, { useMemo, useState, useLayoutEffect } from 'react';
            import { useSelector, useDispatch } from 'react-redux';
            import { useTranslation, Trans } from 'react-i18next';
            import isValid from 'date-fns/isValid';
            import PropTypes from 'prop-types';

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

              /** time to wait (in ms) after the user stops typing before initiating draft auto-save */
              export const draftAutoSaveTimeout = 10000;
              
              export const Paths = {
                MYHEALTH: '/my-health',
              Severity: Minor
              Found in src/applications/mhv-secure-messaging/util/constants.js - About 6 hrs to fix

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

                const IntroductionPage = props => {
                  useEffect(() => {
                    focusElement('h1');
                    scrollTo('topContentElement');
                  }, []);
                Severity: Major
                Found in src/applications/appeals/995/containers/IntroductionPage.jsx - About 6 hrs to fix

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

                  import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                  
                  export const envUrl = environment.API_URL;
                  
                  export const baseURL = '/ask_va_api/v0';
                  Severity: Minor
                  Found in src/applications/ask-va/constants.js - About 6 hrs to fix

                    File index.js has 439 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    // Node modules.
                    import React, { Component } from 'react';
                    import PropTypes from 'prop-types';
                    import appendQuery from 'append-query';
                    import { connect } from 'react-redux';
                    Severity: Minor
                    Found in src/applications/static-pages/cta-widget/index.js - About 6 hrs to fix

                      Function ViewAppeal has 163 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const ViewAppeal = () => {
                        useEffect(() => {
                          focusElement('h2');
                          scrollTo('topScrollElement');
                        });
                      Severity: Major
                      Found in src/applications/appeals/testing/download/containers/ViewAppeal.jsx - About 6 hrs to fix

                        Function getGroupedPreviousEnrollments has 163 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const getGroupedPreviousEnrollments = month => {
                          const { transactDate, actBegin, actEnd, id, paymentDate } = month[0];
                          const myUUID = uuidv4();
                        
                          return (
                        Severity: Major
                        Found in src/applications/verify-your-enrollment/helpers.jsx - About 6 hrs to fix

                          Function AddressValidationRadio has 163 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const AddressValidationRadio = props => {
                            const { formData, setFormData } = props;
                            const [apiData, setApiData] = useState([]);
                            const [loading, isLoading] = useState(false);
                          
                          

                            File NoFormPage.jsx has 437 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import React, { useEffect, useState } from 'react';
                            import { useSelector } from 'react-redux';
                            import { apiRequest } from 'platform/utilities/api';
                            import { formatSSN } from 'platform/utilities/ui';
                            import { isLoggedIn } from '@department-of-veterans-affairs/platform-user/selectors';
                            Severity: Minor
                            Found in src/applications/burials-ez/components/NoFormPage.jsx - About 6 hrs to fix

                              Function submitAppointmentOrRequest has 162 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function submitAppointmentOrRequest(history) {
                                return async (dispatch, getState) => {
                                  const state = getState();
                                  const featureVAOSServiceVAAppointments = selectFeatureVAOSServiceVAAppointments(
                                    state,
                              Severity: Major
                              Found in src/applications/vaos/new-appointment/redux/actions.js - About 6 hrs to fix

                                File ArrayBuilderSummaryPage.jsx has 435 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /* eslint-disable react-hooks/exhaustive-deps */
                                /* eslint-disable react/sort-prop-types */
                                import React, { useEffect, useRef, useState } from 'react';
                                import { connect } from 'react-redux';
                                import { focusElement, scrollAndFocus } from 'platform/utilities/ui';

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

                                    render() {
                                      return (
                                        <div>
                                          <p>
                                            Based on your goals and experiences, we recommend exploring the

                                    Function Error has 161 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const Error = () => {
                                      const { t } = useTranslation();
                                      const selectError = useMemo(makeSelectError, []);
                                      const { error } = useSelector(selectError);
                                    
                                    
                                    Severity: Major
                                    Found in src/applications/check-in/travel-claim/pages/error/index.jsx - About 6 hrs to fix

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

                                        render() {
                                          const { supplies, order, eligibility } = this.props;
                                          const currentDate = moment();
                                          const apneaSupplies = supplies.filter(
                                            supply => supply.productGroup === APNEA,

                                        Function NoFormPage has 160 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const NoFormPage = () => {
                                          const [data, setData] = useState({});
                                          const [loading, setLoading] = useState(true);
                                          const loggedIn = useSelector(isLoggedIn);
                                        
                                        
                                        Severity: Major
                                        Found in src/applications/burials-ez/components/NoFormPage.jsx - About 6 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language