department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,759 of 12,759 total issues

Function selectApptDetailAriaText has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function selectApptDetailAriaText(appointment, isRequest = false) {
  const appointmentDate = selectStartDate(appointment);
  const isCanceled = selectIsCanceled(appointment);
  const isCommunityCare = selectIsCommunityCare(appointment);
  const isPhone = selectIsPhone(appointment);
Severity: Minor
Found in src/applications/vaos/appointment-list/redux/selectors.js - About 1 hr to fix

    Function selectModalityText has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function selectModalityText(appointment, isPendingAppointment = false) {
      const isCommunityCare = selectIsCommunityCare(appointment);
      const isInPerson = selectIsInPerson(appointment);
      const isPhone = selectIsPhone(appointment);
      const isVideoAtlas = selectIsAtlasVideo(appointment);
    Severity: Minor
    Found in src/applications/vaos/appointment-list/redux/selectors.js - About 1 hr to fix

      Function checkFormValidity has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const checkFormValidity = () => {
          const today = new Date();
          // TODO: add validation for ALL blank fields
          let formInvalid;
          if (dateRange === 'custom') {

        Function PrintBtn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const PrintBtn = props => {
          const printButtonRef = useRef(null);
          const { activeFolder } = props;
        
          const handleConfirmPrint = () => {

          Function TypeOfCareAlert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function TypeOfCareAlert() {
            const headline = 'Is the type of care you need not listed here?';
            return (
              <PostFormFieldContent>
                <InfoAlert

            Function next has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                async next(state, dispatch) {
                  if (isCovidVaccine(state)) {
                    recordEvent({
                      event: `${GA_PREFIX}-schedule-covid19-button-clicked`,
                    });
            Severity: Minor
            Found in src/applications/vaos/new-appointment/newAppointmentFlow.js - About 1 hr to fix

              Function getAppealsV2 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function getAppealsV2() {
                return dispatch => {
                  dispatch({ type: FETCH_APPEALS_PENDING });
                  return apiRequest('/appeals')
                    .then(appeals => dispatch(fetchAppealsSuccess(appeals)))
              Severity: Minor
              Found in src/applications/claims-status/actions/index.js - About 1 hr to fix

                Function getClaims has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const getClaims = () => {
                  return dispatch => {
                    const startTimeMillis = Date.now();
                    dispatch({ type: FETCH_CLAIMS_PENDING });
                
                
                Severity: Minor
                Found in src/applications/claims-status/actions/index.js - About 1 hr to fix

                  Function updateAddress has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function addressDescription has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const addressDescription = () => {
                        return (
                          <>
                            <div className="vads-u-margin-bottom--1">
                              {(error || validationError) && (

                      Function errorAddressAlert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const errorAddressAlert = deliveryPointValidation => {
                        if (deliveryPointValidation === BAD_UNIT_NUMBER) {
                          return (
                            <Alert
                              status="warning"

                        Function MailOrFaxFilesContent has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const MailOrFaxFilesContent = () => {
                          return (
                            <>
                              <p>
                                We can process your request more quickly if you upload your files here.

                          Function compareAddressObjects has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function compareAddressObjects(obj1, obj2) {
                            const { hasOwnProperty } = Object.prototype;
                          
                            const keys1 = Object.keys(obj1);
                            const keys2 = Object.keys(obj2);

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

                              render() {
                                return (
                                  <div className="vads-l-grid-container vads-u-padding--2">
                                    <DowntimeNotification
                                      appTitle="view dependents tool"

                              Function getAllPayments has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const getAllPayments = () => async dispatch => {
                                dispatch({ type: PAYMENTS_RECEIVED_STARTED });
                                const response = await retrievePayments();
                                if (response.errors) {
                                  const error = response.errors[0];
                              Severity: Minor
                              Found in src/applications/personalization/dashboard/actions/payments.js - About 1 hr to fix

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

                                  componentDidUpdate(prevProps) {
                                    const {
                                      fetchDirectDeposit,
                                      fetchFullName,
                                      fetchMilitaryInformation,
                                Severity: Minor
                                Found in src/applications/personalization/profile/components/Profile.jsx - About 1 hr to fix

                                  Function ViewRepresentativeBody has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const ViewRepresentativeBody = props => {
                                    const { loading, representative, error } = props.representative;
                                    let content;
                                    if (loading) {
                                      content = <va-loading-indicator message="Loading your representative" />;

                                    Function rebuildGuess has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function rebuildGuess() {
                                        // use Intl API when available and returning valid time zone
                                        try {
                                          var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
                                          if (intlName && intlName.length > 3) {
                                    Severity: Minor
                                    Found in src/applications/personalization/dashboard/lib/moment-tz.js - About 1 hr to fix

                                      Function AccessTroubleAlertBox has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const AccessTroubleAlertBox = props => {
                                        const { className, alertType } = props;
                                        const phase0p5Flag = useSelector(
                                          state => state.featureToggles.mhv_integration_medical_records_to_phase_1,
                                        );

                                        Function subNameContent has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const subNameContent = () => {
                                            if (isOrg) {
                                              return (
                                                <p>
                                                  You can work with any accredited VSO representative at this
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language