Showing 4,231 of 14,884 total issues
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
setReferredBenefit,
setWizardStatus,
expander,
Function createRoutesWithStore
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createRoutesWithStore = () => {
return (
<Switch>
{routes.map((route, i) => {
const options = { appName: APP_NAMES.PRE_CHECK_IN };
Function mapStateToProps
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = state => {
const { featureToggles } = state;
const selectedAddress = state.form?.data['view:currentAddress'];
const shippingAddress = state.form?.data[selectedAddress];
const { fullName, vetEmail, order, supplies } = state.form?.data;
Function createPageListByChapterAskVa
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createPageListByChapterAskVa(formConfig, pagesToMoveConfig) {
const pagesByChapter = {};
const modifiedFormConfig = {
chapters: {},
};
Function OrientationApp
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const OrientationApp = props => {
const [step, setStep] = useState(0);
const [isFirstRender, setIsFirstRender] = useState(true);
const { wizardStateHandler } = props;
Function InnerNavigation
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InnerNavigation = () => {
const location = useLocation();
const handleActiveLinksStyle = path => {
let isInnerActive = false;
Function saveDraftHandler
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async (type, e) => {
// Prevents 'auto' from running if isModalVisible is open
if (type === 'auto' && isModalVisible) {
return;
}
Function confirmAppointment
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function confirmAppointment(history) {
return async (dispatch, getState) => {
const featureBreadcrumbUrlUpdate = selectFeatureBreadcrumbUrlUpdate(
getState(),
);
Function default
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(state = INITIAL_STATE, action) {
switch (action.type) {
case AUTOCOMPLETE_STARTED:
return {
...state,
Function PrinciplesOfExcellenceModalContent
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function PrinciplesOfExcellenceModalContent() {
return (
<>
<h3>Principles of Excellence</h3>
<p>
Function VaccinesListItem
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const VaccinesListItem = props => {
const { record } = props;
return (
<va-card
Function refreshReducer
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const refreshReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Refresh.SET_INITIAL_FHIR_LOAD: {
return {
...state,
File MCPAlerts.jsx
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import recordEvent from 'platform/monitoring/record-event';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
import PropTypes from 'prop-types';
import { currency, calcDueDate, formatDate } from '../utils/helpers';
File ContestableIssues.jsx
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
File deceasedDependentArrayPages.js
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { format, parseISO } from 'date-fns';
import { capitalize } from 'lodash';
import {
titleUI,
arrayBuilderItemFirstPageTitleUI,
File debtSummaryCardContent.js
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import { endDate } from '../../utils/helpers';
const WarningIcon = () => (
File PrescriptionDetailsDocumentation.jsx
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useCallback, useEffect, useState, useRef } from 'react';
import { useParams } from 'react-router-dom';
import { useSelector, useDispatch } from 'react-redux';
import FEATURE_FLAG_NAMES from '@department-of-veterans-affairs/platform-utilities/featureFlagNames';
import PageNotFound from '@department-of-veterans-affairs/platform-site-wide/PageNotFound';
Function submitForm
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function submitForm(formConfig, form) {
const inProgressFormId = form.loadedData?.metadata?.inProgressFormId;
const captureError = (error, errorType) => {
Sentry.withScope(scope => {
scope.setFingerprint([formConfig.trackingPrefix]);
Function submitToUrl
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function submitToUrl(body, submitUrl, trackingPrefix, eventData) {
// This item should have been set in any previous API calls
const csrfTokenStored = localStorage.getItem('csrfToken');
return new Promise((resolve, reject) => {
const req = new XMLHttpRequest();
Function getInitialFormValues
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getInitialFormValues = options => {
const { fieldName, data, modalData } = options;
if (fieldName === FIELD_NAMES.EMAIL) {
return data ? { ...data } : { emailAddress: '' };