department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,723 of 12,672 total issues

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

import React from 'react';
import { createSelector } from 'reselect';
import { Link } from 'react-router';

import fullSchema1990e from 'vets-json-schema/dist/22-1990E-schema.json';
Severity: Major
Found in src/applications/toe/config/form.js - About 3 days to fix

    File helpers.js has 1184 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import { merge } from 'lodash';
    import PropTypes from 'prop-types';
    import get from 'platform/utilities/data/get';
    import omit from 'platform/utilities/data/omit';
    Severity: Major
    Found in src/applications/pre-need-integration/utils/helpers.js - About 3 days to fix

      Function getStatusContents has 602 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function getStatusContents(appeal, name = {}) {
        const { status, aoj, programArea } = appeal.attributes;
        const appealType = appeal.type;
        const statusType = status.type || status;
        const details = status.details || {};
      Severity: Major
      Found in src/applications/claims-status/utils/appeals-v2-helpers.jsx - About 3 days to fix

        File CalculateYourBenefitsForm.jsx has 1145 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import PropTypes from 'prop-types';
        import React, { useState } from 'react';
        import _ from 'lodash';
        import classNames from 'classnames';
        
        
        Severity: Major
        Found in src/applications/gi/components/profile/CalculateYourBenefitsForm.jsx - About 2 days to fix

          File moment-tz.js has 1126 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* istanbul ignore file */
          //! moment-timezone.js
          //! version : 0.5.25
          //! Copyright (c) JS Foundation and other contributors
          //! license : MIT
          Severity: Major
          Found in src/applications/personalization/dashboard/lib/moment-tz.js - About 2 days to fix

            Function getStatusContents has 571 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function getStatusContents(appeal, name = {}) {
              const { status, aoj, programArea } = appeal.attributes;
              const appealType = appeal.type;
              const statusType = status.type || status;
              const details = status.details || {};
            Severity: Major
            Found in src/applications/personalization/dashboard/utils/getStatusContents.jsx - About 2 days to fix

              Function renderAdditionalInfo has 568 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const renderAdditionalInfo = (diaryCode, dateOfLetter, benefitType) => {
                const endDate = (date, days) =>
                  moment(date, 'MM-DD-YYYY')
                    .add(days, 'days')
                    .format('MMMM Do, YYYY,');

                File calculator.js has 1093 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import { isEmpty } from 'lodash';
                import { createSelector } from 'reselect';
                import {
                  formatCurrency,
                  isCountryUSA,
                Severity: Major
                Found in src/applications/gi/selectors/calculator.js - About 2 days to fix

                  File covidResearchUISchema.js has 1090 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import React from 'react';
                  import _ from 'lodash';
                  
                  import fullNameUI from 'platform/forms/definitions/fullName';
                  import { validateBooleanGroup } from 'platform/forms-system/src/js/validation';

                    Function FileField has 549 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const FileField = props => {
                      const {
                        enableShortWorkflow,
                        errorSchema,
                        formContext,
                    Severity: Major
                    Found in src/platform/forms-system/src/js/fields/FileField.jsx - About 2 days to fix

                      Function Prescriptions has 543 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const Prescriptions = () => {
                        const { search } = useLocation();
                        const history = useHistory();
                        const dispatch = useDispatch();
                        const paginatedPrescriptionsList = useSelector(
                      Severity: Major
                      Found in src/applications/mhv-medications/containers/Prescriptions.jsx - About 2 days to fix

                        File moment-tz.js has 1071 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* istanbul ignore file */
                        //! moment-timezone.js
                        //! version : 0.5.25
                        //! Copyright (c) JS Foundation and other contributors
                        //! license : MIT
                        Severity: Major
                        Found in src/applications/vaos/lib/moment-tz.js - About 2 days to fix

                          Function FileField has 536 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const FileField = props => {
                            const {
                              enableShortWorkflow,
                              errorSchema,
                              formContext,
                          Severity: Major
                          Found in src/applications/simple-forms/40-0247/components/FileField.jsx - About 2 days to fix

                            Function FileField has 533 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const FileField = props => {
                              const {
                                enableShortWorkflow,
                                errorSchema,
                                formContext,
                            Severity: Major
                            Found in src/applications/pre-need/components/FileField.jsx - About 2 days to fix

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

                                const content = () => {
                                  return (
                                    <>
                                      <div className="main-content">
                                        <section className="vads-u-margin-bottom--3 small-screen:vads-u-margin-bottom--4">
                              Severity: Major
                              Found in src/applications/mhv-medications/containers/LandingPage.jsx - About 2 days to fix

                                Function FacilitiesMap has 529 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const FacilitiesMap = props => {
                                  const [map, setMap] = useState(null);
                                  const searchResultTitleRef = useRef(null);
                                  const [isMobile, setIsMobile] = useState(window.innerWidth <= 481);
                                  const [isSearching, setIsSearching] = useState(false);
                                Severity: Major
                                Found in src/applications/facility-locator/containers/FacilitiesMap.jsx - About 2 days to fix

                                  File helpers.js has 1044 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import merge from 'lodash/merge';
                                  import { format, isValid, parseISO } from 'date-fns';
                                  
                                  import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                                  import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/api';
                                  Severity: Major
                                  Found in src/applications/claims-status/utils/helpers.js - About 2 days to fix

                                    File Modals.jsx has 1024 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import React from 'react';
                                    import { connect } from 'react-redux';
                                    import recordEvent from 'platform/monitoring/record-event';
                                    import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
                                    import * as actions from '../actions';
                                    Severity: Major
                                    Found in src/applications/gi/containers/Modals.jsx - About 2 days to fix

                                      Function FileField has 490 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const FileField = props => {
                                        const {
                                          errorSchema,
                                          formContext,
                                          formData = [],
                                      Severity: Major
                                      Found in src/applications/appeals/shared/components/FileField.jsx - About 2 days to fix

                                        Function getDebtDetailsCardContent has 488 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const getDebtDetailsCardContent = (debt, dateOfLetter, amountDue) => {
                                          const endDateText = endDate(dateOfLetter, debt.diaryCode);
                                        
                                          switch (debt.diaryCode) {
                                            case '71':
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language