Showing 3,724 of 12,675 total issues
Function content
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
() => {
if (isLoading || awaitingResults) {
return <LoadingIndicator />;
}
Function selectRequestedAppointmentData
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function selectRequestedAppointmentData(state, appointment) {
const featureVAOSServiceCCAppointments = selectFeatureVAOSServiceCCAppointments(
state,
);
const { facilityData } = state?.appointments || [];
Function routeToPageInFlow
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function routeToPageInFlow(callback, history, current, action, data) {
return async (dispatch, getState) => {
const flow = callback(getState());
dispatch({
Function LandingPageContainer
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LandingPageContainer = () => {
const { featureToggles, user } = useSelector(state => state);
const [unreadMessageCount, setUnreadMessageCount] = useState();
const profile = useSelector(selectProfile);
const ssoe = useSelector(isAuthenticatedWithSSOe);
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { logo, title, grants } = this.props.attributes;
return (
<div
Function useHighlightedClaimOrAppeal
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useHighlightedClaimOrAppeal = (appealsData, claimsData) => {
// the appeals data sorted with the most recently updated appeal first
const sortedAppeals = React.useMemo(
() => {
// Array sorting is done in place. Sorting `appealsData` directly was
Function fetchNotifications
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchNotifications = () => async dispatch => {
const getNotifications = () => {
const options = {
method: 'GET',
credentials: 'include',
Function content
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const content = () => {
if (labAndTestDetails) {
return (
<>
<PrintHeader />
File PrescriptionPrintOnly.jsx
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import {
pdfStatusDefinitions,
pdfDefaultStatusDefinition,
File index.js
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import mapValues from 'lodash/mapValues';
import { endOfDay, isAfter, isValid, isWithinInterval } from 'date-fns';
import vaMedicalFacilities from 'vets-json-schema/dist/vaMedicalFacilities.json';
import set from '~/platform/utilities/data/set';
File DocumentRequestPage.jsx
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import Scroll from 'react-scroll';
import { merge } from 'lodash';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
File helpers.jsx
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { Link } from 'react-router';
import moment from 'moment';
import {
Consider simplifying this complex logical expression. Open
Open
if (formContext.reviewMode) {
const {
address1,
address2,
address3,
responses
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
const responses = {
'GET /v0/feature_toggles': (_req, res) => {
const secondsOfDelay = 0;
delaySingleResponse(
() =>
Function apiRequest
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function apiRequest(resource, optionalSettings, success, error) {
const apiVersion = (optionalSettings && optionalSettings.apiVersion) || 'v0';
const baseUrl = `${environment.API_URL}/${apiVersion}`;
const url = resource[0] === '/' ? [baseUrl, resource].join('') : resource;
const csrfTokenStored = localStorage.getItem('csrfToken');
Function findErrors
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const findErrors = (name, err) => {
if (err && typeof err === 'object') {
// process the last type of error message which provides an `__errors`
// message array. If there are multiple errors, we'll join them into
// one message.
Function renderLetterHistory
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const renderLetterHistory = diaryCode => {
switch (diaryCode) {
case '100':
case '101':
case '102':
Function createTransaction
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createTransaction(
route,
method,
fieldName,
payload,
Function SaveResultsModal
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SaveResultsModal = () => {
const [isOpen, setIsOpen] = useState(false);
const [showAlert, setShowAlert] = useState(false);
const currentUrl = window.location.href;
const toggleModal = open => {
Function incomeLimits
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const incomeLimits = (state = initialState, action) => {
switch (action.type) {
case IL_UPDATE_DEPENDENTS:
return {
...state,