department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function getDerivedAttributes has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function getDerivedAttributes(constant, eligibility, institution) {
  const your = eligibility;
  const its = institution;
  const chapter = Number(your.giBillChapter);
  let monthlyRate;
Severity: Major
Found in src/applications/gi/selectors/estimator.js - About 3 hrs to fix

    Function mockPrescription has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function mockPrescription(n = 0, attrs = {}) {
      // Generate some refillable, some not
      const isRefillable = n % 3 === 0;
      const refillRemaining = isRefillable ? Math.ceil(Math.log(n + 1)) : 0;
      const {

      File index.jsx has 314 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import React from 'react';
      import PropTypes from 'prop-types';
      
      export const AssetInformationAlert = () => (
        <va-additional-info trigger="How we define assets">
      Severity: Minor
      Found in src/applications/pensions/components/FormAlerts/index.jsx - About 3 hrs to fix

        File SchoolLocations.jsx has 314 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { useEffect, useState } from 'react';
        import { BrowserRouter as Router, Link } from 'react-router-dom';
        import recordEvent from 'platform/monitoring/record-event';
        import { waitForRenderThenFocus } from 'platform/utilities/ui';
        import { getCalculatedBenefits } from '../../selectors/calculator';
        Severity: Minor
        Found in src/applications/gi/components/profile/SchoolLocations.jsx - About 3 hrs to fix

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

            render() {
              const {
                onSubmit,
                props: {
                  analyticsSectionName,

            Function getUiSchema has 88 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const getUiSchema = () => {
              return {
                'view:livesOnMilitaryBase': {
                  'ui:title': 'I live on a United States military base outside of the U.S.',
                  'ui:webComponentField': VaCheckboxField,
            Severity: Major
            Found in src/applications/verify-your-enrollment/components/addressSchema.js - About 3 hrs to fix

              Function IntroductionPage has 88 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const IntroductionPage = props => {
                const { ombInfo, route } = props;
                const { formConfig, pageList } = route;
              
                useEffect(() => {
              Severity: Major
              Found in src/applications/form-renderer/containers/IntroductionPage.jsx - About 3 hrs to fix

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

                  render() {
                    const {
                      onSubmit,
                      props: {
                        analyticsSectionName,

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

                    render() {
                      const {
                        vaFileNumber: { hasVaFileNumber, isLoading },
                        user,
                      } = this.props;

                    Function Disagree has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const Disagree = () => {
                      useEffect(() => {
                        recordEvent({
                          event: 'howToWizard-alert-displayed',
                          'reason-for-alert':
                    Severity: Major
                    Found in src/applications/financial-status-report/wizard/pages/Disagree.jsx - About 3 hrs to fix

                      Function ConfirmationPage has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function ConfirmationPage() {
                        const { data, slot, facilityDetails, submitStatus } = useSelector(
                          selectConfirmationPage,
                          shallowEqual,
                        );

                        File stateList.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        const stateList = [
                          {
                            key: 'AL',
                            label: 'Alabama',
                            value: 'AL',
                        Severity: Minor
                        Found in src/applications/check-in/utils/appConstants/stateList.js - About 3 hrs to fix

                          File AddFilesForm.jsx has 313 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import PropTypes from 'prop-types';
                          import React from 'react';
                          import Scroll from 'react-scroll';
                          
                          import {

                            File form.js has 312 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import environment from '@department-of-veterans-affairs/platform-utilities/environment';
                            import { cloneDeep } from 'lodash';
                            import { externalServices } from 'platform/monitoring/DowntimeNotification';
                            
                            import {
                            Severity: Minor
                            Found in src/applications/ivc-champva/10-7959f-2/config/form.js - About 3 hrs to fix

                              Function mockPrescription has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function mockPrescription(n = 0, attrs = {}) {
                                // Generate some refillable, some not
                                const isRefillable = n % 3 === 0;
                                const refillRemaining = isRefillable ? Math.ceil(Math.log(n + 1)) : 0;
                                const {
                              Severity: Major
                              Found in src/platform/mhv/api/mocks/medications/prescriptions/index.js - About 3 hrs to fix

                                Function CustomPage has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function CustomPage(props) {
                                    const searchParams = getArrayUrlSearchParams();
                                    const isEdit = !!searchParams.get('edit');
                                    const isAdd = !!searchParams.get('add');
                                
                                

                                  Function DynamicRadioWidget has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function DynamicRadioWidget(props) {
                                    const { onChange } = props;
                                    let locationsList = null;
                                    let upperContent = null;
                                    const [locations, setLocations] = useState([]);

                                    Function Index has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const Index = props => {
                                      const { router } = props;
                                      const { t } = useTranslation();
                                    
                                      const { jumpToPage } = useFormRouting(router);
                                    Severity: Major
                                    Found in src/applications/check-in/pre-check-in/pages/Landing/index.jsx - About 3 hrs to fix

                                      Function CreateFolderModal has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const CreateFolderModal = props => {
                                        const {
                                          isCreateNewModalVisible,
                                          setIsCreateNewModalVisible,
                                          onConfirm,

                                        Function AppealsV2StatusPage has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function AppealsV2StatusPage() {
                                          const [appeal, fullName] = useOutletContext();
                                          const {
                                            events,
                                            alerts,
                                        Severity: Major
                                        Found in src/applications/claims-status/containers/AppealsV2StatusPage.jsx - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language