Showing 4,177 of 14,709 total issues
Function CrisisPanel
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CrisisPanel() {
return (
<div
id="modal-crisisline"
className="va-overlay va-modal va-modal-large"
Function prefillTransformerV3
has 136 lines of code (exceeds 25 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
Function CancelPageLayout
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CancelPageLayout() {
const { id } = useParams();
const {
appointment,
clinicName,
Function default
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(state = INITIAL_STATE, action) {
const newState = {
...state,
loadFromUrl: false, // set this to false anytime a user action happens
};
Function ResultsList
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
export const ResultsList = ({
facilityTypeName,
inProgress,
isMobile,
searchString,
- 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 ZipCodePage
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
const ZipCodePage = ({
editMode,
pastMode,
router,
toggleEditMode,
- 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 SearchPage
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
const SearchPage = props => {
const searchResultTitleRef = useRef(null);
const previousLocationInputString = useRef(
props.currentQuery.locationInputString,
);
- 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 EmploymentRecord
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
const EmploymentRecord = props => {
const { data, goToPath, 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 EmploymentRecord
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
const EmploymentRecord = props => {
const { data, goToPath, 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
File ContactInfo.jsx
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState, useRef } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
Function render
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Apply for pre-need eligibility determination" />
<p>
Function TravelQuestion
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TravelQuestion = props => {
const { router } = props;
const { t } = useTranslation();
const { jumpToPage, goToNextPage } = useFormRouting(router);
const selectVeteranData = useMemo(makeSelectVeteranData, []);
Function CancelPageLayoutRequest
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CancelPageLayoutRequest() {
const { id } = useParams();
const {
appointment,
email,
Function Edit
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Edit = () => {
const dispatch = useDispatch();
const history = useHistory();
const query = useQuery();
File ContactInfo.jsx
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState, useRef } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
File exportsFile.js
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
export {
selectUser,
isLoggedIn,
selectProfile,
isVAPatient,
Function data
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
data: (state = initialState, action) => {
switch (action.type) {
case FETCH_PERSONAL_INFORMATION:
return {
...state,
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Apply for pre-need eligibility determination" />
<p>
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { apps, loading, errors } = this.props;
const deletedApps = apps ? apps.filter(app => app.deleted) : [];
const activeApps = apps ? apps.filter(app => !app.deleted) : [];
Function IntroductionPage
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IntroductionPage = props => {
const { route, loggedIn } = props;
const { formConfig, pageList } = route;
const store = useStore();