department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

export const fieldsMustMatchValidation = (
  errors,
  page,
  formData,
  certProp,
Severity: Minor
Found in src/applications/ivc-champva/10-10D/helpers/validations.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 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"
      Severity: Minor
      Found in src/applications/verify-your-enrollment/constants/index.js - About 1 hr to fix

        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);
        Severity: Minor
        Found in src/applications/verify-your-enrollment/helpers.jsx - 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,
          Severity: Minor
          Found in src/applications/verify-your-enrollment/reducers/updateAddress.js - About 1 hr to fix

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

            const createSaveInProgressUpdate = req => {
              const now = new Date().toISOString();
            
              const formId = req.params.id;
            
            

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

              const IntroductionPage = props => {
                const { route } = props;
              
                const { isUserLOA1, isUserLOA3 } = useSelector(selectAuthStatus);
                const { formConfig, pageList } = route;

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

                const MissingEDIPI = () => {
                  recordEvent({
                    event: 'visible-alert-box',
                    'alert-box-type': 'error',
                    'alert-box-heading': 'We need more information for your application',
                Severity: Minor
                Found in src/applications/lgy/coe/form/components/MissingEDIPI.jsx - About 1 hr to fix

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

                  const MissingEDIPI = () => {
                    recordEvent({
                      event: 'visible-alert-box',
                      'alert-box-type': 'error',
                      'alert-box-heading': 'We need more information for your application',

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

                      const handleTouClick = async type => {
                        const cernerType = type === 'accept' ? 'accept_and_provision' : type;
                    
                        try {
                          setIsDisabled(true);
                    Severity: Minor
                    Found in src/applications/terms-of-use/components/MyVAHealth.jsx - About 1 hr to fix

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

                      function organizeAppointmentsByYearMonthDay(appointments) {
                        const organizedData = [];
                      
                        // First sort the appointments by start time then organize them by yearmonth and day
                        const sortedAppointments = sortAppointmentsByStartTime(appointments);
                      Severity: Minor
                      Found in src/applications/check-in/utils/appointment/index.js - About 1 hr to fix

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

                        const withForm = (Component, options = {}) => {
                          const WrappedComponent = props => {
                            const { appName } = options;
                            const { router } = props;
                            const selectForm = useMemo(makeSelectForm, []);
                        Severity: Minor
                        Found in src/applications/check-in/containers/withForm.jsx - About 1 hr to fix

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

                          const Complete = props => {
                            const { router } = props;
                            const { t } = useTranslation();
                            const { updateError } = useUpdateError();
                            const { isLoading, travelPayClaimError } = usePostTravelOnlyClaim({ router });
                          Severity: Minor
                          Found in src/applications/check-in/travel-claim/pages/complete/index.jsx - About 1 hr to fix

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

                            const FileClaimExplainerPage = () => {
                              const {
                                useToggleValue,
                                useToggleLoadingValue,
                                TOGGLE_NAMES,

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

                                const onChange = event => {
                                  const pageState = event.target.value || '';
                                  saveDischargeDate();
                                  const date = isDateComplete(pageState) ? getDate(pageState) : null;
                                  const nextPage =
                              Severity: Minor
                              Found in src/applications/disability-benefits/wizard/pages/bdd.jsx - About 1 hr to fix

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

                                export default function transformForSubmit(formConfig, form) {
                                  let transformedData = JSON.parse(sharedTransformForSubmit(formConfig, form));
                                
                                  const witnessRelationshipToClaimantAnswers =
                                    transformedData?.witnessRelationshipToClaimant;
                                Severity: Minor
                                Found in src/applications/simple-forms/21-10210/config/submit-transformer.js - About 1 hr to fix

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

                                  export function MedicalExpenseDescription() {
                                    return (
                                      <>
                                        <p>
                                          We want to know if you, your spouse, or your dependents pay medical or

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

                                      const contactMethod = () => {
                                        if (contactPreference === 'email' && currentlyLoggedIn) {
                                          return (
                                            <p className="vads-u-margin-bottom--3">
                                              You should receive an email within 7 business days when your reply is
                                    Severity: Minor
                                    Found in src/applications/ask-va/containers/ConfirmationPage.jsx - About 1 hr to fix

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

                                        const handleChange = async event => {
                                          const file = event?.detail?.files[0];
                                          const extraData = {};
                                      
                                          const checks = { checkTypeAndExtensionMatches, checkIsEncryptedPdf };

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

                                          const onSubmit = event => {
                                            event.preventDefault();
                                        
                                            const hasEmptyInput = stateDependents.some(
                                              dependent => dependent.dependentAge === '',
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language