Showing 3,736 of 12,815 total issues
Function IdentityVerificationAlert
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IdentityVerificationAlert = () => {
const onVerify = () => recordEvent({ event: AUTH_EVENTS.VERIFY });
return (
<va-alert status="continue" data-testid="hca-identity-alert" uswds>
<h2 slot="headline">
Function data
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
data: (state = initialState, action) => {
switch (action.type) {
case FETCH_PERSONAL_INFORMATION:
return {
...state,
Function itemsList
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
items.map((item, index) => {
const itemIsSelected = !!get(
selectedPropName || this.defaultSelectedPropName,
item,
);
Function getPtsdClassification
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getPtsdClassification = (formData, formType) => {
const isCombat = _.get(
'view:selectablePtsdTypes.view:combatPtsdType',
formData,
false,
File DashboardCards.jsx
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
VaPagination,
VaSelect,
} from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/api';
Function DashboardUnreadMessages
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DashboardUnreadMessages = props => {
const { inbox } = props;
const { noAssociations, allTriageGroupsBlocked } = useSelector(
state => state.sm.recipients,
Function perTermSections
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const perTermSections = () => {
const { perTerm } = outputs;
const sections = Object.keys(perTerm).map(section => {
const {
File index.js
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
const all = {
id: '868a0f70-f920-4483-9be4-fa64f65d2e85',
meta: {
lastUpdated: '2023-07-21T12:22:25.721-04:00',
},
File ResponseInboxPageMock.jsx
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
VaAlert,
VaButton,
VaFileInputMultiple,
VaIcon,
Function waitForRenderThenFocus
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function waitForRenderThenFocus(
selector,
root = document,
timeInterval = defaultTime,
// added because we first need to wait for a component to be rendered, then we
- 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 ProfileInformationView
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ProfileInformationView = props => {
const { data, fieldName, title, id } = props;
const titleLower = title.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 componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
- 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 16 (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 ReviewPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ReviewPage = ({
dependentsInput,
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 getBoardExplanation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export const getBoardExplanation = formResponses => {
const reason = formResponses[SHORT_NAME_MAP.REASON];
const noPrevApp =
formResponses[SHORT_NAME_MAP.PREV_APPLICATION] === RESPONSES.NO;
const prevAppType = formResponses[SHORT_NAME_MAP.PREV_APPLICATION_TYPE];
- 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 componentDidUpdate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
- 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 prefillTransformerV2
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function prefillTransformerV2(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const contactInfo = claimant?.contactInfo || {};
const sponsors = state.data?.formData?.attributes?.sponsors;
- 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 useFormRouting
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const useFormRouting = (router = {}) => {
const selectForm = useMemo(makeSelectForm, []);
const { pages, data } = useSelector(selectForm);
const selectApp = useMemo(makeSelectApp, []);
- 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 IntroductionPage
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const IntroductionPage = props => {
const dispatch = useDispatch();
const { hasVaFileNumber, isLoading } = useSelector(
state => state?.vaFileNumber,
);
- 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 AdditionalInformation
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function AdditionalInformation({ title, id, formData }) {
return (
<>
<h2
id={id}
- 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"