department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,177 of 14,709 total issues

File CompareDrawer.jsx has 315 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useState, useRef } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { useHistory } from 'react-router-dom';
import classNames from 'classnames';
Severity: Minor
Found in src/applications/gi/containers/CompareDrawer.jsx - About 3 hrs to fix

    Function getDerivedAttributes has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function getDerivedAttributes(constant, eligibility, institution) {
      const your = eligibility;
      const its = institution;
      const chapter = Number(your.giBillChapter);
      let monthlyRate;
    Severity: Major
    Found in src/applications/gi/selectors/estimator.js - About 3 hrs to fix

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

        const content = () => {
          if (accessAlert) {
            return (
              <AccessTroubleAlertBox
                alertType={accessAlertTypes.VITALS}
      Severity: Major
      Found in src/applications/mhv-medical-records/containers/Vitals.jsx - About 3 hrs to fix

        Function mockPrescription has 89 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function mockPrescription(n = 0, attrs = {}) {
          // Generate some refillable, some not
          const isRefillable = n % 3 === 0;
          const refillRemaining = isRefillable ? Math.ceil(Math.log(n + 1)) : 0;
          const {

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

            const content = () => {
              if (prescription || prescriptionsApiError) {
                return (
                  <>
                    <div className="no-print">
          Severity: Major
          Found in src/applications/mhv-medications/containers/PrescriptionDetails.jsx - About 3 hrs to fix

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

            // Node modules.
            import React from 'react';
            import PropTypes from 'prop-types';
            // Relative imports.
            import { getCernerURL } from 'platform/utilities/cerner';

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

              import React from 'react';
              import PropTypes from 'prop-types';
              
              export const AssetInformationAlert = () => (
                <va-additional-info trigger="How we define assets">
              Severity: Minor
              Found in src/applications/pensions/components/FormAlerts/index.jsx - About 3 hrs to fix

                File personalInformationHelper.js has 314 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import VaTextInputField from 'platform/forms-system/src/js/web-component-fields/VaTextInputField';
                import {
                  dateOfBirthSchema,
                  dateOfBirthUI,
                  selectSchema,

                  File ComparePage.jsx has 314 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import React, {
                    useEffect,
                    useRef,
                    useState,
                    useCallback,
                  Severity: Minor
                  Found in src/applications/gi/containers/ComparePage.jsx - About 3 hrs to fix

                    Function uiSchemaValidate has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function uiSchemaValidate(
                      errors,
                      uiSchema,
                      schema,
                      formData,
                    Severity: Major
                    Found in src/platform/forms-system/src/js/validation.js - About 3 hrs to fix

                      Function mapRawUserDataToState has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function mapRawUserDataToState(json) {
                        const {
                          data: {
                            attributes: {
                              account: { accountUuid } = {},
                      Severity: Major
                      Found in src/platform/user/profile/utilities/index.js - About 3 hrs to fix

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

                        const IntroductionPage = props => {
                          const { route } = props;
                          const { formConfig, pageList } = route;
                        
                          useEffect(
                        Severity: Major
                        Found in src/applications/ivc-champva/10-10D/containers/IntroductionPage.jsx - About 3 hrs to fix

                          Function render has 88 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/containers/ConfirmationPage.jsx - About 3 hrs to fix

                            Function getUiSchema has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const getUiSchema = () => {
                              return {
                                'view:livesOnMilitaryBase': {
                                  'ui:title': 'I live on a United States military base outside of the U.S.',
                                  'ui:webComponentField': VaCheckboxField,
                            Severity: Major
                            Found in src/applications/verify-your-enrollment/components/addressSchema.js - About 3 hrs to fix

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

                                render() {
                                  const {
                                    onSubmit,
                                    props: {
                                      analyticsSectionName,

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

                                  render() {
                                    const {
                                      onSubmit,
                                      props: {
                                        analyticsSectionName,

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

                                    render() {
                                      const {
                                        onSubmit,
                                        props: {
                                          analyticsSectionName,

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

                                      render() {
                                        const {
                                          vaFileNumber: { hasVaFileNumber, isLoading },
                                          user,
                                        } = this.props;

                                      Function Disagree has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const Disagree = () => {
                                        useEffect(() => {
                                          recordEvent({
                                            event: 'howToWizard-alert-displayed',
                                            'reason-for-alert':
                                      Severity: Major
                                      Found in src/applications/financial-status-report/wizard/pages/Disagree.jsx - About 3 hrs to fix

                                        Function ConfirmationPage has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function ConfirmationPage() {
                                          const { data, slot, facilityDetails, submitStatus } = useSelector(
                                            selectConfirmationPage,
                                            shallowEqual,
                                          );
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language