department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function UploadFileToVa has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const UploadFileToVa = () => {
  return (
    <div>
      <MainContentSubDiv id="upload-files-to-va" header="Upload files to VA">
        <LiSpanAndVaLinkAndPTag

    Function OMBInfo has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const OMBInfo = () => {
      const expDate = '07/31/2027';
      const ombNum = '2900-0091';
      const resBurden = '27';
      return (

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

        const handleTouClick = async type => {
          const params = {
            ...(redirectLocation.searchParams.get('terms_code') && {
              // eslint-disable-next-line camelcase
              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 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            if (this.state.loading) {
              return <va-loading-indicator message="Loading facilities..." />;
            }
        
        

          Function renderConfirmationMessage has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const renderConfirmationMessage = () => {
              return (
                <Wrapper
                  pageTitle={t('youre-checked-in')}
                  testID="multiple-appointments-confirm"

            Function Demographics has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const Demographics = props => {
              const dispatch = useDispatch();
              const { router } = props;
              const {
                goToNextPage,
            Severity: Minor
            Found in src/applications/check-in/pre-check-in/pages/Demographics/index.jsx - About 1 hr to fix

              Function generateFeatureToggles has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const generateFeatureToggles = (toggles = {}) => {
                const {
                  checkInExperienceEnabled = true,
                  preCheckInEnabled = true,
                  checkInExperienceTranslationDisclaimerSpanishEnabled = true,

                Function convertCountryCode has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function convertCountryCode(savedData) {
                  const addressPaths = [
                    {
                      path: 'incident0.incidentLocation.country',
                      returnUrl: 'disabilities/ptsd-incident-location-0',

                  Function getMonthlyIncome has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const getMonthlyIncome = formData => {
                    const {
                      additionalIncome: {
                        addlIncRecords = [],
                        spouse: { spAddlIncome = [] } = {},
                  Severity: Minor
                  Found in src/applications/financial-status-report/utils/calculateIncome.js - About 1 hr to fix

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

                      const updateFormData = e => {
                        e.preventDefault();
                    
                        if (!isValidCurrency(grossMonthlyIncome.value)) {
                          setIncomeError(true);

                      Function sendReply has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      ) => async dispatch => {
                        try {
                          await createReplyToMessage(replyToId, message, attachments);
                          dispatch(
                            addAlert(
                      Severity: Minor
                      Found in src/applications/mhv-secure-messaging/actions/messages.js - About 1 hr to fix

                        Function FoldersList has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const FoldersList = props => {
                          const { folders, showUnread } = props;
                        
                          const folderNameDdAction = folderName => {
                            const isCustomFolder =
                        Severity: Minor
                        Found in src/applications/mhv-secure-messaging/components/FoldersList.jsx - About 1 hr to fix

                          Function useGetReferralsAndRequests has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const useGetReferralsAndRequests = () => {
                            const [loading, setLoading] = useState(true);
                            const [referralsError, setReferralsError] = useState(false);
                            const [requestsError, setRequestsError] = useState(false);
                            const dispatch = useDispatch();

                            Function MockAuth has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function MockAuth() {
                              return (
                                <section className="login">
                                  <va-banner
                                    type="warning"
                            Severity: Minor
                            Found in src/applications/login/containers/MockAuth.jsx - About 1 hr to fix

                              Function createAppealsSuccess has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const createAppealsSuccess = (updatedDaysAgo = 10) => {
                                const daysAgo = addDays(new Date(), -updatedDaysAgo);
                                const formattedDaysAgo = format(daysAgo, 'yyyy-MM-dd');
                              
                                return {
                              Severity: Minor
                              Found in src/applications/personalization/dashboard/mocks/appeals/index.js - About 1 hr to fix

                                Function notQualifiedWarning has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function notQualifiedWarning() {
                                  return (
                                    <div className="usa-alert usa-alert-warning usa-content not-qualified">
                                      <div className="usa-alert-body">
                                        <h2>You don't qualify</h2>
                                Severity: Minor
                                Found in src/applications/post-911-gib-status/utils/helpers.jsx - About 1 hr to fix

                                  Function formatAddress has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function formatAddress(address) {
                                    /* eslint-disable prefer-template */
                                  
                                    const {
                                      addressLine1,
                                  Severity: Minor
                                  Found in src/platform/forms/address/helpers.js - About 1 hr to fix

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

                                      render() {
                                        const {
                                          accountLevel,
                                          accountState,
                                          errors,
                                    Severity: Minor
                                    Found in src/platform/user/authorization/containers/MHVApp.jsx - About 1 hr to fix

                                      Function addressValidationSuccessTwoConfirmedSuggestions has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

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

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

                                        export const mapStateToProps = (state, ownProps) => {
                                          const { fieldName } = ownProps;
                                        
                                          const { transaction, transactionRequest } = selectVAPServiceTransaction(
                                            state,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language