department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function ItemList has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ItemList = props => {
  const { list } = props;
  if (typeof list === 'string')
    return (
      <span
Severity: Minor
Found in src/applications/mhv-medical-records/components/shared/ItemList.jsx - About 1 hr to fix

    Function ProfileNotUpdatedNote has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function ProfileNotUpdatedNote(props) {
      const {
        formData,
        includeLink,
        includePhone,

      Function generateResultsContent has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const generateResultsContent = async (doc, parent, data) => {
        for (const resultItem of data.results) {
          const results = doc.struct('Sect', {
            title: resultItem.header || 'Results',
          });
      Severity: Minor
      Found in src/platform/pdf/templates/medications.js - About 1 hr to fix

        Function subscribeComponentAnalyticsEvents has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function subscribeComponentAnalyticsEvents(
          e,
          recordEvent = _recordEvent,
        ) {
          // Is it a component we are tracking?
        Severity: Minor
        Found in src/platform/site-wide/component-library-analytics-setup.js - About 1 hr to fix

          Function Main has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const Main = props => {
            const { hidden } = props.display;
          
            return (
              <div>
          Severity: Minor
          Found in src/platform/site-wide/mobile-menu-button/containers/Main.jsx - About 1 hr to fix

            Function relationshipToVeteranUI has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const relationshipToVeteranUI = options => {
              const { personTitle, labelHeaderLevel } =
                typeof options === 'object' ? options : { personTitle: options };
              const person = personTitle ?? 'Veteran';
            
            

              Function LoginGovSVG has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function LoginGovSVG() {
                return (
                  <svg
                    role="img"
                    viewBox="0 0 114 15"
              Severity: Minor
              Found in src/platform/user/authentication/components/LoginGovSVG.jsx - About 1 hr to fix

                Function renderWhyMightIHaveThisDebt has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const renderWhyMightIHaveThisDebt = deductionCode => {
                  switch (deductionCode) {
                    case '30':
                      return (
                        <>

                  Function GenericDisasterAlert has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const GenericDisasterAlert = () => {
                    return (
                      <va-alert-expandable
                        trigger="Need help with VA Debt after a natural disaster?"
                        status="info"

                    Function renderFacilityInfo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      renderFacilityInfo() {
                        const { facility } = this.props;
                        const {
                          name,
                          website,
                    Severity: Minor
                    Found in src/applications/facility-locator/containers/FacilityDetail.jsx - About 1 hr to fix

                      Function renderBreadcrumbs has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        renderBreadcrumbs(location, selectedResult) {
                          // Map and name props for the search query object
                          const {
                            currentPage: page,
                            context,
                      Severity: Minor
                      Found in src/applications/facility-locator/containers/FacilityLocatorApp.jsx - About 1 hr to fix

                        Function render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            const { submission, data } = this.props.form;
                            const { response } = submission;
                            const name = data.fullName;
                        
                        

                          Function mapStateToProps has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const mapStateToProps = (state, ownProps) => {
                            const currentPageNumber = selectCurrentPageNumber(state);
                            const errorMessages = selectFacilityCodeErrorMessages(ownProps);
                            const facilityCodeSelected = ownProps.formData
                              ? ownProps.formData.facilityCode

                            Function applicantInsurancePrescriptionSchema has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function applicantInsurancePrescriptionSchema(isPrimary) {
                              const keyname = isPrimary
                                ? 'applicantPrimaryHasPrescription'
                                : 'applicantSecondaryHasPrescription';
                              const provider = isPrimary

                              Function applicantProviderSchema has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function applicantProviderSchema(isPrimary) {
                                const keyname1 = isPrimary
                                  ? 'applicantPrimaryProvider'
                                  : 'applicantSecondaryProvider';
                                const keyname2 = isPrimary

                                Function useMockedLogin has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const useMockedLogin = () => {
                                  const [
                                    localHasSession,
                                    setLocalHasSession,
                                    clearLocalHasSession,

                                  Function fetchTotalDisabilityRating has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function fetchTotalDisabilityRating(recordAnalyticsEvent = recordEvent) {
                                    return async dispatch => {
                                      dispatch({
                                        type: FETCH_TOTAL_RATING_STARTED,
                                      });
                                  Severity: Minor
                                  Found in src/applications/rated-disabilities/actions/index.js - About 1 hr to fix

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

                                    const SubmissionErrorAlert = () => {
                                      useEffect(() => {
                                        focusElement('.hca-error-message');
                                      }, []);
                                    
                                    
                                    Severity: Minor
                                    Found in src/applications/hca/components/FormAlerts/SubmissionErrorAlert.jsx - About 1 hr to fix

                                      Function fetchNearbyVALocations has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          async () => {
                                            if (hasAnyMultiData(props)) {
                                              return;
                                            }
                                            const { mainAddress } = props;

                                        Function ActionItemDisplay has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const ActionItemDisplay = props => {
                                          const { router } = props;
                                          const dispatch = useDispatch();
                                          const selectApp = useMemo(makeSelectApp, []);
                                          const { app } = useSelector(selectApp);
                                        Severity: Minor
                                        Found in src/applications/check-in/components/ActionItemDisplay.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language