department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,730 of 12,800 total issues

Function VaccinesListItem has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const VaccinesListItem = props => {
  const { record } = props;

  return (
    <va-card

    Function createBreadcrumbs has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const createBreadcrumbs = (location, prescription, currentPage) => {
      const { pathname } = location;
      const defaultBreadcrumbs = [
        {
          href: medicationsUrls.VA_HOME,
    Severity: Minor
    Found in src/applications/mhv-medications/util/helpers.js - About 1 hr to fix

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

        render() {
          const { user, form, formConfig, route } = this.props;
          const finishAppLaterMessage =
            formConfig?.customText?.finishAppLaterMessage ||
            FINISH_APP_LATER_DEFAULT_MESSAGE;
      Severity: Minor
      Found in src/platform/forms/save-in-progress/RoutedSavablePage.jsx - About 1 hr to fix

        Function addFocusBehaviorToCrisisLineModal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function addFocusBehaviorToCrisisLineModal() {
          const overlay = document.getElementById('modal-crisisline');
          const modal = document.querySelector('.va-crisis-panel.va-modal-inner');
          const tabbableElements = getTabbableElements(modal);
          let openControl;
        Severity: Minor
        Found in src/platform/site-wide/accessible-VCL-modal.js - About 1 hr to fix

          Function titleUI has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const titleUI = (titleOption, descriptionOption) => {
            const {
              title,
              description,
              headerLevel,

            Function HealthcareModalContent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function HealthcareModalContent() {
              return (
                <>
                  <p>
                    <strong>Respondent Burden:</strong> This information is collected in

              Function schema has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const schema = optionalFields => {
                const s = {
                  type: 'object',
                  properties: {
                    bankAccount: {
              Severity: Minor
              Found in src/platform/forms-system/src/js/definitions/directDeposit.jsx - About 1 hr to fix

                Function itemPage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  pageBuilder.itemPage = pageConfig => {
                    const requiredOpts = ['title', 'path', 'uiSchema', 'schema'];
                    verifyRequiredPropsPageConfig('itemPage', requiredOpts, pageConfig);
                    const { onNavBack, onNavForward } = getNavItem(pageConfig.path);
                
                

                  Function determineResultsPage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const determineResultsPage = (formResponses, router) => {
                    const responseToServicePeriod = getServicePeriodResponse(formResponses);
                    const { RESULTS_4 } = SHORT_NAME_MAP;
                  
                    const resultsPages = DISPLAY_CONDITIONS?.RESULTS;
                  Severity: Minor
                  Found in src/applications/pact-act/utilities/display-logic-results.js - About 1 hr to fix

                    Function updateData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function updateData(oldForm, newForm) {
                      const updatedForm = newForm;
                    
                      checkBoxElements.forEach(elementName => {
                        // For each checkBoxGroup in the form, get the number of selected elements before and after the current event
                    Severity: Minor
                    Found in src/applications/coronavirus-research/update/config/formHelper.js - About 1 hr to fix

                      Function recurseField has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const recurseField = (key, field, rank = 0) => {
                        if (
                          field.value === '' ||
                          field.value === 0 ||
                          field.value === null ||
                      Severity: Minor
                      Found in src/applications/burial-poc-v6/pages/ReviewPage.jsx - About 1 hr to fix

                        Function updateData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function updateData(oldForm, newForm) {
                          const updatedForm = newForm;
                          checkBoxElements.forEach(elementName => {
                            // For each checkBoxGroup in the form, get the number of selected elements before and after the current event
                            const oldSelectedCount = Object.keys(oldForm[elementName]).filter(
                        Severity: Minor
                        Found in src/applications/coronavirus-research/sign-up/config/formHelper.js - About 1 hr to fix

                          Function InitialConfirmEligibilityView has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function InitialConfirmEligibilityView(props) {
                            if (props.onReviewPage) {
                              return null;
                            }
                            captureEvents.ineligibilityAlert(props);

                            Function buildSubmitEventData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const buildSubmitEventData = formData => {
                              const yesNoOrUndefined = value => {
                                if (value === undefined) {
                                  return undefined;
                                }
                            Severity: Minor
                            Found in src/applications/edu-benefits/1995/helpers.jsx - About 1 hr to fix

                              Function schema has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function schema(currentSchema, topicProperty = 'topic') {
                                const topicSchema = currentSchema.properties[topicProperty];
                                return {
                                  type: 'object',
                                  required: ['levelOne', 'levelTwo'],
                              Severity: Minor
                              Found in src/applications/ask-a-question/form/inquiry/topic/topic.js - About 1 hr to fix

                                Function transform has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function transform(formConfig, form) {
                                  const benefitsTransform = formData => {
                                    const clonedData = _.cloneDeep(formData);
                                    const benefits = clonedData['view:benefit'];
                                
                                
                                Severity: Minor
                                Found in src/applications/edu-benefits/10203/submit-transformer.js - About 1 hr to fix

                                  Function addFocusBehaviorToCrisisLineModal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const addFocusBehaviorToCrisisLineModal = () => {
                                    const overlay = document?.getElementById('ts-modal-crisisline');
                                    const modal = document?.querySelector('.vcl-crisis-panel.va-modal-inner');
                                  
                                    if (modal) {
                                  Severity: Minor
                                  Found in src/applications/proxy-rewrite/utilities/vcl-modal-behavior.js - About 1 hr to fix

                                    Function addressReducer has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function addressReducer(state = initialState, action) {
                                      switch (action.type) {
                                        case ADDRESS_VALIDATION_START:
                                          return {
                                            ...state,

                                      Function fetchRepresentatives has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const fetchRepresentatives = async (
                                        address,
                                        lat,
                                        long,
                                        name,

                                        Function AppointmentResources has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const AppointmentResources = props => {
                                          const { router } = props;
                                          const { goBack } = router;
                                          const { t } = useTranslation();
                                        
                                        
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language