Showing 4,231 of 14,884 total issues
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 personalInfoPages
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const personalInfoPages = chapter => {
const [nameAndDob, identificationInfo] = chapter.pages;
/** @returns {PageSchema} */
const nameAndDobPage = ({ includeDateOfBirth, pageTitle }) => {
Function InsuranceInformation
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InsuranceInformation = props => {
const {
goBack,
goForward,
contentBeforeButtons,
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 validateLogin
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const validateLogin = async (
lastName,
dob,
dobError,
setLastNameError,
Function TravelQuestion
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelQuestion = props => {
const { router } = props;
const { t } = useTranslation();
const body = (
Function ViewDependentsLayout
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ViewDependentsLayout(props) {
let mainContent;
if (props.loading) {
mainContent = (
Function formatDate
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function formatDate(inputDate) {
if (!inputDate) return null;
const months = [
'January',
Function generate
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generate = async data => {
validate(data);
const tocPageData = {};
const doc = createAccessibleDoc(data, config);
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { currentLocation, formConfig, children, loadedStatus } = this.props;
const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
const trimmedPathname = currentLocation.pathname.replace(/\/$/, '');
let content;
Function createRoutesWithSaveInProgress
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createRoutesWithSaveInProgress(formConfig) {
const protectedRoutes = new Set([
'introduction',
'review-and-submit',
'confirmation',
Function GenericError
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function GenericError(props) {
const { appType, formConfig, onSubmit, testId } = props;
let submitButton;
let submitMessage;
Function MilitaryServiceHistory
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function MilitaryServiceHistory(props) {
const state = useFormikContext();
const { from, to } = state.values.toursOfDuty[0].dateRange;
Function prefillTransformer
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformer(pages, formData, metadata, state) {
const {
user: {
profile: {
vapContactInfo: { residentialAddress, mailingAddress },
Function OMBInfo
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const OMBInfo = () => {
const expDate = '07/31/2027';
const ombNum = '2900-0091';
const resBurden = '27';
return (
Function createDirectDepositChangePage
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createDirectDepositChangePage(schema) {
const { bankAccountChange, bankAccount } = schema.definitions;
return {
title: 'Direct deposit',
path: 'personal-information/direct-deposit',
Function contactInformation
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
contactInformation: formData => {
if (_.isEmpty(_.get(formData, 'view:phoneAndEmail.homePhone', {}))) {
recordEvent({
event: 'edu-0994--response-missing',
'missing-field-question':
Function transformForSubmit
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformForSubmit(formConfig, form) {
const transformedData = JSON.parse(
formsSystemTransformForSubmit(formConfig, form),
);
Function prefillTransformer
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformer(pages, formData, metadata, state) {
const {
user: {
profile: {
vapContactInfo: { residentialAddress, mailingAddress },
Function renderSearchSection
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderSearchSection = () => {
return (
<div className="row search-section">
<div className="title-section">
<h1>Find a VA accredited representative or VSO</h1>