Showing 4,231 of 14,884 total issues
Function SearchQueryReducer
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SearchQueryReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case SEARCH_STARTED:
return {
...state,
Function WarningHeadline
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WarningHeadline = () => {
const { statusCode } = useSelector(selectEnrollmentStatus);
// Declare enrollment status content dictionary
const contentDictionary = [
Function submit
has 67 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;
const useVeteranAddress = currentAddress === 'permanentAddress';
Function InterstitialPage
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InterstitialPage = props => {
const { acknowledge, type } = props;
useEffect(() => {
focusElement(document.querySelector('h1'));
Function selectConfirmedAppointmentData
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function selectConfirmedAppointmentData(state, appointment) {
const isCommunityCare = appointment?.vaos?.isCommunityCare;
const appointmentTypePrefix = isCommunityCare ? 'cc' : 'va';
const isVideo = appointment?.vaos?.isVideo;
Function TypeOfVisitPage
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function TypeOfVisitPage() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const { schema, data, pageChangeInProgress } = useSelector(
state => getFormPageInfo(state, pageKey),
Function claimsV2Reducer
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function claimsV2Reducer(state = initialState, action) {
switch (action.type) {
case FETCH_CLAIMS_PENDING:
return set('claimsLoading', true, state);
case FETCH_CLAIMS_SUCCESS:
Function LabAndTestDetails
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LabAndTestDetails = () => {
const dispatch = useDispatch();
const labAndTestDetails = useSelector(
state => state.mr.labsAndTests.labsAndTestsDetails,
);
Function items
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.map((entry, i) => {
const { shape, color, backImprint, frontImprint } = entry;
const index = refillHistory.length - i - 1;
const phone =
entry.cmopDivisionPhone || entry.dialCmopDivisionPhone;
File personalInformationHelper.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import VaTextInputField from 'platform/forms-system/src/js/web-component-fields/VaTextInputField';
import {
dateOfBirthSchema,
dateOfBirthUI,
selectSchema,
File DownloadRecordType.jsx
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState, useMemo, useEffect, useRef } from 'react';
import { useHistory } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import {
VaCheckbox,
Consider simplifying this complex logical expression. Open
Open
if (isDataFetched) {
return {
labsAndTests:
labsAndTests && recordFilter?.includes('labTests')
? labsAndTests.filter(rec => filterByDate(rec.sortDate))
File index.js
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { apiRequest } from 'platform/utilities/api';
import environment from 'platform/utilities/environment';
import { toSnakeCase } from '../helpers';
File employersPages.js
has 277 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,
File SearchControls.jsx
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {
VaModal,
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { formConfig, buttonOnly, devOnly } = this.props;
const devOnlyForceShowFormControls =
environment.isLocalhost() &&
!window.Cypress &&
Function isValidForm
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function isValidForm(form, pageList, isTesting = false) {
const pageListMap = new Map();
pageList.forEach(page => pageListMap.set(page.pageKey, page));
const validPages = Object.keys(form.pages).filter(pageKey =>
isActivePage(find(pageList, { pageKey }), form.data),
Function ITFBanner
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ITFBanner = props => {
const [messageDismissed, setMessageDismissed] = useState(false);
const [reviewInitialFocus, setReviewInitialFocus] = useState(false);
const goHome = () => {
Function ITFBanner
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ITFBanner = props => {
const [messageDismissed, setMessageDismissed] = useState(false);
const [reviewInitialFocus, setReviewInitialFocus] = useState(false);
const goHome = () => {
Function createDirectDepositPage
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createDirectDepositPage() {
const bankAccountProperties = {
type: 'object',
properties: {
accountType: {