department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function getCards has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const getCards = () => {
    const combinedEnrollmentsObj = combineEnrollmentsWithStartMonth(
      enrollmentPeriods,
    );
    const combinedEnrollmentsValues = Object.values(

    Function appointments has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const appointments = avs => {
      if (avs.appointments?.length > 0) {
        const scheduledAppointments = getAppointmentContent(
          APPOINTMENT_TYPES.SCHEDULED,
          avs.appointments,
    Severity: Minor
    Found in src/applications/avs/components/YourHealthInformation.jsx - About 1 hr to fix

      Function createFutureEvents has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const createFutureEvents = () => {
        // Types: upcoming, next-month, next-week
        return [
          // upcoming
          createEvent(
      Severity: Minor
      Found in src/applications/static-pages/events/helpers/event-generator.js - About 1 hr to fix

        Function SearchResults has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const SearchResults = () => {
          const {
            awaitingResults,
            searchResults,
            searchFolder,
        Severity: Minor
        Found in src/applications/mhv-secure-messaging/containers/SearchResults.jsx - About 1 hr to fix

          Function BackendAppointmentServiceAlert has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function BackendAppointmentServiceAlert() {
            const {
              backendServiceFailures,
              futureStatus,
              pastStatus,

            Function NextSteps has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function NextSteps() {
              return (
                <div className="next-steps-container vads-u-margin-bottom--4">
                  <h3 className="vads-u-margin-top--0 vads-u-margin-bottom--3">
                    Next steps

              Function renderEnrolled has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const renderEnrolled = () => {
                  const {
                    enrolled: shouldRenderEnrolled,
                    enrolledOld: shouldRenderEnrolledOld,
                  } = displayedInputs;

                Function deletePhoneNumberSuccess has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const deletePhoneNumberSuccess = () => {
                  return [
                    rest.delete(`${prefix}/v0/profile/telephones`, (req, res, ctx) => {
                      return res(
                        ctx.json({
                Severity: Minor
                Found in src/applications/personalization/profile/msw-mocks.js - About 1 hr to fix

                  Function fetchSearchResults has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function fetchSearchResults(query, page, options) {
                    return dispatch => {
                      dispatch({ type: FETCH_SEARCH_RESULTS, query });
                  
                      let queryString = `/search?query=${encodeURIComponent(query)}`;
                  Severity: Minor
                  Found in src/applications/search/actions/index.js - About 1 hr to fix

                    Function getEnrollmentData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function getEnrollmentData(apiVersion) {
                      return dispatch =>
                        apiRequest(
                          '/post911_gi_bill_status',
                          apiVersion,
                    Severity: Minor
                    Found in src/applications/post-911-gib-status/actions/post-911-gib-status.js - About 1 hr to fix

                      Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        render() {
                          return (
                            <div>
                              <div className="footer-inner">
                                <DesktopLinks
                      Severity: Minor
                      Found in src/platform/site-wide/va-footer/components/Footer.jsx - About 1 hr to fix

                        Function initMHVTermsMocks has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function initMHVTermsMocks(token, termsName = 'mhvac', bypass = true) {
                          mock(token, {
                            path: `/v0/terms_and_conditions/${termsName}/versions/latest`,
                            verb: 'get',
                            value: {
                        Severity: Minor
                        Found in src/platform/testing/e2e/account-creation-helpers.js - About 1 hr to fix

                          Function deriveNavItemsLookup has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const deriveNavItemsLookup = options => {
                            // Derive the properties from options.
                            const rootPath = get(options, 'rootPath');
                            const depth = get(options, 'depth', 0);
                            const items = get(options, 'items', []);
                          Severity: Minor
                          Found in src/platform/site-wide/side-nav/helpers.js - About 1 hr to fix

                            Function PreviousNames has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function PreviousNames(props) {
                              const { values, setFieldValue } = useFormikContext();
                            
                              useEffect(
                                () => {
                            Severity: Minor
                            Found in src/applications/burial-poc-v6/pages/PreviousNames.jsx - About 1 hr to fix

                              Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                render() {
                                  const { form } = this.props;
                                  const { submission, formId, data } = form;
                                  const submitDate = new Date(submission?.timestamp);
                              
                              
                              Severity: Minor
                              Found in src/applications/edu-benefits/1919/containers/ConfirmationPage.jsx - About 1 hr to fix

                                Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    const { form } = this.props;
                                    const { submission, formId, data } = form;
                                    const submitDate = new Date(submission?.timestamp);
                                    const { fullName } = data;
                                Severity: Minor
                                Found in src/applications/edu-benefits/8794/containers/ConfirmationPage.jsx - About 1 hr to fix

                                  Function redirectIfNecessary has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const redirectIfNecessary = currentWindow => {
                                    // Check if the route matches an absolute cross-domain redirect.
                                    const absoluteCrossDomainRedirects = crossDomainRedirects?.filter(
                                      redirect => !redirect?.catchAll && !redirect?.isToSubdomain,
                                    );
                                  Severity: Minor
                                  Found in src/applications/proxy-rewrite/redirects/index.js - About 1 hr to fix

                                    Function buildLevelOneLinks has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const buildLevelOneLinks = (sectionData, index) => {
                                        const isDropdown = sectionData?.menuSections;
                                        const sectionOpen = levelOneIndexOpen === index;
                                    
                                        if (isDropdown) {

                                      Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        render() {
                                          const fields = [
                                            {
                                              label: 'Subject',
                                              value: 'subject',
                                      Severity: Minor
                                      Found in src/applications/messages/components/Table.jsx - About 1 hr to fix

                                        Function TravelClaimCard has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function TravelClaimCard(props) {
                                          const {
                                            id,
                                            createdOn,
                                            claimStatus,
                                        Severity: Minor
                                        Found in src/applications/travel-pay/components/TravelClaimCard.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language