Showing 4,231 of 14,884 total issues
File EstimatedBenefits.jsx
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import _ from 'lodash';
import { createId } from '../../utils/helpers';
Function perTermSections
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const perTermSections = () => {
const { perTerm } = outputs;
const sections = Object.keys(perTerm).map(section => {
const {
Function CareSummariesDetails
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CareSummariesDetails = () => {
const dispatch = useDispatch();
const careSummary = useSelector(
state => state.mr.careSummariesAndNotes.careSummariesAndNotesDetails,
);
Function generateAccountSummaryContent
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generateAccountSummaryContent = record => {
const { authenticationSummary, vaTreatmentFacilities } = record;
return {
details: {
Function convertDemographics
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const convertDemographics = patient => {
if (!patient) return null;
const { userProfile: profile } = patient;
return {
firstName: profile.name.firstName || NONE_ENTERED,
File index.js
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
const all = {
id: '868a0f70-f920-4483-9be4-fa64f65d2e85',
meta: {
lastUpdated: '2023-07-21T12:22:25.721-04:00',
},
File VerificationReviewWrapper.jsx
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable no-unused-expressions */
import React, { useState, useEffect } from 'react';
import { useHistory } from 'react-router-dom';
import PropTypes from 'prop-types';
import { connect, useDispatch } from 'react-redux';
File index.jsx
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { cloneDeep } from 'lodash';
import { setData } from 'platform/forms-system/src/js/actions';
Function createRichTextDetailItem
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const createRichTextDetailItem = async (doc, config, x, item) => {
let titleText = item.title ?? '';
const content = [];
if (titleText) {
- 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 waitForRenderThenFocus
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function waitForRenderThenFocus(
selector,
root = document,
timeInterval = defaultTime,
// added because we first need to wait for a component to be rendered, then we
- 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 componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
- 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 ProfileInformationView
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ProfileInformationView = props => {
const { data, fieldName, title, id } = props;
const titleLower = title.toLowerCase();
- 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 ReviewPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ReviewPage = ({
dependentsInput,
editMode,
pastMode,
router,
- 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 getBoardExplanation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export const getBoardExplanation = formResponses => {
const reason = formResponses[SHORT_NAME_MAP.REASON];
const noPrevApp =
formResponses[SHORT_NAME_MAP.PREV_APPLICATION] === RESPONSES.NO;
const prevAppType = formResponses[SHORT_NAME_MAP.PREV_APPLICATION_TYPE];
- 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 IntroductionPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const IntroductionPage = props => {
const dispatch = useDispatch();
const { hasVaFileNumber, isLoading } = useSelector(
state => state?.vaFileNumber,
);
- 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 componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
export 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 componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
- 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 componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
- 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 prefillTransformerV2
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function prefillTransformerV2(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const contactInfo = claimant?.contactInfo || {};
const sponsors = state.data?.formData?.attributes?.sponsors;
- 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"