department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

export const generateHealthInsuranceContent = record => {
  return {
    title: record.healthInsuranceCompany,
    details: [
      {

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

      const processUl = ul => {
        const nestedUls = ul.querySelectorAll('ul');
    
        // This section is to address nested <ul> tags
        nestedUls.forEach(nestedUl => {
    Severity: Major
    Found in src/applications/mhv-medications/util/helpers.js - About 2 hrs to fix

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

        render() {
          const { enrollmentData } = this.props;
          let introText;
          let printButton;
          if (enrollmentData.veteranIsEligible) {
      Severity: Major
      Found in src/applications/post-911-gib-status/containers/StatusPage.jsx - About 2 hrs to fix

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

        import { stateList } from './stateList';
        
        const APP_NAMES = Object.freeze({
          CHECK_IN: 'dayOf',
          PRE_CHECK_IN: 'preCheckIn',
        Severity: Minor
        Found in src/applications/check-in/utils/appConstants/index.js - About 2 hrs to fix

          File contactInformation.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from 'react';
          // import _ from 'platform/utilities/data';
          import merge from 'lodash/merge';
          import omit from 'platform/utilities/data/omit';
          import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';

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

            const maximalSetOfPreferences = {
              data: {
                id: '',
                type: 'hashes',
                attributes: {

              File search.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import camelCaseKeysRecursive from 'camelcase-keys-recursive';
              
              import {
                SEARCH_STARTED,
                SEARCH_FAILED,
              Severity: Minor
              Found in src/applications/gi/reducers/search.js - About 2 hrs to fix

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

                const createDebtsSuccess = () => {
                  return {
                    hasDependentDebts: false,
                    debts: [
                      {
                Severity: Minor
                Found in src/applications/personalization/dashboard/mocks/debts/index.js - About 2 hrs to fix

                  File PreSubmitSection.jsx has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // libs
                  import React, { useState } from 'react';
                  import PropTypes from 'prop-types';
                  import { connect } from 'react-redux';
                  import { withRouter } from 'react-router';
                  Severity: Minor
                  Found in src/platform/forms/components/review/PreSubmitSection.jsx - About 2 hrs to fix

                    File config.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import environment from 'platform/utilities/environment';
                    import compact from 'lodash/compact';
                    import {
                      LocationType,
                      FacilityType,
                    Severity: Minor
                    Found in src/applications/facility-locator/config.js - About 2 hrs to fix

                      Function submitTransformer has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function submitTransformer(formConfig, form) {
                        const { data: formData, loadedData } = form;
                        const expandedPages = expandArrayPages(
                          createFormPageList(formConfig),
                          formData,
                      Severity: Major
                      Found in src/applications/ezr/utils/helpers/submit-transformer.js - About 2 hrs to fix

                        Function updateSchema has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              updateSchema: (formData, addressSchema, addressUiSchema, index, path) => {
                                let currentSchema = addressSchema;
                        
                                const modifiedData = { ...formData };
                        
                        
                        Severity: Major
                        Found in src/applications/pre-need/definitions/address.js - About 2 hrs to fix

                          Function submitTransformer has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function submitTransformer(formConfig, form) {
                            const { data: formData, loadedData } = form;
                            const expandedPages = expandArrayPages(
                              createFormPageList(formConfig),
                              formData,

                            Function IdentityVerificationAlert has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const IdentityVerificationAlert = () => {
                              const onVerify = () => recordEvent({ event: AUTH_EVENTS.VERIFY });
                              return (
                                <va-alert status="continue" data-testid="hca-identity-alert" uswds>
                                  <h2 slot="headline">

                              Function data has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                data: (state = initialState, action) => {
                                  switch (action.type) {
                                    case FETCH_PERSONAL_INFORMATION:
                                      return {
                                        ...state,

                                Function itemsList has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      items.map((item, index) => {
                                        const itemIsSelected = !!get(
                                          selectedPropName || this.defaultSelectedPropName,
                                          item,
                                        );

                                  Function getPtsdClassification has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const getPtsdClassification = (formData, formType) => {
                                    const isCombat = _.get(
                                      'view:selectablePtsdTypes.view:combatPtsdType',
                                      formData,
                                      false,

                                    Function DashboardUnreadMessages has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const DashboardUnreadMessages = props => {
                                      const { inbox } = props;
                                    
                                      const { noAssociations, allTriageGroupsBlocked } = useSelector(
                                        state => state.sm.recipients,

                                      Function retrieveMessageThread has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const retrieveMessageThread = messageId => async (
                                        dispatch,
                                        getState,
                                      ) => {
                                        const isPilot = getIsPilotFromState(getState);
                                      Severity: Major
                                      Found in src/applications/mhv-secure-messaging/actions/messages.js - About 2 hrs to fix

                                        File AddToCalendar.unit.spec.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import React from 'react';
                                        import { expect } from 'chai';
                                        import sinon from 'sinon';
                                        import { render } from '@testing-library/react';
                                        import MockDate from 'mockdate';
                                        Severity: Minor
                                        Found in src/applications/vaos/components/AddToCalendar.unit.spec.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language