department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,736 of 12,815 total issues

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

                          const createApplications = (updatedDaysAgo = 1) => {
                            const daysAgo = subDays(Date.now(), updatedDaysAgo);
                          
                            return {
                              data: [

                            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 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

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

                                      render() {
                                        const enrollmentData = this.props.enrollmentData || {};
                                    
                                        const todayFormatted = formatDateLong(new Date());
                                    
                                    
                                    Severity: Minor
                                    Found in src/applications/post-911-gib-status/containers/PrintPage.jsx - About 1 hr to fix

                                      Function newDraft has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const newDraft = (req, res) => {
                                        const { body, category, recipientId, subject } = req.body;
                                        return res.json({
                                          data: {
                                            id: '3885180',
                                      Severity: Minor
                                      Found in src/platform/mhv/api/mocks/secure-messaging/drafts/index.js - About 1 hr to fix

                                        Function saveReply has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const saveReply = (req, res) => {
                                          const { body, category, recipientId, subject } = req.body;
                                          return res.json({
                                            data: {
                                              id: '3885180',
                                        Severity: Minor
                                        Found in src/platform/mhv/api/mocks/secure-messaging/drafts/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language