department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

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 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 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 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 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 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 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 });
                  
                  

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

                            const mapElement = (visible = true) => {
                              const containerClassNames = classNames({
                                'vads-u-display--none': !visible,
                              });
                              const isMobileDevice = smallScreen || landscape;
                          Severity: Minor
                          Found in src/applications/gi/containers/search/LocationSearchResults.jsx - 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 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 renderWorking has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

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

                                  export default function useDowntimeApproachingRenderMethod() {
                                    const [modalDismissed, setModalDismissed] = useState(false);
                                  
                                    return (downtime, children) => {
                                      if (downtime.status === externalServiceStatus.downtimeApproaching) {

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

                                    function ViewDependentsLists(props) {
                                      const onAwardSubhead = (
                                        <>
                                          The following dependents have been added to your VA benefits. Please let
                                          us know if a dependent’s status has changed.

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

                                      const DisabilityRating = () => {
                                        const hasError = useSelector(totalDisabilityError);
                                        const rating = useSelector(state => state.totalRating?.totalDisabilityRating);
                                        const canAccessRatingInfo = useSelector(canAccess)?.[API_NAMES.RATING_INFO];
                                      
                                      

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

                                        const NoServiceHistoryAlert = () => {
                                          return (
                                            <>
                                              <va-alert status="warning" uswds class="vads-u-margin-bottom--4">
                                                <h2 slot="headline">
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language