Showing 4,231 of 14,884 total issues
Function updateFormData
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = () => {
const { from: startDate, to: endDate, isCurrent } = employmentRecord;
// If start date or end date is invalid, set errors and stop
if (
Function fetchPastAppointments
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchPastAppointments(startDate, endDate, selectedIndex) {
return async (dispatch, getState) => {
const featureVAOSServiceVAAppointments = selectFeatureVAOSServiceVAAppointments(
getState(),
);
Function validateMilitaryHistory
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const validateMilitaryHistory = (
errors,
serviceRecords,
useAllFormData,
) => {
Function RadioWidget
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function RadioWidget(props) {
const { options, formContext = {}, value, disabled, onChange, id } = props;
const { enumOptions, labels = {} } = options;
const onReviewPage = formContext?.onReviewPage || false;
Function GenderIdentityAdditionalInfo
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function GenderIdentityAdditionalInfo() {
return (
<>
<p className="vads-u-color--gray-medium vads-u-display--block vads-u-font-weight--normal vads-u-margin--0 vads-u-width--full">
You can change your selection at any time. If you decide you no longer
Function validateAddress
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const validateAddress = (formData, fullName) => async (
dispatch,
getState,
) => {
dispatch({ type: ADDRESS_VALIDATION_START });
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let message;
if (this.props.errors) {
message = this.renderErrors();
Function allergyReducer
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const allergyReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Allergies.GET: {
return {
...state,
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let view;
if (this.props.success) {
view = (
File day-of.reducers.unit.spec.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { expect } from 'chai';
import {
receivedDemographicsDataHandler,
receivedAppointmentDetailsHandler,
File helpers.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { parse, addDays, format, isAfter, isFuture, isValid } from 'date-fns';
import { toggleValues } from '~/platform/site-wide/feature-toggles/selectors';
import FEATURE_FLAG_NAMES from '~/platform/utilities/feature-toggles/featureFlagNames';
import { formatDateLong } from 'platform/utilities/date';
import { deductionCodes } from '../constants/deduction-codes';
File ContactFacilitiesPage.unit.spec.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { expect } from 'chai';
import { mockFetch } from '@department-of-veterans-affairs/platform-testing/helpers';
import ContactFacilitiesPage from './ContactFacilitiesPage';
File index.cc-request.unit.spec.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable camelcase */
import React from 'react';
import { expect } from 'chai';
import userEvent from '@testing-library/user-event';
Function applicantInformation
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function applicantInformation(schema, options) {
// Use the defaults as necessary, but override with the options given
const prefix = options && options.isVeteran ? 'veteran' : 'relative';
const mergedOptions = Object.assign({}, defaults(prefix), options);
const { fields, required, labels } = mergedOptions;
Function apiRequest
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function apiRequest(
resource,
optionalSettings,
success,
error,
Function getNonArraySchema
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getNonArraySchema(schema, uiSchema = {}) {
if (
schema.type === 'array' &&
!get('ui:options.keepInPageOnReview', uiSchema)
) {
Function ProfileInformationView
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ProfileInformationView = props => {
const { data, fieldName, title, id } = props;
const titleLower = title.toLowerCase();
Function submitRepresentativeReport
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const submitRepresentativeReport = newReport => {
return async dispatch => {
dispatch({
type: REPORT_SUBMITTED,
payload: {
Function AuthBenefitsPackagePage
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AuthBenefitsPackagePage = props => {
const { location, route, router } = props;
const { pathname } = location;
const { pageList } = route;
const { schema } = definition;
Function CopyResultsModal
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CopyResultsModal = () => {
const [isOpen, setIsOpen] = useState(false);
const [showAlert, setShowAlert] = useState(false);
const currentUrl = window.location.href;
const toggleModal = open => {