Showing 4,231 of 14,884 total issues
Function fieldsMustMatchValidation
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fieldsMustMatchValidation = (
errors,
page,
formData,
certProp,
Function MailOrFaxFilesContent
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MailOrFaxFilesContent = () => {
return (
<>
<p>
We can process your request more quickly if you upload your files here.
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 compareAddressObjects
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function compareAddressObjects(obj1, obj2) {
const { hasOwnProperty } = Object.prototype;
const keys1 = Object.keys(obj1);
const keys2 = Object.keys(obj2);
Function updateAddress
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateAddress = (state = initialState, action) => {
switch (action.type) {
case UPDATE_ADDRESS:
return {
...state,
Function createSaveInProgressUpdate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createSaveInProgressUpdate = req => {
const now = new Date().toISOString();
const formId = req.params.id;
Function IntroductionPage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const IntroductionPage = props => {
const { route } = props;
const { isUserLOA1, isUserLOA3 } = useSelector(selectAuthStatus);
const { formConfig, pageList } = route;
Function MissingEDIPI
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MissingEDIPI = () => {
recordEvent({
event: 'visible-alert-box',
'alert-box-type': 'error',
'alert-box-heading': 'We need more information for your application',
Function MissingEDIPI
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MissingEDIPI = () => {
recordEvent({
event: 'visible-alert-box',
'alert-box-type': 'error',
'alert-box-heading': 'We need more information for your application',
Function handleTouClick
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleTouClick = async type => {
const cernerType = type === 'accept' ? 'accept_and_provision' : type;
try {
setIsDisabled(true);
Function organizeAppointmentsByYearMonthDay
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function organizeAppointmentsByYearMonthDay(appointments) {
const organizedData = [];
// First sort the appointments by start time then organize them by yearmonth and day
const sortedAppointments = sortAppointmentsByStartTime(appointments);
Function withForm
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const withForm = (Component, options = {}) => {
const WrappedComponent = props => {
const { appName } = options;
const { router } = props;
const selectForm = useMemo(makeSelectForm, []);
Function Complete
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Complete = props => {
const { router } = props;
const { t } = useTranslation();
const { updateError } = useUpdateError();
const { isLoading, travelPayClaimError } = usePostTravelOnlyClaim({ router });
Function FileClaimExplainerPage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FileClaimExplainerPage = () => {
const {
useToggleValue,
useToggleLoadingValue,
TOGGLE_NAMES,
Function onChange
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onChange = event => {
const pageState = event.target.value || '';
saveDischargeDate();
const date = isDateComplete(pageState) ? getDate(pageState) : null;
const nextPage =
Function transformForSubmit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformForSubmit(formConfig, form) {
let transformedData = JSON.parse(sharedTransformForSubmit(formConfig, form));
const witnessRelationshipToClaimantAnswers =
transformedData?.witnessRelationshipToClaimant;
Function MedicalExpenseDescription
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function MedicalExpenseDescription() {
return (
<>
<p>
We want to know if you, your spouse, or your dependents pay medical or
Function contactMethod
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const contactMethod = () => {
if (contactPreference === 'email' && currentlyLoggedIn) {
return (
<p className="vads-u-margin-bottom--3">
You should receive an email within 7 business days when your reply is
Function handleChange
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleChange = async event => {
const file = event?.detail?.files[0];
const extraData = {};
const checks = { checkTypeAndExtensionMatches, checkIsEncryptedPdf };
Function onSubmit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSubmit = event => {
event.preventDefault();
const hasEmptyInput = stateDependents.some(
dependent => dependent.dependentAge === '',