department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,759 of 12,759 total issues

Function MissingEDIPI has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const MissingEDIPI = () => {
  recordEvent({
    event: 'visible-alert-box',
    'alert-box-type': 'error',
    'alert-box-heading': 'We need more information for your application',

    Function handleTouClick has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const handleTouClick = async type => {
        const cernerType = type === 'accept' ? 'accept_and_provision' : type;
    
        try {
          setIsDisabled(true);
    Severity: Minor
    Found in src/applications/terms-of-use/components/MyVAHealth.jsx - About 1 hr to fix

      Function IntroductionPage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const IntroductionPage = props => {
        const { route } = props;
      
        const { isUserLOA1, isUserLOA3 } = useSelector(selectAuthStatus);
        const { formConfig, pageList } = route;

        Function updateMemDb has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const updateMemDb = (req, res) => {
          const key = `${req.method} ${req.url}`;
          const body = req.body || {};
        
          if (key === 'PUT /v0/profile/telephones') {

          Function createSaveInProgressUpdate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const createSaveInProgressUpdate = req => {
            const now = new Date().toISOString();
          
            const formId = req.params.id;
          
          

            Function MissingEDIPI has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const MissingEDIPI = () => {
              recordEvent({
                event: 'visible-alert-box',
                'alert-box-type': 'error',
                'alert-box-heading': 'We need more information for your application',
            Severity: Minor
            Found in src/applications/lgy/coe/form/components/MissingEDIPI.jsx - About 1 hr to fix

              Function DefaultAlert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const DefaultAlert = () => {
                  return (
                    <div data-testid="mhv-unverified-alert">
                      <CustomAlert
                        headline={headline}

                Function organizeAppointmentsByYearMonthDay has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function organizeAppointmentsByYearMonthDay(appointments) {
                  const organizedData = [];
                
                  // First sort the appointments by start time then organize them by yearmonth and day
                  const sortedAppointments = sortAppointmentsByStartTime(appointments);
                Severity: Minor
                Found in src/applications/check-in/utils/appointment/index.js - About 1 hr to fix

                  Function withForm has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const withForm = (Component, options = {}) => {
                    const WrappedComponent = props => {
                      const { appName } = options;
                      const { router } = props;
                      const selectForm = useMemo(makeSelectForm, []);
                  Severity: Minor
                  Found in src/applications/check-in/containers/withForm.jsx - About 1 hr to fix

                    Function onChange has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const onChange = event => {
                        const pageState = event.target.value || '';
                        saveDischargeDate();
                        const date = isDateComplete(pageState) ? getDate(pageState) : null;
                        const nextPage =
                    Severity: Minor
                    Found in src/applications/disability-benefits/wizard/pages/bdd.jsx - About 1 hr to fix

                      Function transformForSubmit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function transformForSubmit(formConfig, form) {
                        let transformedData = JSON.parse(sharedTransformForSubmit(formConfig, form));
                      
                        const witnessRelationshipToClaimantAnswers =
                          transformedData?.witnessRelationshipToClaimant;
                      Severity: Minor
                      Found in src/applications/simple-forms/21-10210/config/submit-transformer.js - About 1 hr to fix

                        Function App has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const App = props => {
                          const {
                            children,
                            formData,
                            setFormData,
                        Severity: Minor
                        Found in src/applications/simple-forms/20-10206/containers/App.jsx - About 1 hr to fix

                          Function profileReducer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function profileReducer(state = getNullProfileState(), action) {
                            switch (action.type) {
                              case FETCH_USER:
                                return {
                                  ...state,
                          Severity: Minor
                          Found in src/applications/accredited-representative-portal/reducers/user.js - About 1 hr to fix

                            Function DependentAgesReview has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const DependentAgesReview = () => {
                              const hasDependents = useSelector(
                                state => state.form.data.questions?.hasDependents,
                              );
                              const dependents = useSelector(

                              Function handleChange has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const handleChange = async event => {
                                  const file = event?.detail?.files[0];
                                  const extraData = {};
                              
                                  const checks = { checkTypeAndExtensionMatches, checkIsEncryptedPdf };

                                Function updateFormData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const updateFormData = () => {
                                    if (!isValidCurrency(cash)) {
                                      return setError(ERR_MSG);
                                    }
                                
                                

                                  Function onSubmit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const onSubmit = event => {
                                      event.preventDefault();
                                  
                                      const hasEmptyInput = stateDependents.some(
                                        dependent => dependent.dependentAge === '',

                                    Function paths has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const paths = () => {
                                        return [
                                          {
                                            path: Paths.INBOX,
                                            label: 'Inbox',
                                    Severity: Minor
                                    Found in src/applications/mhv-secure-messaging/components/Navigation.jsx - About 1 hr to fix

                                      Function retrieveFolder has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const retrieveFolder = folderId => async (dispatch, getState) => {
                                        const isPilot = getIsPilotFromState(getState);
                                        await getFolder({ folderId, isPilot })
                                          .then(response => {
                                            if (response.data) {
                                      Severity: Minor
                                      Found in src/applications/mhv-secure-messaging/actions/folders.js - About 1 hr to fix

                                        Function openContactFacilitiesPage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function openContactFacilitiesPage() {
                                          return async (dispatch, getState) => {
                                            try {
                                              const initialState = getState();
                                              const newBooking = selectCovid19VaccineNewBooking(initialState);
                                        Severity: Minor
                                        Found in src/applications/vaos/covid-19-vaccine/redux/actions.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language