weareinreach / InReach

Detected usage of the any type JS-0323
Anti-pattern
Critical
12 occurrences in this check
Unexpected any. Specify a different type
10import { QuickPromotionModalBody } from './QuickPromotion'
11import { ReviewModalBody } from './Review'
12
13const contextModalDefinitions: Record<string, FC<ContextModalProps<any>>> = {14	login: LoginModalBody,
15	quickPromotion: QuickPromotionModalBody,
16	delete: DeleteModalBody,
Unexpected any. Specify a different type
 25
 26type RichTranslateProps = {
 27	i18nKey: string
 28	values?: Record<string, any> 29	stateSetter?: Dispatch<SetStateAction<string | null>>
 30}
 31export const RichTranslate = ({ stateSetter, ...props }: RichTranslateProps) => {
Unexpected any. Specify a different type
 49	role: 'services' | 'community'
 50	t: TFunction
 51}
 52type RandomArr = <T extends Array<any>>(arr: T) => T[number] 53
 54const randomArrMember: RandomArr = (arr) => arr[Math.floor(Math.random() * arr.length)]
 55
Unexpected any. Specify a different type
108			}
109		})
110		return result
111	}) satisfies z.ZodType<any, any, SearchReturn>112
113type ServCat = {
114	id: string
Unexpected any. Specify a different type
108			}
109		})
110		return result
111	}) satisfies z.ZodType<any, any, SearchReturn>112
113type ServCat = {
114	id: string
Unexpected any. Specify a different type
 43				})),
 44		  } as const)
 45/** Individual create record */
 46export const createOne = <T extends Record<string, any>>(data: T | undefined) => 47	!data
 48		? undefined
 49		: ({
Unexpected any. Specify a different type
 51		  } as const)
 52/** Individual create record with audit log */
 53
 54export const createOneWithAudit = <T extends Record<string, any>>(data: T | undefined, actorId: string) => 55	!data
 56		? undefined
 57		: ({
Unexpected any. Specify a different type
 61				},
 62		  } as const)
 63
 64export const connectOne = <T extends Record<string, any>>(data: T | undefined) => 65	!data
 66		? undefined
 67		: ({
Unexpected any. Specify a different type
 68				connect: data,
 69		  } as const)
 70
 71export const connectOneRequired = <T extends Record<string, any>>(data: T) => 72	({
 73		connect: data,
 74	} as const)
Unexpected any. Specify a different type
 22	} as const)
 23/** Array to createMany object or `undefined` if no data provided */
 24
 25export const createManyOrUndefined = <T extends Array<any>>(data: T | undefined) => 26	!data
 27		? undefined
 28		: ({
Unexpected any. Specify a different type
 13 */
 14/** Array to a createMany object */
 15
 16export const createMany = <T extends Array<any>>(data: T) => 17	({
 18		createMany: {
 19			data: flush(data),
Unexpected any. Specify a different type
 33		  } as const)
 34/** Array to individual nested create records with individual Audit Logs */
 35
 36export const createManyWithAudit = <T extends Array<any>>(data: T | undefined, actorId: string) => 37	!data
 38		? undefined
 39		: ({