Showing 3,736 of 12,814 total issues
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 calculateIncome
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const calculateIncome = (
enhancedFSRActive,
employmentRecords = [],
currEmployment = [],
addlIncRecords = [],
Function getMonthlyIncome
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getMonthlyIncome = formData => {
const {
additionalIncome: {
addlIncRecords = [],
spouse: { spAddlIncome = [] } = {},
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 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 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 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 CareSummariesDetails
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CareSummariesDetails = () => {
const dispatch = useDispatch();
const careSummary = useSelector(
state => state.mr.careSummariesAndNotes.careSummariesAndNotesDetails,
);
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 SpouseEmploymentWorkDates.jsx
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState } from 'react';
import { connect } from 'react-redux';
import { setData } from 'platform/forms-system/src/js/actions';
import { VaDate } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import { parseISODate } from 'platform/forms-system/src/js/helpers';
File constants.js
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const recordType = {
ALLERGIES: 'allergies',
VACCINES: 'vaccines',
CARE_SUMMARIES_AND_NOTES: 'care summaries and notes',
LABS_AND_TESTS: 'lab and test results',
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 = () => (
Function VaFileInputField
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const VaFileInputField = props => {
const mappedProps = vaFileInputFieldMapping(props);
const dispatch = useDispatch();
const [file, setFile] = useState(null);
const formData = useSelector(state => state.form.data);
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 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 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: '' };
Function renderContent
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderContent = () => {
if (debtError) {
return renderAlert(
mcpError ? ALERT_TYPES.ALL_ERROR : ALERT_TYPES.ERROR,
mcpStatements?.length,
Function genSearchAreaFromCenter
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const genSearchAreaFromCenter = query => {
const { lat, lng, currentMapBoundsDistance, currentBounds } = query;
return dispatch => {
if (currentMapBoundsDistance > 500) {
dispatch({ type: GEOCODE_FAILED });
Function OperationStatus
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function OperationStatus(props) {
const { operatingStatus, website, facilityType } = props;
const visitText = useMemo(
() => {
if (facilityType === FacilityType.VA_CEMETERY) {