department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

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

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

          export const phoneUiSchema = fieldName => {
            return {
              inputPhoneNumber: {
                'ui:title': `${fieldName} (U.S. numbers only)`,
                'ui:webComponentField': VaTextInputField,

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

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

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

                        const changeDisabilityName = (oldData, newData, changedIndex) => {
                          const oldId = sippableId(oldData.newDisabilities[changedIndex]?.condition);
                          const newId = sippableId(newData.newDisabilities[changedIndex]?.condition);
                        
                          let result = removeDisability(oldData.newDisabilities[changedIndex], newData);

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

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

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

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

                              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) {
                                  const prefillPersonalInformation = data => {
                                    return {
                                      aboutYourself: {
                                        ...data.personalInformation,
                                Severity: Minor
                                Found in src/applications/ask-va/config/prefill-transformer.js - About 1 hr to fix

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

                                  export const addressUI = props => {
                                    const {
                                      label,
                                      hint = null,
                                      requireCounty = false,
                                  Severity: Minor
                                  Found in src/applications/caregivers/definitions/sharedUI.js - About 1 hr to fix

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

                                    const AmOther = props => {
                                      const { setWizardStatus } = props;
                                      useEffect(
                                        () => {
                                          setWizardStatus(false);
                                    Severity: Minor
                                    Found in src/applications/vre/28-1900/wizard/pages/other/isOther.jsx - About 1 hr to fix

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

                                      export const MaintenanceAlert = () => {
                                        return (
                                          <va-alert
                                            class="row vads-u-margin-top--3 vads-u-margin-left--1"
                                            status="info"

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

                                        const UnAuthBanner = () => {
                                          const dispatch = useDispatch();
                                          const handleSignIn = () => {
                                            dispatch(toggleLoginModal(true, 'mhv-sm-landing-page'));
                                          };
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language