department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

          enrollmentToBeVerified => {
            const {
              verificationBeginDate,
              verificationEndDate,
              // lastDepositAmount,
      Severity: Minor
      Found in src/applications/verify-your-enrollment/helpers.jsx - 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 facilityListProps has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                () => {
                  const caregiverSupport = async facility => {
                    const offersCaregiverSupport = facility.services?.health?.some(
                      service => service.serviceId === 'caregiverSupport',
                    );

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

              export const setupPages = formConfig => {
                const chapterKeys = Object.keys(formConfig?.chapters || {});
                const chapterTitles = Object.values(formConfig?.chapters || {}).map(
                  value => value.title,
                );
              Severity: Minor
              Found in src/applications/ask-va/utils/reviewPageHelper.js - About 1 hr to fix

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

                const PageFieldSummary = props => {
                  const { renderedProperties, defaultEditButton, updatedPage } = props;
                  const { allPages } = setupPages(formConfig);
                  const currentPage = allPages.filter(page => page.key === updatedPage);
                  const alertPage = allPages.filter(page => page.title === 'Your question');

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

                  export function getBenefitOptionText(
                    option,
                    value,
                    isVeteran,
                    awardEffectiveDate,
                  Severity: Minor
                  Found in src/applications/letters/utils/helpers.jsx - About 1 hr to fix

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

                        () => {
                          if (!optGroupEnabled) {
                            return sortRecipients(recipientsList)?.map(item => (
                              <option key={item.id} value={item.id}>
                                {item.name}

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

                      export function formatDescription(description, location = '') {
                        if (!description || !description.text) {
                          return 'DESCRIPTION:';
                        }
                      
                      
                      Severity: Minor
                      Found in src/applications/vaos/utils/calendar.js - About 1 hr to fix

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

                          const renderKicker = () => {
                            if (!displayedInputs.kicker) return null;
                            const radioButtonsLabelText = 'Eligible for kicker bonus?';
                            const kickerAmountId = 'kickerAmount';
                            const kickerFieldId = `${kickerAmountId}-field`;

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

                          export default function(state = INITIAL_STATE, action) {
                            switch (action.type) {
                              case FILTERS_CHANGED:
                                return {
                                  ...state,
                          Severity: Minor
                          Found in src/applications/gi/reducers/filters.js - About 1 hr to fix

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

                            export const notificationsReducer = (state = initialState, action) => {
                              switch (action.type) {
                                case NOTIFICATIONS_RECEIVED_STARTED:
                                  return {
                                    ...state,
                            Severity: Minor
                            Found in src/applications/personalization/common/reducers/notifications.js - About 1 hr to fix

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

                                  () => {
                                    if (isDataFetched) {
                                      return {
                                        labsAndTests:
                                          labsAndTests && recordFilter?.includes('labTests')

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

                                  const renderResults = () => {
                                    return (
                                      <div>
                                        <ResultsCounter
                                          currentPage={currentPage}
                                Severity: Minor
                                Found in src/applications/search/containers/SearchApp.jsx - About 1 hr to fix

                                  Function PmcModalContent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function PmcModalContent() {
                                    return (
                                      <>
                                        <p>
                                          <strong>Respondent Burden:</strong> Public reporting burden for this

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

                                      render() {
                                        let beforeText = '';
                                    
                                        if (this.props.beforeText && this.props.beforeText === '«') {
                                          beforeText = (
                                    Severity: Minor
                                    Found in src/platform/forms-system/src/js/components/ProgressButton.jsx - About 1 hr to fix

                                      Function handleSubmit has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        const handleSubmit = e => {
                                          e.preventDefault();
                                      
                                          const {
                                            facilityType,
                                      Severity: Minor
                                      Found in src/applications/facility-locator/components/SearchControls.jsx - About 1 hr to fix

                                        Function ConfirmationPage has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const ConfirmationPage = () => {
                                          resetStoredSubTask();
                                        
                                          return (
                                            <ConfirmationDecisionReviews
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language