department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function submitTransformer has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const submitTransformer = (formConfig, form) => {
  const { data: formData } = form;
  const primaryKey = formData['view:hasPrimaryCaregiver'] ? 'primary' : null;
  const SecondaryOneKey = formData['view:hasSecondaryCaregiverOne']
    ? 'secondaryOne'
Severity: Major
Found in src/applications/caregivers/config/submit-transformer.js - About 3 hrs to fix

    Function CareSummariesAndNotes has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const CareSummariesAndNotes = () => {
      const dispatch = useDispatch();
      const updatedRecordList = useSelector(
        state => state.mr.careSummariesAndNotes.updatedList,
      );

      Function FillRefillButton has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const FillRefillButton = rx => {
        const dispatch = useDispatch();
      
        const { dispensedDate, error, prescriptionId, success, isRefillable } = rx;
      
      

        File AutosuggestField.jsx has 294 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React from 'react';
        import PropTypes from 'prop-types';
        import Downshift from 'downshift';
        import classNames from 'classnames';
        import set from '../../../../utilities/data/set';
        Severity: Minor
        Found in src/platform/forms-system/src/js/fields/AutosuggestField.jsx - About 3 hrs to fix

          Function updateSchemaFromUiSchema has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function updateSchemaFromUiSchema(
            schema,
            uiSchema,
            formData,
            index = null,
          Severity: Major
          Found in src/platform/forms-system/src/js/state/helpers.js - About 3 hrs to fix

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

              render() {
                if (
                  // Prevent RUM from running on local/CI environments.
                  environment.BASE_URL.indexOf('localhost') < 0 &&
                  // Prevent re-initializing the SDK.
            Severity: Major
            Found in src/applications/health-care-supply-reordering/containers/App.jsx - About 3 hrs to fix

              Function reasonStatement has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const reasonStatement = formValues => {
                const reason = formValues['4_reason'];
                const dischargeType = formValues['5_dischargeType'];
              
                switch (reason) {

                Function reasonStatement has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const reasonStatement = () => {
                    const reason = formResponses[SHORT_NAME_MAP.REASON];
                    const dischargeType = formResponses[SHORT_NAME_MAP.DISCHARGE_TYPE];
                
                    switch (reason) {

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

                    render() {
                      const { route } = this.props;
                      const { formConfig, pageList } = route;
                  
                      return (
                  Severity: Major
                  Found in src/applications/edu-benefits/10215/containers/IntroductionPage.jsx - About 3 hrs to fix

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

                      render() {
                        const { route } = this.props;
                        const { formConfig, pageList } = route;
                    
                        return (
                    Severity: Major
                    Found in src/applications/edu-benefits/8794/containers/IntroductionPage.jsx - About 3 hrs to fix

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

                        render() {
                          const { route } = this.props;
                          const { formConfig, pageList } = route;
                      
                          return (
                      Severity: Major
                      Found in src/applications/edu-benefits/10216/containers/IntroductionPage.jsx - About 3 hrs to fix

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

                          render() {
                            const { route } = this.props;
                            const { formConfig, pageList } = route;
                        
                            return (
                        Severity: Major
                        Found in src/applications/edu-benefits/1919/containers/IntroductionPage.jsx - About 3 hrs to fix

                          Function buildLevelOneLinks has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const buildLevelOneLinks = (sectionData, index) => {
                              if (sectionData.menuSections) {
                                return (
                                  <Fragment key={index}>
                                    <li className="vads-u-background-color--primary-dark vads-u-margin--0 vads-u-margin-bottom--0p5 vads-u-width--full vads-u-font-weight--bold">

                            Function ValidateVeteran has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const ValidateVeteran = props => {
                              const { router } = props;
                              const { t } = useTranslation();
                              const dispatch = useDispatch();
                              const { setPermissions } = useStorage(APP_NAMES.CHECK_IN);
                            Severity: Major
                            Found in src/applications/check-in/day-of/pages/ValidateVeteran.jsx - About 3 hrs to fix

                              Function SignatureCheckbox has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const SignatureCheckbox = props => {
                                const {
                                  children,
                                  fullName,
                                  isRequired,

                                Function content has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const content = () => {
                                    if (!isLoaded) {
                                      return (
                                        <va-loading-indicator
                                          message="Loading your secure message..."
                                Severity: Major
                                Found in src/applications/mhv-secure-messaging/containers/ThreadDetails.jsx - About 3 hrs to fix

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

                                    render() {
                                      let content;
                                  
                                      if (this.props.loading) {
                                        content = (
                                  Severity: Major
                                  Found in src/applications/claims-status/containers/DocumentRequestPage.jsx - About 3 hrs to fix

                                    Function PersonalInformation has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const PersonalInformation = () => {
                                      const location = useLocation();
                                    
                                      const hasUnsavedEdits = useSelector(
                                        state => state.vapService.hasUnsavedEdits,

                                      Function ViewDependentsHeader has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function ViewDependentsHeader(props) {
                                        const { updateDiariesStatus } = props;
                                        let alertProps;
                                        // handle status from api
                                        switch (updateDiariesStatus) {

                                        File ApplicationStatus.jsx has 293 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import React from 'react';
                                        import PropTypes from 'prop-types';
                                        import { fromUnixTime, isBefore } from 'date-fns';
                                        import { format } from 'date-fns-tz';
                                        import { connect } from 'react-redux';
                                        Severity: Minor
                                        Found in src/platform/forms/save-in-progress/ApplicationStatus.jsx - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language