department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,839 of 12,839 total issues

Function populateForm has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const populateForm = () => {
    if (recipientExists(draft.recipientId)) {
      setSelectedRecipient(draft.recipientId);
    } else {
      const newRecipient = {

    Function IdentityNotVerified has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const IdentityNotVerified = () => {
      const content = (
        <>
          <p className="vads-u-font-size--base">
            We need to make sure you’re you — and not someone pretending to be you —
    Severity: Minor
    Found in src/applications/vre/28-1900/components/IdentityNotVerified.jsx - About 1 hr to fix

      Function AmOther has 28 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 renameFolder has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const renameFolder = (folderId, newName) => async dispatch => {
          try {
            await updateFolderName(folderId, newName);
            dispatch(
              addAlert(
        Severity: Minor
        Found in src/applications/mhv-secure-messaging/actions/folders.js - About 1 hr to fix

          Function getThreadList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const getThreadList = async params => {
            const {
              folderId = 0,
              pageSize = 10,
              pageNumber = 1,
          Severity: Minor
          Found in src/applications/mhv-secure-messaging/api/SmApi.js - About 1 hr to fix

            Function NoFilterMatchWarning has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const NoFilterMatchWarning = () => {
              const warningRef = useRef();
              useEffect(() => {
                focusElement(warningRef.current);
              });

              Function selectAppointmentLocality has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function selectAppointmentLocality(
                appointment,
                isPendingAppointment = false,
              ) {
                const practitioner = selectPractitionerName(appointment);
              Severity: Minor
              Found in src/applications/vaos/appointment-list/redux/selectors.js - About 1 hr to fix

                Function NoRegistrationMessage has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function NoRegistrationMessage() {
                  return (
                    <FullWidthLayout>
                      <InfoAlert
                        status="error"
                Severity: Minor
                Found in src/applications/vaos/components/NoRegistrationMessage.jsx - About 1 hr to fix

                  Function LoadProvidersErrorAlert has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function LoadProvidersErrorAlert() {
                    const headline = `We can’t load provider information`;
                    return (
                      <div id="providerSelectionFailed">
                        <InfoAlert

                    Function generateClaimTitle has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const generateClaimTitle = (claim, placement, tab) => {
                      // This will default to 'disability compensation'
                      const claimType = getClaimType(claim).toLowerCase();
                      const isRequestToAddOrRemoveDependent = addOrRemoveDependentClaimTypeCodes.includes(
                        claim?.attributes?.claimTypeCode,
                    Severity: Minor
                    Found in src/applications/claims-status/utils/helpers.js - About 1 hr to fix

                      Function filteredAppointments has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          const filteredAppointments = appointments.filter(appointment => {
                            return req.query.statuses.some(status => {
                              if (appointment.attributes.status === status) {
                                // Automatically add appointments with these statuses to the collection
                                if (
                      Severity: Minor
                      Found in src/applications/vaos/services/mocks/index.js - About 1 hr to fix

                        Function renderOptions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const renderOptions = () => {
                            const displayOptions = Array.isArray(options) ? options : [];
                            return displayOptions.map((option, index) => {
                              const { checked, optionLabel, name, learnMore, dataTestId } = option;
                        
                        
                        Severity: Minor
                        Found in src/applications/gi/components/VaCheckboxGroupGi.jsx - About 1 hr to fix

                          Function getTab has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const getTab = tabName => {
                              const activeTab = tabName === mobileTab;
                              const tabClasses = classNames(
                                {
                                  'active-results-tab': activeTab,
                          Severity: Minor
                          Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

                            Function preEligibilityChange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const preEligibilityChange = e => {
                                const { value } = e.target;
                            
                                recordEvent({
                                  event: 'gibct-form-change',
                            Severity: Minor
                            Found in src/applications/gi/components/SearchBenefits.jsx - About 1 hr to fix

                              Function preEligibilityChange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const preEligibilityChange = (e, name, number) => {
                                  const field = e.target.name;
                                  const { value } = e.target;
                              
                                  if (field === 'giBillChapter' && value === '33a') {
                              Severity: Minor
                              Found in src/applications/gi/components/profile/BenefitsForm.jsx - About 1 hr to fix

                                Function eligibilityAndFilters has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const eligibilityAndFilters = cnt => {
                                    const showTuitionAndFilters = cnt > 0 || usedFilters;
                                
                                    if (showTuitionAndFilters) {
                                      return (
                                Severity: Minor
                                Found in src/applications/gi/containers/search/LocationSearchResults.jsx - About 1 hr to fix

                                  Function handleInputFocusWithPotentialOverLap has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const handleInputFocusWithPotentialOverLap = (
                                    fieldId1,
                                    fieldId2,
                                    scrollableFieldId,
                                  ) => {
                                  Severity: Minor
                                  Found in src/applications/gi/utils/helpers.js - About 1 hr to fix

                                    Function addressLabel has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const addressLabel = address => {
                                      // Destructure address object for easier access
                                      const {
                                        addressLine1,
                                        addressLine2,

                                      Function transformServiceHistoryEntryIntoTableRow has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const transformServiceHistoryEntryIntoTableRow = entry => {
                                        const formattedBeginDate = entry.beginDate
                                          ? moment(entry.beginDate).format('LL')
                                          : '';
                                        const formattedEndDate = entry.endDate
                                      Severity: Minor
                                      Found in src/applications/personalization/profile/helpers.js - About 1 hr to fix

                                        Function createBasicInitialState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function createBasicInitialState(serviceHistory) {
                                          return {
                                            user: {
                                              profile: {
                                                veteranStatus: {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language