department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

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

              export const sendMessage = (message, attachments) => async dispatch => {
                try {
                  await createMessage(message, attachments);
                  dispatch(
                    addAlert(
              Severity: Minor
              Found in src/applications/mhv-secure-messaging/actions/messages.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 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 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 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

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

                                const createRow = (inst, type, name = inst.institution) => {
                                  const estimatedHousing = (
                                    <div key="months">
                                      {estimatedHousingValue(inst)}
                                      <span className="sr-only">per month</span>
                              Severity: Minor
                              Found in src/applications/gi/components/profile/SchoolLocations.jsx - About 1 hr to fix

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

                                  const fieldLabel = (field, index, displayDiff) => {
                                    return (
                                      <div
                                        role="rowheader"
                                        key={`${index}-label`}
                                Severity: Minor
                                Found in src/applications/gi/components/CompareGrid.jsx - About 1 hr to fix

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

                                  export default function Disclaimer() {
                                    return (
                                      <div className="row disclaimer">
                                        <p>
                                          Please note: Content on this Web page is for informational purposes
                                  Severity: Minor
                                  Found in src/applications/gi/components/content/Disclaimer.jsx - About 1 hr to fix

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

                                    export default function SizeOfInstitutionsModalContent() {
                                      return (
                                        <>
                                          <p>
                                            The size of institutions is based on calculation of full-time equivalent

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

                                        const renderOptions = () => {
                                          const displayOptions = Array.isArray(options) ? options : [];
                                          return displayOptions.map((option, index) => {
                                            const { checked, optionLabel, name, learnMore, dataTestId } = option;
                                            return (
                                      Severity: Minor
                                      Found in src/applications/gi/components/CheckboxGroup.jsx - 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