Showing 3,724 of 12,675 total issues
Function inquiriesGridView
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const inquiriesGridView = category => {
const filteredInquiries = filterAndSortInquiries(category);
const indexOfLastItem = currentPage * itemsPerPage;
const indexOfFirstItem = indexOfLastItem - itemsPerPage;
const currentInquiries = filteredInquiries.slice(
Function ReplyDrafts
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReplyDrafts = props => {
const {
cannotReply,
drafts,
isSaving,
Function getPageFlow
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function getPageFlow(state) {
const featureBreadcrumbUrlUpdate = selectFeatureBreadcrumbUrlUpdate(state);
return {
clinicChoice: {
Function BehalfOfSomeoneElseContent
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const BehalfOfSomeoneElseContent = () => {
return (
<>
<p>
You can upload a copy of their sponsor’s DD214 or other separation
Function content
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const content = () => {
return (
<>
{allergies?.length > 0 ? (
<>
Function pdfData
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(rxList, allergiesList) => {
return {
subject: 'Full Medications List',
headerBanner: [
{
File FolderThreadListView.jsx
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useCallback, useEffect, useMemo } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useLocation, useParams } from 'react-router-dom';
import PropTypes from 'prop-types';
import {
File helpers.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment-timezone';
import * as Sentry from '@sentry/browser';
import { snakeCase } from 'lodash';
import { generatePdf } from '@department-of-veterans-affairs/platform-pdf/exports';
import { formatDateLong } from '@department-of-veterans-affairs/platform-utilities/exports';
Function enterData
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function enterData(field) {
switch (field.type) {
// Select fields register as having type 'select-one'.
case 'select-one':
cy.wrap(field.element)
Function testForm
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const testForm = testConfig => {
const {
appName,
arrayPages = [],
dataPrefix,
Function makeMockApiRouter
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeMockApiRouter(opts) {
// mockResponses[token][verb][response]
const mockResponses = {};
const router = express.Router(); // eslint-disable-line new-cap
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { currentLocation, formConfig, children, formData } = this.props;
const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
const lastPathComponent = currentLocation.pathname.split('/').pop();
const isIntroductionPage = trimmedPathname.endsWith('introduction');
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
// loading state for terms content is handled by parent component
const { terms } = this.props;
if (!terms.termsContent) {
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
addressValidationType,
suggestedAddresses,
addressFromUser,
Function submit
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const submit = form => {
const currentAddress = form.data['view:currentAddress'];
const itemQuantities = form.data?.order?.length;
const { order, permanentAddress, temporaryAddress, vetEmail } = form.data;
for (const address of [permanentAddress, temporaryAddress]) {
Function createDirectDepositPage
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createDirectDepositPage(schema) {
const { bankAccountChangeUpdate, bankAccount } = schema.definitions;
return {
title: 'Direct deposit',
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Apply for a Specially Adapted Housing Grant or Special Home Adaptation Grant" />
<p>
Function activeDutyNote
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const activeDutyNote = () => {
if (
eighteenOrOver(formData.relativeDateOfBirth) &&
(!hasServed || (hasServed && allServicePeriodsHaveEndDate))
) {
Function facilityReducer
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function facilityReducer(state = initialState, action) {
switch (action.type) {
case FETCH_FACILITY_STARTED:
return { ...state, data: {}, loading: true, error: false };
case FETCH_FACILITY_SUCCESS:
Function WiderThanMobileOfficialGovtWebsite
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WiderThanMobileOfficialGovtWebsite = () => {
const [isExpanded, setIsExpanded] = useState(false);
const toggleExpansion = () => {
setIsExpanded(!isExpanded);