Showing 12,841 of 12,841 total issues
Function transform
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
// Copy over sponsor data if the claimant is the veteran.
const populateSponsorData = application =>
isVeteran({ application })
? merge({}, application, {
File EnhancedVehicleRecord.jsx
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { VaTextInput } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import { isValidCurrency } from '../../utils/validations';
import ButtonGroup from '../shared/ButtonGroup';
File transformers.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import { isEmpty } from 'lodash';
import {
APPOINTMENT_TYPES,
TYPE_OF_VISIT,
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (!this.props.user.login.currentlyLoggedIn) return null;
const { savedStatus } = this.props.form;
const { formConfig } = this.props;
const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
Function exports
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(chai, utils) {
const axe = require('axe-core');
const { Assertion } = chai;
utils.addMethod(chai.Assertion.prototype, 'accessible', function(
Function VAPServiceTransaction
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function VAPServiceTransaction(props) {
const {
id,
isModalOpen,
children,
Function returnAllCare
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const returnAllCare = async params => {
const { address, bounds, locationType, page, center, radius } = params;
const isUrgentCare = locationType === LocationType.URGENT_CARE;
const vaData = await LocatorApi.searchWithBounds(
address,
Function DecisionReviewPage
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DecisionReviewPage = () => {
useEffect(() => {
setTimeout(() => {
focusElement('#main h2');
});
Function DecisionReviewPage
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DecisionReviewPage = () => {
useEffect(() => {
setTimeout(() => {
focusElement('#main h2');
});
Function DecisionReviewPage
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DecisionReviewPage = () => {
useEffect(() => {
setTimeout(() => {
focusElement('#main h2');
});
Function transformForSubmit
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformForSubmit(formConfig, form) {
const transformedData = JSON.parse(
formsSystemTransformForSubmit(formConfig, form),
);
Function applicantInsuranceCardSchema
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function applicantInsuranceCardSchema(isPrimary) {
const keyname = isPrimary ? 'primaryInsuranceCard' : 'secondaryInsuranceCard';
return {
uiSchema: {
...titleUI(
Function ApplicantRelationshipReviewPage
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ApplicantRelationshipReviewPage(props) {
const { data, keyname = KEYNAME, primary = PRIMARY, secondary = SECONDARY } =
props || {};
const genOps = props.genOp || generateOptions;
const {
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
data,
schema,
uiSchema,
Function submitToAPI
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const submitToAPI = (state, setState) => {
// if no file has been added, show an error message
if (state.files.length === 0) {
setState({
...state,
Function submitToAPI
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const submitToAPI = (state, setState) => {
// if no file has been added, show an error message
if (state.files.length === 0) {
setState({
...state,
Function conditionalDataLayerPush
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const conditionalDataLayerPush = () => {
return (
currentLocationInputString,
currentSortType,
currentRepresentativeType,
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const { fullName } = data;
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.state.loading) {
return <va-loading-indicator message="Loading facilities..." />;
}
Function InsuranceInformation
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InsuranceInformation = props => {
const {
goBack,
goForward,
contentBeforeButtons,