department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

  render() {
    const { formConfig, buttonOnly, devOnly } = this.props;
    const devOnlyForceShowFormControls =
      environment.isLocalhost() &&
      !window.Cypress &&

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

      render() {
        const { formConfig, buttonOnly, devOnly } = this.props;
        const devOnlyForceShowFormControls =
          environment.isLocalhost() &&
          !window.Cypress &&

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

        render() {
          const { formConfig, buttonOnly, devOnly } = this.props;
          const devOnlyForceShowFormControls =
            environment.isLocalhost() &&
            !window.Cypress &&

        Function createMockAddressValidationSuccessResponse has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const createMockAddressValidationSuccessResponse = _data => {
          return {
            data: {
              messages: [
                {

          Function askVA has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            askVA: (state = initialState, action) => {
              switch (action.type) {
                case SET_CATEGORY_ID:
                  return {
                    ...state,
          Severity: Major
          Found in src/applications/ask-va/reducers/index.js - About 2 hrs to fix

            Function CommunityCareProviderSelectionPage has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function CommunityCareProviderSelectionPage() {
              const pageTitle = useSelector(state => getPageTitle(state, pageKey));
            
              const dispatch = useDispatch();
              const { data, pageChangeInProgress, schema } = useSelector(

              Function directDeposit has 66 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function directDeposit(state = initialState, action) {
                switch (action.type) {
                  case DIRECT_DEPOSIT_FETCH_SUCCEEDED:
                  case DIRECT_DEPOSIT_SAVE_SUCCEEDED: {
                    return {
              Severity: Major
              Found in src/applications/personalization/profile/reducers/directDeposit.js - About 2 hrs to fix

                Function useUnavailableItems has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const useUnavailableItems = () => {
                    const { groups, items, channels } = getEntities(communicationPreferences);
                
                    const excludedGroupIds = [
                      // Always exclude QUICK_SUBMIT and GENERAL

                  Function mapStateToProps has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const mapStateToProps = state => {
                    const { isReady: hasLoadedScheduledDowntime } = state.scheduledDowntime;
                    const isLOA3 = isLOA3Selector(state);
                    const isLOA1 = isLOA1Selector(state);
                    const isVAPatient = isVAPatientSelector(state);
                  Severity: Major
                  Found in src/applications/personalization/dashboard/components/Dashboard.jsx - About 2 hrs to fix

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

                      render() {
                        const contentClasses = classNames(
                          'form-expanding-group-open',
                          'wizard-content',
                          {
                    Severity: Major
                    Found in src/applications/post-911-gib-status/components/EducationWizard.jsx - About 2 hrs to fix

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

                      import appendQuery from 'append-query';
                      import * as Sentry from '@sentry/browser';
                      import React from 'react';
                      import fullSchema from 'vets-json-schema/dist/FEEDBACK-TOOL-schema.json';
                      import { transformForSubmit } from 'platform/forms-system/src/js/helpers';
                      Severity: Minor
                      Found in src/applications/edu-benefits/feedback-tool/helpers.js - About 2 hrs to fix

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

                        import { VA_FORM_IDS } from 'platform/forms/constants';
                        import {
                          yesNoSchema,
                          yesNoUI,
                        } from 'platform/forms-system/src/js/web-component-patterns';

                          File transform.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import * as Sentry from '@sentry/browser';
                          import { formatDateShort } from 'platform/utilities/date';
                          import { isValid } from 'date-fns';
                          import {
                            isStreamlinedShortForm,
                          Severity: Minor
                          Found in src/applications/financial-status-report/utils/transform.js - About 2 hrs to fix

                            Function FormSaveErrorMessage has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function FormSaveErrorMessage(props) {
                              const { route, formConfig, user, form, location, showLoginModal } = props;
                            
                              const savedStatus = form?.savedStatus;
                              const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
                            Severity: Major
                            Found in src/platform/forms/components/review/FormSaveErrorMessage.jsx - About 2 hrs to fix

                              File seiTreatmentFacilities.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              const treatmentFacilities = [
                                {
                                  userProfileId: 15176497,
                                  treatmentFacilityId: 17698697,
                                  addressCity: null,

                                Function SubmitButtons has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function SubmitButtons(props) {
                                  const { onBack, onSubmit, submission, formConfig, formErrors = {} } = props;
                                
                                  const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
                                  const buttonText =
                                Severity: Major
                                Found in src/platform/forms-system/src/js/review/SubmitButtons.jsx - About 2 hrs to fix

                                  Function createContactInformationPage has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function createContactInformationPage(
                                    schema,
                                    addressField = 'veteranAddress',
                                  ) {
                                    const { homePhone, mobilePhone } = schema.properties;
                                  Severity: Major
                                  Found in src/applications/edu-benefits/pages/contactInformation.js - About 2 hrs to fix

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

                                    const IntroductionPage = props => {
                                      const dispatch = useDispatch();
                                      const { hasVaFileNumber, isLoading } = useSelector(
                                        state => state?.vaFileNumber,
                                      );
                                    Severity: Major
                                    Found in src/applications/686c-674/containers/IntroductionPage.jsx - About 2 hrs to fix

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

                                        render() {
                                          if (this.props.loading || !Object.keys(this.props.facility).length) {
                                            return (
                                              <va-loading-indicator
                                                message={`Loading facility's ${

                                        Function Dependents has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const Dependents = () => {
                                          useEffect(() => {
                                            recordEvent({
                                              event: 'howToWizard-alert-displayed',
                                              'reason-for-alert': 'request help with debt for spouses or dependents',
                                        Severity: Major
                                        Found in src/applications/financial-status-report/wizard/pages/Dependents.jsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language