department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,848 of 12,848 total issues

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

  const handleTouClick = async type => {
    const termsCode = termsCodeExists
      ? `?terms_code=${redirectLocation.searchParams.get('terms_code')}`
      : '';

Severity: Minor
Found in src/applications/terms-of-use/containers/TermsOfUse.jsx - About 1 hr to fix

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

      render() {
        const {
          appId,
          authenticatedWithSSOe,
          children,
    Severity: Minor
    Found in src/applications/static-pages/cta-widget/index.js - About 1 hr to fix

      Function TravelAddress has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const TravelAddress = props => {
        const { router } = props;
        const { t } = useTranslation();
        const { updateError } = useUpdateError();
        const selectVeteranAddress = useMemo(makeSelectVeteranAddress, []);

        Function TravelClaimSuccessAlert has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const TravelClaimSuccessAlert = () => {
          const selectForm = useMemo(makeSelectForm, []);
          const { data } = useSelector(selectForm);
          const { appointmentToFile } = data;
          const { t } = useTranslation();

          Function fetchMapBoxGeocoding has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const fetchMapBoxGeocoding = async (query, client = null) => {
            if (!query) {
              return {
                type: 'SEARCH_FAILED',
                errorMessage: content['error--facility-search-cancelled'],
          Severity: Minor
          Found in src/applications/caregivers/actions/fetchMapBoxGeocoding.js - About 1 hr to fix

            Function HouseholdExpensesInputList has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const HouseholdExpensesInputList = props => {
              const { submitted } = props.formContext;
              const { errorSchema } = props;
            
              const errorList = errorSchema?.expenseRecords?.__errors;

              Function checkMessageValidity has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  () => {
                    let messageValid = true;
                    let signatureValid = true;
                    let checkboxValid = true;
              
              

                Function updateCCProviderSortMethod has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function updateCCProviderSortMethod(sortMethod, selectedFacility = {}) {
                  return async (dispatch, getState) => {
                    let location = null;
                    const { currentLocation } = getNewAppointment(getState());
                    const action = {
                Severity: Minor
                Found in src/applications/vaos/new-appointment/redux/actions.js - About 1 hr to fix

                  Function getPageContent has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    getPageContent() {
                      const { claim } = this.props;
                  
                      // Return null if the claim/ claim.attributes dont exist
                      if (!claimAvailable(claim)) {
                  Severity: Minor
                  Found in src/applications/claims-status/containers/ClaimStatusPage.jsx - About 1 hr to fix

                    Function NotInDEERSAlert has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const NotInDEERSAlert = () => {
                      return (
                        <>
                          <va-alert
                            status="warning"

                      Function AccountSecurityLoa1CredAlert has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const AccountSecurityLoa1CredAlert = () => {
                        const { label } = useSignInServiceProvider();
                      
                        return (
                          <>

                        Function prescriptions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function prescriptions(state = initialState, action) {
                          switch (action.type) {
                            case 'LOADING_ACTIVE':
                              return set('active.loading', true, state);
                        
                        

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

                            render() {
                              let content;
                          
                              switch (this.props.serviceAvailability) {
                                case SERVICE_AVAILABILITY_STATES.unrequested: {

                            Function buildAllergiesPDFList has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const buildAllergiesPDFList = allergies => {
                              return allergies.map(item => {
                                return {
                                  header: item.name,
                                  sections: [
                            Severity: Minor
                            Found in src/applications/mhv-medications/util/pdfConfigs.js - About 1 hr to fix

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

                              export function waitForShadowRoot(el, waitForPaint = true) {
                                return new Promise((resolve, reject) => {
                                  const host = typeof el === 'string' ? document.querySelector(el) : el;
                              
                                  if (isWebComponentReady(host) || process.env.NODE_ENV === 'test') {
                              Severity: Minor
                              Found in src/platform/utilities/ui/webComponents.js - About 1 hr to fix

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

                                  render() {
                                    const {
                                      data,
                                      schema,
                                      uiSchema,
                                Severity: Minor
                                Found in src/platform/forms-system/src/js/components/SchemaForm.jsx - About 1 hr to fix

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

                                  export function updateItemsSchema(schema, fieldData = null) {
                                    if (schema.type === 'array') {
                                      let newSchema = schema;
                                  
                                      // This happens the first time this function is called when
                                  Severity: Minor
                                  Found in src/platform/forms-system/src/js/state/helpers.js - About 1 hr to fix

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

                                    export default function ThrottledError(props) {
                                      const { buttonText, when, formConfig, onBack, onSubmit, testId } = props;
                                      let ariaDescribedBy = null;
                                      // If no ariaDescribedBy is passed down from form.js,
                                      // a null value will properly not render the aria label.

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

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

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

                                          const veteranList = veterans?.map((veteran, index) => {
                                            return (
                                              <li
                                                key={`veteran-${index}`}
                                                className="fry-dea-form-featured-content vads-u-margin-top--2"
                                        Severity: Minor
                                        Found in src/applications/fry-dea/components/RelatedVeterans.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language