Showing 4,231 of 14,884 total issues
Function ConfirmationPage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const ConfirmationPage = ({
claimStatus,
getClaimStatus,
userFullName,
userEmail,
- 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 IssueCard
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const IssueCard = ({
id,
index,
item = {},
options = {},
- 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 PrimaryPhone
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const PrimaryPhone = ({
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 focusIssue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const focusIssue = (_index, root, value) => {
setTimeout(() => {
const item = value || window.sessionStorage.getItem(LAST_ISSUE);
window.sessionStorage.removeItem(LAST_ISSUE);
const [id, type] = (item || '').toString().split(',');
- 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 PrimaryPhone
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const PrimaryPhone = ({
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 focusIssue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const focusIssue = (_index, root, value) => {
setTimeout(() => {
const item = value || window.sessionStorage.getItem(LAST_ISSUE);
window.sessionStorage.removeItem(LAST_ISSUE);
const [id, type] = (item || '').toString().split(',');
- 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 UserNav
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const UserNav = ({ isMobile }) => {
const profile = useSelector(selectUserProfile);
const isLoading = useSelector(selectIsUserLoading);
const uniqueId = useRef(generateUniqueId());
- 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 CarefulConsiderationStatement
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const CarefulConsiderationStatement = ({ formResponses, router }) => {
const reasonStatement = () => {
const reason = formResponses[SHORT_NAME_MAP.REASON];
const dischargeType = formResponses[SHORT_NAME_MAP.DISCHARGE_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 renderMedicalRecordInfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const renderMedicalRecordInfo = formResponses => {
const reason = formResponses[SHORT_NAME_MAP.REASON];
if (
[
RESPONSES.REASON_PTSD,
- 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 data
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
data: (state = initialState, action) => {
switch (action.type) {
case FETCH_POST_911_GI_BILL_ELIGIBILITY_SUCCESS:
return {
...state,
- 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 fieldsMustMatchValidation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const fieldsMustMatchValidation = (
errors,
page,
formData,
certProp,
- 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 deepEqual
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function deepEqual(obj1, obj2) {
if (obj1 === obj2) return true;
if (
typeof obj1 !== 'object' ||
- 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 nameWording
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function nameWording(
formData,
isPosessive = true,
cap = true,
firstNameOnly = 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 BenefitsProfileWrapper
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const BenefitsProfileWrapper = ({ children }) => {
const {
loading,
expirationDate,
updated,
- 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 LevelThreeLinks
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const LevelThreeLinks = ({ section, aboutVA = false }) => {
const buildSeeAllLink = seeAllLink => {
if (seeAllLink) {
return (
<div className="panel-bottom-link">
- 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 verifyEnrollmentAction
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const verifyEnrollmentAction = verifications => {
return async (dispatch, getState) => {
dispatch({ type: VERIFY_ENROLLMENT });
const {
checkClaimant: { claimantId },
- 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 concatStreets
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function concatStreets(addr, newLines = false) {
const updated = { ...addr, streetCombined: '' };
if (addr) {
for (const [k, v] of Object.entries(addr)) {
updated.streetCombined += k.includes('street')
- 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 useMockedLogin
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const useMockedLogin = () => {
const [
localHasSession,
setLocalHasSession,
clearLocalHasSession,
- 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 updateMemDb
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const updateMemDb = (req, res = null) => {
const key = `${req.method} ${req.url}`;
const body = req.body || {};
if (key === 'PUT /v0/profile/telephones') {
- 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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
activeEditView,
fieldName,
isEmpty,
- 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"