department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,762 of 12,762 total issues

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

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

  const { goToNextPage } = useFormRouting(router);
Severity: Minor
Found in src/applications/check-in/travel-claim/pages/LoadingPage/index.jsx - 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 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 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 displayContent has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const displayContent = (title, form526RequiredIdentifers) => {
            const missingIdentifiers = filterMissingIdentifiers(
              form526RequiredIdentifers,
            );
          
          

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

                                        export function transformFacilityV2(facility) {
                                          return {
                                            resourceType: 'Location',
                                            id: facility.id,
                                            vistaId: facility.vistaSite,
                                        Severity: Minor
                                        Found in src/applications/vaos/services/location/transformers.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language