Showing 3,745 of 12,716 total issues
File index.js
has 4384 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const all = {
resourceType: 'Bundle',
id: '8d8b7708-da2e-41f6-90ec-12b8477635f1',
meta: {
lastUpdated: '2024-05-31T11:21:05.570-04:00',
File index.js
has 2937 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const all = {
entry: [
{
// #####################################################################################
// ##################################################################################### Blood pressure
File mockData.js
has 2226 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const healthFacilityMockData = {
data: [
{
id: 'vba_349b',
type: 'facility',
File index.js
has 2068 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const all = {
id: '5177513c-0db5-4c07-8b5f-05f57e00c044',
meta: {
lastUpdated: '2024-07-01T16:06:49.182-04:00',
},
File appeals-v2-helpers.jsx
has 1901 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import moment from 'moment';
import { find, get, startCase } from 'lodash';
import * as Sentry from '@sentry/browser';
import { Link } from 'react-router-dom-v5-compat';
File messageDetails.js
has 1793 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const { sub, formatISO } = require('date-fns');
const messageDetails = {
data: [
{
File index.js
has 1682 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const set = require('lodash/set');
const cloneDeep = require('lodash/cloneDeep');
/**
* Loops through the claims array and adds the claims to the user object
*
File index.js
has 1660 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const has3Copays = {
data: [
{
id: '53a48388-38d3-41da-a187-b7680462db4c',
pSSeqNum: 1,
Function getDerivedValues
has a Cognitive Complexity of 213 (exceeds 5 allowed). Consider refactoring. Open
Open
(constant, eligibility, institution, inputs) => {
if (
[constant, eligibility, institution, inputs].some(e => !e || isEmpty(e))
) {
return {};
- 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 V1V3Page
has 860 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function V1V3Page() {
/** @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`);
Function ComposeForm
has 813 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ComposeForm = props => {
const { pageTitle, headerRef, draft, recipients, signature } = props;
const {
noAssociations,
allTriageGroupsBlocked,
File index.js
has 1505 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const set = require('lodash/set');
const cloneDeep = require('lodash/cloneDeep');
/**
* Loops through the claims array and adds the claims to the user object
*
File index.js
has 1486 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const set = require('lodash/set');
const cloneDeep = require('lodash/cloneDeep');
/**
* Loops through the claims array and adds the claims to the user object
*
File responses.js
has 1454 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const commonResponses = require('../../../platform/testing/local-dev-mock-api/common');
module.exports = {
...commonResponses,
'GET /v0/feature_toggles': {
Function getDerivedValues
has 768 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(constant, eligibility, institution, inputs) => {
if (
[constant, eligibility, institution, inputs].some(e => !e || isEmpty(e))
) {
return {};
Function formReducer
has 664 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function formReducer(state = initialState, action) {
switch (action.type) {
case FORM_PAGE_OPENED: {
const { data, schema } = setupFormData(
state.data,
File countryList.js
has 1243 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const countryList = [
{
key: 'AFG',
label: 'Afghanistan',
value: 'AFG',
File form.js
has 1238 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import React from 'react';
import { externalServices } from 'platform/monitoring/DowntimeNotification';
import {
checkboxGroupSchema,
File form.js
has 1230 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { createSelector } from 'reselect';
import fullSchema5490 from 'vets-json-schema/dist/22-5490-schema.json';
import commonDefinitions from 'vets-json-schema/dist/definitions.json';
Function LandingPage
has 629 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LandingPage = () => {
const user = useSelector(selectUser);
const dispatch = useDispatch();
const location = useLocation();
const fullState = useSelector(state => state);