weareinreach / InReach

async function should have await expression JS-0116
Bug risk
Minor
11 days ago2 years old
Found async function without any await expressions
237	)
238}
239
240export const getStaticPaths: GetStaticPaths = async () => {241	return {242		paths: [],243		fallback: true,244	}245	// }246}247
248export const getStaticProps: GetStaticProps<
249	{ slug: string; organizationId: string },
Found async function without any await expressions
172	)
173}
174
175export const getStaticPaths: GetStaticPaths = async () => {176	return {177		paths: [],178		fallback: true,179	}180}181export const getStaticProps: GetStaticProps<
182	Record<string, unknown>,
183	RoutedQuery<'/org/[slug]/[orgLocationId]'>
Found async function without any await expressions
146		</>
147	)
148}
149export const getStaticPaths: GetStaticPaths = async () => {150	return {151		paths: [],152		fallback: 'blocking',153	}154}155export const getStaticProps: GetStaticProps<
156	Record<string, unknown>,
157	RoutedQuery<'/search/intl/[country]'>
Found async function without any await expressions
 1import type OtaClient from '@crowdin/ota-client'
 2
 3export const createCommonFns = ({ common, database }: { common: OtaClient; database: OtaClient }) => ({
 4	fetchCrowdinFile: async (file: string, lang: string) => { 5		common.setCurrentLocale(lang) 6		return common.getFileTranslations(file) 7	}, 8	fetchCrowdinDbKey: async (ns: string, lang: string) => ({
 9		[ns]: await database.getStringByKey(ns, lang),
10	}),
Found async function without any await expressions
 5
 6import { type TGetParentNameSchema } from './query.getParentName.schema'
 7
 8const getParentName = async ({ input }: TRPCHandlerParams<TGetParentNameSchema>) => { 9	const { slug, orgLocationId } = input1011	switch (true) {12		case Boolean(slug): {13			return prisma.organization.findUniqueOrThrow({14				where: { slug },15				select: { name: true },16			})17		}18		case Boolean(orgLocationId): {19			return prisma.orgLocation.findUniqueOrThrow({20				where: { id: orgLocationId },21				select: { name: true },22			})23		}24		default: {25			throw new TRPCError({ code: 'BAD_REQUEST' })26		}27	}28}29export default getParentName