Showing 3,724 of 12,675 total issues
Function RegisterFailed
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RegisterFailed = () => {
const content = {
heading: 'We couldn’t create a MyHealtheVet account for you',
alertText: (
<>
Function getTravelMessage
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getTravelMessage = () => {
if (
form.data['travel-question'] === 'no' ||
!isTravelReimbursementEnabled
) {
Function DraftSavedInfo
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DraftSavedInfo = props => {
const { messageId, drafts } = props;
const threadDetails = useSelector(state => state.sm.threadDetails);
Function fetchResultsThunk
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const fetchResultsThunk = (options = {}) => async dispatch => {
// Derive options properties.
const city = options?.city || null;
const contributionAmount = options?.contributionAmount || null;
const hideFetchingState = options?.hideFetchingState;
Function claimsReducer
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function claimsReducer(state = initialState, action) {
switch (action.type) {
case FETCH_CLAIMS_PENDING:
return set(state, true, 'claimsLoading');
case FETCH_CLAIMS_SUCCESS:
Function arrayBuilderYesNoUI
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export const arrayBuilderYesNoUI = (
arrayBuilderOptions,
yesNoOptions,
yesNoOptionsMore,
) => {
- 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 addressUiSchema
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function addressUiSchema(
path = 'address',
checkBoxTitle = 'I live on a United States military base outside of the U.S.',
uiRequiredCallback = () => false,
newSchemaKeys = {},
- 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 getNonArraySchema
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export function getNonArraySchema(schema, uiSchema = {}) {
if (
schema.type === 'array' &&
!get('ui:options.keepInPageOnReview', uiSchema)
) {
- 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 createStringifyFormReplacer
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export function createStringifyFormReplacer(options) {
const replacerFn = (key, value) => {
if (!options?.allowPartialAddress && isPartialAddress(value)) {
return undefined;
}
- 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 Balances
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const Balances = () => {
// get balances from redux
const { debtLetters, mcp } = useSelector(
({ combinedPortal }) => combinedPortal,
);
- 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 validateLogin
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const validateLogin = async (
lastName,
dob,
dobError,
setLastNameError,
- 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 MoveMessageToFolderBtn
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const MoveMessageToFolderBtn = props => {
const {
threadId,
allFolders,
isVisible,
- 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 FilterBox
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const FilterBox = forwardRef((props, ref) => {
const {
category,
setCategory,
dateRange,
- 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 uiSchema
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export function uiSchema(
label = 'Address',
useStreet3 = false,
isRequired = null,
ignoreRequired = false,
- 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 SuggestedAddress
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const SuggestedAddress = ({
formData,
address,
handleAddNewClick,
setAddressToUI,
- 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 NextStepsPage
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function NextStepsPage() {
const { data: formData } = useSelector(state => state.form);
const repType =
formData['view:selectedRepresentative'].attributes?.individualType;
const address = {
- 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 VaPrescription
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const VaPrescription = prescription => {
const showRefillContent = useSelector(selectRefillContentFlag);
const isDisplayingDocumentation = useSelector(
state =>
state.featureToggles[
- 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 webComponents.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
const FORCE_OPTION = { force: true };
const DELAY_OPTION = { force: true, delay: 100 };
Cypress.Commands.add('selectVaButtonPairPrimary', field => {
const selector = `va-button-pair${field ? `[name="${field}"]` : ''}`;
File index.js
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
const all = {
resourceType: 'Bundle',
id: '27b154d8-18c6-41b3-a988-8474bacd19a8',
meta: {
lastUpdated: '2023-09-29T11:04:31.316-04:00',
File EvidenceVaRecords.jsx
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState, useEffect } from 'react';
import { VaTextInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import { EVIDENCE_VA_PATH } from '../constants';
import { content } from '../content/evidenceVaRecords';