Showing 3,724 of 12,675 total issues
Function UpgradeFailed
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UpgradeFailed = () => {
const content = {
heading: 'We couldn’t upgrade your My HealtheVet account',
alertText: (
<>
Function Footer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Footer = () => {
return (
<footer data-testid="arp-footer" className="footer arp-footer">
<div className="footer-inner">
<div className="usa-grid usa-grid-full footer-banner vads-u-padding-top--2">
Function renderWhyMightIHaveThisDebt
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const renderWhyMightIHaveThisDebt = deductionCode => {
switch (deductionCode) {
case '30':
return (
<section>
Function YourVAHealthFacilityPage
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const YourVAHealthFacilityPage = props => {
const { data, setFormData, goBack, goForward } = props;
const [apiData, setApiData] = useState(facilities);
const [isSearching, setIsSearching] = useState(false);
const [pageURL, setPageURL] = useState('');
Function ConfirmationPage
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ConfirmationPage = () => {
const { submission, data } = useSelector(state => state.form);
const { response, timestamp } = submission;
const name = data.veteranFullName;
Function CategorySelect
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CategorySelect = props => {
const { id, onChange, value, loggedIn } = props;
const dispatch = useDispatch();
const [apiData, setApiData] = useState([]);
Function saveDraftHandler
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async (type, e) => {
const {
messageValid,
signatureValid,
checkboxValid,
Function getLetterPdf
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getLetterPdf(letterType, letterName, letterOptions, LH_MIGRATION__options) {
let settings;
if (letterType === LETTER_TYPES.benefitSummary) {
settings = {
// eslint-disable-next-line -- LH_MIGRATION
Function getAppointmentSlots
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAppointmentSlots(startDate, endDate, initialFetch = false) {
return async (dispatch, getState) => {
const state = getState();
const siteId = getSiteIdFromFacilityId(
selectCovid19VaccineFormData(state).vaFacility,
Function getAddressUISchema
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAddressUISchema(label = '') {
const fieldOrder = ['street', 'street2', 'city', 'state', 'postalCode'];
const addressChangeSelector = createSelector(
({ formData, path }) => get(path.concat('city'), formData),
Function onAllComplete
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onAllComplete: () => {
if (canUseMocks()) {
dispatch({ type: DONE_UPLOADING });
dispatch(
setNotification({
Function fetchMilitaryInformation
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchMilitaryInformation(recordAnalyticsEvent = recordEvent) {
return async dispatch => {
dispatch({ type: FETCH_MILITARY_INFORMATION });
const baseUrl = '/profile/service_history';
Function careSummariesAndNotesReducer
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const careSummariesAndNotesReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.CareSummariesAndNotes.GET: {
return {
...state,
Function RxBreadcrumbs
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RxBreadcrumbs = () => {
const location = useLocation();
const prescription = useSelector(
state => state.rx.prescriptions?.prescriptionDetails,
);
Function pdfData
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
allergiesPdfList => {
return {
subject: `Single Medication Record - ${prescription?.prescriptionName}`,
headerBanner: [
{
Function setupJSDom
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setupJSDom() {
// Prevent warnings from displaying
/* eslint-disable no-console */
if (process.env.LOG_LEVEL === 'debug') {
console.error = (error, reactError) => {
Function VaCheckboxGroupField
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function VaCheckboxGroupField(props) {
const checkboxes = getCheckboxData(props.childrenProps);
const onGroupChange = event => {
const checkboxKey = event.target.dataset.key;
Function render
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
uiSchema,
errorSchema,
idSchema,
Function setHiddenFields
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function setHiddenFields(schema, uiSchema, formData, path = []) {
if (!uiSchema) {
return schema;
}
Function formatOperatingHours
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatOperatingHours = operatingHours => {
if (!operatingHours) return operatingHours;
// Remove all whitespace and sanitize dashes.
const sanitizedOperatingHours = operatingHours
.replace(/ /g, '')