Showing 4,231 of 14,884 total issues
File ChangeOfAddressForm.jsx
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import ADDRESS_DATA from 'platform/forms/address/data';
import { validateAsciiCharacters } from 'platform/user/profile/vap-svc/util';
import SchemaForm from '@department-of-veterans-affairs/platform-forms-system/SchemaForm';
Function Search
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Search = () => {
const onInputSubmit = componentState => {
const inputValue = componentState?.inputValue;
const savedSuggestions = componentState?.savedSuggestions || [];
const suggestions = componentState?.suggestions || [];
Function onAddFile
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onAddFile = async (event, index = null, password) => {
if (event.target?.files?.length) {
const currentFile = event.target.files[0];
const allFiles = props.formData || [];
const addUiOptions = props.uiSchema['ui:options'];
Function VaCheckboxGroupField
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function VaCheckboxGroupField(props) {
const checkboxes = getCheckboxData(props.childrenProps);
const onGroupChange = event => {
const checkboxKey = event.target.dataset.key;
Function render
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { id, disabled, options = {} } = this.props;
const { month, day, year } = this.state.value;
let daysForSelectedMonth;
Function render
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Mock SIP Form" />
<p>Equal to VA Form XX-123 (Mock SIP Form).</p>
Function Footer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Footer = () => {
return (
<footer data-testid="arp-footer" className="footer arp-footer">
<div className="footer-inner">
<div className="usa-grid usa-grid-full footer-banner vads-u-padding-top--2">
Function PlotAllowance
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function PlotAllowance(props) {
const formikContext = useFormikContext();
return (
<div className="vads-u-margin-x--1p5">
Function sponsorInfo
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function sponsorInfo(schema) {
const { fields, required } = {
...defaults(),
};
const possibleProperties = {
Function getFormSchema
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getFormSchema = (formData = {}) => {
const defaultCountry =
countries.find(
country => country.countryCodeISO3 === formData?.countryCodeIso3,
)?.countryCodeISO3 || 'USA';
Function UpgradeFailed
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UpgradeFailed = () => {
const content = {
heading: 'We couldn’t upgrade your My HealtheVet account',
alertText: (
<>
Function Footer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Footer = () => {
return (
<footer data-testid="arp-footer" className="footer arp-footer">
<div className="footer-inner">
<div className="usa-grid usa-grid-full footer-banner vads-u-padding-top--2">
Function WhoIsYourQuestionAboutCustomPage
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WhoIsYourQuestionAboutCustomPage = props => {
const { onChange, loggedIn, goBack, formData, goForward } = props;
const [validationError, setValidationError] = useState(null);
const [showModal, setShowModal] = useState(false);
Function getLetterPdf
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getLetterPdf(letterType, letterName, letterOptions, LH_MIGRATION__options) {
let settings;
if (letterType === LETTER_TYPES.benefitSummary) {
settings = {
// eslint-disable-next-line -- LH_MIGRATION
Function EmergencyNote
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EmergencyNote = props => {
const { dropDownFlag } = props;
const content = () => (
<>
Function CantFindYourTeam
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CantFindYourTeam = () => {
const ssoe = useSelector(isAuthenticatedWithSSOe);
const mhvSecureMessagingEditContactList = useSelector(
state =>
Function getAppointmentSlots
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAppointmentSlots(startDate, endDate, initialFetch = false) {
return async (dispatch, getState) => {
const state = getState();
const siteId = getSiteIdFromFacilityId(
selectCovid19VaccineFormData(state).vaFacility,
Function getAddressUISchema
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAddressUISchema(label = '') {
const fieldOrder = ['street', 'street2', 'city', 'state', 'postalCode'];
const addressChangeSelector = createSelector(
({ formData, path }) => get(path.concat('city'), formData),
Function ccAppointmentReducer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ccAppointmentReducer(state = initialState, action) {
switch (action.type) {
case SET_FORM_CURRENT_PAGE:
return {
...state,
Function onAllComplete
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onAllComplete: () => {
if (canUseMocks()) {
dispatch({ type: DONE_UPLOADING });
dispatch(
setNotification({