Showing 4,231 of 14,884 total issues
Function Submitted
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Submitted(props) {
const { formConfig, onBack, onSubmit } = props;
let ariaDescribedBy = null;
// If no ariaDescribedBy is passed down from form.js,
// a null value will properly not render the aria label.
Function SSNWidget
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function SSNWidget(props) {
const [val, setVal] = useState(props.value);
const [displayVal, setDisplayVal] = useState(props.value);
const handleChange = value => {
Function formatReadableDate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatReadableDate = (rawDate, minimumDateDigits = 1) => {
const months = [
'January',
'February',
'March',
Function CustomPhoneNumberField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CustomPhoneNumberField(props) {
function handleChange(event) {
if (props?.showMebEnhancements08) {
props?.updateGlobalPhoneNumber(event);
if (event?.length > 9) {
Function recordPanEvent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const recordPanEvent = (mapCenter, currentQuery) => {
const { searchCoords, searchArea } = currentQuery;
return new Promise((resolve, _) => {
let distanceMoved;
Function transform
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
// https://developer.va.gov/explore/appeals/docs/decision_reviews?version=current
// match supplemental claims schema here
const mainTransform = formData => {
const { benefitType, additionalDocuments } = formData;
Function MobileLogoRow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const MobileLogoRow = () => {
return (
<nav className="vads-u-display--flex vads-u-flex-direction--column vads-u-margin--0 vads-u-padding--0">
<div className="header-logo-row vads-u-background-color--primary-darker vads-u-display--flex vads-u-align-items--center vads-u-justify-content--space-between vads-u-padding-y--1p5 vads-u-padding-left--1p5 vads-u-padding-right--1">
<a
Function contestableIssuesReducer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const contestableIssuesReducer = getEligibleContestableIssues => (
state = initialState,
action,
) => {
switch (action?.type) {
Function processContestableIssues
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const processContestableIssues = contestableIssues => {
const processDate = entry =>
(entry.attributes?.approxDecisionDate || '').replace(REGEXP.DASH, '');
// remove issues with no title & sort by date - see
// https://dsva.slack.com/archives/CSKKUL36K/p1623956682119300
Function transform
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
// https://developer.va.gov/explore/appeals/docs/decision_reviews?version=current
// match supplemental claims schema here
const mainTransform = formData => {
const { benefitType, additionalDocuments } = formData;
Function DependentListLoopForm
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DependentListLoopForm = props => {
const { children, data, page, onChange, onSubmit } = props;
const { fullName = {} } = data || {};
// build the uiSchema title attribute based on form & page data
Function DependentListLoopForm
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DependentListLoopForm = props => {
const { children, data, page, onChange, onSubmit } = props;
const { fullName = {} } = data || {};
// build the uiSchema title attribute based on form & page data
Function getEmptyState
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEmptyState(props) {
const {
onEdit,
hideTitle,
title,
Function createFormConfig
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createFormConfig = (form, options) => {
const { chapters, formId, ombInfo, title } = form;
const { rootUrl, trackingPrefix } = options;
const subTitle = `VA Form ${formId}`;
Function getEmptyState
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEmptyState(props) {
const {
onEdit,
hideTitle,
title,
Function libraryPagerGen
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function libraryPagerGen() {
const numCardsCount = libraryNumActiveCards();
numCards = libraryNumCards();
pages = Math.ceil(numCardsCount / itemsPerPage);
if (document.getElementById('pager-nums-insert')) {
Function labResults
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const labResults = avs => {
if (avs.labResults?.length > 0) {
const labResultItems = avs.labResults.map((item, idx) => (
<div key={idx}>
{labResultValues(item.values)}
Function ConfirmationPage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ConfirmationPage = () => {
const { submission, data } = useSelector(state => state.form);
const { userFullName } = useSelector(selectProfile);
const loggedIn = useSelector(isLoggedIn);
const { response } = submission;
Function updateSchema
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: (formData, schema, uiSchema) => {
const countryUI = uiSchema;
const addressFormData = get(
['view:mailingAddress', 'address'],
formData,
Function HelpTextContent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function HelpTextContent() {
const BTSSS_PORTAL_URL = 'https://dvagov-btsss.dynamics365portals.us/';
return (
<div>