Showing 4,177 of 14,709 total issues
Function Landing
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Landing = props => {
const { location, router } = props;
const { jumpToPage } = useFormRouting(router);
const { t } = useTranslation();
Function TravelClaimDetails
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function TravelClaimDetails() {
const { id } = useParams();
const location = useLocation();
const { claimDetailsProps = null } = location.state ?? {};
const [claimDetails, setClaimDetails] = useState(claimDetailsProps);
Function render
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
loadingDecisionRequest,
decisionRequestError,
params,
Function buildPrescriptionsPDFList
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildPrescriptionsPDFList = prescriptions => {
return prescriptions?.map(rx => {
if (rx?.prescriptionSource === 'NV') {
return {
...buildNonVAPrescriptionPDFList(rx)[0],
Consider simplifying this complex logical expression. Open
Open
if (prescription) {
const dispStatus = 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 claimInformation.js
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import {
titleUI,
titleSchema,
radioUI,
File index.js
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import manifest from '../manifest.json';
import Alert from '../components/Alert';
File event-generator.js
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment-timezone';
import { fleshOutRecurringEvents, removeDuplicateEvents } from '.';
moment.tz.setDefault('America/New_York');
const now = moment().clone();
File BenefitsForm.jsx
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import EbenefitsLink from 'platform/site-wide/ebenefits/containers/EbenefitsLink';
import {
ariaLabels,
Function createLocationEvents
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createLocationEvents = () => {
const facilityEventData = {
fieldEventCost: 'Free',
fieldFacilityLocation: {
entity: {
Function YourVAHealthFacilityPage
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const YourVAHealthFacilityPage = props => {
const { data, setFormData, goBack, goForward, searchQuery } = props;
const [apiData, setApiData] = useState(facilities);
const [isSearching, setIsSearching] = useState(false);
const [pageURL, setPageURL] = useState('');
Function editEmailAddressSuccess
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const editEmailAddressSuccess = () => {
// store the email address that's passed in via the POST or PUT call so we can
// return it with the GET user/ response
let newEmailAddress;
return [
Function render
has 91 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 index.unit.spec.js
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { expect } from 'chai';
import moment from 'moment-timezone';
import MockDate from 'mockdate';
import { mockFetch } from '@department-of-veterans-affairs/platform-testing/helpers';
File actions.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as Sentry from '@sentry/browser';
import recordEvent from 'platform/monitoring/record-event';
import localStorage from 'platform/utilities/storage/localStorage';
import { displayFileSize } from 'platform/utilities/ui/index';
import { FILE_UPLOAD_NETWORK_ERROR_MESSAGE } from 'platform/forms-system/src/js/constants';
Function FormApp
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FormApp = props => {
const { currentLocation, formConfig, children, formData } = props;
const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
const lastPathComponent = currentLocation.pathname.split('/').pop();
const { additionalRoutes, CustomTopContent } = formConfig;
Function getProfileInfoFieldAttributes
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getProfileInfoFieldAttributes = fieldName => {
let apiRoute;
let convertCleanDataToPayload;
let title;
let uiSchema;
Function getProfileInfoFieldAttributes
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getProfileInfoFieldAttributes = fieldName => {
let apiRoute;
let convertCleanDataToPayload;
let title;
let uiSchema;
Function IntroductionPage
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const IntroductionPage = props => {
const { ombInfo, route } = props;
const { formConfig, pageList } = route;
useEffect(() => {
Function render
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { disabilities } = this.state;
const { calculatedRating } = this.state;
const ratings = getRatings(disabilities);