department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

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

  render() {
    const { currentLocation, formConfig, children, loadedStatus } = this.props;
    const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
    const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
    let content;
Severity: Minor
Found in src/platform/forms/save-in-progress/RoutedSavableApp.jsx - About 1 hr to fix

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

    export default function GenericError(props) {
      const { appType, formConfig, onSubmit, testId } = props;
      let submitButton;
      let submitMessage;
    
    

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

      export default function MilitaryServiceHistory(props) {
        const state = useFormikContext();
      
        const { from, to } = state.values.toursOfDuty[0].dateRange;
      
      
      Severity: Minor
      Found in src/applications/burial-poc-v6/pages/MilitaryServiceHistory.jsx - About 1 hr to fix

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

          contactInformation: formData => {
            if (_.isEmpty(_.get(formData, 'view:phoneAndEmail.homePhone', {}))) {
              recordEvent({
                event: 'edu-0994--response-missing',
                'missing-field-question':
        Severity: Minor
        Found in src/applications/edu-benefits/0994/analytics-functions.js - About 1 hr to fix

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

          export function prefillTransformer(pages, formData, metadata, state) {
            const {
              user: {
                profile: {
                  vapContactInfo: { residentialAddress, mailingAddress },
          Severity: Minor
          Found in src/applications/ezr/utils/helpers/prefill-transformer.js - About 1 hr to fix

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

            export default function createDirectDepositChangePage(schema) {
              const { bankAccountChange, bankAccount } = schema.definitions;
              return {
                title: 'Direct deposit',
                path: 'personal-information/direct-deposit',
            Severity: Minor
            Found in src/applications/edu-benefits/pages/directDepositChange.js - About 1 hr to fix

              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 (
              Severity: Minor
              Found in src/applications/ezr/components/IntroductionPage/OMBInfo.jsx - About 1 hr to fix

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

                    const renderSearchSection = () => {
                      return (
                        <div className="row search-section">
                          <div className="title-section">
                            <h1>Find a VA accredited representative or VSO</h1>
                  Severity: Minor
                  Found in src/applications/representative-search/containers/SearchPage.jsx - About 1 hr to fix

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

                    export function prefillTransformer(pages, formData, metadata, state) {
                      const {
                        user: {
                          profile: {
                            vapContactInfo: { residentialAddress, mailingAddress },

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

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

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

                                  const CategoryInput = props => {
                                    const {
                                      categories,
                                      category,
                                      categoryError,

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

                                          const sharingModalContent = () => {
                                            const title = `Opt ${
                                              isSharing ? 'out of' : 'back in to'
                                            } sharing your electronic health information?`;
                                            return (
                                        Severity: Minor
                                        Found in src/applications/mhv-medical-records/containers/SettingsPage.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language