department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

export default function ClaimDetailsContent(props) {
  const {
    createdOn,
    claimStatus,
    claimNumber,
Severity: Minor
Found in src/applications/travel-pay/components/ClaimDetailsContent.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 App has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const App = props => {
          const {
            children,
            formData,
            setFormData,
        Severity: Minor
        Found in src/applications/simple-forms/20-10206/containers/App.jsx - About 1 hr to fix

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

          export const eventsIntroDescription = () => {
            return (
              <>
                <p>
                  We want to know about any traumatic events during your military service.

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

                      const programLabel = programKey => {
                        const program = programs[programKey];
                        const showLink = program.link && program.link.href;
                    
                        const link =

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

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

                                    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 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">

                                        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.
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language