Showing 4,177 of 14,709 total issues
Function content
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
const content = () => {
if (accessAlert) {
return (
<AccessTroubleAlertBox
alertType={accessAlertTypes.HEALTH_CONDITIONS}
Function NonVaPrescription
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
const NonVaPrescription = prescription => {
const content = () => {
const status = prescription?.dispStatus?.toString();
return (
<div className="medication-details-div vads-u-border-top--1px vads-u-border-color--gray-lighter vads-u-margin-top--3 medium-screen:vads-u-margin-top--4 vads-u-margin-bottom--3">
File IntroductionPage.jsx
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
VaAlert,
VaButton,
VaSearchInput,
} from '@department-of-veterans-affairs/component-library/dist/react-bindings';
File assetTransferPages.js
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import merge from 'lodash/merge';
import {
arrayBuilderItemFirstPageTitleUI,
arrayBuilderItemSubsequentPageTitleUI,
Function ReviewPage
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ReviewPage = props => {
const [privacyCheckbox, setPrivacyCheckbox] = useState(false);
const [submitted, setSubmitted] = useState(false);
const { chapterTitles, getChapterPagesFromChapterIndex } = setupPages();
Function BurialIntroduction
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function BurialIntroduction(props) {
return (
<>
<Page {...props}>
<div className="schemaform-intro">
Function HomeAcreageValueInput
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const HomeAcreageValueInput = props => {
const {
goBack,
goForward,
onReviewPage = false,
File SearchBenefits.jsx
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState } from 'react';
import { useFeatureToggle } from 'platform/utilities/feature-toggles';
import EbenefitsLink from 'platform/site-wide/ebenefits/containers/EbenefitsLink';
import recordEvent from 'platform/monitoring/record-event';
import PropTypes from 'prop-types';
Function default
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(state = INITIAL_STATE, action) {
switch (action.type) {
case ADD_COMPARE_INSTITUTION:
if (state.selected.length < 3) {
return {
Function CopyAddressModal
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CopyAddressModal = props => {
const {
mailingAddress = null,
homeAddress,
transaction,
File trustPages.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import merge from 'lodash/merge';
import {
arrayBuilderItemFirstPageTitleUI,
arrayBuilderItemSubsequentPageTitleUI,
File constants.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
import constants from 'vets-json-schema/dist/constants.json';
import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';
const { pciuStates: PCIU_STATES } = constants;
Function ViewDependentsListItem
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ViewDependentsListItem(props) {
const [open, setOpen] = useState(false);
const {
manageDependentsToggle,
Function CareSummariesAndNotesListItem
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CareSummariesAndNotesListItem = props => {
const { record } = props;
const isDischargeSummary = record.type === loincCodes.DISCHARGE_SUMMARY;
const admDate = dischargeSummarySortFields.ADMISSION_DATE;
File index.js
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
import moment from 'moment-timezone';
import { isArray, sortBy, filter, isEmpty } from 'lodash';
export const filterByOptions = [
{
File LocationSearchForm.jsx
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable react/jsx-no-bind */
/* eslint-disable react/jsx-wrap-multilines */
/* eslint-disable react/prop-types */
import React, { useEffect, useState, createRef } from 'react';
Function generate
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const generate = async data => {
validate(data);
const tocPageData = {};
const doc = createAccessibleDoc(data, config);
- 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 ContactInfo
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const ContactInfo = ({
data,
goBack,
goForward,
onReviewPage,
- 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 Autocomplete
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const Autocomplete = ({
availableResults,
debounceDelay,
formData,
id,
- 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 ContestableIssues
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const ContestableIssues = props => {
const {
id,
options,
formContext = {},
- 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"