Showing 4,231 of 14,884 total issues
Function ContactInfoPage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function ContactInfoPage() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const history = useHistory();
const dispatch = useDispatch();
- 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 BackLink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function BackLink({ appointment }) {
const {
isPastAppointment,
isPendingAppointment,
isUpcomingAppointment,
- 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 VAFacilityLocation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function VAFacilityLocation({
clinicName,
facility,
facilityName,
facilityId,
- 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 recordChangedEvents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function recordChangedEvents(email, phone, data) {
if (email) {
recordEvent({
event: `${GA_PREFIX}-contact-info-email-${
email !== data.email ? 'changed' : 'not-changed'
- 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 routeToPageInFlow
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function routeToPageInFlow(history, current, action, referralId) {
const pageFlow = getPageFlow(referralId);
// if there is no current page meaning there was an error fetching referral data
// then we are on an error state in the form and back should go back to appointments.
const nextPageString = current
- 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 FilesNeeded
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function FilesNeeded({ item, previousPage = null }) {
const { TOGGLE_NAMES, useToggleValue } = useFeatureToggle();
const cst5103UpdateEnabled = useToggleValue(
TOGGLE_NAMES.cst5103UpdateEnabled,
);
- 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 fetchPatientEligibility
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export async function fetchPatientEligibility({
typeOfCare,
location,
type = 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 logEligibilityExplanation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function logEligibilityExplanation(
location,
typeOfCare,
{ request, direct, directReasons, requestReasons },
) {
- 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 generateDocsFiled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const generateDocsFiled = docsFiled => {
return docsFiled.map(document => {
if (document.id && document.status) {
return {
requestTypeText: `Request type: ${document.displayName}`,
- 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 MobileFilterControls
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function MobileFilterControls({ className }) {
const [filtersOpen, setFiltersOpen] = useState(false);
const [tuitionAndHousingOpen, setTuitionAndHousingOpen] = useState(false);
const filterClick = () => {
- 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 GiBillBreadcrumbs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const GiBillBreadcrumbs = () => {
const ProgramsTypeMatch = useRouteMatch(
'/institution/:facilityCode/:programType',
);
const profileMatch = useRouteMatch('/institution/:facilityCode');
- 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 SearchAccordion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function SearchAccordion({
expanded,
children,
buttonLabel,
button,
- 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 JumpLink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function JumpLink({
label,
jumpToId,
iconToggle = true,
onClick,
- 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 Expander
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const Expander = ({ expanded, dateRange, onToggle, missingEvents }) => {
const title = expanded ? 'Hide past events' : 'Reveal past events';
const cssClass = expanded ? 'section-expanded' : 'section-unexpanded';
const separator =
expanded && !missingEvents ? <div className="separator" /> : 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 SchoolClosingHeading
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SchoolClosingHeading = ({ schoolClosing, schoolClosingOn }) => {
if (schoolClosing) {
const isFutureClosing =
schoolClosingOn && moment(schoolClosingOn) > moment();
const content = isFutureClosing
- 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 fetchResultsThunk
has a Cognitive Complexity of 6 (exceeds 5 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;
- 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 Checkbox
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const Checkbox = ({
checked,
className,
errorMessage,
id,
- 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 SchoolAndEmployers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const SchoolAndEmployers = () => {
const [currentTab, setCurrentTab] = useState(0);
const tabPanelClassList =
'vads-u-border-bottom--1px vads-u-border-left--1px vads-u-border-right--1px vads-u-border-color--primary medium-screen:vads-u-padding--4 mobile:vads-u-padding--2';
const baseTabClassList =
- 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 ChangeOfDirectDepositWrapper
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ChangeOfDirectDepositWrapper = ({ applicantName }) => {
const prefix = 'GI-Bill-Chapters-';
const [toggleDirectDepositForm, setToggleDirectDepositForm] = useState(false);
const [screenWidth, setScreenWidth] = useState(window.innerWidth);
const [formData, setFormData] = useState();
- 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 updateUrlParams
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const updateUrlParams = (
history,
tab,
searchQuery,
filters,
- 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"