Showing 4,177 of 14,709 total issues
File index.jsx
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable react/jsx-key */
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import * as Sentry from '@sentry/browser';
Function transform
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const transform = (formConfig, form) => {
const {
questions,
personalIdentification,
personalData: {
Function DashboardCards
has 253 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');
Function DashboardCards
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DashboardCards = () => {
const [error, hasError] = useState(false);
const [inquiries, setInquiries] = useState([]);
const [statusFilter, setStatusFilter] = useState('All');
const [categoryFilter, setCategoryFilter] = useState('All');
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 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 TermsOfUse
has 252 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);
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,
);
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 DownloadRecordType
has 246 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DownloadRecordType = () => {
const history = useHistory();
const dispatch = useDispatch();
const [checkAll, setCheckAll] = useState(false);
const [labTestCheck, setLabTestCheck] = useState(false);
Function createDebtsSuccess
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createDebtsSuccess = () => {
return {
hasDependentDebts: false,
debts: [
{
Function FileField
has a Cognitive Complexity of 62 (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 VAFacilityPageV2
has 243 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function VAFacilityPageV2() {
const pageTitle = useSelector(state => getPageTitle(state, pageKey));
const history = useHistory();
const dispatch = useDispatch();
Function PrescriptionPrintOnly
has 243 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PrescriptionPrintOnly = props => {
const { rx, hideLineBreak, refillHistory, isDetailsRx } = props;
const pharmacyPhone = pharmacyPhoneNumber(rx);
const activeNonVaContent = pres => (
Function appointmentsReducer
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function appointmentsReducer(state = initialState, action) {
switch (action.type) {
case FETCH_FUTURE_APPOINTMENTS:
return {
...state,
Function Vitals
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Vitals = () => {
const dispatch = useDispatch();
const updatedRecordList = useSelector(state => state.mr.vitals.updatedList);
const listState = useSelector(state => state.mr.vitals.listState);
const vitals = useSelector(state => state.mr.vitals.vitalsList);