Showing 4,231 of 14,884 total issues
Function OtherAssetsInputList
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
const OtherAssetsInputList = props => {
const { errorSchema, formContext } = props;
const errorList = errorSchema?.otherAssets?.__errors;
const { submitted } = formContext;
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let buttonText;
let buttonDisabled; // false causes MS Voice Access to ignore buttons
let message;
switch (this.props.downloadStatus) {
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
appeal,
fullName,
appealsLoading,
Function toggleSMSNotificationsSuccess
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const toggleSMSNotificationsSuccess = (enrolled = true) => {
return [
rest.put(`${prefix}/v0/profile/telephones`, (req, res, ctx) => {
return res(
ctx.json({
Function generateAllergyItem
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generateAllergyItem = record => {
if (record.isOracleHealthData) {
return {
items: [
{
Function generateMicrobioContent
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generateMicrobioContent = record => {
const content = {
details: {
header: 'Details about this test',
sectionSeparators: false,
Function folders
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function folders(state = initialState, action) {
switch (action.type) {
case FETCH_FOLDER_SUCCESS: {
const { attributes } = action.folder.data;
const messages = action.messages.data.map(message => message.attributes);
Function generateResultItemContent
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const generateResultItemContent = async (
item,
doc,
results,
hasHorizontalRule,
- 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 buildAddressArray
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export const buildAddressArray = (location, titleCaseText = false) => {
if (location && location.type === 'provider') {
const { address } = location.attributes;
if (!isEmpty(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 UNSAFE_componentWillReceiveProps
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
UNSAFE_componentWillReceiveProps(newProps) {
// When a user is logged in, the profile finishes loading after the component
// has mounted, so we check here.
// If we're done loading the profile, check to see if we should load or redirect
if (
- 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 PreSubmitSection
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export function PreSubmitSection(props) {
const {
form,
preSubmit = {},
setPreSubmit,
- 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 19 (exceeds 5 allowed). Consider refactoring. Open
export function createStringifyFormReplacer(options) {
/**
* Replaces values based on a set of rules.
*
* @param {*} key
- 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 prefillTransformerV3
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export function prefillTransformerV3(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const exclusionPeriods = Array.isArray(state.data?.exclusionPeriods)
? state.data?.exclusionPeriods
- 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 InformalConference
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export const InformalConference = ({
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 DependentsPage
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const DependentsPage = ({
dependents,
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 ConfirmationPageV2
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export const ConfirmationPageV2 = () => {
const form = useSelector(state => state.form || {});
const profile = useSelector(state => selectProfile(state));
// Fix this after Lighthouse sets up the download URL
- 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 ShowAlertOrSip
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const ShowAlertOrSip = ({ basename, sipOptions, bottom }) => {
const loggedIn = useSelector(isLoggedIn);
// Verified LOA3?
const isVerified = useSelector(
state => selectProfile(state)?.verified || 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 LevelThreeLinks
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const LevelThreeLinks = ({
activeMenu,
menuSections,
setLevelTwoMenuOpen,
setLinkShouldFocus,
- 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 ShowAlertOrSip
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
const ShowAlertOrSip = ({ basename, sipOptions, bottom }) => {
const loggedIn = useSelector(isLoggedIn);
// Verified LOA3?
const isVerified = useSelector(
state => selectProfile(state)?.verified || 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 V1V3Page
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export default function V1V3Page() {
/** @param {import('react').FormEvent | import('@department-of-veterans-affairs/web-components/dist/types/components').VaSelectCustomEvent } evt */
function updateValue(evt) {
const { value, name } = /** @type {HTMLInputElement} */ (evt.target);
const display = document.getElementById(`${name}Value`);
- 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"