Showing 3,724 of 12,675 total issues
File PreSubmitSection.jsx
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// libs
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
File helpers.js
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import { addDays, format, isValid } from 'date-fns';
import { toggleValues } from '~/platform/site-wide/feature-toggles/selectors';
import FEATURE_FLAG_NAMES from '~/platform/utilities/feature-toggles/featureFlagNames';
import { deductionCodes } from '../constants/deduction-codes';
Function createDirectDepositPage
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function createDirectDepositPage() {
const bankAccountProperties = {
type: 'object',
properties: {
accountType: {
Function IntroductionPage
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function IntroductionPage(props) {
const { route } = props;
const { formConfig, pageList } = route;
const { appType } = formConfig?.customText;
Function libraryFilters
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function libraryFilters(el) {
// Grab our current page from the active pager button.
if (el.srcElement.classList.contains('pager-numbers')) {
activePage = parseInt(el.srcElement.text, 10);
sessionStorage.setItem('pageNum', parseInt(el.srcElement.text, 10));
Function ArrivedAtFacility
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ArrivedAtFacility = props => {
const { router } = props;
const { t } = useTranslation();
const dispatch = useDispatch();
const { goToNextPage } = useFormRouting(router);
Function transformTOEForm
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transformTOEForm(_formConfig, form) {
const formFieldUserFullName = form?.data['view:userFullName']?.userFullName;
const viewComponentUserFullName =
form?.loadedData?.formData['view:userFullName']?.userFullName;
const formFieldDateOfBirth = form?.data?.dateOfBirth;
Function IntroductionPage
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const IntroductionPage = props => {
const dispatch = useDispatch();
const { hasVaFileNumber, isLoading } = useSelector(
state => state?.vaFileNumber,
);
Function LandingPageUnauth
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LandingPageUnauth = () => {
const dispatch = useDispatch();
const handleSignIn = () => {
dispatch(toggleLoginModal(true, 'mhv-sm-landing-page'));
};
Function selectRequestedAppointmentDetails
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function selectRequestedAppointmentDetails(state, id) {
const { appointmentDetailsStatus, facilityData } = state.appointments;
const featureVAOSServiceCCAppointments = selectFeatureVAOSServiceCCAppointments(
state,
);
Function specializedMissionAttributes
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const specializedMissionAttributes = () => {
const options = [
{
name: 'specialMissionHbcu',
checked: specialMissionHbcu,
Function mapRating
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapRating = institution => {
const { type } = institution; // used to identify if the training is OJT
let ratingAverage = false;
let ratingCount = -1;
let institutionRatingIsNotNull = false;
Function StemAskVAQuestions
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function StemAskVAQuestions() {
const handler = {
recordLinkClick: () => {
recordEvent({
event: 'nav-ask-va-questions-link-click',
Function validateMilitaryHistory
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const validateMilitaryHistory = (errors, serviceRecords, formData) => {
// Map the highestRank to the corresponding Rank Description from jsonData
const rankMap = jsonData.reduce((map, rank) => {
// eslint-disable-next-line no-param-reassign
map[rank['Rank Code'].toUpperCase()] = rank[
Function mapStateToProps
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = state => {
const togglesLoaded = togglesAreLoaded(state);
const profileToggles = selectProfileToggles(state);
const signInServicesEligibleForDD = new Set([
CSP_IDS.ID_ME,
Function vaccineReducer
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const vaccineReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Vaccines.GET: {
const vaccine = action.response;
return {
File address-schemas.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import ADDRESS_DATA from 'platform/forms/address/data';
import cloneDeep from 'platform/utilities/data/cloneDeep';
import { validateAsciiCharacters } from 'platform/user/profile/vap-svc/util';
File MCPAlerts.jsx
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import recordEvent from 'platform/monitoring/record-event';
import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';
import PropTypes from 'prop-types';
import { currency, calcDueDate, formatDate } from '../utils/helpers';
File form.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { VA_FORM_IDS } from 'platform/forms/constants';
import {
yesNoSchema,
yesNoUI,
} from 'platform/forms-system/src/js/web-component-patterns';
File utils.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
export const orientationSteps = [
{
number: 0,