department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function getContestableIssues has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getContestableIssues = props => {
  const benefitType = props?.benefitType || DEFAULT_BENEFIT_TYPE;
  return dispatch => {
    dispatch({ type: FETCH_CONTESTABLE_ISSUES_INIT });

Severity: Minor
Found in src/applications/appeals/996/actions/index.js - About 1 hr to fix

    Function getContestableIssues has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getContestableIssues = props => {
      const benefitType = props?.benefitType || DEFAULT_BENEFIT_TYPE;
      return dispatch => {
        dispatch({ type: FETCH_CONTESTABLE_ISSUES_INIT });
    
    
    Severity: Minor
    Found in src/applications/appeals/testing/sc/actions/index.js - About 1 hr to fix

      Function renderReviewAnswers has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const renderReviewAnswers = () => {
          return Object.keys(SHORT_NAME_MAP).map(shortName => {
            if (formResponses[shortName] === null) {
              return null;
            }
      Severity: Minor
      Found in src/applications/discharge-wizard/components/v2/ReviewPage.jsx - About 1 hr to fix

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

          render() {
            const { form } = this.props;
            const { submission, formId } = form;
            const benefits = form.data['view:selectedBenefits'];
        
        
        Severity: Minor
        Found in src/applications/edu-benefits/1990/containers/ConfirmationPage.jsx - About 1 hr to fix

          Function applicantServicePage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function applicantServicePage(currentSchema) {
            return {
              title: 'Applicant service',
              path: 'applicant/service',
              initialData: {},
          Severity: Minor
          Found in src/applications/edu-benefits/pages/applicantService.js - About 1 hr to fix

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

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

              Function getButton has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                getButton(form) {
                  let url = '';
                  switch (form) {
                    case '0994':
                      url = `/education/about-gi-bill-benefits/how-to-use-benefits/vettec-high-tech-program/apply-for-vettec-form-22-0994`;
              Severity: Minor
              Found in src/applications/edu-benefits/components/EducationWizard.jsx - About 1 hr to fix

                Function PreSubmitNotice has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const PreSubmitNotice = props => {
                  const { onSectionComplete, preSubmitInfo, showError, submission } = props;
                  const { field, required } = preSubmitInfo;
                
                  const [accepted, setAccepted] = useState(false);
                Severity: Minor
                Found in src/applications/ezr/components/PreSubmitNotice/index.jsx - About 1 hr to fix

                  Function applicantInsuranceCommentsSchema has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function applicantInsuranceCommentsSchema(isPrimary) {
                    const keyname = isPrimary
                      ? 'primaryAdditionalComments'
                      : 'secondaryAdditionalComments';
                    return {

                    Function addressLabel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const addressLabel = address => {
                      // Destructure address object for easier access
                      const {
                        addressLine1,
                        addressLine2,
                    Severity: Minor
                    Found in src/applications/verify-your-enrollment/helpers.jsx - About 1 hr to fix

                      Function getPeriodsToVerify has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const getPeriodsToVerify = pendingEnrollments => {
                        return pendingEnrollments
                          .map(enrollmentToBeVerified => {
                            const {
                              actBegin,
                      Severity: Minor
                      Found in src/applications/verify-your-enrollment/helpers.jsx - About 1 hr to fix

                        Function openShareLink has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function openShareLink() {
                          const shareLinks = Array.from(document.querySelectorAll('.va-js-share-link'));
                        
                          if (shareLinks.length > 0) {
                            const hasNavigatorShare = navigator.share !== undefined;
                        Severity: Minor
                        Found in src/applications/static-pages/widget-creators/social-share-links.js - About 1 hr to fix

                          Function buildOperatingStatusProps has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const buildOperatingStatusProps = attrs => {
                            const { opStatus, opStatusExtra } = attrs;
                            let statusLabel;
                            let iconType;
                            let statusType;

                            Function appointmentDetails has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const appointmentDetails = testId => {
                                return (
                                  <div data-testid={testId}>
                                    <div
                                      className="vads-u-margin-top--1p5 vads-u-margin-bottom--1"

                              Function addRequiredDescriptionsToDisabilitiesBDD has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const addRequiredDescriptionsToDisabilitiesBDD = formData => {
                                  if (!isBDDForm || !formData.newDisabilities) {
                                    return formData;
                                  }
                              
                              

                                Function makeUiSchema has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function makeUiSchema(itemId) {
                                  return {
                                    'ui:title': ({ formData }) =>
                                      detailsPageBegin(
                                        additionalExposuresPageTitle,

                                  Function foldersReducer has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const foldersReducer = (state = initialState, action) => {
                                    switch (action.type) {
                                      case Actions.Folder.GET_LIST:
                                        return {
                                          ...state,
                                  Severity: Minor
                                  Found in src/applications/mhv-secure-messaging/reducers/folders.js - About 1 hr to fix

                                    Function ActionButtons has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function ActionButtons(props) {
                                      const { eligibleForRequests, facilityId } = props;
                                      const history = useHistory();
                                      const dispatch = useDispatch();
                                      const { requestDateTime } = useSelector(getNewAppointmentFlow);

                                      Function makeHeaderLabel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        const makeHeaderLabel = () => {
                                          const removed = [];
                                          const added = [];
                                      
                                          loaded.forEach(loadedCode => {
                                      Severity: Minor
                                      Found in src/applications/gi/containers/CompareDrawer.jsx - About 1 hr to fix

                                        Function AccreditationModalContent has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function AccreditationModalContent() {
                                          return (
                                            <>
                                              <p>
                                                The goal of accreditation is to ensure the education provided by
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language