department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

File StatusDropdown.jsx has 332 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import PropTypes from 'prop-types';
import { dispStatusObj } from '../../util/constants';

const StatusDropdown = props => {
Severity: Minor
Found in src/applications/mhv-medications/components/shared/StatusDropdown.jsx - About 4 hrs to fix

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

      render() {
        const { idSchema, formContext, formData, uiSchema, schema } = this.props;
        const id = idSchema.$id;
    
        // wrap matching text in a <span> element
    Severity: Major
    Found in src/platform/forms-system/src/js/fields/AutosuggestField.jsx - About 3 hrs to fix

      Function GuardianInformation has 99 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function GuardianInformation(schema, options) {
        // Use the defaults as necessary, but override with the options given
        const { fields, required } = {
          ...defaults(),
          ...options,
      Severity: Major
      Found in src/applications/edu-benefits/1990/pages/GuardianInformation.jsx - About 3 hrs to fix

        Function DependentSummary has 99 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const DependentSummary = props => {
          const {
            data,
            goBack,
            goForward,
        Severity: Major
        Found in src/applications/ezr/components/FormPages/DependentSummary.jsx - About 3 hrs to fix

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

          const IntroductionPage = props => {
            const { route, isLoggedIn } = 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 DependentSummary has 99 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const DependentSummary = props => {
              const {
                data,
                goBack,
                goForward,

              Function confirmationFAQ has 99 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const confirmationFAQ = () => {
                return (
                  <>
                    <section className="hca-confirmation-faq">
                      <h2>What to do if you have questions now</h2>
              Severity: Major
              Found in src/applications/hca/components/ConfirmationPage/ConfirmationFAQ.jsx - About 3 hrs to fix

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

                  render() {
                    const { searchTerm, ariaLive1, ariaLive2, filteredOptions } = this.state;
                    const autocompleteHelperText = `
                      When autocomplete results are available use up and down arrows to
                      review and enter to select. Touch device users, explore by touch or

                  Function ClinicChoicePage has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function ClinicChoicePage() {
                    const pageTitle = useSelector(state => getPageTitle(state, pageKey));
                  
                    const featureClinicFilter = useSelector(state =>
                      selectFeatureClinicFilter(state),

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

                      render() {
                        const {
                          appealsLoading,
                          claimsLoading,
                          list,
                    Severity: Major
                    Found in src/applications/claims-status/containers/YourClaimsPageV2.jsx - About 3 hrs to fix

                      File MHVApp.jsx has 330 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import PropTypes from 'prop-types';
                      import React from 'react';
                      import { connect } from 'react-redux';
                      import { withRouter } from 'react-router';
                      import appendQuery from 'append-query';
                      Severity: Minor
                      Found in src/platform/user/authorization/containers/MHVApp.jsx - About 3 hrs to fix

                        Function ConsentNotice has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function ConsentNotice() {
                          return (
                            <span>
                              <strong>What is this research about?</strong>
                              <p>

                          Function ConsentNotice has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function ConsentNotice() {
                            return (
                              <span>
                                <strong>What is this research about?</strong>
                                <p>

                            Function nextQuestion has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function nextQuestion(currentQuestion, answer, state) {
                              let next;
                              const noGeneralCourtMartial = ['2', '3'].includes(state['7_courtMartial']);
                              const dischargeYear = state['2_dischargeYear'];
                              const dischargeMonth = state['3_dischargeMonth'] || 1;
                            Severity: Major
                            Found in src/applications/discharge-wizard/reducers/discharge-wizard.js - About 3 hrs to fix

                              Function makeSchemas has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function makeSchemas(prefix) {
                                const properties = makeFormProperties(prefix);
                                const schema = {
                                  type: 'object',
                                  properties: {

                                Function handleSearchOnQueryChange has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const handleSearchOnQueryChange = () => {
                                    const { currentQuery, searchResults } = props;
                                    const {
                                      context,
                                      representativeInputString,
                                Severity: Major
                                Found in src/applications/representative-search/containers/SearchPage.jsx - About 3 hrs to fix

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

                                  // Node modules.
                                  import React, { Component } from 'react';
                                  import PropTypes from 'prop-types';
                                  import { isEmpty, map, replace } from 'lodash';
                                  import * as Sentry from '@sentry/browser';

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

                                      render() {
                                        let paymentsReceivedTable = '';
                                        let paymentsReturnedTable = '';
                                        let content;
                                        // If the app is loading, show a loading LoadingIndicator

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

                                      import { isEmpty } from 'lodash';
                                      import { createInitialState } from '@department-of-veterans-affairs/platform-forms-system/state/helpers';
                                      import { format } from 'date-fns';
                                      import { apiRequest } from 'platform/utilities/api';
                                      import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                                      Severity: Minor
                                      Found in src/applications/simple-forms/21-0966/config/helpers.js - About 3 hrs to fix

                                        File InstallmentContract.jsx has 330 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import React, { useState } from 'react';
                                        import PropTypes from 'prop-types';
                                        import { connect } from 'react-redux';
                                        import { setData } from 'platform/forms-system/src/js/actions';
                                        import {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language