department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function handleSearch has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleSearch = async () => {
    if (!query.trim()) {
      setSearchInputError(content['validation-facilities--search-required']);
      return;
    }

    Function GetFormHelp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const GetFormHelp = () => {
      return (
        <>
          <p>
            If you have trouble using this online form, call our MyVA411 main

      Function ClaimantInformationComponent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function ClaimantInformationComponent() {
        const {
          gender,
          dob,
          userFullName: { first, last },

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

          const updateFormData = e => {
            setSubmitted(true);
            e.preventDefault();
        
            const loanBeganContainsGoodValue = validateLoanBegan(

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

            const updateFormData = e => {
              setSubmitted(true);
              e.preventDefault();
          
              if (unpaidBalanceError || minMonthlyPaymentError || amountOverdueError) {

            Function EditPreferences has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const EditPreferences = () => {
              const [editListModal, setEditListModal] = useState(false);
              const editPreferencesButtonRef = useRef();
              const handleModalClose = useCallback(() => {
                focusElement(editPreferencesButtonRef.current);

              Function checkMessageValidity has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  () => {
                    let messageValid = true;
                    let signatureValid = true;
                    let checkboxValid = true;
              
              

                Function handleDeleteDraftConfirm has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const handleDeleteDraftConfirm = () => {
                    if (savedDraft) {
                      setNavigationError(null);
                      setIsModalVisible(false);
                      dispatch(deleteDraft(draftId)).then(() => {

                  Function getFacilityPageInfo has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function getFacilityPageInfo(state) {
                    const formInfo = getCovid19VaccineFormPageInfo(state, 'vaFacility');
                    const data = selectCovid19VaccineFormData(state);
                    const newBooking = selectCovid19VaccineNewBooking(state);
                  
                  
                  Severity: Minor
                  Found in src/applications/vaos/covid-19-vaccine/redux/selectors.js - About 1 hr to fix

                    Function transformFacilityV2 has 33 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

                      Function searchResults has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const searchResults = (cnt, visible = true) => {
                          if (cnt > 0) {
                            const containerClassNames = classNames(
                              'location-search-results-container',
                              'usa-grid',
                      Severity: Minor
                      Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

                        Function schoolTypesCheckboxes has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function schoolTypesCheckboxes(
                          handleIncludedSchoolTypesChange,
                          options,
                          smallScreen,
                          automatedTest = false,
                        Severity: Minor
                        Found in src/applications/gi/containers/search/FilterBeforeResults.jsx - About 1 hr to fix

                          Function yellowRibbonReducer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const yellowRibbonReducer = (state = initialState, action) => {
                            switch (action.type) {
                              case FETCH_RESULTS: {
                                return {
                                  ...state,
                          Severity: Minor
                          Found in src/applications/yellow-ribbon/reducers/index.js - About 1 hr to fix

                            Function LoginAlert has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const LoginAlert = () => {
                              const { ID_ME, LOGIN_GOV } = CSP_IDS;
                              const heading = `Verify your identity with Login.gov or ID.me to change your direct deposit information online`;
                              return (
                                <VaAlert status="continue" visible uswds>

                              Function createApplications has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const createApplications = (updatedDaysAgo = 1) => {
                                const daysAgo = subDays(Date.now(), updatedDaysAgo);
                              
                                return {
                                  data: [

                                Function renderOrg has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const renderOrg = () => {
                                    return (
                                      <dl className="review">
                                        <div className="review-row">
                                          <dt>Name</dt>

                                  Function subNameContent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const subNameContent = () => {
                                      const accreditedOrganizations =
                                        repAttributes?.accreditedOrganizations?.data;
                                  
                                      if (isOrg) {

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

                                      const DefaultErrorMessage = () => {
                                        let InlineErrorComponent;
                                        if (isReactComponent(errorText)) {
                                          InlineErrorComponent = errorText;
                                        } else if (typeof errorText === 'string') {
                                    Severity: Minor
                                    Found in src/platform/forms/components/review/FormSaveErrorMessage.jsx - About 1 hr to fix

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

                                        redirectOrLoad(props) {
                                          // Stop a user that's been redirected from being redirected again after
                                          // logging in
                                          this.shouldRedirectOrLoad = false;
                                      
                                      
                                      Severity: Minor
                                      Found in src/platform/forms/save-in-progress/RoutedSavableApp.jsx - About 1 hr to fix

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

                                        export function expandArrayPages(pageList, data) {
                                          const result = pageList.reduce(
                                            (acc, nextPage) => {
                                              const { lastArrayPath, arrayPages, currentList } = acc;
                                              // If we see an array page and we’re starting a section or in the middle of one, just add it
                                        Severity: Minor
                                        Found in src/platform/forms-system/src/js/helpers.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language