department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function fileInputUI has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const fileInputUI = stringOrOptions => {
  if (typeof stringOrOptions === 'string') {
    return {
      'ui:title': stringOrOptions,
      'ui:webComponentField': VaFileInputField,

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

      render() {
        return (
          <Modal
            hideCloseButton
            id="session-timeout-modal"
    Severity: Minor
    Found in src/platform/user/authentication/components/SessionTimeoutModal.jsx - About 1 hr to fix

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

        render() {
          const { submission, data } = this.props.form;
          const { response } = submission;
          const name = data.veteranFullName;
      
      
      Severity: Minor
      Found in src/applications/mock-sip-form/containers/ConfirmationPage.jsx - About 1 hr to fix

        Function addressValidationSuccessTwoInternational has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          addressValidationSuccessTwoInternational() {
            return asyncReturn(
              {
                addresses: [
                  {
        Severity: Minor
        Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

          Function constructor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor(props) {
              super(props);
              // Throw an error if there’s no viewComponent (should be React component)
              if (
                !isReactComponent(get('ui:options.viewComponent', this.props.uiSchema))

            Function fetchDebtLettersVBMS has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const fetchDebtLettersVBMS = () => async dispatch => {
              dispatch(fetchDebtLettersInitiated());
              try {
                const options = {
                  method: 'GET',
            Severity: Minor
            Found in src/applications/combined-debt-portal/combined/actions/debts.js - About 1 hr to fix

              Function IntroText has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const IntroText = () => {
                const restartWizard = () => {
                  recordEvent({ event: 'howToWizard-start-over' });
                };
                return (
              Severity: Minor
              Found in src/applications/appeals/996/content/introduction.jsx - About 1 hr to fix

                Function IntroductionPage has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const IntroductionPage = props => {
                  useEffect(() => {
                    focusElement('h1');
                    scrollTo('topContentElement');
                  });
                Severity: Minor
                Found in src/applications/appeals/996/containers/IntroductionPage.jsx - About 1 hr to fix

                  Function getEvidence has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const getEvidence = formData => {
                    const evidenceSubmission = {
                      evidenceType: [],
                    };
                    // Add VA evidence data
                  Severity: Minor
                  Found in src/applications/appeals/995/utils/submit.js - About 1 hr to fix

                    Function getEvidence has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const getEvidence = formData => {
                      const evidenceSubmission = {
                        evidenceType: [],
                      };
                      // Add VA evidence data
                    Severity: Minor
                    Found in src/applications/appeals/testing/sc/utils/submit.js - About 1 hr to fix

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

                        render() {
                          const { submission, data } = this.props.form;
                          const { response } = submission;
                          const name = data.veteranFullName;
                      
                      
                      Severity: Minor
                      Found in src/applications/sah/sahg/containers/ConfirmationPage.jsx - About 1 hr to fix

                        Function applicantMedigapSchema has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function applicantMedigapSchema(isPrimary) {
                          const keyname = isPrimary ? 'primaryMedigapPlan' : 'secondaryMedigapPlan';
                          return {
                            uiSchema: {
                              ...titleUI(

                          Function searchByCoordinates has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            static searchByCoordinates(
                              address = null,
                              lat,
                              long,
                              name,

                            Function customCOEsubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const customCOEsubmit = (formConfig, form) => {
                              const formCopy = cloneDeep(form);
                            
                              const { periodsOfService = [], relevantPriorLoans = [] } = formCopy.data;
                            
                            

                              Function MailingAddressInfoPage has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const MailingAddressInfoPage = () => {
                                const mailingAddress = useSelector(selectVAPMailingAddress);
                              
                                const showSuccessAlert = window.sessionStorage.getItem(
                                  'onReviewPageContactInfoEdit',

                                Function customCOEsubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const customCOEsubmit = (formConfig, form) => {
                                  const formCopy = cloneDeep(form);
                                
                                  const { periodsOfService = [], relevantPriorLoans = [] } = formCopy.data;
                                
                                
                                Severity: Minor
                                Found in src/applications/lgy/coe/form/config/helpers.js - About 1 hr to fix

                                  Function MailingAddressInfoPageTaskGreen has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const MailingAddressInfoPageTaskGreen = () => {
                                    const mailingAddress = useSelector(selectVAPMailingAddress);
                                  
                                    const showSuccessAlert = window.sessionStorage.getItem(
                                      'onReviewPageContactInfoEdit',

                                    Function renderVaMedication has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const renderVaMedication = medication => {
                                      const facilityPhone = normalizePhoneNumber(medication.facilityPhone);
                                      const phoneNotClickable = !numberIsClickable(facilityPhone);
                                    
                                      return (
                                    Severity: Minor
                                    Found in src/applications/avs/components/YourHealthInformation.jsx - About 1 hr to fix

                                      Function useRepresentativeStatus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function useRepresentativeStatus() {
                                        const [representative, setRepresentative] = useState(null);
                                        const [isLoading, setIsLoading] = useState(true);
                                        const [error, setError] = useState(null);
                                      
                                      

                                        Function useDemographicsFlags has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const useDemographicsFlags = () => {
                                          const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
                                          const context = useSelector(selectCurrentContext);
                                          const { token } = context;
                                        
                                        
                                        Severity: Minor
                                        Found in src/applications/check-in/hooks/useDemographicsFlags.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language