department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,731 of 12,808 total issues

Function TravelAddress has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TravelAddress = props => {
  const { router } = props;
  const { t } = useTranslation();
  const selectVeteranData = useMemo(makeSelectVeteranData, []);
  const { demographics } = useSelector(selectVeteranData);
Severity: Minor
Found in src/applications/check-in/day-of/pages/TravelAddress.jsx - About 1 hr to fix

    Function fetchFormStatus has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const fetchFormStatus = () => async dispatch => {
      dispatch(initiateApiCall());
      const sessionExpiration = localStorage.getItem('sessionExpiration');
      const remainingSessionTime = moment(sessionExpiration).diff(moment());
      if (!remainingSessionTime) {
    Severity: Minor
    Found in src/applications/disability-benefits/2346/actions/index.js - About 1 hr to fix

      Function isOutsideListLoopReturn has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const isOutsideListLoopReturn = (
        chapter,
        outerField,
        uiTitle,
        formChapter,
      Severity: Minor
      Found in src/applications/disability-benefits/686c-674/config/helpers.js - About 1 hr to fix

        Function isOutsideListLoopReturn has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const isOutsideListLoopReturn = (
          chapter,
          outerField,
          uiTitle,
          formChapter,
        Severity: Minor
        Found in src/applications/disability-benefits/686c-674-v2/config/helpers.js - About 1 hr to fix

          Function LandingPage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const LandingPage = () => {
            const profile = useSelector(selectUserProfile);
            const isLoading = useSelector(selectUserIsLoading);
          
            if (isLoading) {

            Function fetchDebts has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const fetchDebts = async dispatch => {
              const getDebts = () => {
                const options = {
                  method: 'GET',
                  credentials: 'include',
            Severity: Minor
            Found in src/applications/financial-status-report/actions/index.js - About 1 hr to fix

              Function YesIDES has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const YesIDES = props => {
                const { setWizardStatus } = props;
                useEffect(
                  () => {
                    setWizardStatus(WIZARD_STATUS_COMPLETE);

                Function StaticInformationReviewField has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const StaticInformationReviewField = props => {
                  const [isLoggedIn, setIsLoggedIn] = useState();
                  useEffect(
                    () => {
                      setIsLoggedIn(props.isLoggedIn);

                  Function LandingPageAuth has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const LandingPageAuth = () => {
                    const dispatch = useDispatch();
                    const fullState = useSelector(state => state);
                    const inbox = useSelector(state => state.sm.folders?.folder);
                    const [prefLink, setPrefLink] = useState('');

                    Function sendReply has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    ) => async dispatch => {
                      try {
                        await createReplyToMessage(replyToId, message, attachments);
                        dispatch(
                          addAlert(
                    Severity: Minor
                    Found in src/applications/mhv-secure-messaging/actions/messages.js - About 1 hr to fix

                      Function YesVaMemorandum has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const YesVaMemorandum = props => {
                        const { setWizardStatus } = props;
                        useEffect(
                          () => {
                            setWizardStatus(WIZARD_STATUS_COMPLETE);

                        Function YesDisabilityRating has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const YesDisabilityRating = props => {
                          const { setWizardStatus } = props;
                          useEffect(
                            () => {
                              setWizardStatus(WIZARD_STATUS_COMPLETE);

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

                          export function routeToPageInFlow(history, current, action, data) {
                            return async (dispatch, getState) => {
                              const pageFlow = getPageFlow(getState());
                          
                              dispatch({
                          Severity: Minor
                          Found in src/applications/vaos/covid-19-vaccine/flow.js - About 1 hr to fix

                            Function onAllComplete has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        onAllComplete: () => {
                                          const now = new Date(Date.now());
                                          const uploadDate = buildDateFormatter()(now.toISOString());
                                          if (!hasError) {
                                            recordEvent({
                            Severity: Minor
                            Found in src/applications/claims-status/actions/index.js - About 1 hr to fix

                              Function getRecentlyClosedClaims has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const getRecentlyClosedClaims = claims => {
                                return claims
                                  .filter(isBenefitsClaimOrAppeal)
                                  .filter(claim => {
                                    // Check if this is an appeal, if so we want to filter it out
                              Severity: Minor
                              Found in src/applications/claims-status/components/ClosedClaimMessage.jsx - About 1 hr to fix

                                Function getCalculatedBenefits has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  (inputs, constants, institution) => {
                                    const avgDodBah = constants ? constants.AVGDODBAH : 0;
                                    const tfCap = constants ? constants.TFCAP : 0;
                                
                                    const { vetTecTuitionFees, vetTecScholarships } = inputs;
                                Severity: Minor
                                Found in src/applications/gi/selectors/vetTecCalculator.js - About 1 hr to fix

                                  Function renderBuyUp has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const renderBuyUp = () => {
                                      if (!displayedInputs.buyUp) return null;
                                  
                                      const buyUpAmountId = 'buyUpAmount';
                                      const buyUpFieldId = `${buyUpAmountId}-field`;

                                    Function mapper has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                mapper: institution => {
                                                  const hasFlags = institution.cautionFlags.length > 0;
                                                  return (
                                                    <div className="vads-u-display--flex">
                                                      <div className="caution-flag-icon vads-u-flex--1">
                                    Severity: Minor
                                    Found in src/applications/gi/containers/CompareLayout.jsx - About 1 hr to fix

                                      Function addressReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function addressReducer(state = initialState, action) {
                                        switch (action.type) {
                                          case ADDRESS_VALIDATION_START:
                                            return {
                                              ...state,

                                        Function parseCareSummariesAndNotes has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const parseCareSummariesAndNotes = records => {
                                          return `
                                        ${txtLine}
                                        2) Care summaries and notes
                                        
                                        
                                        Severity: Minor
                                        Found in src/applications/mhv-medical-records/util/txtHelpers/notes.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language