Showing 12,811 of 12,811 total issues
File helpers.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment-timezone';
import * as Sentry from '@sentry/browser';
import { snakeCase } from 'lodash';
import { generatePdf } from '@department-of-veterans-affairs/platform-pdf/exports';
import { formatDateLong } from '@department-of-veterans-affairs/platform-utilities/exports';
Function enterData
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function enterData(field) {
switch (field.type) {
// Select fields register as having type 'select-one'.
case 'select-one':
cy.wrap(field.element)
Function makeMockApiRouter
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeMockApiRouter(opts) {
// mockResponses[token][verb][response]
const mockResponses = {};
const router = express.Router(); // eslint-disable-line new-cap
Function testForm
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const testForm = testConfig => {
const {
appName,
arrayPages = [],
dataPrefix,
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { currentLocation, formConfig, children, formData } = this.props;
const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
const lastPathComponent = currentLocation.pathname.split('/').pop();
const isIntroductionPage = trimmedPathname.endsWith('introduction');
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
// loading state for terms content is handled by parent component
const { terms } = this.props;
if (!terms.termsContent) {
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
addressValidationType,
suggestedAddresses,
addressFromUser,
Function submit
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const submit = form => {
const currentAddress = form.data['view:currentAddress'];
const itemQuantities = form.data?.order?.length;
const { order, permanentAddress, temporaryAddress, vetEmail } = form.data;
for (const address of [permanentAddress, temporaryAddress]) {
Function activeDutyNote
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const activeDutyNote = () => {
if (
eighteenOrOver(formData.relativeDateOfBirth) &&
(!hasServed || (hasServed && allServicePeriodsHaveEndDate))
) {
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="schemaform-intro">
<FormTitle title="Apply for a Specially Adapted Housing Grant or Special Home Adaptation Grant" />
<p>
Function createDirectDepositPage
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createDirectDepositPage(schema) {
const { bankAccountChangeUpdate, bankAccount } = schema.definitions;
return {
title: 'Direct deposit',
Function facilityReducer
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function facilityReducer(state = initialState, action) {
switch (action.type) {
case FETCH_FACILITY_STARTED:
return { ...state, data: {}, loading: true, error: false };
case FETCH_FACILITY_SUCCESS:
Function WiderThanMobileOfficialGovtWebsite
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WiderThanMobileOfficialGovtWebsite = () => {
const [isExpanded, setIsExpanded] = useState(false);
const toggleExpansion = () => {
setIsExpanded(!isExpanded);
Function CustomResolutionOptionReview
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CustomResolutionOptionReview = props => {
const formData = useSelector(state => state.form.data);
const { selectedDebtsAndCopays = [] } = formData;
const currentDebt = selectedDebtsAndCopays[props.pagePerItemIndex];
Function fetchConfirmedAppointmentDetails
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchConfirmedAppointmentDetails(id, type) {
return async (dispatch, getState) => {
try {
const state = getState();
const featureVAOSServiceVAAppointments = selectFeatureVAOSServiceVAAppointments(
Function openFacilityPageV2
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function openFacilityPageV2(page, uiSchema, schema) {
return async (dispatch, getState) => {
try {
const initialState = getState();
const featureFacilitiesServiceV2 = selectFeatureFacilitiesServiceV2(
Function getCompareCalculatorState
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getCompareCalculatorState = (
calculator,
institution,
constants,
) => {
Function ConnectedDevicesContainer
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ConnectedDevicesContainer = () => {
const [hasLoaded, setHasLoaded] = useState(false);
const [connectionAvailable, setConnectionAvailable] = useState(false);
const [connectedDevices, setConnectedDevices] = useState([]);
const [successAlert, setSuccessAlert] = useState(false);
Function onChangeEvent
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onChangeEvent = option => {
// title may be a React component
const title = options.title?.props?.children || options.title || '';
// this check isn't ideal since the message may exist and the question
// may be dynamically toggled between being required or not
Function removeDependents
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function removeDependents(state = initialState, action) {
// schema, uiSchema, and formData are already extracted based on index (stateKey) here.
if (action.type === FORM_DATA_UPDATED) {
const {
data: newFormData,