Showing 3,724 of 12,675 total issues
File FileField.jsx
has 595 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
/* Customized copy of Platform's FileField component
* - Adds new optional prop `ariaLabelAdditionalText` to append additional
* text to the upload button's aria-label attribute.
*/
Function FolderThreadListView
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FolderThreadListView = props => {
const { testing } = props;
const dispatch = useDispatch();
const error = null;
const threadsPerPage = THREADS_PER_PAGE_DEFAULT;
File form.js
has 592 lines of code (exceeds 250 allowed). Consider refactoring. Open
import merge from 'lodash/merge';
import fullSchema from 'vets-json-schema/dist/FEEDBACK-TOOL-schema.json';
import dateRangeUI from 'platform/forms-system/src/js/definitions/dateRange';
import phoneUI from 'platform/forms-system/src/js/definitions/phone';
import emailUI from 'platform/forms-system/src/js/definitions/email';
File FileField.jsx
has 592 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
import PropTypes from 'prop-types';
import React, { useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux';
import classNames from 'classnames';
Function FacilitySearch
has 255 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FacilitySearch = props => {
const { data: formData, goBack, goForward, goToPath } = props;
const [query, setQuery] = useState('');
const [submittedQuery, setSubmittedQuery] = useState('');
const [loading, setLoading] = useState(false);
Function EditContactList
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
const EditContactList = () => {
const dispatch = useDispatch();
const location = useLocation();
const history = useHistory();
const [allTriageTeams, setAllTriageTeams] = useState(null);
File getStatusContents.jsx
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import { format } from 'date-fns';
import _ from 'lodash';
import * as Sentry from '@sentry/browser';
import { Link } from 'react-router';
Function FileField
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
const FileField = props => {
const {
enableShortWorkflow,
errorSchema,
formContext,
- 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 render
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
Function SearchControls
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SearchControls = props => {
const {
currentQuery,
onChange,
geolocateUser,
Function DashboardCards
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DashboardCards = () => {
const [error, hasError] = useState(false);
const [inquiries, setInquiries] = useState([]);
const [lastUpdatedFilter, setLastUpdatedFilter] = useState('newestToOldest');
const [statusFilter, setStatusFilter] = useState('All');
File form.js
has 586 lines of code (exceeds 250 allowed). Consider refactoring. Open
import fullSchemaHca from 'vets-json-schema/dist/10-10EZ-schema.json';
// platform imports
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import FormFooter from '@department-of-veterans-affairs/platform-forms/FormFooter';
Function ConfirmationPage
has 251 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ConfirmationPage = props => {
const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
const showUpdatedConfirmation = useToggleValue(
TOGGLE_NAMES.pensionConfirmationUpdate,
);
Function transform
has 250 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const transform = (formConfig, form) => {
const {
questions,
personalIdentification,
personalData: {
File disabilityLabelsRevised.js
has 582 lines of code (exceeds 250 allowed). Consider refactoring. Open
// note: the id's are no longer used for classification, but are kept here for compatibility with the old code
export default {
0: 'ACL tear (anterior cruciate ligament tear), bilateral',
1: 'ACL tear (anterior cruciate ligament tear), left',
Function FileField
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
const FileField = props => {
const {
enableShortWorkflow,
errorSchema,
formContext,
- 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 FileField
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
const FileField = props => {
const {
errorSchema,
formContext,
formData = [],
- 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 SectionField.jsx
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import { formatSSN } from 'platform/utilities/ui';
import { getJobTitleOrType } from '../helpers';
export const convertDateFormat = date => {
Function renderProfileCalculatorModals
has 246 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderProfileCalculatorModals = () => {
const whenUsedGiBill = (
<div>
<p>
Effective January 1, 2018, the Post-9/11 GI Bill monthly housing
Function TermsOfUse
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function TermsOfUse() {
const isAuthenticatedWithSiS = useSelector(isAuthenticatedWithOAuth);
const isAuthenticatedWithIAM = useSelector(isAuthenticatedWithSSOe);
const [isDisabled, setIsDisabled] = useState(false);
const [isMiddleAuth, setIsMiddleAuth] = useState(true);