department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

const DependentAgesReview = () => {
  const hasDependents = useSelector(
    state => state.form.data.questions?.hasDependents,
  );
  const dependents = useSelector(

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

      const content = () => {
        if (replyMessage === undefined) {
          return (
            <va-loading-indicator
              message="Loading your secure message..."
    Severity: Minor
    Found in src/applications/mhv-secure-messaging/containers/MessageReply.jsx - About 1 hr to fix

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

      export const retrieveFolder = folderId => async (dispatch, getState) => {
        const isPilot = getIsPilotFromState(getState);
        await getFolder({ folderId, isPilot })
          .then(response => {
            if (response.data) {
      Severity: Minor
      Found in src/applications/mhv-secure-messaging/actions/folders.js - About 1 hr to fix

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

          const paths = () => {
            return [
              {
                path: Paths.INBOX,
                label: 'Inbox',
        Severity: Minor
        Found in src/applications/mhv-secure-messaging/components/Navigation.jsx - 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 ReplyButton has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const ReplyButton = props => {
              const history = useHistory();
              const messageId = useSelector(
                state => state.sm.threadDetails.messages[0]?.messageId,
              );
            Severity: Minor
            Found in src/applications/mhv-secure-messaging/components/ReplyButton.jsx - About 1 hr to fix

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