Showing 4,231 of 14,884 total issues
File ApplicationStatus.jsx
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import { fromUnixTime, isBefore } from 'date-fns';
import { format } from 'date-fns-tz';
import { connect } from 'react-redux';
File schemas.js
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { createSelector } from 'reselect';
import { merge, omit } from 'lodash';
import fullSchema from 'vets-json-schema/dist/21-526EZ-ALLCLAIMS-schema.json';
import _ from 'platform/utilities/data';
File validations.js
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import _ from 'platform/utilities/data';
import { isValidPhone, isValidEmail } from 'platform/forms/validations';
import {
MILITARY_CITY_CODES,
MILITARY_STATE_CODES,
File form.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import footerContent from 'platform/forms/components/FormFooter';
import { externalServices } from 'platform/monitoring/DowntimeNotification';
import getHelp from '../../shared/components/GetFormHelp';
Function generateResultsContent
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateResultsContent = async (doc, parent, data) => {
const results = doc.struct('Sect', {
title: 'Results',
});
parent.add(results);
Function getFormDOM
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getFormDOM(form) {
const formDOM = form?.container || findDOMNode(form);
if (!formDOM) {
throw new Error(
Function render
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { defaultSelectedItem } = this.state;
const { showError, currentQuery, handleServiceTypeChange } = this.props;
return (
<Downshift
Consider simplifying this complex logical expression. Open
Open
if (isDomesticAddress) {
address = {
country: 'United States',
street:
address1 &&
Function priorServiceStatement
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const priorServiceStatement = formValues => {
switch (formValues['12_priorService']) {
case '1':
return (
<AlertMessage
Function render
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const rowId = `disability-row-${this.props.indx + 1}`;
const containerClasses = classNames(
'vads-u-padding-x--4 vads-u-margin-y--1',
this.props.disability.errorMessage
Function render
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (
// Prevent RUM from running on local/CI environments.
environment.BASE_URL.indexOf('localhost') < 0 &&
// Prevent re-initializing the SDK.
Function updateSchema
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: (formData, formSchema) => {
const updatedCategoryTopicContactPreferences = getContactMethods(
formData.selectCategory,
formData.selectTopic,
);
Function getEditView
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getEditView = () => {
const { SchemaField } = registry.fields;
const newUISchema = omit(
['ui:field', 'ui:title', 'ui:description'],
uiSchema,
Function ReplyDrafts
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReplyDrafts = props => {
const {
cannotReply,
drafts,
isSaving,
Function TrashButton
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TrashButton = props => {
const { activeFolder, messageId, threadId, visible } = props;
const dispatch = useDispatch();
const history = useHistory();
const [isDeleteVisible, setIsDeleteVisible] = useState(false);
Function MessageActionButtons
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MessageActionButtons = props => {
const {
threadId,
hideReplyButton,
isCreateNewModalVisible,
Consider simplifying this complex logical expression. Open
Open
if (isEditing) {
return (
<div
key={index}
id={`${this.props.idSchema.$id}_${index}`}
Function Authentication
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Authentication() {
const profile = useSelector(selectProfile);
useEffect(
() => {
if (!profile?.loading) {
Function MhvSignIn
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function MhvSignIn() {
const [email, setEmail] = useState('');
const [isValidEmail, setIsValidEmail] = useState(false);
const isAllowedEmail = user => {
File ResultsList.jsx
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { toggleValues } from 'platform/site-wide/feature-toggles/selectors';