department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function answerReviewLabel has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const answerReviewLabel = (key, formValues) => {
  const answer = formValues[key];

  const dischargeMonth =
    monthLabelMap[formValues[SHORT_NAME_MAP.DISCHARGE_MONTH]] || '';
Severity: Minor
Found in src/applications/discharge-wizard/helpers/index.jsx - About 1 hr to fix

    Function ClaimantContactInformation has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function ClaimantContactInformation(props) {
      const formikContext = useFormikContext();
    
      return (
        <>
    Severity: Minor
    Found in src/applications/burial-poc-v6/pages/ClaimantContactInformation.jsx - About 1 hr to fix

      Function additionalBenefits has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function additionalBenefits(schema, options) {
        // Use the defaults as necessary, but override with the options given
        const mergedOptions = { ...defaults, ...options };
        const { fields, required } = mergedOptions;
      
      
      Severity: Minor
      Found in src/applications/edu-benefits/pages/additionalBenefits.js - About 1 hr to fix

        Function mapEnrollmentVerificationsForSubmission has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const mapEnrollmentVerificationsForSubmission = ev => {
          // The enrollments are in order with the most recent first.  Look
          // for the first non-null verificationStatus (or, the most recent
          // month) that was verified as either correct or incorrect.
          const mostRecentVerifiedEnrollmentIndex = ev.enrollmentVerifications.findIndex(
        Severity: Minor
        Found in src/applications/enrollment-verification/helpers/index.js - About 1 hr to fix

          Function componentDidUpdate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            componentDidUpdate(prevProps) {
              const {
                fieldName,
                forceEditView,
                successCallback,

            Function fetchRatedDisabilities has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function fetchRatedDisabilities() {
              return async dispatch => {
                const response = await getData(
                  '/disability_compensation_form/rated_disabilities',
                );
            Severity: Minor
            Found in src/applications/rated-disabilities/actions/index.js - About 1 hr to fix

              Function PrefillAlerts has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const PrefillAlerts = () => {
                return (
                  <>
                    <h1 className="vads-u-margin-bottom--8">Alerts</h1>
              
              

                Function componentDidUpdate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  componentDidUpdate(prevProps) {
                    const {
                      fieldName,
                      forceEditView,
                      successCallback,

                  Function componentDidUpdate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    componentDidUpdate(prevProps) {
                      const {
                        fieldName,
                        forceEditView,
                        successCallback,

                    Function BackButton has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const BackButton = props => {
                      const { action, prevUrl, router, text = null } = props;
                      const {
                        getCurrentPageFromRouter,
                        getPreviousPageFromRouter,
                    Severity: Minor
                    Found in src/applications/check-in/components/BackButton.jsx - About 1 hr to fix

                      Function createRoutesWithStore has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const createRoutesWithStore = () => {
                        return (
                          <Switch>
                            {routes.map((route, i) => {
                              const options = {
                      Severity: Minor
                      Found in src/applications/check-in/travel-claim/routes.jsx - About 1 hr to fix

                        Function ActionLink has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const ActionLink = props => {
                          const { action, appointmentId, app, startTime } = props;
                          const { t } = useTranslation();
                          const { getPreCheckinComplete } = useStorage(app);
                        
                        
                        Severity: Minor
                        Found in src/applications/check-in/components/ActionLink.jsx - About 1 hr to fix

                          Function ViewPaymentsApp has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function ViewPaymentsApp(props) {
                            const headerRef = useCallback(node => {
                              node?.focus();
                            }, []);
                          
                          

                            Function RogersStem has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const RogersStem = () => {
                              useEffect(() => {
                                recordEvent({
                                  event: 'howToWizard-alert-displayed',
                                  'reason-for-alert': 'help with STEM program debt',

                              Function renderAddressOption has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const renderAddressOption = (address, id = 'userEntered') => {
                                  const hasConfirmedSuggestions = apiData.length > 0;
                                  const { addressStreet, cityStateZip, addressCountry } = formatAddress(
                                    address,
                                  );

                                Function OtherExpensesInputList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const OtherExpensesInputList = props => {
                                  const { errorSchema, formContext } = props;
                                  const errorList = errorSchema?.otherExpenses?.__errors;
                                  const { submitted } = formContext;
                                
                                

                                  Function setUnsavedNavigationError has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      typeOfError => {
                                        if (typeOfError === null) {
                                          setNavigationError(null);
                                        }
                                        if (

                                    Function runAdvancedSearch has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    ) => async (dispatch, getState) => {
                                      dispatch({ type: Actions.Search.START });
                                      const isPilot = getIsPilotFromState(getState);
                                      try {
                                        const response = await searchFolderAdvanced(
                                    Severity: Minor
                                    Found in src/applications/mhv-secure-messaging/actions/search.js - About 1 hr to fix

                                      Function letterItems has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          const letterItems = (this.props.letters || []).map((letter, index) => {
                                            let content;
                                            let letterTitle;
                                            let helpText;
                                            if (letter.letterType === LETTER_TYPES.benefitSummary) {
                                      Severity: Minor
                                      Found in src/applications/letters/containers/LetterList.jsx - About 1 hr to fix

                                        Function searchReducer has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const searchReducer = (state = initialState, action) => {
                                          switch (action.type) {
                                            case Actions.Search.RUN_ADVANCED:
                                              return {
                                                ...state,
                                        Severity: Minor
                                        Found in src/applications/mhv-secure-messaging/reducers/search.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language