department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

File careExpensesPages.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import merge from 'lodash/merge';
import {
  arrayBuilderItemFirstPageTitleUI,
  arrayBuilderItemSubsequentPageTitleUI,

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

        () => {
          if (isLoading || awaitingResults) {
            return <LoadingIndicator />;
          }
    
    

      Function DeleteDraftModal has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const DeleteDraftModal = props => {
        const { unsavedDraft, draftSequence } = props;
        return (
          <VaModal
            id={`delete-draft-modal${draftSequence ? `-${draftSequence}` : ''}`}

        Function routeToPageInFlow has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function routeToPageInFlow(callback, history, current, action, data) {
          return async (dispatch, getState) => {
            const flow = callback(getState());
        
            dispatch({
        Severity: Major
        Found in src/applications/vaos/new-appointment/redux/actions.js - About 2 hrs to fix

          Function ReferralAppointments has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function ReferralAppointments() {
            useManualScrollRestoration();
            const basePath = useRouteMatch();
            const { isInCCPilot } = useIsInCCPilot();
            const { search } = useLocation();
          Severity: Major
          Found in src/applications/vaos/referral-appointments/index.jsx - About 2 hrs to fix

            Function SearchByProgram has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const SearchByProgram = () => {
              const distanceDropdownOptions = [
                { value: '5', label: 'within 5 miles' },
                { value: '15', label: 'within 15 miles' },
                { value: '25', label: 'within 25 miles' },
            Severity: Major
            Found in src/applications/gi/updated-gi/components/SearchByProgram.jsx - About 2 hrs to fix

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

                render() {
                  const { logo, title, grants } = this.props.attributes;
              
                  return (
                    <div

                Function fetchNotifications has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const fetchNotifications = () => async dispatch => {
                  const getNotifications = () => {
                    const options = {
                      method: 'GET',
                      credentials: 'include',
                Severity: Major
                Found in src/applications/personalization/common/actions/notifications.js - About 2 hrs to fix

                  Function sharingModalContent has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const sharingModalContent = () => {
                      const title = `Opt ${
                        isSharing ? 'out of' : 'back in to'
                      } sharing your electronic health information?`;
                      const primaryButtonText = isSharing ? 'Opt out' : 'Opt in';
                  Severity: Major
                  Found in src/applications/mhv-medical-records/containers/SettingsPage.jsx - About 2 hrs to fix

                    Function useHighlightedClaimOrAppeal has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const useHighlightedClaimOrAppeal = (appealsData, claimsData) => {
                      // the appeals data sorted with the most recently updated appeal first
                      const sortedAppeals = React.useMemo(
                        () => {
                          // Array sorting is done in place. Sorting `appealsData` directly was

                      File PrescriptionPrintOnly.jsx has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React from 'react';
                      import PropTypes from 'prop-types';
                      import {
                        pdfStatusDefinitions,
                        pdfDefaultStatusDefinition,

                        Consider simplifying this complex logical expression.
                        Open

                            if (formContext.reviewMode) {
                              const {
                                address1,
                                address2,
                                address3,

                          responses has 22 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          const responses = {
                            'GET /v0/feature_toggles': (_req, res) => {
                              const secondsOfDelay = 0;
                              delaySingleResponse(
                                () =>
                          Severity: Minor
                          Found in src/applications/personalization/profile/mocks/server.js - About 2 hrs to fix

                            Function findErrors has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                const findErrors = (name, err) => {
                                  if (err && typeof err === 'object') {
                                    // process the last type of error message which provides an `__errors`
                                    // message array. If there are multiple errors, we'll join them into
                                    // one message.
                            Severity: Major
                            Found in src/platform/forms-system/src/js/utilities/data/reduceErrors.js - About 2 hrs to fix

                              Function createTransaction has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function createTransaction(
                                route,
                                method,
                                fieldName,
                                payload,
                              Severity: Major
                              Found in src/platform/user/profile/vap-svc/actions/transactions.js - About 2 hrs to fix

                                Function renderLetterHistory has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const renderLetterHistory = diaryCode => {
                                  switch (diaryCode) {
                                    case '100':
                                    case '101':
                                    case '102':

                                  Function incomeLimits has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const incomeLimits = (state = initialState, action) => {
                                    switch (action.type) {
                                      case IL_UPDATE_DEPENDENTS:
                                        return {
                                          ...state,
                                  Severity: Major
                                  Found in src/applications/income-limits/reducers/index.js - About 2 hrs to fix

                                    Function ConfirmationPage has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const ConfirmationPage = () => {
                                      resetStoredSubTask();
                                    
                                      return (
                                        <Toggler toggleName={Toggler.TOGGLE_NAMES.scConfirmationUpdate}>
                                    Severity: Major
                                    Found in src/applications/appeals/995/containers/ConfirmationPage.jsx - About 2 hrs to fix

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

                                        render() {
                                          const {
                                            data,
                                            schema,
                                            uiSchema,

                                        Function alertsBuildShow has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function alertsBuildShow() {
                                          // This controls the text expanders.
                                          function expanderFire() {
                                            // Toggle aria-expanded for the button
                                            const ariaExpanded =
                                        Severity: Major
                                        Found in src/applications/static-pages/widget-creators/alerts-dismiss-view.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language