Showing 3,724 of 12,675 total issues
Function content
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const content = () => {
if (accessAlert) {
return (
<AccessTroubleAlertBox
alertType={accessAlertTypes.VITALS}
Function directDeposit
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function directDeposit(state = initialState, action) {
switch (action.type) {
case DIRECT_DEPOSIT_FETCH_SUCCEEDED:
case DIRECT_DEPOSIT_SAVE_SUCCEEDED: {
return {
Function mapStateToProps
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = state => {
const { isReady: hasLoadedScheduledDowntime } = state.scheduledDowntime;
const isLOA3 = isLOA3Selector(state);
const isLOA1 = isLOA1Selector(state);
const isVAPatient = isVAPatientSelector(state);
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const contentClasses = classNames(
'form-expanding-group-open',
'wizard-content',
{
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { enrollment, id } = this.props;
const amendments = enrollment.amendments || [];
const yellowRibbonStatus = enrollment.yellowRibbonAmount > 0 && (
<div className="yellow-ribbon-school">
File FacilitySearch.jsx
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import { useDispatch } from 'react-redux';
import { VaSearchInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import { setData } from 'platform/forms-system/src/js/actions';
Function FormSaveErrorMessage
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function FormSaveErrorMessage(props) {
const { route, formConfig, user, form, location, showLoginModal } = props;
const savedStatus = form?.savedStatus;
const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
Function SubmitButtons
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function SubmitButtons(props) {
const { onBack, onSubmit, submission, formConfig, formErrors = {} } = props;
const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
const buttonText =
File form.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { VA_FORM_IDS } from 'platform/forms/constants';
import preSubmitInfo from 'platform/forms/preSubmitInfo';
import FormFooter from 'platform/forms/components/FormFooter';
import { externalServices as services } from 'platform/monitoring/DowntimeNotification';
Function createContactInformationPage
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createContactInformationPage(
schema,
addressField = 'veteranAddress',
) {
const { homePhone, mobilePhone } = schema.properties;
Function sortTheResults
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const sortTheResults = (sortByPropertyName, indexA, indexB) => {
// -n (negative number) sorts indexA to the front of the array.
// n (positive number) sorts indexA to the back of the array.
// stayPut keeps both indexA and indexB right where they are.
const [
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.props.loading || !Object.keys(this.props.facility).length) {
return (
<va-loading-indicator
message={`Loading facility's ${
File employersPages.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { arrayBuilderPages } from '~/platform/forms-system/src/js/patterns/array-builder';
import {
addressSchema,
addressUI,
arrayBuilderItemFirstPageTitleUI,
Function Dependents
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Dependents = () => {
useEffect(() => {
recordEvent({
event: 'howToWizard-alert-displayed',
'reason-for-alert': 'request help with debt for spouses or dependents',
Function MonetaryInputList
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MonetaryInputList = props => {
const { errorSchema, formContext } = props;
const errorList = errorSchema?.monetaryAssets?.__errors;
const { submitted } = formContext;
Function OtherAssetsInputList
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const OtherAssetsInputList = props => {
const { errorSchema, formContext } = props;
const errorList = errorSchema?.otherAssets?.__errors;
const { submitted } = formContext;
Function updateFormData
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = () => {
if (
!isValidFromDate(employmentRecord.from) ||
(!isValidToDate(employmentRecord.from, employmentRecord.to) &&
!employmentRecord.isCurrent)
Function EmergencyNote
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EmergencyNote = props => {
const { dropDownFlag } = props;
const content = () => (
<>
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let buttonText;
let buttonDisabled;
let message;
switch (this.props.downloadStatus) {
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
appeal,
fullName,
appealsLoading,