department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

import React from 'react';
import PropTypes from 'prop-types';
import { VaTextInputField } from 'platform/forms-system/src/js/web-component-fields';
import {
  currentOrPastDateUI,

    Function addressValidationSuccess has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      addressValidationSuccess() {
        return asyncReturn(
          {
            addresses: [
              {
    Severity: Major
    Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 2 hrs to fix

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

        render() {
          const dataType = this.props.schema.type;
          if (dataType !== 'array') {
            throw new Error(`Data Type ${dataType} not supported.`);
          }
      Severity: Major
      Found in src/applications/my-education-benefits/components/AccordionField.jsx - About 2 hrs to fix

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

          render() {
            return (
              <div className="schemaform-intro">
                <FormTitle title="Opt out of sharing education benefits information" />
                <h4>
        Severity: Major
        Found in src/applications/edu-benefits/0993/containers/IntroductionPage.jsx - About 2 hrs to fix

          Function getFormSchema has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const getFormSchema = (formData = {}) => {
            const defaultCountry =
              countries.find(
                country => country.countryCodeISO3 === formData?.countryCodeIso3,
              )?.countryCodeISO3 || 'USA';
          Severity: Major
          Found in src/applications/verify-your-enrollment/components/addressSchema.js - About 2 hrs to fix

            Function MultipleIds has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const MultipleIds = () => {
              const content = {
                heading: 'It looks like you have more than one My HealtheVet account',
                alertText: (
                  <div>

              Function useSendPreCheckInData has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const useSendPreCheckInData = () => {
                const selectForm = useMemo(makeSelectForm, []);
                const { data } = useSelector(selectForm);
                const [isLoading, setIsLoading] = useState(true);
                const {
              Severity: Major
              Found in src/applications/check-in/hooks/useSendPreCheckInData.jsx - About 2 hrs to fix

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

                  render() {
                    const { route } = this.props;
                    const { formConfig, pageList } = route;
                
                    return (
                Severity: Major
                Found in src/applications/travel-pay/containers/IntroductionPage.jsx - About 2 hrs to fix

                  File IntroductionPage.jsx has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import React, { useEffect } from 'react';
                  
                  import PropTypes from 'prop-types';
                  import { useDispatch, useSelector } from 'react-redux';
                  import { setData } from '~/platform/forms-system/src/js/actions';

                    Function FacilityConfirmation has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const FacilityConfirmation = props => {
                      const { data, goBack, goForward, goToPath } = props;
                      const selectedFacility = data['view:plannedClinic'].veteranSelected;
                      const selectedCaregiverSupportFacility =
                        data['view:plannedClinic'].caregiverSupport;

                      Function updateFormData has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const updateFormData = () => {
                          if (
                            !isValidFromDate(employmentRecord.from) ||
                            (!isValidToDate(employmentRecord.from, employmentRecord.to) &&
                              !employmentRecord.isCurrent)

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

                          const content = () => {
                            const folderCount = folders?.length;
                            if (folders === undefined) {
                              return (
                                <va-loading-indicator
                        Severity: Major
                        Found in src/applications/mhv-secure-messaging/containers/Folders.jsx - About 2 hrs to fix

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

                          import { apiRequest } from 'platform/utilities/api';
                          import environment from 'platform/utilities/environment';
                          
                          import { toSnakeCase } from '../helpers';
                          
                          
                          Severity: Minor
                          Found in src/applications/my-education-benefits/actions/index.js - About 2 hrs to fix

                            File toxicExposure.jsx has 279 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import React from 'react';
                            import { checkboxGroupSchema } from 'platform/forms-system/src/js/web-component-patterns';
                            import {
                              capitalizeEachWord,
                              formSubtitle,

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

                                render() {
                                  const {
                                    analyticsSectionName,
                                    fieldName,
                                    isEditing,

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

                                  render() {
                                    const {
                                      addressFromUser,
                                      addressValidationError,
                                      confirmedSuggestions,

                                  Function Balances has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const Balances = () => {
                                    // get balances from redux
                                    const { debtLetters, mcp } = useSelector(
                                      ({ combinedPortal }) => combinedPortal,
                                    );

                                    Function IntroductionProcessListV1 has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function IntroductionProcessListV1() {
                                      return (
                                        <div className="process schemaform-process">
                                          <ol>
                                            <li className="process-step list-one">

                                      Function navigateForward has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const navigateForward = (
                                        SHORT_NAME,
                                        formResponses,
                                        router,
                                        editMode,
                                      Severity: Major
                                      Found in src/applications/discharge-wizard/utilities/page-navigation.js - About 2 hrs to fix

                                        Function submitForm has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const submitForm = (form, formConfig, submissionId) => {
                                          const formWithSubmissionId = {
                                            ...form,
                                            data: {
                                              ...form.data,
                                        Severity: Major
                                        Found in src/applications/coronavirus-research/update/config/submitForm.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language