department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,672 total issues

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

const IntroductionPage = props => {
  const { route } = props;
  const { formConfig, pageList } = route;

  return (

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

      render() {
        if (this.state.loading) {
          return <va-loading-indicator message="Loading facilities..." />;
        }
    
    
    Severity: Major
    Found in src/applications/static-pages/facilities/OtherFacilityListWidget.jsx - About 2 hrs to fix

      Function TravelEligibilityAddtionalInfo has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const TravelEligibilityAddtionalInfo = () => {
        const boldComponent = [
          <span key="bold" className="vads-u-font-weight--bold" />,
        ];
        return (

        Function Waivers has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function getPastAppointmentDateRangeOptions has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function getPastAppointmentDateRangeOptions(today = moment()) {
            const startOfToday = today.clone().startOf('day');
          
            // Past 3 months
            const options = [

            Function AccountUpdateView has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const AccountUpdateView = props => {
              // all props used come from the result of the useDirectDeposit hook
              const {
                formData,
                formSubmit,

              Function SearchReducer has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function SearchReducer(state = initialState, action) {
                switch (action.type) {
                  case FETCH_SEARCH_RESULTS: {
                    return {
                      ...state,
              Severity: Major
              Found in src/applications/search/reducers/index.js - About 2 hrs to fix

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

                import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                import { externalServices } from 'platform/monitoring/DowntimeNotification';
                import get from '@department-of-veterans-affairs/platform-forms-system/get';
                import GetFormHelp from '../../shared/components/GetFormHelp';
                import manifest from '../manifest.json';
                Severity: Minor
                Found in src/applications/ivc-champva/10-7959a/config/form.js - About 2 hrs to fix

                  File EnhancedEmploymentRecord.jsx has 258 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

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

                    File AdditionalInstructions.jsx has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import React from 'react';
                    import PropTypes from 'prop-types';
                    import { board } from '../../helpers';
                    
                    const AdditionalInstructions = ({ formValues }) => {

                      SearchDropdownComponent has 21 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class SearchDropdownComponent extends React.Component {
                        static propTypes = {
                          /**
                           * A boolean value for whether the submit button should be rendered or not.
                           * */

                        Function createRichTextDetailItem has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const createRichTextDetailItem = async (doc, config, x, item) => {
                          let titleText = item.title ?? '';
                          const content = [];
                        
                          if (titleText) {
                        Severity: Major
                        Found in src/platform/pdf/templates/utils.js - About 2 hrs to fix

                          Function vaTextInputFieldMapping has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function vaTextInputFieldMapping(props) {
                            const {
                              description,
                              textDescription,
                              DescriptionField,

                            Function refreshTransaction has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function refreshTransaction(
                              transaction,
                              analyticsSectionName,
                              _route = null,
                            ) {
                            Severity: Major
                            Found in src/platform/user/profile/vap-svc/actions/transactions.js - About 2 hrs to fix

                              Function renderServiceTypeDropdown has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const renderServiceTypeDropdown = () => {
                                  const { facilityType, serviceType, serviceTypeChanged } = currentQuery;
                                  const disabled = ![
                                    LocationType.HEALTH,
                                    LocationType.URGENT_CARE,
                              Severity: Major
                              Found in src/applications/facility-locator/components/SearchControls.jsx - About 2 hrs to fix

                                Function transform has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function transform(formConfig, form) {
                                  const newSchoolTransform = formData => {
                                    let clonedData = _.cloneDeep(formData);
                                
                                    delete clonedData.newSchoolName;
                                Severity: Major
                                Found in src/applications/edu-benefits/1995/config/submit-transformer.js - About 2 hrs to fix

                                  Function listItems has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const listItems = providers.map((item, index) => {
                                      const { insuranceName, insurancePolicyHolderName } = item;
                                      const srLabel = getInsuranceSrLabel(item);
                                      const modalDescription = replaceStrValues(
                                        content['insurance-modal-remove-description'],
                                  Severity: Major
                                  Found in src/applications/ezr/components/FormFields/InsurancePolicyList.jsx - About 2 hrs to fix

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

                                      render() {
                                        const {
                                          route,
                                          params,
                                          form,
                                    Severity: Major
                                    Found in src/applications/edu-benefits/0993/containers/FormPage.jsx - About 2 hrs to fix

                                      Function personalInfo has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const personalInfo = (state = initialState, action) => {
                                        switch (action.type) {
                                          case FETCH_PERSONAL_INFO:
                                            return {
                                              ...state,
                                      Severity: Major
                                      Found in src/applications/verify-your-enrollment/reducers/personalInfo.js - About 2 hrs to fix

                                        Function listItems has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const listItems = providers.map((item, index) => {
                                            const { insuranceName, insurancePolicyHolderName } = item;
                                            const srLabel = getInsuranceSrLabel(item);
                                            const modalDescription = replaceStrValues(
                                              content['insurance-modal-remove-description'],
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language