Showing 3,724 of 12,675 total issues
Function render
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { name } = form.data.application.claimant;
const submittedAt = moment(form.submission.submittedAt);
File form.js
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// this form does NOT use JSON schema for its data model
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import footerContent from 'platform/forms/components/FormFooter';
import manifest from '../manifest.json';
File LocationSearchForm.jsx
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable react/jsx-no-bind */
/* eslint-disable react/jsx-wrap-multilines */
/* eslint-disable react/prop-types */
import React, { useEffect, useState, createRef } from 'react';
Function UnderReview
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function UnderReview(response, name) {
return (
<>
<div>
<va-alert
Function createAppointments
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createAppointments = (
token = defaultUUID,
demographicsNeedsUpdate = false,
demographicsConfirmedAt = null,
nextOfKinNeedsUpdate = false,
Function StepComponent
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const StepComponent = props => {
const { step, clickHandler } = props;
const data = orientationSteps[step];
let content;
Function adaptPayload
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const adaptPayload = formData => {
const payload = {};
const {
fullName: { firstName: first, lastName: last },
date,
Function PathologyDetails
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PathologyDetails = props => {
const { record, fullState, runningUnitTest } = props;
const user = useSelector(state => state.user.profile);
const allowTxtDownloads = useSelector(
state =>
Function NonVaPrescription
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const NonVaPrescription = prescription => {
const content = () => {
const status = prescription?.dispStatus?.toString();
return (
<div className="medication-details-div vads-u-border-top--1px vads-u-border-color--gray-lighter vads-u-margin-top--3 medium-screen:vads-u-margin-top--4 vads-u-margin-bottom--3">
File ChangeOfAddressWrapper.jsx
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState, useEffect, useCallback } from 'react';
import PropTypes from 'prop-types';
import '../sass/change-of-address-wrapper.scss';
import { useDispatch, useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
Function ReviewPage
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReviewPage = props => {
const [privacyCheckbox, setPrivacyCheckbox] = useState(false);
const [submitted, setSubmitted] = useState(false);
const { chapterTitles, getChapterPagesFromChapterIndex } = setupPages();
Function BurialIntroduction
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function BurialIntroduction(props) {
return (
<>
<Page {...props}>
<div className="schemaform-intro">
Function render
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { submission, data } = this.props.form;
const { response } = submission;
const name = data.claimantFullName;
File IntroductionPage.jsx
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
Function prefillTransformer
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformer(pages, formData, metadata, state) {
const bankInformation = state.data?.bankInformation || {};
const claimant = state.data?.formData?.data?.attributes?.claimant || {};
const contactInfo = claimant?.contactInfo || {};
const stateUser = state.user;
Function HomeAcreageValueInput
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HomeAcreageValueInput = props => {
const {
goBack,
goForward,
onReviewPage = false,
File SearchBenefits.jsx
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState } from 'react';
import { useFeatureToggle } from 'platform/utilities/feature-toggles';
import EbenefitsLink from 'platform/site-wide/ebenefits/containers/EbenefitsLink';
import recordEvent from 'platform/monitoring/record-event';
import PropTypes from 'prop-types';
Function default
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(state = INITIAL_STATE, action) {
switch (action.type) {
case ADD_COMPARE_INSTITUTION:
if (state.selected.length < 3) {
return {
Function CopyAddressModal
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CopyAddressModal = props => {
const {
mailingAddress = null,
homeAddress,
transaction,
File constants.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import constants from 'vets-json-schema/dist/constants.json';
import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';
const { pciuStates: PCIU_STATES } = constants;