Showing 4,231 of 14,884 total issues
Function addressDescription
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addressDescription = () => {
return (
<>
<div className="vads-u-margin-bottom--1">
{(error || validationError) && (
Function errorAddressAlert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const errorAddressAlert = deliveryPointValidation => {
if (deliveryPointValidation === BAD_UNIT_NUMBER) {
return (
<Alert
status="warning"
Function rebuildGuess
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function rebuildGuess() {
// use Intl API when available and returning valid time zone
try {
var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (intlName && intlName.length > 3) {
Function mockGetRefreshStatus
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const mockGetRefreshStatus = () => {
switch (scenario) {
case 1: {
return STALE;
}
Function AccessTroubleAlertBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AccessTroubleAlertBox = props => {
const { className, alertType, documentType } = props;
const phase0p5Flag = useSelector(
state => state.featureToggles.mhv_integration_medical_records_to_phase_1,
);
Function onInputSubmit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onInputSubmit = event => {
event.preventDefault();
setFormWasSubmitted(true);
clearGAData();
Function handleSearch
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleSearch = clickedPage => {
const newPage = clickedPage.toString();
setPage(newPage);
setFormWasSubmitted(true);
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const enrollmentData = this.props.enrollmentData || {};
const todayFormatted = formatDateLong(new Date());
Function createImageDetailItem
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createImageDetailItem = async (doc, config, x, item) => {
let titleText = item.title ?? '';
const content = [];
if (titleText) {
Function bodyObserver
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const bodyObserver = new MutationObserver(bodyMutationsList => {
bodyMutationsList.forEach(bodyMutation => {
if (bodyMutation.addedNodes.length > 0) {
bodyMutation.addedNodes.forEach(bodyNode => {
if (bodyNode.id === 'kampyleButtonContainer') {
Function viewportPresetHelper
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const viewportPresetHelper = (preset, orientation, options) => {
if (
isValidPreset(preset) &&
isValidOrientation(orientation) &&
isValidOptions(options)
Function newDraft
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const newDraft = (req, res) => {
const { body, category, recipientId, subject } = req.body;
return res.json({
data: {
id: '3885180',
Function baseSet
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function baseSet(arrayPath, value, object, level = 0) {
if (level >= arrayPath.length) {
// We're at the end of our path; time to assign
return value;
}
Function saveReply
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const saveReply = (req, res) => {
const { body, category, recipientId, subject } = req.body;
return res.json({
data: {
id: '3885180',
Function getEmptyState
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEmptyState(props) {
const {
onEdit,
hideTitle,
title,
Function validatePages
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function validatePages(orderedPageTypes) {
const pageTypes = {};
for (const pageType of orderedPageTypes) {
if (pageType === 'intro') {
if (pageTypes.intro || pageTypes.summary || pageTypes.item) {
Function accessibleFieldContent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
{this.orderedProperties.map((objectFields, index) => {
if (objectFields.length > 1) {
const [first, ...rest] = objectFields;
const visible = rest.filter(
prop => !schema.properties[prop]['ui:collapsed'],
Function vaCheckboxFieldMapping
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function vaCheckboxFieldMapping(props) {
const {
description,
textDescription,
DescriptionField,
Function VaSelectField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function VaSelectField(props) {
let addDefaultEntry = false;
const mappedProps = vaSelectFieldMapping(props);
const enumOptions =
(Array.isArray(props.childrenProps.schema.enum) &&
Function baseSet
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function baseSet(arrayPath, value, object, level = 0) {
if (level >= arrayPath.length) {
// We're at the end of our path; time to assign
return value;
}