department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,846 of 12,846 total issues

Function appointmentIcon has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const appointmentIcon = appointment => {
  const isPhone = isVAPhoneAppointment(appointment);
  const {
    isCommunityCare,
    isCompAndPenAppointment,

    Function transformFormToVAOSVARequest has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function transformFormToVAOSVARequest(state) {
      const data = getFormData(state);
      const typeOfCare = getTypeOfCare(data);
    
      return {

      Function getAppointmentTimezone has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function getAppointmentTimezone(appointment) {
        // Appointments with timezone included in api
        if (appointment?.timezone) {
          const abbreviation = getTimezoneAbbrFromApi(appointment);
      
      
      Severity: Minor
      Found in src/applications/vaos/services/appointment/index.js - About 1 hr to fix

        Function renderTuitionAssist has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const renderTuitionAssist = () => {
            if (!displayedInputs.tuitionAssist) return null;
            const tuitionAssistId = 'tuitionAssist';
            const tuitionAssistFieldId = `${tuitionAssistId}-field`;
            return (

          Function fetchNameAutocompleteSuggestions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function fetchNameAutocompleteSuggestions(name, filterFields, version) {
            if (name === '' || name === null || name === undefined) {
              return { type: NAME_AUTOCOMPLETE_SUCCEEDED, payload: [] };
            }
          
          
          Severity: Minor
          Found in src/applications/gi/actions/index.js - About 1 hr to fix

            Function renderScholarships has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const renderScholarships = () => {
                if (!displayedInputs.scholarships) return null;
                const scholarshipsId = 'scholarships';
                const scholarshipsFieldId = `${scholarshipsId}-field`;
                return (

              Function renderTuition has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const renderTuition = () => {
                  if (!displayedInputs.tuition) return null;
              
                  const tuitionFeesId = 'tuitionFees';
                  const tuitionFeesFieldId = `${tuitionFeesId}-field`;

                Function uiSchema has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function uiSchema(
                  subHeader = veteranApplicantDetailsSubHeader,
                  description = '',
                  nameUI = nonPreparerFullMaidenNameUI,
                  ssnUI = ssnDashesUI,

                  Function fetchResultsApi has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const fetchResultsApi = async (options = {}) => {
                    // Derive options properties.
                    const city = options?.city;
                    const contribution_amount = options?.contributionAmount;
                    const mockRequest = options?.mockRequest;
                  Severity: Minor
                  Found in src/applications/yellow-ribbon/api/index.js - About 1 hr to fix

                    Function loadConnectedApps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function loadConnectedApps() {
                      return async dispatch => {
                        recordEvent({ event: 'profile-get-connected-apps-started' });
                        dispatch({ type: LOADING_CONNECTED_APPS });
                    
                    

                      Function deepEqual has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function deepEqual(obj1, obj2) {
                        if (obj1 === obj2) return true;
                      
                        if (
                          typeof obj1 !== 'object' ||

                        Function getCemeteries has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function getCemeteries() {
                          return fetch(`${environment.API_URL}/v0/preneeds/cemeteries`, {
                            credentials: 'include',
                            headers: {
                              'X-Key-Inflection': 'camel',
                        Severity: Minor
                        Found in src/applications/pre-need-integration/utils/helpers.js - About 1 hr to fix

                          Function useAlerts has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const useAlerts = dispatch => {
                            const alertList = useSelector(state => state.mr.alerts?.alertList);
                            const [activeAlert, setActiveAlert] = useState();
                          
                            useEffect(
                          Severity: Minor
                          Found in src/applications/mhv-medical-records/hooks/use-alerts.js - About 1 hr to fix

                            Function submitEmail has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function submitEmail(email) {
                              recordEvent({ event: 'vic-email-started' });
                              return dispatch => {
                                dispatch({ type: VIC_EMAIL_CAPTURING });
                            
                            
                            Severity: Minor
                            Found in src/applications/veteran-id-card/actions/index.js - About 1 hr to fix

                              Function allDependents has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function allDependents(state = initialState, action) {
                                switch (action.type) {
                                  case FETCH_ALL_DEPENDENTS_SUCCESS:
                                    if (action.response.persons && action.response.persons.length > 0) {
                                      allPeople = splitPersons(action.response.persons);
                              Severity: Minor
                              Found in src/applications/personalization/view-dependents/reducers/index.js - About 1 hr to fix

                                Function UNSAFE_componentWillReceiveProps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  UNSAFE_componentWillReceiveProps(nextProps) {
                                    // Once the login logic is all done...
                                    // This will occur even for unauthenticated users and should only occur once.
                                    if (this.props.user.profile.loading && !nextProps.user.profile.loading) {
                                      const userProfile = nextProps.user.profile;
                                Severity: Minor
                                Found in src/applications/veteran-id-card/containers/VeteranIDCard.jsx - About 1 hr to fix

                                  Function ConditionListItem has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const ConditionListItem = props => {
                                    const { record } = props;
                                  
                                    return (
                                      <va-card

                                    Function LabsAndTestsListItem has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const LabsAndTestsListItem = props => {
                                      const { record } = props;
                                    
                                      return (
                                        <va-card

                                      Function allergiesReducer has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const allergiesReducer = (state = initialState, action) => {
                                        switch (action.type) {
                                          case Actions.Allergies.GET_LIST: {
                                            return {
                                              ...state,
                                      Severity: Minor
                                      Found in src/applications/mhv-medications/reducers/allergies.js - About 1 hr to fix

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

                                          render() {
                                            let content;
                                        
                                            switch (this.props.serviceAvailability) {
                                              case SERVICE_AVAILABILITY_STATES.unrequested: {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language