department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function getLabsAndTestsList has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getLabsAndTestsList = (isCurrent = false) => async dispatch => {
  dispatch({
    type: Actions.LabsAndTests.UPDATE_LIST_STATE,
    payload: Constants.loadStates.FETCHING,
  });
Severity: Minor
Found in src/applications/mhv-medical-records/actions/labsAndTests.js - About 1 hr to fix

    Function MedicalAuthorizationPolicy has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const MedicalAuthorizationPolicy = props => {
      const { formData } = props;
    
      return (
        <div className="vads-u-margin-y--3">

      Function buildAllergiesPDFList has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const buildAllergiesPDFList = allergies => {
        return allergies.map(item => {
          return {
            header: item.name,
            sections: [
      Severity: Minor
      Found in src/applications/mhv-medications/util/pdfConfigs.js - About 1 hr to fix

        Function waitForShadowRoot has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function waitForShadowRoot(el, waitForPaint = true) {
          return new Promise((resolve, reject) => {
            const host = typeof el === 'string' ? document.querySelector(el) : el;
        
            if (isWebComponentReady(host) || process.env.NODE_ENV === 'test') {
        Severity: Minor
        Found in src/platform/utilities/ui/webComponents.js - About 1 hr to fix

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

            render() {
              const {
                data,
                schema,
                uiSchema,
          Severity: Minor
          Found in src/platform/forms-system/src/js/components/SchemaForm.jsx - About 1 hr to fix

            Function updateItemsSchema has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function updateItemsSchema(schema, fieldData = null) {
              if (schema.type === 'array') {
                let newSchema = schema;
            
                // This happens the first time this function is called when
            Severity: Minor
            Found in src/platform/forms-system/src/js/state/helpers.js - About 1 hr to fix

              Function ThrottledError has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function ThrottledError(props) {
                const { buttonText, when, formConfig, onBack, onSubmit, testId } = props;
                let ariaDescribedBy = null;
                // If no ariaDescribedBy is passed down from form.js,
                // a null value will properly not render the aria label.

                Function VeteranInfoBox has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const VeteranInfoBox = props => {
                  const {
                    first,
                    middle,
                    last,

                  Function veteranList has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const veteranList = veterans?.map((veteran, index) => {
                      return (
                        <li
                          key={`veteran-${index}`}
                          className="fry-dea-form-featured-content vads-u-margin-top--2"
                  Severity: Minor
                  Found in src/applications/fry-dea/components/RelatedVeterans.jsx - About 1 hr to fix

                    Function renderHealthServices has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      renderHealthServices() {
                        const {
                          facility: {
                            attributes: { services },
                          },
                    Severity: Minor
                    Found in src/applications/facility-locator/components/ServicesAtFacility.jsx - About 1 hr to fix

                      Function renderInbox has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const renderInbox = () => {
                          if (
                            MEBClaimStatusFetchInProgress ||
                            TOEClaimStatusFetchInProgress ||
                            !isLoggedIn.current
                      Severity: Minor
                      Found in src/applications/education-letters/containers/InboxPage.jsx - About 1 hr to fix

                        Function loginPrompt has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          loginPrompt() {
                            if (this.props.isLoggedIn) {
                              if (this.moreThanSixMonths(this.props?.remainingEntitlement)) {
                                return (
                                  <div
                        Severity: Minor
                        Found in src/applications/edu-benefits/10203/containers/IntroductionPage.jsx - About 1 hr to fix

                          Function applicantInsuranceEobSchema has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function applicantInsuranceEobSchema(isPrimary) {
                            const keyname = isPrimary ? 'applicantPrimaryEob' : 'applicantSecondaryEob';
                            const provider = isPrimary
                              ? 'applicantPrimaryProvider'
                              : 'applicantSecondaryProvider';

                            Function containerForLinks has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const containerForLinks = (title, linkGroups) => {
                                const isActiveMenu = activeMenu === title;
                            
                                return (
                                  <div

                              Function VADXPlugin has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const VADXPlugin = () => {
                                return (
                                  <div>
                                    <p>VADX Plugin Example</p>
                                    <div>

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

                                const App = props => {
                                  const { featureFlagsLoading, user } = props;
                                  const { ratedDisabilities } = props.ratedDisabilities;
                                
                                  return (
                                Severity: Minor
                                Found in src/applications/rated-disabilities/containers/App.jsx - About 1 hr to fix

                                  Function GroupCheckboxWidget has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const GroupCheckboxWidget = props => {
                                    const { value, options, formContext, onChange } = props;
                                    const { onReviewPage, reviewMode } = formContext || {};
                                    const { labels } = options;
                                  
                                  
                                  Severity: Minor
                                  Found in src/applications/_mock-form/components/GroupCheckboxWidget.jsx - About 1 hr to fix

                                    Function MhvAlert has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const MhvAlert = () => {
                                        const headline = serviceDescription
                                          ? `${mhvHeadingPrefix} to ${serviceDescription}`
                                          : mhvHeadingPrefix;
                                        return (

                                      Function deriveEventLocations has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const deriveEventLocations = event => {
                                        const locations = [];
                                      
                                        if (!event) {
                                          return locations;
                                      Severity: Minor
                                      Found in src/applications/static-pages/events/helpers/index.js - About 1 hr to fix

                                        Function formatContactInfo has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function formatContactInfo(poaAttributes) {
                                          const {
                                            addressLine1,
                                            addressLine2,
                                            addressLine3,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language