Showing 12,848 of 12,848 total issues
Function recipientsReducer
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const recipientsReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.AllRecipients.GET_LIST: {
const {
associatedTriageGroups,
Function checkCommunityCareEligibility
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function checkCommunityCareEligibility() {
return async (dispatch, getState) => {
const state = getState();
const communityCareEnabled = selectFeatureCommunityCare(state);
Function NeedHelp
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function NeedHelp() {
return (
<div className="vads-u-margin-top--9 vads-u-margin-bottom--3">
<h2 className="vads-u-font-size--h3 vads-u-margin-bottom--0">
Need help?
Function sections
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const sections = Object.keys(perTerm).map(section => {
const {
visible,
title,
learnMoreAriaLabel,
Function fetchSearchByLocationCoords
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchSearchByLocationCoords(
location,
coordinates,
distance,
filters,
Function renderFacilityTable
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderFacilityTable = mainMap => {
const data = Array.of(createMainRow(mainMap.institution)).concat(
createBranchesAndExtensionsRows(mainMap, viewableRowCount),
);
Function renderAddressOption
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderAddressOption(address, id = 'userEntered') {
if (address !== undefined) {
const { street, cityStateZip, country } =
id !== 'userEntered'
? formatAddress(address)
Function updateSchema
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: (formData, addressSchema, addressUiSchema, index, path) => {
let currentSchema = addressSchema;
const modifiedData = { ...formData };
Function calculateTuition
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function calculateTuition(constant, eligibility, institution, derived) {
if (derived.oldGiBill) {
return { qualifier: 'per year', value: 0, ratedQualifier: '/ year' };
}
if (institution.type === 'ojt') {
Function fetchTotalDisabilityRating
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchTotalDisabilityRating(recordAnalyticsEvent = recordEvent) {
return async dispatch => {
dispatch({
type: FETCH_TOTAL_RATING_STARTED,
});
Function renderWebResult
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderWebResult(result, snippetKey = 'snippet', isBestBet = false, index) {
const strippedTitle = removeDoubleBars(
formatResponseString(result.title, true),
);
return (
Function downloadPdf
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const downloadPdf = async () => {
const formattedText = convertHtmlForDownload(
htmlContent,
DOWNLOAD_FORMAT.PDF,
);
Function searchResults
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const searchResults = () => {
if (loading) {
return <va-loading-indicator message="Loading..." set-focus />;
}
if (representativeResults?.length) {
Function NextStepsPage
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function NextStepsPage() {
const { data: formData } = useSelector(state => state.form);
return (
<div className="row">
Consider simplifying this complex logical expression. Open
Open
if (
(keys.email && (contactInfo.email?.emailAddress || '') !== email) ||
(keys.homePhone &&
contactInfo.homePhone?.updatedAt !== homePhone?.updatedAt) ||
(keys.mobilePhone &&
Consider simplifying this complex logical expression. Open
Open
if (
(keys.email && (contactInfo.email?.emailAddress || '') !== email) ||
(keys.homePhone &&
contactInfo.homePhone?.updatedAt !== homePhone?.updatedAt) ||
(keys.mobilePhone &&
Consider simplifying this complex logical expression. Open
Open
if (id) {
return (
<>
<va-card show-shadow>
<div className="auth-card">
Consider simplifying this complex logical expression. Open
Open
if (inquiryData?.attributes?.status) {
const { status } = inquiryData.attributes;
return (
<>
<h3 className="vads-u-font-weight--normal vads-u-font-size--base vads-u-font-family--sans vads-u-border-bottom--2px vads-u-border-color--gray-light vads-u-padding-bottom--2">
Consider simplifying this complex logical expression. Open
Open
if (err?.errors?.[0]?.code === '401' || err?.issue?.[0]?.code === '401') {
errorTitle =
err?.errors?.[0]?.title ||
err?.issue?.[0]?.diagnostics ||
'Not authorized';
Consider simplifying this complex logical expression. Open
Open
if (showTuitionAndFilters) {
return (
<>
{!smallScreen && (
<>