department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,848 of 12,848 total issues

Function customCOEsubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const customCOEsubmit = (formConfig, form) => {
  const formCopy = cloneDeep(form);

  const { periodsOfService = [], relevantPriorLoans = [] } = formCopy.data;

Severity: Minor
Found in src/applications/lgy/coe/form/config/helpers.js - About 1 hr to fix

    Function customCOEsubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const customCOEsubmit = (formConfig, form) => {
      const formCopy = cloneDeep(form);
    
      const { periodsOfService = [], relevantPriorLoans = [] } = formCopy.data;
    
    

      Function renderVaMedication has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const renderVaMedication = medication => {
        const facilityPhone = normalizePhoneNumber(medication.facilityPhone);
        const phoneNotClickable = !numberIsClickable(facilityPhone);
      
        return (
      Severity: Minor
      Found in src/applications/avs/components/YourHealthInformation.jsx - About 1 hr to fix

        Function useRepresentativeStatus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function useRepresentativeStatus() {
          const [representative, setRepresentative] = useState(null);
          const [isLoading, setIsLoading] = useState(true);
          const [error, setError] = useState(null);
        
        

          Function useDemographicsFlags has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const useDemographicsFlags = () => {
            const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
            const context = useSelector(selectCurrentContext);
            const { token } = context;
          
          
          Severity: Minor
          Found in src/applications/check-in/hooks/useDemographicsFlags.jsx - About 1 hr to fix

            Function constructor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              constructor(props) {
                super(props);
                // Throw an error if there’s no viewComponent (should be React component)
                if (
                  !isReactComponent(get('ui:options.viewComponent', this.props.uiSchema))

              Function reorderHousingIllnessRemoveFdc has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function reorderHousingIllnessRemoveFdc(savedData) {
                const { returnUrl } = savedData.metadata;
              
                if (
                  returnUrl === '/veteran-information' ||

                Function confirmationPageAlertParagraph has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const confirmationPageAlertParagraph = formData => {
                  if (confirmationPageFormBypassed(formData)) {
                    if (
                      hasActiveCompensationITF({ formData }) &&
                      hasActivePensionITF({ formData })
                Severity: Minor
                Found in src/applications/simple-forms/21-0966/config/helpers.js - About 1 hr to fix

                  Function ShowWorkDates has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const ShowWorkDates = () => {
                      return (
                        <div className="vads-u-margin-top--3">
                          <VaDate
                            monthYearOnly

                    Function checkIncomeGmt has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const checkIncomeGmt = async (data, setFormData) => {
                      const { gmtData } = data;
                    
                      try {
                        const response = await getCalculatedMonthlyIncomeApi(data);

                      Function ShowWorkDates has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const ShowWorkDates = () => {
                          return (
                            <div className="vads-u-margin-top--3">
                              <VaDate
                                monthYearOnly

                        Function UtilityBillInputList has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const UtilityBillInputList = props => {
                          const { errorSchema, formContext } = props;
                          const errorList = errorSchema?.utilityRecords?.__errors;
                          const { submitted } = formContext;
                        
                        

                          Function submit5103 has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function submit5103(id, trackedItemId, cstClaimPhasesEnabled = false) {
                            return dispatch => {
                              dispatch({
                                type: SUBMIT_DECISION_REQUEST,
                              });
                          Severity: Minor
                          Found in src/applications/claims-status/actions/index.js - About 1 hr to fix

                            Function renderWorking has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const renderWorking = () => {
                                if (!displayedInputs.working) return null;
                                return (
                                  <Dropdown
                                    label={learnMoreLabel({

                              Function handleVetTechPreferredProviderChange has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const handleVetTechPreferredProviderChange = (e, currentName) => {
                                  const { checked } = e.target;
                                  const name = currentName || e.target.name;
                                  if (checked && name === 'vettec') {
                                    dispatchFilterChange({
                              Severity: Minor
                              Found in src/applications/gi/containers/search/FilterBeforeResults.jsx - About 1 hr to fix

                                Function beneficiaryZIPCodeChanged has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function beneficiaryZIPCodeChanged(beneficiaryZIP) {
                                  // pass input through to reducers if not five digits
                                  if (!beneficiaryZIPRegExTester.exec(beneficiaryZIP)) {
                                    return {
                                      type: BENEFICIARY_ZIP_CODE_CHANGED,
                                Severity: Minor
                                Found in src/applications/gi/actions/index.js - About 1 hr to fix

                                  Function renderCautionFlags has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const renderCautionFlags = () => {
                                      if (!schoolClosing && cautionFlags.length === 0) {
                                        return null;
                                      }
                                  
                                  
                                  Severity: Minor
                                  Found in src/applications/gi/components/profile/CautionaryInformation.jsx - About 1 hr to fix

                                    Function updateUrlParams has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const updateUrlParams = (
                                      history,
                                      tab,
                                      searchQuery,
                                      filters,
                                    Severity: Minor
                                    Found in src/applications/gi/selectors/search.js - About 1 hr to fix

                                      Function setupMap has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        const setupMap = () => {
                                          if (map.current) return; // initialize map only once
                                          const container = document.getElementById('mapbox-gl-container');
                                          if (!container) return;
                                      
                                      
                                      Severity: Minor
                                      Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

                                        Function handleInputChange has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const handleInputChange = (event, target, name) => {
                                            const { value } = event ? event.target : target.detail;
                                            const field = event ? event.target.name : name;
                                            calculatorInputChange({ field, value });
                                        
                                        
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language