Showing 4,177 of 14,709 total issues
Function IntroductionPage
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IntroductionPage = props => {
useEffect(() => {
focusElement('h1');
scrollTo('topContentElement');
}, []);
Function BurialAllowance
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function BurialAllowance(props) {
const { values } = useFormikContext();
const getBurialAllowanceRequestedOptions = () => {
const allowanceTypes = [
Function YourTreatmentPlan
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
const YourTreatmentPlan = props => {
const { avs } = props;
const { medChangesSummary, orders } = avs;
const medChanges =
Function useDirectDeposit
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useDirectDeposit = () => {
const dispatch = useDispatch();
const [formData, setFormData] = useState({});
Function ManageDependents
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ManageDependents = props => {
const {
relationship,
updateFormData,
cleanupFormData,
File RefillPrescriptions.jsx
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState, useEffect, useMemo } from 'react';
import PropTypes from 'prop-types';
import { Link, useLocation } from 'react-router-dom';
import { useSelector, useDispatch } from 'react-redux';
import {
File profile.js
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import PropTypes from 'prop-types';
import {
isValidEmail,
File ResultsPage.jsx
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { waitForRenderThenFocus } from '@department-of-veterans-affairs/platform-utilities/ui';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
File profile.js
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import PropTypes from 'prop-types';
import {
isValidEmail,
File profile.js
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import PropTypes from 'prop-types';
import {
isValidEmail,
Function render
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { route, showWizard } = this.props;
const { formConfig, pageList } = route;
const sipProps = { formConfig, pageList };
Function PreSubmitNotice
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PreSubmitNotice = props => {
const { preSubmitInfo, showError, onSectionComplete, submission } = props;
const { field, required } = preSubmitInfo;
const [accepted, setAccepted] = useState(false);
Function AppointmentListInfoBlock
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AppointmentListInfoBlock = () => {
const { t } = useTranslation();
const [privacyActModalOpen, setPrivacyActModalOpen] = useState(false);
const getModalUrl = modalState => {
Function updateSchema
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
const updateSchema = () => {
if (addressFormData) {
// if livesOnMilitaryBase is checked
if (addressFormData?.['view:livesOnMilitaryBase']) {
const filteredRequiredArray = addressFormRequiredData.filter(
Function selfEnteredReducer
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const selfEnteredReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.SelfEntered.GET_VITALS: {
return {
...state,
Function getMissingInfo
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const getMissingInfo = ({ data, keys, content, requiredKeys = [] }) => {
const missingInfo = [];
// If both home & mobile selected, make only one phone required
const phones = [keys.homePhone, '|', keys.mobilePhone];
const eitherPhone =
- 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 EvidenceSummary
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
const EvidenceSummary = ({
data,
goBack,
goForward,
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 getMissingInfo
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const getMissingInfo = ({ data, keys, content, requiredKeys = [] }) => {
const missingInfo = [];
// If both home & mobile selected, make only one phone required
const phones = [keys.homePhone, '|', keys.mobilePhone];
const eitherPhone =
- 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 getMissingInfo
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const getMissingInfo = ({ data, keys, content, requiredKeys = [] }) => {
const missingInfo = [];
// If both home & mobile selected, make only one phone required
const phones = [keys.homePhone, '|', keys.mobilePhone];
const eitherPhone =
- 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 getMissingInfo
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const getMissingInfo = ({ data, keys, content, requiredKeys = [] }) => {
const missingInfo = [];
// If both home & mobile selected, make only one phone required
const phones = [keys.homePhone, '|', keys.mobilePhone];
const eitherPhone =
- 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"