weareinreach / InReach

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
20 days agoa year old
Expected to return a value at the end of async method 'response'
228	}),
229	orgBadges: getTRPCMock({
230		path: ['fieldOpt', 'orgBadges'],
231		response: async (input) => {232			switch (input.badgeType) {
233				case 'organization-leadership': {
234					const { default: data } = await import('./json/fieldOpt.orgBadges.organization-leadership.json')
Expected to return a value at the end of arrow function
124				<Button
125					className={classes.skipNext}
126					variant={'primary-icon'}
127					onClick={() => {128						if (!form.isValid()) return startShake()
129						setStep(stepNumber)
130					}}
Expected to return a value at the end of arrow function
 82		validateInputOnBlur: true,
 83	})
 84
 85	const submitHandler = () => { 86		if (!form.isValid()) return startShake()
 87		UserSurveyAction.mutate(form.values)
 88	}
Arrow function expected no return value
347					})
348					return
349				}
350				return {351					label: t(item.attribute.tsKey, { ns: item.attribute.tsNs }),352					value: item.attribute.id,353				}354			}) ?? []
355		),
356		...otherOpt,
Arrow function expected no return value
287					return
288				}
289
290				return {291					label: t(item.attribute.tsKey, { ns: item.attribute.tsNs }),292					value: item.attribute.id,293				}294			}) ?? []
295		),
296		...otherOpt,