Showing 12,759 of 12,759 total issues
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 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 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 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 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 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 generateHelpSection
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateHelpSection = (doc, parent) => {
const infoSection = doc.struct('Sect', {
title: 'Information',
});
infoSection.add(
Function getEmptyState
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEmptyState(props) {
const {
onEdit,
hideTitle,
title,
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 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 vaCheckboxFieldMapping
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function vaCheckboxFieldMapping(props) {
const {
description,
textDescription,
DescriptionField,
Function SSNWidget
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function SSNWidget(props) {
const [val, setVal] = useState(props.value);
const [displayVal, setDisplayVal] = useState(props.value);
const handleChange = value => {
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 Submitted
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Submitted(props) {
const { formConfig, onBack, onSubmit } = props;
let ariaDescribedBy = null;
// If no ariaDescribedBy is passed down from form.js,
// a null value will properly not render the aria label.
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 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 formatReadableDate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatReadableDate = (rawDate, minimumDateDigits = 1) => {
const months = [
'January',
'February',
'March',
Function recordPanEvent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const recordPanEvent = (mapCenter, currentQuery) => {
const { searchCoords, searchArea } = currentQuery;
return new Promise((resolve, _) => {
let distanceMoved;
Function CustomPhoneNumberField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CustomPhoneNumberField(props) {
function handleChange(event) {
if (props?.showMebEnhancements08) {
props?.updateGlobalPhoneNumber(event);
if (event?.length > 9) {
Function transform
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
// https://developer.va.gov/explore/appeals/docs/decision_reviews?version=current
// match supplemental claims schema here
const mainTransform = formData => {
const { benefitType, additionalDocuments } = formData;