Showing 4,231 of 14,884 total issues
Function generateResultsContent
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const generateResultsContent = async (doc, parent, data) => {
const results = doc.struct('Sect', {
title: 'Results',
});
parent.add(results);
- 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 generateResultsContent
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const generateResultsContent = async (doc, parent, data) => {
for (const resultItem of data.results) {
const results = doc.struct('Sect', {
title: resultItem.header || 'Results',
});
- 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 SipsDevModal
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const SipsDevModal = props => {
const { pageList, form, locationPathname } = props || {};
const { formId, version, data, submission } = form || {};
const [isModalVisible, toggleModal] = useState(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 formatAddress
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function formatAddress(address) {
/* eslint-disable prefer-template */
const {
addressLine1,
- 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 FormApp
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const FormApp = props => {
const { currentLocation, formConfig, children, formData } = props;
const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
const lastPathComponent = currentLocation.pathname.split('/').pop();
const { additionalRoutes, CustomTopContent } = formConfig;
- 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 extractProfileErrors
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const extractProfileErrors = dataPayload => {
const metaDescriptions = dataPayload?.meta?.errors?.reduce(
(acc, error, index) =>
error?.description
? `${acc}${index > 0 ? ' | ' : ''}${error.description}`
- 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 TernaryRadios
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const TernaryRadios = ({
formError,
formResponses,
formValue,
h1,
- 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 PaymentHistoryTable
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const PaymentHistoryTable = ({ currentDebt }) => {
const getFirstPaymentDateFromCurrentDebt = debt => {
const firstPaymentDate = last(debt.fiscalTransactionData)?.transactionDate;
if (firstPaymentDate === '') return 'N/A';
- 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 getDynamicContent
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const getDynamicContent = formResponses => {
// Final content to show on the results page
const dynamicContentMatchingAnswer = [];
// Get array of short names with responses in the store minus SERVICE_PERIOD and any question ending in '_A'
- 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 OverviewPage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const OverviewPage = () => {
const { debtLetters, mcp } = useSelector(
({ combinedPortal }) => combinedPortal,
);
const {
- 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 useServiceType
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function useServiceType() {
const dispatch = useDispatch();
const selector = useSelector(
state => state.drupalStaticData.vaHealthServicesData || [],
- 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 CustomEmailField
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function CustomEmailField(props) {
function handleChange(event) {
if (props?.showMebEnhancements08) {
if (props.email !== event) {
props.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 IntroductionLogin
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function IntroductionLogin({
isClaimantCallComplete,
isPersonalInfoFetchFailed,
isLoggedIn,
isLOA3,
- 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 Results
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const Results = ({ dependents, pastMode, results, router, year, zipCode }) => {
const APPLY_URL = '/health-care/apply-for-health-care-form-10-10ez/';
const currentYear = new Date().getFullYear();
useEffect(
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
export function uiSchema(
label = 'Address',
useStreet2 = true,
useStreet3 = false,
isRequired = null,
- 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 createMutationObserverCallback
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function createMutationObserverCallback() {
// Find native header, footer, etc based on page path
const DEPRECATED_SELECTOR_CONFIG = [
{
path: /.*/,
- 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 validateAddress
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const validateAddress = (formData, fullName) => async (
dispatch,
getState,
) => {
dispatch({ type: ADDRESS_VALIDATION_START });
- 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 VerificationReviewWrapper
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const VerificationReviewWrapper = ({
children,
dispatchUpdateToggleEnrollmentSuccess,
dispatchVerifyEnrollmentAction,
enrollmentVerifications,
- 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 App
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const App = ({
canApply,
certificateOfEligibility: { coe, generateAutoCoeStatus, profileIsUpdating },
getCoe,
getCoeMock,
- 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 libraryFilters
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function libraryFilters(el) {
// Grab our current page from the active pager button.
if (el.srcElement.classList.contains('pager-numbers')) {
activePage = parseInt(el.srcElement.text, 10);
sessionStorage.setItem('pageNum', parseInt(el.srcElement.text, 10));
- 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"