department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,848 of 12,848 total issues

Function applicantHasInsuranceSchema has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function applicantHasInsuranceSchema(isPrimary) {
  const keyname = isPrimary ? 'applicantHasPrimary' : 'applicantHasSecondary';
  return {
    uiSchema: {
      ...titleUI(

    Function componentDidUpdate has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      componentDidUpdate(prevProps) {
        const {
          fieldName,
          forceEditView,
          successCallback,

      Function fetchRatedDisabilities has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function fetchRatedDisabilities() {
        return async dispatch => {
          const response = await getData(
            '/disability_compensation_form/rated_disabilities',
          );
      Severity: Minor
      Found in src/applications/rated-disabilities/actions/index.js - About 1 hr to fix

        Function createRoutesWithStore has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const createRoutesWithStore = () => {
          return (
            <Switch>
              {routes.map((route, i) => {
                const options = {
        Severity: Minor
        Found in src/applications/check-in/travel-claim/routes.jsx - About 1 hr to fix

          Function BackButton has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const BackButton = props => {
            const { action, prevUrl, router, text = null } = props;
            const {
              getCurrentPageFromRouter,
              getPreviousPageFromRouter,
          Severity: Minor
          Found in src/applications/check-in/components/BackButton.jsx - About 1 hr to fix

            Function OtherExpensesInputList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const OtherExpensesInputList = props => {
              const { errorSchema, formContext } = props;
              const errorList = errorSchema?.otherExpenses?.__errors;
              const { submitted } = formContext;
            
            

              Function RogersStem has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const RogersStem = () => {
                useEffect(() => {
                  recordEvent({
                    event: 'howToWizard-alert-displayed',
                    'reason-for-alert': 'help with STEM program debt',

                Function fetchFormStatus has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const fetchFormStatus = () => async dispatch => {
                  dispatch({
                    type: FSR_API_CALL_INITIATED,
                  });
                  const sessionExpiration = localStorage.getItem('sessionExpiration');
                Severity: Minor
                Found in src/applications/financial-status-report/actions/index.js - About 1 hr to fix

                  Function runAdvancedSearch has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  ) => async (dispatch, getState) => {
                    dispatch({ type: Actions.Search.START });
                    const isPilot = getIsPilotFromState(getState);
                    try {
                      const response = await searchFolderAdvanced(
                  Severity: Minor
                  Found in src/applications/mhv-secure-messaging/actions/search.js - About 1 hr to fix

                    Function letterItems has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        const letterItems = (this.props.letters || []).map((letter, index) => {
                          let content;
                          let letterTitle;
                          let helpText;
                          if (letter.letterType === LETTER_TYPES.benefitSummary) {
                    Severity: Minor
                    Found in src/applications/letters/containers/LetterList.jsx - About 1 hr to fix

                      Function searchReducer has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const searchReducer = (state = initialState, action) => {
                        switch (action.type) {
                          case Actions.Search.RUN_ADVANCED:
                            return {
                              ...state,
                      Severity: Minor
                      Found in src/applications/mhv-secure-messaging/reducers/search.js - About 1 hr to fix

                        Function GET /vaos/v2/eligibility has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          'GET /vaos/v2/eligibility': (req, res) => {
                            const isDirect = req.query.type === 'direct';
                            const ineligibilityReasons = [];
                        
                            if (
                        Severity: Minor
                        Found in src/applications/vaos/services/mocks/index.js - About 1 hr to fix

                          Function getPageContent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            getPageContent() {
                              const { claim } = this.props;
                          
                              // Return null if the claim/ claim.attributes dont exist
                              if (!claimAvailable(claim)) {
                          Severity: Minor
                          Found in src/applications/claims-status/containers/FilesPage.jsx - About 1 hr to fix

                            Function ConfirmationPage has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function ConfirmationPage() {
                              const dispatch = useDispatch();
                              const {
                                data,
                                facilityDetails,

                              Function schoolAttributes has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const schoolAttributes = () => {
                                  const options = [
                                    {
                                      name: 'excludeCautionFlags',
                                      checked: excludeCautionFlags,
                              Severity: Minor
                              Found in src/applications/gi/containers/FilterYourResults.jsx - About 1 hr to fix

                                Function resultCards has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    (institution, index) => {
                                      const { distance, name } = institution;
                                      const miles = Number.parseFloat(distance).toFixed(2);
                                      const { currentPage } = pagination;
                                
                                
                                Severity: Minor
                                Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

                                  Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      const { programs } = this.props;
                                  
                                      if (programs && programs.length) {
                                        return (

                                    Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      render() {
                                        if (!this.props.isVisible) return null;
                                    
                                        const alertClass = classNames(
                                          'usa-alert',
                                    Severity: Minor
                                    Found in src/applications/gi/components/AlertBox.jsx - About 1 hr to fix

                                      Function noResultsFound has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        const noResultsFound = cnt => {
                                          const noResultsNoFilters = cnt === 0 && !usedFilters;
                                          const noResultsWithFilters = cnt === 0 && usedFilters;
                                      
                                          return (
                                      Severity: Minor
                                      Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

                                        Function CalcBeneficiaryLocationQuestionModalContent has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function CalcBeneficiaryLocationQuestionModalContent() {
                                          return (
                                            <div>
                                              <p>
                                                VA pays monthly housing allowance (MHA) based on the campus location
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language