department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,672 total issues

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

function CustomPhoneNumberField(props) {
  function handleChange(event) {
    if (props?.toeDupContactInfoCall) {
      props?.updateGlobalPhoneNumber(event);
      if (event?.length > 9) {
Severity: Minor
Found in src/applications/toe/components/CustomPhoneNumberField.jsx - About 1 hr to fix

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

    const captureError = (error, details) => {
      if (error instanceof Error) {
        Sentry.withScope(scope => {
          const { token } = details;
          if (token) {
    Severity: Minor
    Found in src/applications/check-in/utils/analytics/index.js - About 1 hr to fix

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

                          updateSchema: (formData, schema, uiSchema) => {
                            const countryUI = uiSchema;
                            const addressFormData = get(
                              ['view:mailingAddress', 'address'],
                              formData,
      Severity: Minor
      Found in src/applications/toe/config/form.js - About 1 hr to fix

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

          const infoBlockMessage = () => {
            if (appointment?.kind === 'phone') {
              return (
                <span data-testid="phone-msg-confirmation">
                  {t('your-provider-will-call-you-at-your-appointment-time')}

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

            drawFreeTextOption(option) {
              const { highlightedIndex, value, selectionMade } = this.state;
          
              if ((selectionMade && option === value) || option?.length < 1) {
                return null;

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

                    updateSchema: (formData, schema, uiSchema) => {
                      const {
                        authorizerType,
                        thirdPartyType,
                        personFullName,
            Severity: Minor
            Found in src/applications/simple-forms/21-0845/pages/infoScope.js - About 1 hr to fix

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

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

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

                export const isSsnUnique = formData => {
                  const {
                    veteranSsnOrTin,
                    primarySsnOrTin,
                    secondaryOneSsnOrTin,
                Severity: Minor
                Found in src/applications/caregivers/utils/helpers/form-config.js - About 1 hr to fix

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

                  export default function transformForSubmit(formConfig, form) {
                    const remarksFormData = form.data.remarks;
                    const remarksUiSchema =
                      formConfig.chapters.additionalInformationChapter.pages.remarks.uiSchema;
                  
                  
                  Severity: Minor
                  Found in src/applications/simple-forms/26-4555/config/submit-transformer.js - About 1 hr to fix

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

                    export const MobileLogoRow = () => {
                      return (
                        <nav className="vads-u-display--flex vads-u-flex-direction--column vads-u-margin--0 vads-u-padding--0">
                          <div className="header-logo-row vads-u-background-color--primary-darker vads-u-display--flex vads-u-align-items--center vads-u-justify-content--space-between vads-u-padding-y--1p5 vads-u-padding-left--1p5 vads-u-padding-right--1">
                            <a

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

                          const calculateExpenses = async () => {
                            if (!gmtData?.isEligibleForStreamlined) return;
                      
                            try {
                              const response = await getMonthlyExpensesAPI(data);

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

                            const calculateExpenses = async () => {
                              if (!otherExpenses?.length || !gmtData?.isEligibleForStreamlined) return;
                        
                              try {
                                const response = await getMonthlyExpensesAPI(data);

                          Function content has 30 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 transformFormToAppointment has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function transformFormToAppointment(state) {
                              const clinic = getChosenClinicInfo(state);
                              const data = selectCovid19VaccineFormData(state);
                            
                              const slot = getChosenSlot(state);

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

                              const PrintBtn = props => {
                                const printButtonRef = useRef(null);
                                const { activeFolder } = props;
                              
                                const handleConfirmPrint = () => {

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

                                const EditContentListOrSignatureModal = props => {
                                  const { editListModal, onClose } = props;
                                  const fullState = useSelector(state => state);
                                
                                  return (

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

                                  function ScheduleNewAppointmentButton() {
                                    const history = useHistory();
                                    const dispatch = useDispatch();
                                    const { typeOfCare } = useSelector(getNewAppointmentFlow);
                                    const featureStartSchedulingLink = useSelector(

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

                                        enter(path) {
                                          if (isBlock(path)) {
                                            const parent = stack[stack.length - 1];
                                            const block = {
                                              type: !parent ? 'Feature' : 'Background',
                                    Severity: Minor
                                    Found in src/applications/vaos/scripts/gherkin.js - About 1 hr to fix

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

                                        const makeLoadedCards = () => {
                                          setLoadedCards(
                                            loaded.map((facilityCode, index) => {
                                              return (
                                                <li
                                      Severity: Minor
                                      Found in src/applications/gi/containers/CompareDrawer.jsx - About 1 hr to fix

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

                                          renderErrorMessages() {
                                            const {
                                              claimsLoading,
                                              appealsLoading,
                                              stemClaimsLoading,
                                        Severity: Minor
                                        Found in src/applications/claims-status/containers/YourClaimsPageV2.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language