Showing 4,231 of 14,884 total issues
Function populateForm
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const populateForm = () => {
if (recipientExists(draft.recipientId)) {
setSelectedRecipientId(draft.recipientId);
} else {
const newRecipient = {
Function IdentityNotVerified
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const IdentityNotVerified = () => {
const content = (
<>
<p className="vads-u-font-size--base">
We need to make sure you’re you — and not someone pretending to be you —
Function getThreadList
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getThreadList = async params => {
const {
folderId = 0,
pageSize = 10,
pageNumber = 1,
Function selectAppointmentLocality
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function selectAppointmentLocality(
appointment,
isPendingAppointment = false,
) {
const practitioner = selectPractitionerName(appointment);
Function NoFilterMatchWarning
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const NoFilterMatchWarning = () => {
const warningRef = useRef();
useEffect(() => {
focusElement(warningRef.current);
});
Function NoRegistrationMessage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function NoRegistrationMessage() {
return (
<FullWidthLayout>
<InfoAlert
status="error"
Function filteredAppointments
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const filteredAppointments = appointments.filter(appointment => {
return req.query.statuses.some(status => {
if (appointment.attributes.status === status) {
// Automatically add appointments with these statuses to the collection
if (
Function LoadProvidersErrorAlert
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function LoadProvidersErrorAlert() {
const headline = `We can’t load provider information`;
return (
<div id="providerSelectionFailed">
<InfoAlert
Function generateClaimTitle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateClaimTitle = (claim, placement, tab) => {
// This will default to 'disability compensation'
const claimType = getClaimType(claim).toLowerCase();
const isRequestToAddOrRemoveDependent = addOrRemoveDependentClaimTypeCodes.includes(
claim?.attributes?.claimTypeCode,
Function getTab
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getTab = tabName => {
const activeTab = tabName === mobileTab;
const tabClasses = classNames(
{
'active-results-tab': activeTab,
Function eligibilityAndFilters
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const eligibilityAndFilters = cnt => {
const showTuitionAndFilters = cnt > 0 || usedFilters;
if (showTuitionAndFilters) {
return (
Function handleInputFocusWithPotentialOverLap
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const handleInputFocusWithPotentialOverLap = (
fieldId1,
fieldId2,
scrollableFieldId,
) => {
Function makeLoadedCards
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const makeLoadedCards = () => {
setLoadedCards(
loaded.map((facilityCode, index) => {
return (
<li
Function preEligibilityChange
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const preEligibilityChange = (e, name, number) => {
const field = e.target.name;
const { value } = e.target;
if (field === 'giBillChapter' && value === '33a') {
Function renderOptions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderOptions = () => {
const displayOptions = Array.isArray(options) ? options : [];
return displayOptions.map((option, index) => {
const { checked, optionLabel, name, learnMore, dataTestId } = option;
Function preEligibilityChange
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const preEligibilityChange = e => {
const { value } = e.target;
recordEvent({
event: 'gibct-form-change',
Function HomePage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HomePage = () => {
return (
<div className="vads-u-margin-bottom--8">
<h1 data-testid="comparison-tool-title">GI Bill® Comparison Tool</h1>
<p
Function addressLabel
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addressLabel = address => {
// Destructure address object for easier access
const {
addressLine1,
addressLine2,
Function transformServiceHistoryEntryIntoTableRow
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const transformServiceHistoryEntryIntoTableRow = entry => {
const formattedBeginDate = entry.beginDate
? moment(entry.beginDate).format('LL')
: '';
const formattedEndDate = entry.endDate
Function promises
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.map(([key, fetchFn]) => {
if (key === 'appointments') {
let fromDate;
let toDate;
if (dateFilter.option === 'any') {