Showing 3,724 of 12,675 total issues
File FAQSections.jsx
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
export const FirstFAQSection = () => {
return (
<>
Function arrayBuilderPages
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
export function arrayBuilderPages(options, pageBuilderCallback) {
let introPath;
let summaryPath;
let hasItemsKey;
const itemPages = [];
- 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 AppointmentMessage
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
const AppointmentMessage = props => {
const { appointment, page } = props;
const { t } = useTranslation();
const defaultMessage = t(
- 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 EmploymentRecord
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
const EmploymentRecord = props => {
const { data, goToPath, setFormData } = props;
const editIndex = getJobIndex();
- 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 CreditCardBill
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
const CreditCardBill = props => {
const { data, goToPath, setFormData } = props;
const { expenses } = data;
const { creditCardBills = [] } = expenses;
- 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 EmploymentRecord
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
const EmploymentRecord = props => {
const { data, goToPath, setFormData } = props;
const editIndex = getJobIndex();
- 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 covid19VaccineReducer
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
export default function covid19VaccineReducer(state = initialState, action) {
switch (action.type) {
case FORM_PAGE_OPENED: {
const { newBooking } = state;
const { data, schema } = setupFormData(
- 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 render
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { showWizard } = this.props;
if (showWizard === undefined) return null;
Function getSignlePreviousEnrollments
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getSignlePreviousEnrollments = awards => {
const myUUID = uuidv4();
return (
<div className="vye-top-border" key={myUUID}>
{awards.transactDate &&
Function DependentInformation
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DependentInformation = props => {
const { data, goToPath, setFormData } = props;
const { dependents = [] } = data;
const search = new URLSearchParams(window.location.search);
Function SearchControls
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SearchControls = props => {
const {
onSubmit,
locateUser,
geolocationInProgress,
Function AlertBackgroundBox
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AlertBackgroundBox = props => {
const dispatch = useDispatch();
const alertList = useSelector(state => state.sm.alerts?.alertList);
const folder = useSelector(state => state.sm.folders?.folder);
const [alertContent, setAlertContent] = useState('');
Function resolveLandingPageLinks
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
const resolveLandingPageLinks = (
authdWithSSOe = false,
featureToggles,
unreadMessageAriaLabel,
registered = false,
File ComboBox.jsx
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Description: ComboBox component for the disability benefits form.
import React from 'react';
import PropTypes from 'prop-types';
import { VaTextInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import { fullStringSimilaritySearch } from 'platform/forms-system/src/js/utilities/addDisabilitiesStringSearch';
File form.js
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import footerContent from '~/platform/forms/components/FormFooter';
import manifest from '../manifest.json';
import transform from './submit-transformer';
import getHelp from '../../shared/components/GetFormHelp';
File ReviewCollapsibleChapter.jsx
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
import get from '@department-of-veterans-affairs/platform-forms-system/get';
import set from '@department-of-veterans-affairs/platform-forms-system/set';
import { getScrollOptions } from '@department-of-veterans-affairs/platform-utilities/ui';
import classNames from 'classnames';
import uniqueId from 'lodash/uniqueId';
Function AppointmentMessage
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AppointmentMessage = props => {
const { appointment, page } = props;
const { t } = useTranslation();
const defaultMessage = t(
Function createFormConfig781a
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function createFormConfig781a(iterations) {
let configObj = {};
const formType = '781a';
for (let index = 0; index < iterations; index++) {
configObj = {
Function renderExtensionBeneficiaryZIP
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderExtensionBeneficiaryZIP = () => {
if (!displayedInputs.beneficiaryLocationQuestion) {
return null;
}
const extensions = getExtensions();
File VitalDetails.jsx
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState, useRef, useMemo } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
import { useParams } from 'react-router-dom';
import { chunk } from 'lodash';