department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,945 of 13,747 total issues

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

  render() {
    const {
      activeEditView,
      fieldName,
      isEmpty,

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

      render() {
        const {
          activeEditView,
          fieldName,
          isEmpty,

      Function VaMedicalCenter has 171 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const VaMedicalCenter = props => {
        const {
          errorSchema,
          formContext,
          formData,
      Severity: Major
      Found in src/applications/hca/components/FormFields/VaMedicalCenter.jsx - About 6 hrs to fix

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

          render() {
            const { supplies, order, eligibility } = this.props;
            const currentDate = moment();
            const batterySupplies = supplies.filter(
              batterySupply => batterySupply.productGroup === BATTERY,
        Severity: Major
        Found in src/applications/disability-benefits/2346/components/Batteries.jsx - About 6 hrs to fix

          Function Navigation has 171 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const Navigation = () => {
            const [isMobile, setIsMobile] = useState(true);
            const [isNavigationOpen, setIsNavigationOpen] = useState(false);
            const location = useLocation();
            const activeFolder = useSelector(folder);
          Severity: Major
          Found in src/applications/mhv-secure-messaging/components/Navigation.jsx - About 6 hrs to fix

            Function submitFiles has 171 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function submitFiles(claimId, trackedItem, files) {
              let filesComplete = 0;
              let bytesComplete = 0;
              let hasError = false;
              const totalSize = files.reduce((sum, file) => sum + file.file.size, 0);
            Severity: Major
            Found in src/applications/claims-status/actions/index.js - About 6 hrs to fix

              File Dashboard.jsx has 451 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import React, { useEffect, useState } from 'react';
              import PropTypes from 'prop-types';
              import { connect, useDispatch, useSelector } from 'react-redux';
              import isEmpty from 'lodash/isEmpty';
              
              
              Severity: Minor
              Found in src/applications/personalization/dashboard/components/Dashboard.jsx - About 6 hrs to fix

                Function uiSchema has 170 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function uiSchema(
                  label = 'Address',
                  useStreet3 = false,
                  isRequired = null,
                  ignoreRequired = false,
                Severity: Major
                Found in src/platform/forms/definitions/address.js - About 6 hrs to fix

                  File pdfConfigs.js has 450 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import {
                    createNoDescriptionText,
                    createOriginalFillRecord,
                    dateFormat,
                    processList,
                  Severity: Minor
                  Found in src/applications/mhv-medications/util/pdfConfigs.js - About 6 hrs to fix

                    File YourHealthInformation.jsx has 449 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import React from 'react';
                    import PropTypes from 'prop-types';
                    import { useSelector } from 'react-redux';
                    import { parse } from 'date-fns';
                    
                    
                    Severity: Minor
                    Found in src/applications/avs/components/YourHealthInformation.jsx - About 6 hrs to fix

                      File constants.js has 447 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 useStorage has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const useStorage = (app, local = false) => {
                          const STORAGE_KEYS = useMemo(
                            () => {
                              return createStorageKeys({ app });
                            },
                        Severity: Major
                        Found in src/applications/check-in/hooks/useStorage.jsx - About 6 hrs to fix

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

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

                            Function transformVAOSAppointment has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function transformVAOSAppointment(appt) {
                              const appointmentType = getAppointmentType(appt);
                              const isCC = appt.kind === 'cc';
                              const isVideo = appt.kind === 'telehealth';
                              const isAtlas = !!appt.telehealth?.atlas;
                            Severity: Major
                            Found in src/applications/vaos/services/appointment/transformers.js - About 6 hrs to fix

                              Function ConditionDetails has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const ConditionDetails = props => {
                                const { runningUnitTest } = props;
                                const record = useSelector(state => state.mr.conditions.conditionDetails);
                                const conditionList = useSelector(
                                  state => state.mr.conditions.conditionsList,
                              Severity: Major
                              Found in src/applications/mhv-medical-records/containers/ConditionDetails.jsx - About 6 hrs to fix

                                File ReviewPage.jsx has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import React, { useLayoutEffect } from 'react';
                                import { useFormikContext } from 'formik';
                                import { Link, useLocation } from 'react-router-dom';
                                import { VaOnThisPage } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                                import {
                                Severity: Minor
                                Found in src/applications/burial-poc-v6/pages/ReviewPage.jsx - About 6 hrs to fix

                                  responses has 48 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  const responses = {
                                    'GET /vaos/v0/appointments': (req, res) => {
                                      if (req.query.type === 'cc') {
                                        return res.json(confirmedCC);
                                      }
                                  Severity: Minor
                                  Found in src/applications/vaos/services/mocks/index.js - About 6 hrs to fix

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

                                    import merge from 'lodash/merge';
                                    import get from 'platform/utilities/data/get';
                                    import unset from 'platform/utilities/data/unset';
                                    
                                    import fullSchema1990 from 'vets-json-schema/dist/22-1990-schema.json';
                                    Severity: Minor
                                    Found in src/applications/edu-benefits/1990/config/form.js - About 6 hrs to fix

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

                                      export function uiSchema(
                                        label = 'Address',
                                        useStreet3 = false,
                                        isRequired = null,
                                        ignoreRequired = false,
                                      Severity: Major
                                      Found in src/platform/forms-system/src/js/definitions/address.js - About 6 hrs to fix

                                        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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language