Showing 3,724 of 12,675 total issues
Function NotificationChannel
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const NotificationChannel = props => {
const {
apiStatus,
channelId,
channelType,
Function hcaEnrollmentStatus
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
function hcaEnrollmentStatus(state = initialState, action) {
const { data = {}, response = {}, type } = action;
const {
FETCH_ENROLLMENT_STATUS_STARTED,
FETCH_ENROLLMENT_STATUS_SUCCEEDED,
Function content
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const content = () => {
if (accessAlert) {
return (
<AccessTroubleAlertBox
alertType={accessAlertTypes.HEALTH_CONDITIONS}
Function MedicationsList
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MedicationsList = props => {
const history = useHistory();
const {
rxList,
pagination,
Function AllergiesPrintOnly
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AllergiesPrintOnly = props => {
const { allergies } = props;
const content = () => {
return (
Function mapRawUserDataToState
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function mapRawUserDataToState(json) {
const {
data: {
attributes: {
account: { accountUuid } = {},
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 render
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { form } = this.props;
const { submission, data } = form;
const submitDate = new Date(submission?.timestamp);
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 prefillTransformer
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function prefillTransformer(pages, formData, metadata) {
const prefillPersonalInformation = data => {
const newData = _.omit(['personalInformation'], data);
const { personalInformation } = 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 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 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 AddIssue
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const AddIssue = ({
validations,
description,
data,
goToPath,
- 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 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 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"
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"