Showing 3,731 of 12,808 total issues
Function convertChemHemObservation
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const convertChemHemObservation = record => {
const results = isArrayAndHasItems(record.result)
? record.result.map(item =>
extractContainedResource(record, item.reference),
)
Function renderResultsList
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderResultsList() {
const { results, loading } = this.props.search;
const query = this.props.router?.location?.query?.query || '';
if (loading) {
return <va-loading-indicator message="Loading results..." />;
Function generateHeaderBanner
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateHeaderBanner = async (doc, header, data, config) => {
doc.moveDown(1);
const currentHeight = doc.y;
// Calculate text width
Function generateInfoSection
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateInfoSection = (doc, parent) => {
const infoSection = doc.struct('Sect', {
title: 'Information',
});
infoSection.add(
Function currentOrPastDateUI
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const currentOrPastDateUI = options => {
const { title, errorMessages, required, ...uiOptions } =
typeof options === 'object' ? options : { title: options };
// if monthYearOnly is used, the schema pattern also needs
Function componentDidUpdate
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
Function handleSubmit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleSubmit = event => {
if (!event.target.value) {
setInputError(true);
return;
}
Function transform
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
// https://dev-developer.va.gov/explore/appeals/docs/decision_reviews?version=current
const mainTransform = formData => {
const informalConference = showNewHlrContent(formData)
? formData.informalConferenceChoice === 'yes'
Function answerReviewLabel
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const answerReviewLabel = (key, formValues) => {
const answer = formValues[key];
const dischargeMonth =
monthLabelMap[formValues[SHORT_NAME_MAP.DISCHARGE_MONTH]] || '';
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { error, fetching, results, scopes } = this.props;
// Show loading indicator if we are fetching.
if (fetching) {
Function displayConditionsMet
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const displayConditionsMet = (SHORT_NAME, formResponses) => {
const displayConditionsForShortName = DISPLAY_CONDITIONS[SHORT_NAME];
const questionRequirements = Object.keys(displayConditionsForShortName);
if (questionRequirements.includes('FORK')) {
Function ClaimantContactInformation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function ClaimantContactInformation(props) {
const formikContext = useFormikContext();
return (
<>
Function additionalBenefits
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function additionalBenefits(schema, options) {
// Use the defaults as necessary, but override with the options given
const mergedOptions = { ...defaults, ...options };
const { fields, required } = mergedOptions;
Function mapEnrollmentVerificationsForSubmission
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const mapEnrollmentVerificationsForSubmission = ev => {
// The enrollments are in order with the most recent first. Look
// for the first non-null verificationStatus (or, the most recent
// month) that was verified as either correct or incorrect.
const mostRecentVerifiedEnrollmentIndex = ev.enrollmentVerifications.findIndex(
Function applicantHasInsuranceSchema
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function applicantHasInsuranceSchema(isPrimary) {
const keyname = isPrimary ? 'applicantHasPrimary' : 'applicantHasSecondary';
return {
uiSchema: {
...titleUI(
Function componentDidUpdate
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidUpdate(prevProps) {
const {
fieldName,
forceEditView,
successCallback,
Function fetchRatedDisabilities
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchRatedDisabilities() {
return async dispatch => {
const response = await getData(
'/disability_compensation_form/rated_disabilities',
);
Function createRoutesWithStore
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createRoutesWithStore = () => {
return (
<Switch>
{routes.map((route, i) => {
const options = {
Function BackButton
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const BackButton = props => {
const { action, prevUrl, router, text = null } = props;
const {
getCurrentPageFromRouter,
getPreviousPageFromRouter,
Function RogersStem
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RogersStem = () => {
useEffect(() => {
recordEvent({
event: 'howToWizard-alert-displayed',
'reason-for-alert': 'help with STEM program debt',