department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,731 of 12,808 total issues

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

export const UploadDocuments = () => {
  return (
    <>
      <div>
        <p>

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

    export default function HandlePrefilledSSN(fieldProps) {
      const props = vaTextInputFieldMapping(fieldProps);
      const [val, setVal] = useState(props.value);
      const [displayVal, setDisplayVal] = useState(props.value);
      const [cleared, setCleared] = useState(false);
    Severity: Minor
    Found in src/applications/ivc-champva/shared/components/maskSSN.jsx - About 1 hr to fix

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

      export function applicantInsuranceThroughEmployerSchema(isPrimary) {
        const keyname = isPrimary
          ? 'applicantPrimaryThroughEmployer'
          : 'applicantSecondaryThroughEmployer';
        const provider = isPrimary

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

          const addressDescription = () => {
            return (
              <>
                {loading ? (
                  <va-loading-indicator

          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 PersonalInformationPage has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const PersonalInformationPage = props => {
              const { location, route, router } = props;
              const { pathname } = location;
              const { pageList } = route;
              const { data: formData } = useSelector(state => state.form);
            Severity: Minor
            Found in src/applications/hca/containers/PersonalInformationPage.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 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 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 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 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 AccountSecurityLoa1CredAlert has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

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

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

                                    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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language