Showing 12,848 of 12,848 total issues
Function mapElement
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const mapElement = (visible = true) => {
const containerClassNames = classNames({
'vads-u-display--none': !visible,
});
const isMobileDevice = smallScreen || landscape;
Function ViewDependentsLists
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ViewDependentsLists(props) {
const onAwardSubhead = (
<>
The following dependents have been added to your VA benefits. Please let
us know if a dependent’s status has changed.
Function useDowntimeApproachingRenderMethod
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function useDowntimeApproachingRenderMethod() {
const [modalDismissed, setModalDismissed] = useState(false);
return (downtime, children) => {
if (downtime.status === externalServiceStatus.downtimeApproaching) {
Function DisabilityRating
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DisabilityRating = () => {
const hasError = useSelector(totalDisabilityError);
const rating = useSelector(state => state.totalRating?.totalDisabilityRating);
const canAccessRatingInfo = useSelector(canAccess)?.[API_NAMES.RATING_INFO];
Function NoServiceHistoryAlert
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const NoServiceHistoryAlert = () => {
return (
<>
<va-alert status="warning" uswds class="vads-u-margin-bottom--4">
<h2 slot="headline">
Function sections
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
.map(listItem => {
const object = { header: '', headerSize: 'H2', items: [] };
object.header = listItem.text;
const index = list.indexOf(listItem);
const nextHeader = list
Function generateResultItemContent
has a Cognitive Complexity of 12 (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 MenuItemLevel1
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const MenuItemLevel1 = ({
expandedMenuID,
item,
updateExpandedMenuID,
}) => {
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { idSchema, formContext, formData, uiSchema, schema } = this.props;
const id = idSchema.$id;
// wrap matching text in a <span> element
- 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 checkTypeAndExtensionMatches
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function checkTypeAndExtensionMatches({ file, result }) {
// file.name and file.type may be undefined in some browsers, see
// https://developer.mozilla.org/en-US/docs/Web/API/File#browser_compatibility
const extension = (file.name || '')
.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 determineResultsPage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const determineResultsPage = (formResponses, router) => {
const responseToServicePeriod = getServicePeriodResponse(formResponses);
const { RESULTS_4 } = SHORT_NAME_MAP;
const resultsPages = DISPLAY_CONDITIONS?.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 sessionTypeUrl
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function sessionTypeUrl({
type = '',
queryParams = {},
version = API_VERSION,
allowVerification = 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 getLatestDebt
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const getLatestDebt = debts => {
return debts
? debts.reduce((acc, curr) => {
const mostRecentHistory = head(curr.debtHistory);
if (mostRecentHistory) {
- 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 getLatestBill
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const getLatestBill = bills => {
return bills
? bills.reduce((acc, currBill) => {
if (currBill.pSStatementDateOutput) {
if (!acc) {
- 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 AreaOfDisagreement
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const AreaOfDisagreement = ({
data = {},
pagePerItemIndex,
goBack,
goForward,
- 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 answerReview
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const answerReview = (key, formValues) => {
const ans = formValues[key];
const dischargeYearLabel = prevApplicationYearCutoff[formValues['4_reason']];
const monthObj = options.months.find(
m => String(m.value) === formValues['3_dischargeMonth'],
- 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 InboxPage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const InboxPage = ({
claimStatus,
getClaimStatus,
user,
MEBClaimStatusFetchInProgress,
- 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 DependentSummary
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const DependentSummary = props => {
const {
data,
goBack,
goForward,
- 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 PreSubmitNotice
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function PreSubmitNotice({
formData,
showError,
onSectionComplete,
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 DownloadHandler
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const DownloadHandler = ({
clickedId,
downloadUrl,
form,
formNumber,
- 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"