department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function ConfirmCancelModal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ConfirmCancelModal = props => {
  const { activeSection, closeModal, onHide, isVisible } = props;

  // return null to avoid even having the web component in dom
  // when not needed (this makes testing easier as well)

    Function recordSearchResultsEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const recordSearchResultsEvents = (props, results) => {
      const dataPush = { event: 'fl-search-results' };
      const { currentQuery, pagination, resultTime } = props;
    
      if (currentQuery) {
    Severity: Minor
    Found in src/applications/facility-locator/utils/analytics.js - About 1 hr to fix

      Function DisasterAlert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const DisasterAlert = () => {
        return (
          <va-alert-expandable
            trigger="Need help with VA Debt after a natural disaster?"
            status="info"

        Function fetchResultsThunk has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const fetchResultsThunk = () => async dispatch => {
          // Change the `fetching` state in our store.
          dispatch(
            fetchResultsAction({
              hideFetchingState: true,
        Severity: Minor
        Found in src/applications/third-party-app-directory/actions/index.js - About 1 hr to fix

          Function AreaOfDisagreementReviewField has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const AreaOfDisagreementReviewField = props => {
            const { defaultEditButton, formData } = props;
          
            if (!getIssueName(formData)) {
              return null;
          Severity: Minor
          Found in src/applications/appeals/shared/content/areaOfDisagreement.jsx - About 1 hr to fix

            Function withFeatureFlip has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const withFeatureFlip = (Component, type) => {
              return props => {
                const selectFeatureToggles = useMemo(makeSelectFeatureToggles, []);
                const featureToggles = useSelector(selectFeatureToggles);
                const {

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

                render() {
                  const { user, form } = this.props;
                  const contentBeforeButtons = (
                    <SaveFormLink
                      locationPathname={this.props.location.pathname}

                Function fileUploadUi has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function fileUploadUi(content) {
                  return {
                    ...fileUiSchema(content.label, {
                      buttonText: 'Upload file',
                      addAnotherLabel: 'Upload another file',
                Severity: Minor
                Found in src/applications/pre-need/utils/upload.js - About 1 hr to fix

                  Function prepareAddressData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const prepareAddressData = formData => {
                    let addressData = {
                      veteranName: formData.fullName,
                      addressLine1: formData.addressLine1,
                      addressLine2: formData.addressLine2,
                  Severity: Minor
                  Found in src/applications/verify-your-enrollment/helpers.jsx - About 1 hr to fix

                    Function formatMenuItems has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const formatMenuItems = menuItems => {
                        const formattedMenuItems = [];
                    
                        if (menuItems && isArray(menuItems)) {
                          return menuItems;

                      Function mockData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const mockData = (state = INITIAL_STATE, action) => {
                        switch (action.type) {
                          case UPDATE_PENDING_VERIFICATIONS:
                            // this delets all pending verifications award_ids
                            return {
                      Severity: Minor
                      Found in src/applications/verify-your-enrollment/reducers/mockData.js - About 1 hr to fix

                        Function buildHourItem has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const buildHourItem = item => {
                            // {day: 4, starthours: 700, endhours: 1730, comment: ""}
                            if (
                              item.starthours < 0 ||
                              item.endhours < 0 ||
                        Severity: Minor
                        Found in src/applications/static-pages/facilities/vetCentersHours.jsx - About 1 hr to fix

                          Function DependentListLoopForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const DependentListLoopForm = props => {
                            const { children, data, page, onChange, onSubmit } = props;
                            const { isLoggedIn } = useSelector(selectAuthStatus);
                            const { fullName = {} } = data || {};
                          
                          

                            Function updateFormPages has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const updateFormPages = (
                              patientDemographicsStatus,
                              pages,
                              URLS,
                              isTravelReimbursementEnabled = false,
                            Severity: Minor
                            Found in src/applications/check-in/utils/navigation/index.js - About 1 hr to fix

                              Function withError has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const withError = Component => {
                                const WrappedComponent = props => {
                                  const selectError = useMemo(makeSelectError, []);
                                  const { error } = useSelector(selectError);
                              
                              
                              Severity: Minor
                              Found in src/applications/check-in/containers/withError.jsx - About 1 hr to fix

                                Function TravelQuestion has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const TravelQuestion = props => {
                                  const { router } = props;
                                  const { t } = useTranslation();
                                
                                  const additionalInfoItems = [
                                Severity: Minor
                                Found in src/applications/check-in/day-of/pages/TravelQuestion.jsx - About 1 hr to fix

                                  Function TravelVehicle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const TravelVehicle = props => {
                                    const { router } = props;
                                    const { t } = useTranslation();
                                    const { updateError } = useUpdateError();
                                    const additionalInfoItems = [

                                    Function makeSchema has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function makeSchema(locationId) {
                                      return {
                                        type: 'object',
                                        properties: {
                                          toxicExposure: {

                                      Function prefillTransformer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function prefillTransformer(pages, formData, metadata) {
                                        // TODO: once backend prefill is implemented, refactor to
                                        // remove test-data with incoming prefill data
                                        const { preparerType } = formData;
                                        const newFormData = {

                                        Function makeSchema has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function makeSchema(itemId) {
                                          return {
                                            type: 'object',
                                            properties: {
                                              toxicExposure: {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language