Showing 4,177 of 14,709 total issues
File helpers.jsx
has 405 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable camelcase */
import React from 'react';
import EbenefitsLink from 'platform/site-wide/ebenefits/containers/EbenefitsLink';
import { apiRequest as commonApiClient } from '@department-of-veterans-affairs/platform-utilities/api';
Function DateTimeSelectPage
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function DateTimeSelectPage() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const {
appointmentSlotsStatus,
File ResultCard.jsx
has 405 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import classNames from 'classnames';
import appendQuery from 'append-query';
Function DeleteDraft
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DeleteDraft = props => {
const history = useHistory();
const location = useLocation();
const dispatch = useDispatch();
const deleteDraftButtonRef = useRef();
Function render
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const showUploadModal =
this.props.uploading && this.state.canShowUploadModal;
return (
Function Vaccines
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Vaccines = props => {
const { runningUnitTest } = props;
const dispatch = useDispatch();
const updatedRecordList = useSelector(state => state.mr.vaccines.updatedList);
const listState = useSelector(state => state.mr.vaccines.listState);
File ReviewCardField.jsx
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import PropTypes from 'prop-types';
import * as Sentry from '@sentry/browser';
import {
File ProfilePageHeader.jsx
has 403 lines of code (exceeds 250 allowed). Consider refactoring. Open
import PropTypes from 'prop-types';
import React, { useState } from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import classNames from 'classnames';
File helpers.jsx
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { cloneDeep } from 'lodash';
import { formFields } from './constants';
import { getSchemaCountryCode } from './utils/form-submit-transform';
Function TravelReview
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TravelReview = props => {
const { router } = props;
const { t } = useTranslation();
const selectForm = useMemo(makeSelectForm, []);
const { data } = useSelector(selectForm);
Function NewBookingSection
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function NewBookingSection() {
const match = useRouteMatch();
const location = useLocation();
const dispatch = useDispatch();
const canUseVaccineFlow = useSelector(selectCanUseVaccineFlow);
Function resolveLandingPageLinks
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
const resolveLandingPageLinks = (
authdWithSSOe = false,
featureToggles,
unreadMessageAriaLabel,
registered = false,
Function PrintDownload
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PrintDownload = props => {
const {
downloadPdf,
downloadTxt,
list,
File transactions.js
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as Sentry from '@sentry/browser';
import {
ADDRESS_POU,
FIELD_NAMES,
File PrescriptionDetails.jsx
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useCallback, useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useParams } from 'react-router-dom';
import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
Function SelectAccreditedRepresentative
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SelectAccreditedRepresentative = props => {
const {
loggedIn,
setFormData,
formData,
Function resolveParamsWithUrl
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
export const resolveParamsWithUrl = ({
address,
locationType,
serviceType,
page,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function EvidencePrivateRecords
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const EvidencePrivateRecords = ({
data,
goBack,
goForward,
goToPath,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function EvidencePrivateRecords
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const EvidencePrivateRecords = ({
data,
goBack,
goForward,
goToPath,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function DependentAges
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const DependentAges = ({
contentBeforeButtons,
contentAfterButtons,
goForward,
goToPath,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"