Showing 4,231 of 14,884 total issues
Function mapStateToProps
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const mapStateToProps = state => {
const mailingFieldName = VAP_SERVICE.FIELD_NAMES.MAILING_ADDRESS;
const {
apiRoute,
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 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 failedMsg
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const failedMsg = () => {
return (
<va-alert
status="warning"
visible
Function imageStatusContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const imageStatusContent = () => {
if (radiologyDetails.studyId) {
if (processingRequest) {
return (
<va-loading-indicator
Function convertMedication
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const convertMedication = med => {
if (!med) return null;
if (med.dispStatus?.toLowerCase()?.includes('non-va'))
return convertNonVaMedication(med);
Function generateMedicalEventsContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateMedicalEventsContent = record => {
return {
title: record.medicalEvent,
details: [
{
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 buildNonVAPrescriptionTXT
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildNonVAPrescriptionTXT = prescription => {
return `
---------------------------------------------------------------------------------
Function content
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const content = () => {
return (
<>
{page ? (
<PrintOnlyPage
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 validateDate
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
errors,
dateString,
formData,
schema,
errorMessages,
Function userNavReducer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function userNavReducer(state = initialState, action) {
switch (action.type) {
case TOGGLE_FORM_SIGN_IN_MODAL:
return set('showFormSignInModal', action.isOpen, state);
Function handleVaChange
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleVaChange = e => {
const fileFromEvent = e.detail.files[0];
if (!fileFromEvent) {
file = null;
setError(mappedProps.error);
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 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 props = this.props;
if (props.formContext.reviewMode) {
return (
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 addressValidationSuccessSingleMissingUnitNumber
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addressValidationSuccessSingleMissingUnitNumber() {
return asyncReturn(
{
addresses: [
{