Showing 4,231 of 14,884 total issues
Function loadConnectedApps
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function loadConnectedApps() {
return async dispatch => {
recordEvent({ event: 'profile-get-connected-apps-started' });
dispatch({ type: LOADING_CONNECTED_APPS });
Function UNSAFE_componentWillReceiveProps
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
UNSAFE_componentWillReceiveProps(nextProps) {
// Once the login logic is all done...
// This will occur even for unauthenticated users and should only occur once.
if (this.props.user.profile.loading && !nextProps.user.profile.loading) {
const userProfile = nextProps.user.profile;
Function useAlerts
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useAlerts = dispatch => {
const alertList = useSelector(state => state.mr.alerts?.alertList);
const [activeAlert, setActiveAlert] = useState();
useEffect(
Function formatDateAndTime
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatDateAndTime = rawDate => {
let date = rawDate;
if (typeof rawDate === 'string') {
date = new Date(rawDate);
}
Function convertTreatmentFacilities
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const convertTreatmentFacilities = recordList => {
if (!recordList) return null;
return recordList.map(record => ({
facilityName: record.facilityName || NONE_ENTERED,
facilityType:
Function submitEmail
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function submitEmail(email) {
recordEvent({ event: 'vic-email-started' });
return dispatch => {
dispatch({ type: VIC_EMAIL_CAPTURING });
Function dropdownContent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const dropdownContent = () => {
return (
<>
<p className="vads-u-padding-bottom--1">
A VA provider added this medication record in your VA medical
Function allergiesReducer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const allergiesReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Allergies.GET_LIST: {
return {
...state,
Consider simplifying this complex logical expression. Open
Open
} else if (prefillEnabled && !verifyRequiredPrefill) {
const H = `h${this.props.headingLevel}`;
const {
buttonOnly,
retentionPeriod,
Function uiSchemaValidate
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
errors,
uiSchema,
schema,
formData,
path = '',
Consider simplifying this complex logical expression. Open
Open
if (
nextProps.reviewMode &&
!nextProps.editModeOnReviewPage &&
nextProps.reviewMode === this.props.reviewMode &&
deepEquals(this.state, nextState) &&
Consider simplifying this complex logical expression. Open
Open
} else if (
allowITF &&
!isCreating &&
!hasActiveITF &&
!createITFCalled &&
Consider simplifying this complex logical expression. Open
Open
} else if (
allowITF &&
!isCreating &&
!hasActiveITF &&
!createITFCalled &&
Consider simplifying this complex logical expression. Open
Open
} else if (prefillEnabled && !verifyRequiredPrefill) {
const H = `h${this.props.headingLevel}`;
const {
buttonOnly,
retentionPeriod,
Consider simplifying this complex logical expression. Open
Open
if (
nextProps.reviewMode &&
!nextProps.editModeOnReviewPage &&
nextProps.reviewMode === this.props.reviewMode &&
deepEquals(this.state, nextState) &&
Consider simplifying this complex logical expression. Open
Open
if (
nextProps.reviewMode &&
!nextProps.editModeOnReviewPage &&
nextProps.reviewMode === this.props.reviewMode &&
deepEquals(this.state, nextState) &&
Consider simplifying this complex logical expression. Open
Open
} else if (prefillEnabled && !verifyRequiredPrefill) {
const H = `h${this.props.headingLevel}`;
const {
buttonOnly,
retentionPeriod,
Consider simplifying this complex logical expression. Open
Open
if (
nextProps.reviewMode &&
!nextProps.editModeOnReviewPage &&
nextProps.reviewMode === this.props.reviewMode &&
deepEquals(this.state, nextState) &&
Consider simplifying this complex logical expression. Open
Open
} else if (prefillEnabled && !verifyRequiredPrefill) {
const H = `h${this.props.headingLevel}`;
const {
buttonOnly,
retentionPeriod,
Consider simplifying this complex logical expression. Open
Open
if (
[SENT_DATE_DESCENDING.value, DRAFT_DATE_DESCENDING.value].includes(
sortOrder,
) ||
(sortOrder === SENDER_ALPHA_ASCENDING.value &&