Showing 4,231 of 14,884 total issues
Consider simplifying this complex logical expression. Open
Open
if (keys.address && requiredKeys.includes(keys.address)) {
const addressObject = data[keys.address] || {};
const isUS = addressObject.addressType !== ADDRESS_TYPES.international;
const hasRequiredAddressFields =
Consider simplifying this complex logical expression. Open
Open
if (type === 'manual') {
setSavedDraft(true);
if (validSignatureNotRequired) {
setNavigationError(null);
Consider simplifying this complex logical expression. Open
Open
if (
errorCodes.some(
code =>
code === 10000 ||
code === 10005 ||
Consider simplifying this complex logical expression. Open
Open
if (radiologyDetails.studyId) {
if (processingRequest) {
return (
<va-loading-indicator
message="Loading..."
Consider simplifying this complex logical expression. Open
Open
if (prescription || prescriptionsApiError) {
return (
// TODO: clean after grouping flag is gone
<div
className={`${showGroupingContent ? 'vads-u-margin-bottom--4' : ''}`}
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const buttonClasses = classNames(
this.props.cssClass,
{ 'va-btn-withicon': this.props.icon },
'va-dropdown-trigger',
Function generateResultItemContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateResultItemContent = async (
item,
doc,
results,
hasHorizontalRule,
Function generateFooterContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateFooterContent = async (
doc,
parent,
data,
config,
Function generateResultItemContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateResultItemContent = async (
item,
doc,
results,
hasHorizontalRule,
Function checkAutoSession
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function checkAutoSession(
loggedIn,
ssoeTransactionId,
profile = {},
) {
Function VaRadioField
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function VaRadioField(props) {
const mappedProps = vaRadioFieldMapping(props);
const enumOptions =
Array.isArray(props.childrenProps.schema.enum) &&
optionsList(props.childrenProps.schema);
Function vaRadioFieldMapping
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function vaRadioFieldMapping(props) {
const {
description,
textDescription,
DescriptionField,
Function SsnField
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function SsnField(fieldProps) {
const props = vaTextInputFieldMapping(fieldProps);
const [val, setVal] = useState(props.value);
const [displayVal, setDisplayVal] = useState(props.value);
Function fileUiSchema
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function fileUiSchema(label, userOptions = {}) {
return {
'ui:title': label,
'ui:field': FileField,
'ui:options': {
Function recalculateSchemaAndData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function recalculateSchemaAndData(initialState) {
return Object.keys(initialState.pages).reduce((state, pageKey) => {
// on each data change, we need to do the following steps
// Recalculate any required fields, based on the new data
const page = state.pages[pageKey];
Function TextNotificationsDisclaimer
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function TextNotificationsDisclaimer() {
return (
<>
<h4>What to know about text notifications</h4>
<ul>
Function CustomEmailField
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CustomEmailField(props) {
function handleChange(event) {
if (props?.showMebEnhancements08) {
if (props.email !== event) {
props.setFormData({
Function onContinueClick
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onContinueClick = async () => {
const year = yearInput || new Date().getFullYear();
if (dependentsInput && year && zipCodeInput) {
setSubmitting(true);
Function strongCaseTips
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const strongCaseTips = () => {
if (specialReason) {
const { name, type } = reasonsObj[reason];
return (
<>
Function enrollmentStatus
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function enrollmentStatus(state = ENROLLMENT_STATUS_INIT_STATE, action) {
const { response = {}, type } = action;
const {
FETCH_ENROLLMENT_STATUS_STARTED,
FETCH_ENROLLMENT_STATUS_SUCCEEDED,