Showing 4,177 of 14,709 total issues
File validations.js
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'platform/utilities/data';
import some from 'lodash/some';
import moment from 'moment';
import {
File index.js
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable camelcase */
const simpleUser = {
data: {
id: '',
type: 'users_scaffolds',
Function ExtraDetails
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ExtraDetails = rx => {
const { dispStatus, refillRemaining } = rx;
const pharmacyPhone = pharmacyPhoneNumber(rx);
let noRefillRemaining = false;
if (refillRemaining === 0 && dispStatus === 'Active') {
Function uiSchema
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function uiSchema(label = 'Address', useStreet3 = true) {
let fieldOrder = [
'street',
'unitNumber',
'street2',
File display-conditions.js
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { range } from 'lodash';
import { months } from 'platform/static-data/options-for-select';
import { RESPONSES } from './question-data-map';
const get15YearsPast = () => `${new Date().getFullYear() - 15}`;
Function FilterBox
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FilterBox = forwardRef((props, ref) => {
const {
category,
setCategory,
dateRange,
File DownloadFileType.jsx
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState, useCallback, useEffect, useMemo } from 'react';
import { Link, useHistory } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { formatDateLong } from '@department-of-veterans-affairs/platform-utilities/exports';
File RadiologyDetails.jsx
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
Function SearchControls
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
const SearchControls = props => {
const {
currentQuery,
onChange,
onSubmit,
- 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 ApplicantAddressCopyPage
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export function ApplicantAddressCopyPage({
contentBeforeButtons,
contentAfterButtons,
customAddressKey, // optional override of `applicantAddress` so we can target arbitrary addresses in the 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 addressUISchema
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export const addressUISchema = (
isMilitaryBaseAddress = false,
path,
callback,
) => {
- 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 getCalendarData
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export function getCalendarData({ appointment, facility }) {
let data = {};
const isAtlas = appointment?.videoData.isAtlas;
const isHome = isVideoHome(appointment);
const videoKind = appointment?.videoData.kind;
- 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 LocationSearchResults
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function LocationSearchResults({
search,
filters,
preview,
dispatchUpdateEligibilityAndFilters,
- 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 SchoolLocations
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export default function SchoolLocations({
calculator,
constants,
eligibility,
facilityMap,
- 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 form.js
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import get from '@department-of-veterans-affairs/platform-forms-system/get';
import fullSchemaBurials from 'vets-json-schema/dist/21P-530EZ-schema.json';
import { externalServices } from '@department-of-veterans-affairs/platform-monitoring/DowntimeNotification';
import FormFooter from '@department-of-veterans-affairs/platform-forms/FormFooter';
File VitalDetails.jsx
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState, useRef, useMemo } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
import { useParams } from 'react-router-dom';
import { chunk } from 'lodash';
File SearchApp.jsx
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useCallback, useEffect, useRef, useState } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router';
import { connect } from 'react-redux';
File demographics.js
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { NO_INFO_REPORTED, NONE_RECORDED } from '../constants';
export const generateDemographicsContent = record => {
const results = {
results: {
Function SpouseGrossMonthlyIncomeInput
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SpouseGrossMonthlyIncomeInput = props => {
const { goToPath, goBack, setFormData } = props;
const editIndex = getJobIndex();
Function VaccineDetails
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
const VaccineDetails = props => {
const { runningUnitTest } = props;
const record = useSelector(state => state.mr.vaccines.vaccineDetails);
const vaccines = useSelector(state => state.mr.vaccines.vaccinesList);
const user = useSelector(state => state.user.profile);