department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

const clearSpouseData = formData => {
  return {
    ...formData,
    questions: {
      ...formData.questions,

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

    export const saveDraft = (messageData, type, id) => async dispatch => {
      recordEvent({
        // For Google Analytics
        event: 'secure-messaging-save-draft-type',
        'secure-messaging-save-draft': type,
    Severity: Minor
    Found in src/applications/mhv-secure-messaging/actions/draftDetails.js - About 1 hr to fix

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

      const WelcomeMessage = () => {
        const fullState = useSelector(state => state);
      
        return (
          <div className="welcome-message">

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

            () => {
              return (
                isTranstioningFacility && (
                  <va-alert status="warning" class="vads-u-margin-y--2">
                    <h1 slot="headline">

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

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

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