Showing 3,724 of 12,675 total issues
File ContactInfo.jsx
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect, useState, useRef } from 'react';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { Link } from 'react-router';
import { Element } from 'react-scroll';
Function prefillTransformerV3
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformerV3(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const exclusionPeriods = Array.isArray(state.data?.exclusionPeriods)
? state.data?.exclusionPeriods
Function render
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Apply for pre-need eligibility determination" />
<p>
Function TravelQuestion
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelQuestion = props => {
const { router } = props;
const { t } = useTranslation();
const { jumpToPage, goToNextPage } = useFormRouting(router);
const selectVeteranData = useMemo(makeSelectVeteranData, []);
Function Edit
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Edit = () => {
const dispatch = useDispatch();
const history = useHistory();
const query = useQuery();
Function AdmissionAndDischargeDetails
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AdmissionAndDischargeDetails = props => {
const { record, runningUnitTest } = props;
const user = useSelector(state => state.user.profile);
const allowTxtDownloads = useSelector(
state =>
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
route,
params,
form,
File arrayBuilder.jsx
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-unused-vars */
import { getNextPagePath } from 'platform/forms-system/src/js/routing';
import {
createArrayBuilderItemAddPath,
onNavForwardKeepUrlParams,
Function data
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: (state = initialState, action) => {
switch (action.type) {
case FETCH_PERSONAL_INFORMATION:
return {
...state,
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { route, userIdVerified, userLoggedIn } = this.props;
const { formConfig, pageList } = route;
return (
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Apply for pre-need eligibility determination" />
<p>
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { apps, loading, errors } = this.props;
const deletedApps = apps ? apps.filter(app => app.deleted) : [];
const activeApps = apps ? apps.filter(app => !app.deleted) : [];
Function IntroductionPage
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const IntroductionPage = props => {
const { route, loggedIn } = props;
const { formConfig, pageList } = route;
const store = useStore();
Function renderView
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderView = () => {
// This block renders the desktop and mobile view. It ensures that the desktop map
// gets re-loaded when resizing from mobile to desktop.
const {
currentQuery,
Function TravelMileage
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelMileage = props => {
const { router } = props;
const { t } = useTranslation();
const dispatch = useDispatch();
Function Vaccines
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Vaccines = props => {
const { runningUnitTest } = props;
const dispatch = useDispatch();
const updatedRecordList = useSelector(state => state.mr.vaccines.updatedList);
const listState = useSelector(state => state.mr.vaccines.listState);
File topic.js
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { flatten, orderBy } from 'lodash';
import clone from 'platform/utilities/data/clone';
import get from 'platform/utilities/data/get';
import set from 'platform/utilities/data/set';
import { createSelector } from 'reselect';
Function SipsDevModal
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SipsDevModal = props => {
const { pageList, form, locationPathname } = props || {};
const { formId, version, data, submission } = form || {};
const [isModalVisible, toggleModal] = useState(false);
Function Description
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Description(props) {
const isClaimingBurialAllowance =
props.formData['view:claimedBenefits'].burialAllowance;
const serviceRequested =
props.formData?.burialAllowanceRequested?.service === true;
File helpers.js
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment-timezone';
import cheerio from 'cheerio';
import { generatePdf } from '@department-of-veterans-affairs/platform-pdf/exports';
import * as Sentry from '@sentry/browser';
import {