Showing 3,724 of 12,675 total issues
Function lcsSingleVsMulti
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function lcsSingleVsMulti(
userInput,
disabilityLabels,
threshold = THRESHOLD,
splitreg = REGEX_SPLIT,
Function updateFormDataAddress
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const updateFormDataAddress = (
oldFormData,
formData,
path,
index = null, // this is included in the path, but added as
Function pageAndDataState
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(state, page) => {
const definitions = {
...(formConfig.defaultDefinitions || {}),
...page.schema.definitions,
};
Function createStringifyFormReplacer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createStringifyFormReplacer(options) {
const replacerFn = (key, value) => {
if (!options?.allowPartialAddress && isPartialAddress(value)) {
return undefined;
}
Function handleChange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleChange(event) {
if (props?.showMebEnhancements08) {
if (props.email !== event) {
props.setFormData({
...props?.formData,
Function mapBenefitFromFormInputData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapBenefitFromFormInputData = (benefit, formData) => {
if (checkExtraConditions(benefit, formData) === false) return false;
const mappingKeys = Object.keys(mappingTypes);
// Each mapping type (i.e. GOALS).
Function prefillTransformer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function prefillTransformer(pages, formData, metadata) {
const newFormData = formData;
for (const addressType of ['permanentAddress', 'temporaryAddress']) {
if (newFormData[addressType]?.country) {
Function setupMap
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const setupMap = () => {
const mapContainerElement = document.getElementById(mapboxGlContainer);
if (!mapContainerElement) {
return null;
}
Function VABenefitsCall
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function VABenefitsCall() {
return (
<div>
<p className="p1">
<strong>To check on the status of your claim or appeal</strong>, use our{' '}
Function mainTransform
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mainTransform = formData => {
const { benefitType, additionalDocuments } = formData;
const attributes = {
// fall back to compensation; this will fix a few existing submission
Function renderPhoneNumber
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const renderPhoneNumber = (
title,
subTitle = null,
phone,
from,
Function mainTransform
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mainTransform = formData => {
const { benefitType, additionalDocuments } = formData;
const attributes = {
// fall back to compensation; this will fix a few existing submission
Function renderVenueWarnings
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderVenueWarnings = () => {
const prevAppType = formResponses[SHORT_NAME_MAP.PREV_APPLICATION_TYPE];
const reason = formResponses[SHORT_NAME_MAP.REASON];
const dischargeYear = formResponses[SHORT_NAME_MAP.DISCHARGE_YEAR];
const dischargeMonth = formResponses[SHORT_NAME_MAP.DISCHARGE_MONTH] || 1;
Function prefillTransformer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformer(pages, formData, metadata) {
const { homePhone, mobilePhone, email, remainingEntitlement } = formData;
const totalDays = remainingEntitlement
? remainingEntitlement.months * 30 + remainingEntitlement.days
Function CustomSSNReviewPage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function CustomSSNReviewPage(props) {
const maskedSSN = maskSSN(props?.data?.veteranSocialSecurityNumber?.ssn);
return props.data ? (
<div className="form-review-panel-page">
<div className="form-review-panel-page-header-row">
Function getCemeteries
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getCemeteries() {
return fetch(`${environment.API_URL}/v0/preneeds/cemeteries`, {
credentials: 'include',
headers: {
'X-Key-Inflection': 'camel',
Function onclick
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
radio.onclick = e => {
let title = e.target.attributes.name.value;
if (hasVeteran && veteranLabelMap.has(title))
title = veteranLabelMap.get(title);
else if (nonVeteranMap.has(title)) title = nonVeteranMap.get(title);
Function getPrimaryContact
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getPrimaryContact(data) {
// If a certification name is present, third party signer is the certifier
const useCert =
data?.certification?.firstName && data?.certification?.firstName !== '';
Function deepEqual
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function deepEqual(obj1, obj2) {
if (obj1 === obj2) return true;
if (
typeof obj1 !== 'object' ||
Function PaymentSelectionUI
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const PaymentSelectionUI = () => {
return radioUI({
title: 'Tell us where to send the payment for this claim',
description: (
<>