department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,848 of 12,848 total issues

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

export function updateData(oldForm, newForm) {
  const updatedForm = newForm;

  checkBoxElements.forEach(elementName => {
    // For each checkBoxGroup in the form, get the number of selected elements before and after the current event
Severity: Minor
Found in src/applications/coronavirus-research/update/config/formHelper.js - About 1 hr to fix

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

    const recurseField = (key, field, rank = 0) => {
      if (
        field.value === '' ||
        field.value === 0 ||
        field.value === null ||
    Severity: Minor
    Found in src/applications/burial-poc-v6/pages/ReviewPage.jsx - About 1 hr to fix

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

      function InitialConfirmEligibilityView(props) {
        if (props.onReviewPage) {
          return null;
        }
        captureEvents.ineligibilityAlert(props);

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

        export function transform(formConfig, form) {
          const benefitsTransform = formData => {
            const clonedData = _.cloneDeep(formData);
            const benefits = clonedData['view:benefit'];
        
        
        Severity: Minor
        Found in src/applications/edu-benefits/10203/submit-transformer.js - About 1 hr to fix

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

          export const buildSubmitEventData = formData => {
            const yesNoOrUndefined = value => {
              if (value === undefined) {
                return undefined;
              }
          Severity: Minor
          Found in src/applications/edu-benefits/1995/helpers.jsx - About 1 hr to fix

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

            export function schema(currentSchema, topicProperty = 'topic') {
              const topicSchema = currentSchema.properties[topicProperty];
              return {
                type: 'object',
                required: ['levelOne', 'levelTwo'],
            Severity: Minor
            Found in src/applications/ask-a-question/form/inquiry/topic/topic.js - About 1 hr to fix

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

              export const addFocusBehaviorToCrisisLineModal = () => {
                const overlay = document?.getElementById('ts-modal-crisisline');
                const modal = document?.querySelector('.vcl-crisis-panel.va-modal-inner');
              
                if (modal) {
              Severity: Minor
              Found in src/applications/proxy-rewrite/utilities/vcl-modal-behavior.js - 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 fetchRepresentatives has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const fetchRepresentatives = async (
                    address,
                    lat,
                    long,
                    name,

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

                    const AppointmentResources = props => {
                      const { router } = props;
                      const { goBack } = router;
                      const { t } = useTranslation();
                    
                    

                      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 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 YesDisabilityRating has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const YesDisabilityRating = 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 YesVaMemorandum has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

                                      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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language