Showing 4,231 of 14,884 total issues
File blueButton.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { formatDateLong } from '@department-of-veterans-affairs/platform-utilities/exports';
import { pharmacyPhoneNumber } from '@department-of-veterans-affairs/mhv/exports';
import { format, isAfter } from 'date-fns';
import { capitalize } from 'lodash';
import { Actions } from '../util/actionTypes';
Function content
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const content = () => {
if (accessAlert) {
return (
<AccessTroubleAlertBox
alertType={accessAlertTypes.HEALTH_CONDITIONS}
Function HealthConditions
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const HealthConditions = () => {
const ABOUT_THE_CODES_LABEL = 'About the codes in some condition names';
const dispatch = useDispatch();
const updatedRecordList = useSelector(
state => state.mr.conditions.updatedList,
Function AllergiesPrintOnly
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AllergiesPrintOnly = props => {
const { allergies } = props;
const content = () => {
return (
File RequestedAppointmentsPage.unit.spec.js
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { mockFetch } from '@department-of-veterans-affairs/platform-testing/helpers';
import { expect } from 'chai';
import MockDate from 'mockdate';
import moment from 'moment';
import React from 'react';
Function data
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
data: (state = initialState, action) => {
switch (action.type) {
case FETCH_POST_911_GI_BILL_ELIGIBILITY_SUCCESS:
return {
...state,
Function ApplicationSelector
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ApplicationSelector = () => {
const [searchTerm, setSearchTerm] = useState('');
// a stand-in for the actual process config for now
const processConfig = {
Function ReviewPage
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ReviewPage = props => {
const { location } = props;
const [privacyCheckbox, setPrivacyCheckbox] = useState(false);
const [submitted, setSubmitted] = useState(false);
Function createClaimsSuccess
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createClaimsSuccess = (updatedDaysAgo = 1, open = true) => {
const daysAgo = subDays(new Date(), updatedDaysAgo);
const formattedDaysAgo = format(daysAgo, 'yyyy-MM-dd');
return {
data: [
Function render
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { uiSchema, errorSchema, idSchema, schema, formContext } = this.props;
const { SchemaField } = this.props.registry.fields || {};
const properties = Object.keys(schema.properties);
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
- 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 setHiddenFields
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export function setHiddenFields(schema, uiSchema, formData, path = []) {
if (!uiSchema) {
return schema;
}
- 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 FileFieldCustom
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export function FileFieldCustom(props) {
const updateButton = (
// eslint-disable-next-line @department-of-veterans-affairs/prefer-button-component
<button type="submit" onClick={props.updatePage}>
Update page
- 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 ContactInfo
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const ContactInfo = ({
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 ContactInfo
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const ContactInfo = ({
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 Form526Entry
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export const Form526Entry = ({
children,
inProgressFormId,
isBDDForm,
location,
- 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 ReviewCardField
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const ReviewCardField = ({
uiSchema,
schema,
errorSchema,
idSchema,
- 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 PayrollDeductionInputList
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const PayrollDeductionInputList = props => {
const { goToPath, goBack, setFormData } = props;
const editIndex = getJobIndex();
- 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 Typeahead
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const Typeahead = ({ uiSchema, idSchema, formData, onChange, onBlur }) => {
const [input, setInput] = useState('');
const [suggestions, setSuggestions] = useState([]);
const getInput = useCallback(
- 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"