department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,848 of 12,848 total issues

Function renderHealthServices has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  renderHealthServices() {
    const {
      facility: {
        attributes: { services },
      },
Severity: Minor
Found in src/applications/facility-locator/components/ServicesAtFacility.jsx - About 1 hr to fix

    Function renderInbox has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const renderInbox = () => {
        if (
          MEBClaimStatusFetchInProgress ||
          TOEClaimStatusFetchInProgress ||
          !isLoggedIn.current
    Severity: Minor
    Found in src/applications/education-letters/containers/InboxPage.jsx - About 1 hr to fix

      Function loginPrompt has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        loginPrompt() {
          if (this.props.isLoggedIn) {
            if (this.moreThanSixMonths(this.props?.remainingEntitlement)) {
              return (
                <div
      Severity: Minor
      Found in src/applications/edu-benefits/10203/containers/IntroductionPage.jsx - About 1 hr to fix

        Function applicantInsuranceEobSchema has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function applicantInsuranceEobSchema(isPrimary) {
          const keyname = isPrimary ? 'applicantPrimaryEob' : 'applicantSecondaryEob';
          const provider = isPrimary
            ? 'applicantPrimaryProvider'
            : 'applicantSecondaryProvider';

          Function containerForLinks has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const containerForLinks = (title, linkGroups) => {
              const isActiveMenu = activeMenu === title;
          
              return (
                <div

            Function App has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const App = props => {
              const { featureFlagsLoading, user } = props;
              const { ratedDisabilities } = props.ratedDisabilities;
            
              return (
            Severity: Minor
            Found in src/applications/rated-disabilities/containers/App.jsx - About 1 hr to fix

              Function GroupCheckboxWidget has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const GroupCheckboxWidget = props => {
                const { value, options, formContext, onChange } = props;
                const { onReviewPage, reviewMode } = formContext || {};
                const { labels } = options;
              
              
              Severity: Minor
              Found in src/applications/_mock-form/components/GroupCheckboxWidget.jsx - About 1 hr to fix

                Function deriveEventLocations has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const deriveEventLocations = event => {
                  const locations = [];
                
                  if (!event) {
                    return locations;
                Severity: Minor
                Found in src/applications/static-pages/events/helpers/index.js - About 1 hr to fix

                  Function formatContactInfo has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function formatContactInfo(poaAttributes) {
                    const {
                      addressLine1,
                      addressLine2,
                      addressLine3,

                    Function PrepareContent has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const PrepareContent = props => {
                      const { smallHeading, router, appointmentCount } = props;
                      const { jumpToPage } = useFormRouting(router);
                      const { t } = useTranslation();
                      const selectFeatureToggles = useMemo(makeSelectFeatureToggles, []);
                    Severity: Minor
                    Found in src/applications/check-in/components/PrepareContent.jsx - About 1 hr to fix

                      Function VeteranInfoBox has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const VeteranInfoBox = props => {
                        const {
                          first,
                          middle,
                          last,

                        Function transformMarriage has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function transformMarriage(marriage) {
                              const transformedMarriage = { ...marriage };
                              if (
                                transformedMarriage['view:pastMarriage'] &&
                                transformedMarriage['view:pastMarriage'].reasonForSeparation
                        Severity: Minor
                        Found in src/applications/pensions/migrations.js - About 1 hr to fix

                          Function addForm0781 has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const addForm0781 = formData => {
                            const clonedData = _.cloneDeep(formData);
                            const incidentKeys = getFlatIncidentKeys();
                            const incidents = incidentKeys
                              .filter(incidentKey => clonedData[incidentKey])
                          Severity: Minor
                          Found in src/applications/disability-benefits/all-claims/utils/submit.js - About 1 hr to fix

                            Function SubmissionErrorAlert has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const SubmissionErrorAlert = () => {
                              useEffect(() => {
                                focusElement('.caregiver-error-message');
                              }, []);
                            
                            

                              Function GroupCheckboxWidget has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const GroupCheckboxWidget = props => {
                                const { value, options, formContext, onChange } = props;
                                const { onReviewPage, reviewMode } = formContext || {};
                                const { labels } = options;
                              
                              

                                Function FacilityReview has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const FacilityReview = props => {
                                  const { data, goToPath } = props;
                                  const plannedClinic = data['view:plannedClinic'];
                                  const veteranSelectedFacility = plannedClinic.veteranSelected;
                                  const selectedCaregiverSupportFacility = plannedClinic.caregiverSupport;

                                  Function useDetectFieldChanges has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const useDetectFieldChanges = formData => {
                                    const prevDataRef = useRef();
                                    const [shouldShowReviewButton, setShouldShowReviewButton] = useState(true);
                                  
                                    useEffect(

                                    Function updateFormData has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const updateFormData = e => {
                                        e.preventDefault();
                                    
                                        if (!employmentRecord.type || employmentRecord.type === '') {
                                          setTypeError('Please select your type of work.');

                                      Function updateFormData has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        const updateFormData = e => {
                                          e.preventDefault();
                                      
                                          if (!employmentRecord.type || employmentRecord.type === '') {
                                            setTypeError('Please select your type of work.');

                                        Function ReadOnlyUserDescription has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const ReadOnlyUserDescription = props => {
                                          const [isLoggedIn, setIsLoggedIn] = useState();
                                          useEffect(
                                            () => {
                                              setIsLoggedIn(props.isLoggedIn);
                                        Severity: Minor
                                        Found in src/applications/vre/25-8832/components/ReadOnlyUserDescription.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language