department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,736 of 12,815 total issues

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

export function transform(formConfig, form) {
  const newSchoolTransform = formData => {
    let clonedData = _.cloneDeep(formData);

    delete clonedData.newSchoolName;
Severity: Major
Found in src/applications/edu-benefits/1995/config/submit-transformer.js - About 2 hrs to fix

    Function listItems has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const listItems = providers.map((item, index) => {
        const { insuranceName, insurancePolicyHolderName } = item;
        const srLabel = getInsuranceSrLabel(item);
        const modalDescription = replaceStrValues(
          content['insurance-modal-remove-description'],

      Function UploadFileToVa has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const UploadFileToVa = () => {
        return (
          <div>
            <MainContentSubDiv id="upload-files-to-va" header="Upload files to VA">
              <LiSpanAndVaLinkAndPTag
      Severity: Major
      Found in src/applications/sco/components/MainContent/Update/UploadFileToVa.jsx - About 2 hrs to fix

        Function personalInfo has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const personalInfo = (state = initialState, action) => {
          switch (action.type) {
            case FETCH_PERSONAL_INFO:
              return {
                ...state,
        Severity: Major
        Found in src/applications/verify-your-enrollment/reducers/personalInfo.js - About 2 hrs to fix

          Function HouseholdFinancialOnboarding has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const HouseholdFinancialOnboarding = props => {
            const {
              goBack,
              goForward,
              contentBeforeButtons,
          Severity: Major
          Found in src/applications/hca/components/FormPages/FinancialInformation.jsx - About 2 hrs to fix

            Function OMBInfo has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const OMBInfo = () => {
              const expDate = '07/31/2027';
              const ombNum = '2900-0091';
              const resBurden = '35';
              return (

              Function useSendDemographicsFlags has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const useSendDemographicsFlags = () => {
                const selectApp = useMemo(makeSelectApp, []);
                const { app } = useSelector(selectApp);
                const [isLoading, setIsLoading] = useState(false);
                const [isComplete, setIsComplete] = useState(false);
              Severity: Major
              Found in src/applications/check-in/hooks/useSendDemographicsFlags.jsx - About 2 hrs to fix

                Function NextOfKin has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const NextOfKin = props => {
                  const { router } = props;
                  const { t } = useTranslation();
                
                  const selectVeteranData = useMemo(makeSelectVeteranData, []);
                Severity: Major
                Found in src/applications/check-in/pre-check-in/pages/NextOfKin/index.jsx - About 2 hrs to fix

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

                    const updateFormData = e => {
                      e.preventDefault();
                  
                      const errorList = selectedDeductions
                        .filter(

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

                      const updateFormData = e => {
                        e.preventDefault();
                    
                        const errorList = selectedDeductions
                          .filter(

                      Function processUl has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const processUl = ul => {
                          const nestedUls = ul.querySelectorAll('ul');
                      
                          // This section is to address nested <ul> tags
                          nestedUls.forEach(nestedUl => {
                      Severity: Major
                      Found in src/applications/mhv-medications/util/helpers.js - About 2 hrs to fix

                        File index.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import { stateList } from './stateList';
                        
                        const APP_NAMES = Object.freeze({
                          CHECK_IN: 'dayOf',
                          PRE_CHECK_IN: 'preCheckIn',
                        Severity: Minor
                        Found in src/applications/check-in/utils/appConstants/index.js - About 2 hrs to fix

                          File contactInformation.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React from 'react';
                          // import _ from 'platform/utilities/data';
                          import merge from 'lodash/merge';
                          import omit from 'platform/utilities/data/omit';
                          import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';

                            File index.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            const maximalSetOfPreferences = {
                              data: {
                                id: '',
                                type: 'hashes',
                                attributes: {

                              File search.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import camelCaseKeysRecursive from 'camelcase-keys-recursive';
                              
                              import {
                                SEARCH_STARTED,
                                SEARCH_FAILED,
                              Severity: Minor
                              Found in src/applications/gi/reducers/search.js - About 2 hrs to fix

                                File index.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                const createDebtsSuccess = () => {
                                  return {
                                    hasDependentDebts: false,
                                    debts: [
                                      {
                                Severity: Minor
                                Found in src/applications/personalization/dashboard/mocks/debts/index.js - About 2 hrs to fix

                                  File config.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import environment from 'platform/utilities/environment';
                                  import compact from 'lodash/compact';
                                  import {
                                    LocationType,
                                    FacilityType,
                                  Severity: Minor
                                  Found in src/applications/facility-locator/config.js - About 2 hrs to fix

                                    Function submitTransformer has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function submitTransformer(formConfig, form) {
                                      const { data: formData, loadedData } = form;
                                      const expandedPages = expandArrayPages(
                                        createFormPageList(formConfig),
                                        formData,
                                    Severity: Major
                                    Found in src/applications/ezr/utils/helpers/submit-transformer.js - About 2 hrs to fix

                                      Function updateSchema has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            updateSchema: (formData, addressSchema, addressUiSchema, index, path) => {
                                              let currentSchema = addressSchema;
                                      
                                              const modifiedData = { ...formData };
                                      
                                      
                                      Severity: Major
                                      Found in src/applications/pre-need/definitions/address.js - About 2 hrs to fix

                                        Function submitTransformer has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function submitTransformer(formConfig, form) {
                                          const { data: formData, loadedData } = form;
                                          const expandedPages = expandArrayPages(
                                            createFormPageList(formConfig),
                                            formData,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language