Showing 4,231 of 14,884 total issues
Function mapRating
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapRating = institution => {
const { type } = institution; // used to identify if the training is OJT
let ratingAverage = false;
let ratingCount = -1;
let institutionRatingIsNotNull = false;
Function StemAskVAQuestions
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function StemAskVAQuestions() {
const handler = {
recordLinkClick: () => {
recordEvent({
event: 'nav-ask-va-questions-link-click',
Function specializedMissionAttributes
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const specializedMissionAttributes = () => {
const options = [
{
name: 'specialMissionHbcu',
checked: specialMissionHbcu,
Function mapStateToProps
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = state => {
const togglesLoaded = togglesAreLoaded(state);
const profileToggles = selectProfileToggles(state);
const signInServicesEligibleForDD = new Set([
CSP_IDS.ID_ME,
Function content
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const content = () => {
if (activeAlert && activeAlert.type === ALERT_TYPE_ERROR) {
return (
<>
<h1 className="vads-u-margin-bottom--0p5">Vaccine:</h1>
Function generateMedicationsContent
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateMedicationsContent = record => {
return {
title: record.drugName,
details: [
{
Function vaccineReducer
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const vaccineReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Vaccines.GET: {
const vaccine = action.response;
return {
File address-schemas.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import ADDRESS_DATA from 'platform/forms/address/data';
import cloneDeep from 'platform/utilities/data/cloneDeep';
import { validateAsciiCharacters } from 'platform/user/profile/vap-svc/util';
File TermsOfUse.jsx
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState, useEffect } from 'react';
import { useSelector } from 'react-redux';
import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/exports';
import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import {
File utils.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
export const orientationSteps = [
{
number: 0,
File labels.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import constants from 'vets-json-schema/dist/constants.json';
export const militaryBranches = [
'Air Force',
'Army',
File SmApi.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/exports';
import { DefaultFolders, threadSortingOptions } from '../util/constants';
const apiBasePath = `${environment.API_URL}/my_health/v1`;
Function generateTitleSection
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateTitleSection = (doc, parent, data) => {
const titleSection = doc.struct('Sect', {
title: 'Introduction',
});
parent.add(titleSection);
Function reduceErrors
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
errors.reduce((processedErrors, error) => {
let errorIndex = null; // save key (index) of array items with __error
const findErrors = (name, err) => {
if (err && typeof err === 'object') {
// process the last type of error message which provides an `__errors`
Function ConfirmationPage
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ConfirmationPage = () => {
const alertRef = useRef(null);
const form = useSelector(state => state.form || {});
const { submission, formId, data = {} } = form;
const { fullName } = data;
Function transform
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
const newSchoolTransform = formData => {
let clonedData = _.cloneDeep(formData);
delete clonedData.newSchoolName;
delete clonedData.newSchoolAddress;
Function listItems
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const listItems = dependents.map((item, index) => {
const { fullName, dependentRelation } = item;
const dependentName = normalizeFullName(fullName);
const modalDescription = replaceStrValues(
content['household-dependent-modal-remove-description'],
Function validateAddress
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const validateAddress = (formData, fullName) => async (
dispatch,
getState,
) => {
dispatch({ type: ADDRESS_VALIDATION_START });
Function listItems
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const listItems = dependents.map((item, index) => {
const { fullName, dependentRelation } = item;
const dependentName = normalizeFullName(fullName);
const modalDescription = replaceStrValues(
content['household-dependent-modal-remove-description'],
Function Demographics
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Demographics = props => {
const dispatch = useDispatch();
const selectVeteranData = useMemo(makeSelectVeteranData, []);
const { t } = useTranslation();
const { demographics } = useSelector(selectVeteranData);