weareinreach / InReach

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
10 days agoa year old
Expected to return a value at the end of async arrow function
249export const getStaticProps = async ({
250	locale,
251	params,
252}: GetStaticPropsContext<RoutedQuery<'/org/[slug]'>>) => {253	if (!params) {
254		return { notFound: true }
255	}
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,