department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function getSubmenu has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  getSubmenu(item, currentSection) {
    if (this.mobileMediaQuery?.matches) {
      const menuSections = [
        item.menuSections.mainColumn,
        item.menuSections.columnOne,
Severity: Minor
Found in src/platform/site-wide/mega-menu/components/MegaMenu.jsx - About 1 hr to fix

    Function replaceSchema has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            replaceSchema: (formData, _schema, _uiSchema, index, path) => {
              const addressPath = getAddressPath(path); // path is ['address', 'currentField']
              cachedPath = addressPath;
              const data = get(addressPath, formData) ?? {};
              const { country } = data;

      Function createRoutes has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function createRoutes(formConfig) {
        // Validate the config while creating the routes because this is really the
        // entry point for applications to use the forms library.
        // TODO: Tree shake this config validation in prod
        validateConfig(formConfig);
      Severity: Minor
      Found in src/platform/forms-system/src/js/routing.js - About 1 hr to fix

        Function pactAct has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const pactAct = (state = initialState, action) => {
          switch (action.type) {
            case PAW_UPDATE_SERVICE_PERIOD:
              return updateFormValue(SERVICE_PERIOD, false, state, action);
            case PAW_UPDATE_BURN_PIT_2_1:
        Severity: Minor
        Found in src/applications/pact-act/reducers/index.js - About 1 hr to fix

          Function fetchFormStatus has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const fetchFormStatus = () => async dispatch => {
            dispatch(initiateApiCall());
            const sessionExpiration = localStorage.getItem('sessionExpiration');
            const remainingSessionTime = moment(sessionExpiration).diff(moment());
            if (!remainingSessionTime) {
          Severity: Minor
          Found in src/applications/health-care-supply-reordering/actions/index.js - About 1 hr to fix

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

            export function prefillTransformer(pages, formData, metadata, state) {
              const vaProfile = state.user.profile;
            
              // For reference, I _think_ the vapContactInfo has the follow form:
              // const vapContactInfo = {
            Severity: Minor
            Found in src/applications/fry-dea/helpers.jsx - About 1 hr to fix

              Function DecisionReviewPage has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const DecisionReviewPage = () => {
                useEffect(() => {
                  setTimeout(() => {
                    focusElement('#main h2');
                  });
              Severity: Minor
              Found in src/applications/appeals/996/subtask/pages/other.jsx - About 1 hr to fix

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

                  render() {
                    const { form } = this.props;
                    const { submission, formId, data } = form;
                    const submitDate = submission.timestamp;
                    const { fullName } = data;
                Severity: Minor
                Found in src/applications/edu-benefits/10282/containers/ConfirmationPage.jsx - About 1 hr to fix

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

                    render() {
                      return (
                        <div>
                          <va-button onClick={this.openModal} text="Opt Out" />
                          <VaModal
                  Severity: Minor
                  Found in src/applications/edu-benefits/components/OptOutWizard.jsx - About 1 hr to fix

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

                      render() {
                        const { form } = this.props;
                        const { submission, formId, data } = form;
                        const submitDate = new Date(submission?.timestamp);
                    
                    
                    Severity: Minor
                    Found in src/applications/form-renderer/containers/ConfirmationPage.jsx - About 1 hr to fix

                      Function mailInfo has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const mailInfo = (address, officeName, faxNum, preamble, appType) => {
                        const faxNumMarkup = (
                          <VaTelephone
                            contact={JSON.stringify({
                              phoneNumber: faxNum ?? '3033317809',

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

                          render() {
                            const { form } = this.props;
                            const { submission, formId, data } = form;
                        
                            const { fullName } = data;

                          Function MFA has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const MFA = () => {
                            const verifyLink = useCallback(async policy => {
                              await verify({ policy, isLink: true, isSignup: false });
                            }, []);
                          
                          

                            Function verifyDependents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function verifyDependents(state = initialState, action) {
                              switch (action.type) {
                                case DEPENDENCY_VERIFICATION_CALL_SUCCESS:
                                  return {
                                    ...state,

                              Function FinancialConfirmation has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const FinancialConfirmation = props => {
                                const { goBack, goForward } = props;
                              
                                return (
                                  <va-alert
                              Severity: Minor
                              Found in src/applications/hca/components/FormPages/FinancialConfirmation.jsx - About 1 hr to fix

                                Function YourAppointment has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const YourAppointment = props => {
                                  const { avs } = props;
                                
                                  return (
                                    <div className="avs-accordion-item">
                                Severity: Minor
                                Found in src/applications/avs/components/YourAppointment.jsx - About 1 hr to fix

                                  Function createRecurringEvents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const createRecurringEvents = () => {
                                    const recurEventData = { id: 'upcoming' };
                                    const eventA = createEvent(
                                      now
                                        .clone()
                                  Severity: Minor
                                  Found in src/applications/static-pages/events/helpers/event-generator.js - About 1 hr to fix

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

                                      render() {
                                        const { form } = this.props;
                                        const { submission, formId, data } = form;
                                        const submitDate = submission ? submission.timestamp : null;
                                        const { fullName } = data;
                                    Severity: Minor
                                    Found in src/applications/travel-pay/containers/ConfirmationPage.jsx - About 1 hr to fix

                                      Function generateMedicalCentersSchemas has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const generateMedicalCentersSchemas = (
                                        medicalCentersKey = 'medicalCenters',
                                        medicalCentersTitle = 'Default Medical Centers Title',
                                        medicalCenterMessage = 'Default Message',
                                        medicalCenterFieldLabel = 'Default Field Label',

                                        Function App has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const App = props => {
                                          const { location, children } = props;
                                          const { data: formData } = useSelector(state => state.form);
                                          const { isLoadingFeatureFlags: loading, useFacilitiesApi } = useSelector(
                                            selectFeatureToggles,
                                        Severity: Minor
                                        Found in src/applications/caregivers/containers/App.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language