Showing 12,848 of 12,848 total issues
Function getAppeals
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getAppeals() {
const startTimestampMs = Date.now();
return dispatch => {
dispatch({ type: FETCH_APPEALS_PENDING });
Function getBlueButtonReportData
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getBlueButtonReportData = () => async dispatch => {
try {
const [
labs,
notes,
Function Alert
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Alert = props => {
const { isAlertVisible, paginatedPrescriptionsList } = props;
return (
<div className={`${isAlertVisible ? 'vads-u-margin-top--5' : ''}`}>
Function Search
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const Search = ({ searchDropdownComponentEnabled }) => {
const [term, setTerm] = useState('');
const onFormSubmit = event => {
event.preventDefault();
- 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 updateFormDataAddress
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const updateFormDataAddress = (
oldFormData,
formData,
path,
index = null, // this is included in the path, but added as
- 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 FormNav
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function FormNav(props) {
const {
formConfig = {},
currentPath,
formData,
- 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 updateFormDataAddress
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const updateFormDataAddress = (
oldFormData,
formData,
path,
index = null, // this is included in the path, but added as
- 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 getPropertyInfo
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const getPropertyInfo = (pageList = [], name, instance = '') => {
const findPageIndex = (
obj,
insideInstance = instance === '' || instance === name,
) => {
- 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 navigateBackward
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const navigateBackward = (SHORT_NAME, formResponses, router) => {
const roadmap = makeRoadmap(getServicePeriodResponse(formResponses));
if (roadmap?.length) {
const CURRENT_INDEX = roadmap?.indexOf(SHORT_NAME);
- 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 applyFocus
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const applyFocus = (parentId, headerHasFocused, setHeaderHasFocused) => {
if (!headerHasFocused) {
setTimeout(() => {
const header = document
.getElementById(parentId)
- 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 IntroductionLoginV2
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function IntroductionLoginV2({
isClaimantCallComplete,
isEligibilityCallComplete,
isPersonalInfoFetchFailed,
isLoggedIn,
- 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 BenefitRelinquishWidget
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const BenefitRelinquishWidget = ({ formData, setFormData }) => {
const { eligibility } = formData;
const [selected, setSelected] = useState('');
const chapter30 = eligibility?.includes('Chapter30');
- 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 prefillTransformerV4
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function prefillTransformerV4(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const serviceData = state.data?.formData?.data?.attributes?.serviceData || [];
const contactInfo = claimant?.contactInfo || {};
- 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 prefillTransformer
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export default function prefillTransformer(pages, formData, metadata) {
const newFormData = formData;
for (const addressType of ['permanentAddress', 'temporaryAddress']) {
if (newFormData[addressType]?.country) {
- 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 checkExtraConditions
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const checkExtraConditions = (benefit, formData) => {
let result = true;
if (benefit.extraConditions) {
if (benefit.extraConditions.oneIsNotBlank) {
- 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 prefillTransformerV1
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function prefillTransformerV1(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const serviceData = state.data?.formData?.data?.attributes?.serviceData || [];
const contactInfo = claimant?.contactInfo || {};
- 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 14 (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 serviceData = state.data?.formData?.data?.attributes?.serviceData || [];
const contactInfo = claimant?.contactInfo || {};
- 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 submitForm
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const submitForm = (form, formConfig, submissionId) => {
const formWithSubmissionId = {
...form,
data: {
...form.data,
- 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 applyFocus
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export const applyFocus = (parentId, headerHasFocused, setHeaderHasFocused) => {
if (!headerHasFocused) {
setTimeout(() => {
const header = document
.getElementById(parentId)
- 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 transform
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function transform(formConfig, form) {
const newSchoolTransform = formData => {
let clonedData = _.cloneDeep(formData);
delete clonedData.newSchoolName;
delete clonedData.newSchoolAddress;
- 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"