department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,846 of 12,846 total issues

Function renderAlert has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const renderAlert = (alertType, debts) => {
  const alertInfo = alertMessage(alertType, APP_TYPES.COPAY);
  const showOther = debts > 0;
  const showVAReturnLink = !showOther && alertType !== ALERT_TYPES.ALL_ERROR;

    Function renderAlert has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const renderAlert = (alertType, statements) => {
      const alertInfo = alertMessage(alertType, APP_TYPES.DEBT);
      const showOther = statements > 0;
      const showVAReturnLink = !showOther && alertType !== ALERT_TYPES.ALL_ERROR;
    
    

      Function getDynamicContent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const getDynamicContent = formResponses => {
        // Final content to show on the results page
        const dynamicContentMatchingAnswer = [];
      
        // Get array of short names with responses in the store minus SERVICE_PERIOD and any question ending in '_A'
      Severity: Minor
      Found in src/applications/pact-act/utilities/results-1-1-dynamic-content.js - About 1 hr to fix

        Function addressValidationSuccessSingleConfirmedSuggestion has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          addressValidationSuccessSingleConfirmedSuggestion() {
            return asyncReturn(
              {
                addresses: [
                  {
        Severity: Minor
        Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

          Function applyFocus has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const applyFocus = (parentId, headerHasFocused, setHeaderHasFocused) => {
            if (!headerHasFocused) {
              setTimeout(() => {
                const header = document
                  .getElementById(parentId)
          Severity: Minor
          Found in src/applications/pact-act/utilities/page-setup.js - About 1 hr to fix

            Function buildAddressArray has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function buildAddressArray(location, titleCaseText = false) {
              if (location && location.type === LocationType.CC_PROVIDER) {
                const { address } = location.attributes;
            
                if (!isEmpty(address)) {
            Severity: Minor
            Found in src/applications/facility-locator/utils/facilityAddress.js - About 1 hr to fix

              Function SearchResultReducer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const SearchResultReducer = (state = INITIAL_STATE, action) => {
                switch (action.type) {
                  case FETCH_LOCATIONS:
                    return {
                      ...state,
              Severity: Minor
              Found in src/applications/facility-locator/reducers/searchResult.js - About 1 hr to fix

                Function onContinueClick has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const onContinueClick = () => {
                    if (!formValue) {
                      setFormError(true);
                      applyErrorFocus('duw-radio');
                    } else {

                  Function applyFocus has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const applyFocus = (parentId, headerHasFocused, setHeaderHasFocused) => {
                    if (!headerHasFocused) {
                      setTimeout(() => {
                        const header = document
                          .getElementById(parentId)
                  Severity: Minor
                  Found in src/applications/discharge-wizard/utilities/page-setup.js - About 1 hr to fix

                    Function mapStateToProps has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const mapStateToProps = state => {
                      const { MEBClaimStatus, TOEClaimStatus } = state?.data;
                      let latestClaim;
                    
                      if (
                    Severity: Minor
                    Found in src/applications/education-letters/containers/InboxPage.jsx - About 1 hr to fix

                      Function addOrUpdateIssue has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const addOrUpdateIssue = () => {
                          setSubmitted(true);
                          if (!showIssueNameError && !invalidDate) {
                            const selectedCount =
                              getSelected(data).length + (currentData[SELECTED] ? 0 : 1);
                      Severity: Minor
                      Found in src/applications/appeals/shared/components/AddIssue.jsx - About 1 hr to fix

                        Function onContinueClick has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const onContinueClick = () => {
                            if (!formValue) {
                              setFormError(true);
                              applyErrorFocus('duw-dropdown');
                            } else {

                          Function DirectDepositDescription has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const DirectDepositDescription = () => {
                            const displayBankInfo = useCheckPath();
                          
                            return (
                              <div className="vads-u-margin-top--2 vads-u-margin-bottom--2">

                            Function PreferredFacilityAlert has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const PreferredFacilityAlert = () => {
                              // use logging to track the volume of users who receive this alert
                              useEffect(() => {
                                return () => {
                                  recordEvent({

                              Function DirectDepositDescription has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const DirectDepositDescription = () => {
                                const displayBankInfo = useCheckPath();
                              
                                return (
                                  <div className="vads-u-margin-top--2 vads-u-margin-bottom--2">

                                Function DirectDepositDescription has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const DirectDepositDescription = () => {
                                  const displayBankInfo = useCheckPath();
                                
                                  return (
                                    <div className="vads-u-margin-top--2 vads-u-margin-bottom--2">

                                  Function transformForSubmit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function transformForSubmit(formConfig, form) {
                                    const transformedData = JSON.parse(
                                      formsSystemTransformForSubmit(formConfig, form),
                                    );
                                  
                                  
                                  Severity: Minor
                                  Found in src/applications/ivc-champva/10-7959C/config/submitTransformer.js - About 1 hr to fix

                                    Function verifyEnrollment has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const verifyEnrollment = (state = initialState, action) => {
                                      switch (action.type) {
                                        case VERIFY_ENROLLMENT:
                                          return {
                                            ...state,

                                      Function App has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const App = () => {
                                        return (
                                          <div>
                                            <div className="row">
                                              <VaBreadcrumbs
                                      Severity: Minor
                                      Found in src/applications/sco/containers/App.jsx - About 1 hr to fix

                                        Function FollowUs has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const FollowUs = () => {
                                          return (
                                            <section>
                                              <h4>Follow us</h4>
                                              <ul className="va-nav-linkslist-list social">
                                        Severity: Minor
                                        Found in src/applications/sco/components/HubRail/ConnectWithUs/followUs.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language