Showing 3,724 of 12,675 total issues
Function default
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function() {
if (
// need this environment check for unit tests to work
environment.isProduction() &&
// this will filter production users using the feature flag
Function BlockedTriageGroupAlert
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
const BlockedTriageGroupAlert = props => {
const { blockedTriageGroupList, alertStyle, parentComponent } = props;
const { alertTitle, alertMessage } = BlockedTriageAlertText;
const MESSAGE_TO_CARE_TEAM = "You can't send messages to";
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 PrescriptionDetails.jsx
has 404 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 FilterBox
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FilterBox = forwardRef((props, ref) => {
const {
category,
setCategory,
dateRange,
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 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 render
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { showWizard } = this.props;
if (showWizard === undefined) return null;
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);
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,
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 EvidenceVaRecords
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const EvidenceVaRecords = ({
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 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 ApplicantAddressCopyPage
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
export function ApplicantAddressCopyPage({
contentBeforeButtons,
contentAfterButtons,
data,
setFormData,
- 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"
Further reading
Function ChangeOfAddressWrapper
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const ChangeOfAddressWrapper = ({ mailingAddress, applicantName }) => {
const { loading: isLoading, error, data: response } = useSelector(
state => state.updateAddress,
);
const {
- 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
File index.js
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Node modules.
import React from 'react';
import PropTypes from 'prop-types';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
// Relative imports.
File helpers.jsx
has 399 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';