Showing 4,231 of 14,884 total issues
Function handleChange
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleChange = e => {
const multiples =
multipleOptions ?? showMultipleNames(filteredSuggestions, name);
let allowContinue = false;
Function fetchMilitaryInformation
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchMilitaryInformation(recordAnalyticsEvent = recordEvent) {
return async dispatch => {
dispatch({ type: FETCH_MILITARY_INFORMATION });
const baseUrl = '/profile/service_history';
Function careSummariesAndNotesReducer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const careSummariesAndNotesReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.CareSummariesAndNotes.GET: {
return {
...state,
Function pdfData
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
allergiesPdfList => {
return {
subject: `Single Medication Record - ${prescription?.prescriptionName}`,
headerBanner: [
{
File veteranMarriageHistoryArrayPages.js
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { format, parseISO } from 'date-fns';
import { capitalize } from 'lodash';
import {
textUI,
textSchema,
File IntroductionPage.jsx
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
import { setData } from '~/platform/forms-system/src/js/actions';
File spouseMarriageHistoryArrayPages.js
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { format, parseISO } from 'date-fns';
import { capitalize } from 'lodash';
import {
textUI,
textSchema,
File index.js
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const { cloneDeep, set } = require('lodash');
const { USER } = require('../../constants/user');
const loa3User = {
data: {
Function setupJSDom
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupJSDom() {
// Prevent warnings from displaying
/* eslint-disable no-console */
if (process.env.LOG_LEVEL === 'debug') {
console.error = (error, reactError) => {
Function render
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
Function setHiddenFields
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function setHiddenFields(schema, uiSchema, formData, path = []) {
if (!uiSchema) {
return schema;
}
Function formatOperatingHours
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatOperatingHours = operatingHours => {
if (!operatingHours) return operatingHours;
// Remove all whitespace and sanitize dashes.
const sanitizedOperatingHours = operatingHours
.replace(/ /g, '')
Function BuildPage
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const BuildPage = props => {
const { title, field, id, goToPath, subTitle } = props;
const headerRef = useRef(null);
Function RegisterFailed
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RegisterFailed = () => {
const content = {
heading: 'We couldn’t create a MyHealtheVet account for you',
alertText: (
<>
Function getTravelMessage
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getTravelMessage = () => {
if (
form.data['travel-question'] === 'no' ||
!isTravelReimbursementEnabled
) {
Function DraftSavedInfo
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DraftSavedInfo = props => {
const { messageId, drafts } = props;
const threadDetails = useSelector(state => state.sm.threadDetails);
Function openFacilityPageV2
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function openFacilityPageV2(page, uiSchema, schema) {
return async (dispatch, getState) => {
try {
const initialState = getState();
const { newAppointment } = initialState;
Function BuildRoutes
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const BuildRoutes = () => {
const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
const toggleValue = useToggleValue(TOGGLE_NAMES.isUpdatedGi);
const lcToggleValue = useToggleValue(
TOGGLE_NAMES.giComparisonToolLceToggleFlag,
Function fetchResultsThunk
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchResultsThunk = (options = {}) => async dispatch => {
// Derive options properties.
const city = options?.city || null;
const contributionAmount = options?.contributionAmount || null;
const hideFetchingState = options?.hideFetchingState;
Function claimsReducer
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function claimsReducer(state = initialState, action) {
switch (action.type) {
case FETCH_CLAIMS_PENDING:
return set(state, true, 'claimsLoading');
case FETCH_CLAIMS_SUCCESS: