Showing 3,724 of 12,675 total issues
Function ContactInfoNeeded
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ContactInfoNeeded = () => {
const email = useSelector(state =>
selectVAPContactInfoField(state, FIELD_NAMES.EMAIL),
);
const mailingAddress = useSelector(state =>
Function EditConfirmCancelModal
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const EditConfirmCancelModal = props => {
const { activeSection, onHide, isVisible } = props;
const { onCancel } = useContext(EditContext);
Function HealthcareError
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HealthcareError = () => {
// status will be 'warning' if toggle is on
const status = useToggleValue(TOGGLE_NAMES.myVaUpdateErrorsWarnings)
? 'warning'
: 'error';
Function idcard
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function idcard(state = initialState, action) {
switch (action.type) {
case ATTRS_FETCHING:
return {
...state,
Function getRecordType
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getRecordType = record => {
if (record.resourceType === fhirResourceTypes.DIAGNOSTIC_REPORT) {
if (record.code?.text === 'CH') return labTypes.CHEM_HEM;
if (
record.code?.coding?.some(
Function sharingReducer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const sharingReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Sharing.STATUS: {
const { consentStatus } = action.response;
return {
Function generateTxt
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async () => {
setDownloadStarted(true);
setDownloadType('txt');
setBlueButtonRequested(true);
dispatch(clearAlerts());
Function failedMsg
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const failedMsg = () => {
return (
<va-alert
status="warning"
visible
Function benefitEndDateExplanation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function benefitEndDateExplanation(condition, delimitingDate) {
switch (condition) {
case 'activeDuty':
return (
<div className="section benefit-end-date">
Function buildNonVAPrescriptionTXT
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildNonVAPrescriptionTXT = prescription => {
return `
---------------------------------------------------------------------------------
Function validateDate
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
errors,
dateString,
formData,
schema,
errorMessages,
Function renderedProperties
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
objectFields => {
const [first, ...rest] = objectFields;
// expand under functionality is controlled in the reducer by setting ui:collapsed, so
// we can check if its expanded by seeing if there are any visible "children"
const visible = rest.filter(
Function summaryPage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pageBuilder.summaryPage = pageConfig => {
const requiredOpts = ['title', 'path', 'uiSchema', 'schema'];
verifyRequiredPropsPageConfig('summaryPage', requiredOpts, pageConfig);
const summaryPageProps = {
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const props = this.props;
if (props.formContext.reviewMode) {
return (
Function constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props) {
super(props);
// Throw an error if there’s no viewField (should be React component)
if (!isReactComponent(this.props.uiSchema['ui:options'].viewField)) {
Function addressValidationSuccessSingleMissingUnitNumber
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addressValidationSuccessSingleMissingUnitNumber() {
return asyncReturn(
{
addresses: [
{
Function mapStateToProps
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = (state, ownProps) => {
const { transaction } = ownProps;
const {
addressFromUser,
addressValidationError,
Function setDismissedHCANotification
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function setDismissedHCANotification(status, statusEffectiveAt) {
return (dispatch, getState) => {
const hasPreviouslyDismissedNotification = !!dismissedHCANotificationDate(
getState(),
);
Function addressValidationSuccessSingleBadUnitNumber
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addressValidationSuccessSingleBadUnitNumber() {
return asyncReturn(
{
addresses: [
{
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const pageDescription = (
<>
<h3 className="vads-u-font-size--h4">Shipping address</h3>
<div className="vads-u-margin-top--2">