Showing 4,177 of 14,709 total issues
Function FileField
has 543 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FileField = props => {
const {
enableShortWorkflow,
errorSchema,
formContext,
File moment-tz.js
has 1071 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* istanbul ignore file */
//! moment-timezone.js
//! version : 0.5.25
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
Function FileField
has 533 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FileField = props => {
const {
enableShortWorkflow,
errorSchema,
formContext,
File form.js
has 1051 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import fullSchema from 'vets-json-schema/dist/686C-674-schema.json';
import environment from 'platform/utilities/environment';
import { arrayBuilderPages } from 'platform/forms-system/src/js/patterns/array-builder';
import FormFooter from 'platform/forms/components/FormFooter';
import { externalServices } from 'platform/monitoring/DowntimeNotification';
Function content
has 530 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const content = () => {
return (
<>
<div className="main-content">
<section className="vads-u-margin-bottom--3 mobile-lg:vads-u-margin-bottom--4">
File Modals.jsx
has 1016 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import recordEvent from 'platform/monitoring/record-event';
import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
Function ReplyDraftItem
has 502 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReplyDraftItem = props => {
const {
draft,
drafts,
cannotReply,
Function FileField
has 501 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FileField = props => {
const {
errorSchema,
formContext,
formData = [],
Function getDebtDetailsCardContent
has 488 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getDebtDetailsCardContent = (debt, dateOfLetter, amountDue) => {
const endDateText = endDate(dateOfLetter, debt.diaryCode);
switch (debt.diaryCode) {
case '71':
File seiFamilyHealthHistory.js
has 943 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const familyHealthHistory = {
success: true,
failure: false,
pojoObject: [
{
File actions.js
has 941 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable camelcase */
import moment from 'moment';
import * as Sentry from '@sentry/browser';
import { recordEvent } from '@department-of-veterans-affairs/platform-monitoring/exports';
import { selectVAPResidentialAddress } from '@department-of-veterans-affairs/platform-user/selectors';
Function V3BasePage
has 461 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function V3BasePage() {
/** @param {import('react').FormEvent | import('@department-of-veterans-affairs/web-components/dist/types/components').VaSelectCustomEvent } evt */
function updateValue(evt) {
const { value, name } = /** @type {HTMLInputElement} */ (evt.target);
const display = document.getElementById(`${name}Value`);
File seiFoodJournal.js
has 915 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const foodJournal = [
{
foodJournalId: 20208041,
oplock: null,
glassesOfWater: 5,
Function ComposeForm
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
Open
const ComposeForm = props => {
const { pageTitle, headerRef, draft, recipients, signature } = props;
const {
noAssociations,
allTriageGroupsBlocked,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function CalculateYourBenefitsForm
has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring. Open
Open
function CalculateYourBenefitsForm({
calculatorInputChange,
displayedInputs,
eligibility,
eligibilityChange,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File ComposeForm.jsx
has 892 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState, useEffect, useMemo, useCallback } from 'react';
import PropTypes from 'prop-types';
import { validateNameSymbols } from 'platform/forms-system/src/js/web-component-patterns/fullNamePattern';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
File V1V3Page.jsx
has 886 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* This page is for testing the compatibility of running v1 and v3 components on the same page.
*/
import React, { useState } from 'react';
Function getNextEvents
has 426 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getNextEvents(appeal) {
const { type: currentStatus, details } = appeal.attributes.status;
const appealType = appeal.type;
switch (currentStatus) {
Function covid19VaccineReducer
has 425 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function covid19VaccineReducer(state = initialState, action) {
switch (action.type) {
case FORM_PAGE_OPENED: {
const { newBooking } = state;
const { data, schema } = setupFormData(
File formSubmitTransformers.unit.spec.js
has 875 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { expect } from 'chai';
import {
transformFormToCCRequest,
transformFormToVARequest,