department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function addServicePeriod has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const addServicePeriod = (formData, separationDate, setFormData) => {
  const updateData = newData => {
    window.sessionStorage.removeItem(SAVED_SEPARATION_DATE);
    setFormData({
      ...newData,

    Function fixTreatedDisabilityNamesKey has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function fixTreatedDisabilityNamesKey(savedData) {
      const formData = clone(savedData.formData);
      const facilities = formData.vaTreatmentFacilities || [];
      const powDisabilities = formData['view:isPow']?.powDisabilities;
      if (facilities) {

      Function burialUploadUI has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const burialUploadUI = content => {
        const findAndFocusLastSelect = () => {
          const lastSelect = [...document.querySelectorAll('select')].slice(-1);
          if (lastSelect.length) {
            focusElement(lastSelect[0]);
      Severity: Minor
      Found in src/applications/burials-ez/utils/upload.js - About 1 hr to fix

        Function DisagreeFileClaimPage has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const DisagreeFileClaimPage = () => {
          recordEvent({
            event: 'howToWizard-alert-displayed',
            'reason-for-alert': 'disagree with VA decision, needs a decision review',
          });

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

            const updateFormData = event => {
              event.preventDefault();
          
              const inputValue = homeAcreageValue.value;
          
          
          Severity: Minor
          Found in src/applications/pensions/components/HomeAcreageValueInput.jsx - About 1 hr to fix

            Function TotalNetWorthOverTwentyFiveThousandAlert has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const TotalNetWorthOverTwentyFiveThousandAlert = () => {
              const linkText = 'Get VA Form 21P-0969 to download (opens in new tab)';
              return (
                <va-alert status="warning">
                  <p className="vads-u-margin-y--0">
            Severity: Minor
            Found in src/applications/pensions/components/FormAlerts/index.jsx - About 1 hr to fix

              Function updateSchema has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                        updateSchema: formData => {
                          let mailingAddress;
                          const veteransAddress =
                            formData[veteranFields.parentObject][veteranFields.address];
                          if (
              Severity: Minor
              Found in src/applications/simple-forms/21-4142/pages/preparerAddress1.js - About 1 hr to fix

                Function Zero has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                ComboAlert.Zero = () => {
                  return (
                    <va-alert
                      class="row vads-u-margin-bottom--5"
                      status="info"

                  Function HouseholdExpensesChecklist has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const HouseholdExpensesChecklist = () => {
                    const dispatch = useDispatch();
                    const formData = useSelector(state => state.form.data);
                  
                    const { expenses } = formData;

                    Function onGoForward has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const onGoForward = () => {
                        const courtEr = courtLocation.length === 0;
                        const docketEr = docketNumber.length === 0;
                        const dateEr = dateDischarged.length === 0;
                    
                    

                      Function getLetterList has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function getLetterList(dispatch, LH_MIGRATION__options, shouldUseLettersDiscrepancies = false) {
                        if (shouldUseLettersDiscrepancies) {
                          // Call the endpoint to log evss vs lighthouse letter discrepancies
                          apiRequest('/v0/letters_discrepancy');
                        }
                      Severity: Minor
                      Found in src/applications/letters/actions/letters.js - About 1 hr to fix

                        Function saveReplyDraft has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        ) => async dispatch => {
                          recordEvent({
                            // For Google Analytics
                            event: 'secure-messaging-save-draft-type',
                            'secure-messaging-save-draft': type,
                        Severity: Minor
                        Found in src/applications/mhv-secure-messaging/actions/draftDetails.js - About 1 hr to fix

                          Function displayType has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function displayType(errorCodes, location) {
                            const isPending = location.pathname.endsWith('/pending');
                            const isPast = location.pathname.endsWith('/past');
                            const isUpcoming = location.pathname.endsWith('/');
                          
                          

                            Function EditContentListOrSignatureModal has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const EditContentListOrSignatureModal = props => {
                              const { editListModal, onClose } = props;
                              const fullState = useSelector(state => state);
                            
                              return (

                              Function selectProviderSelectionInfo has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function selectProviderSelectionInfo(state) {
                                const {
                                  communityCareProviders,
                                  data,
                                  requestStatus,
                              Severity: Minor
                              Found in src/applications/vaos/new-appointment/redux/selectors.js - About 1 hr to fix

                                Function getFacilityPageV2Info has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function getFacilityPageV2Info(state) {
                                  const formInfo = getFormPageInfo(state, 'vaFacilityV2');
                                  const data = getFormData(state);
                                  const newAppointment = getNewAppointment(state);
                                  const typeOfCare = getTypeOfCare(data);
                                Severity: Minor
                                Found in src/applications/vaos/new-appointment/redux/selectors.js - About 1 hr to fix

                                  Function getLongTermAppointmentHistoryV2 has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const getLongTermAppointmentHistoryV2 = ((chunks = 1) => {
                                    const batch = [];
                                    let promise = null;
                                  
                                    return () => {
                                  Severity: Minor
                                  Found in src/applications/vaos/services/appointment/index.js - About 1 hr to fix

                                    Function getDefaultPage has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      getDefaultPage() {
                                        return (
                                          <>
                                            <DefaultPage
                                              backUrl={this.props.lastPage ? `/${this.props.lastPage}` : filesPath}
                                    Severity: Minor
                                    Found in src/applications/claims-status/containers/DocumentRequestPage.jsx - About 1 hr to fix

                                      Function GET /vaos/v2/appointments has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        'GET /vaos/v2/appointments': (req, res) => {
                                          // merge arrays together
                                          const appointments = confirmedV2.data.concat(requestsV2.data, mockAppts);
                                          const filteredAppointments = appointments.filter(appointment => {
                                            return req.query.statuses.some(status => {
                                      Severity: Minor
                                      Found in src/applications/vaos/services/mocks/index.js - About 1 hr to fix

                                        Function handleScroll has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            () => {
                                              if (
                                                !initialTop &&
                                                headerRef.current &&
                                                headerRef.current.offsetTop &&
                                        Severity: Minor
                                        Found in src/applications/gi/containers/ComparePage.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language