weareinreach / InReach

Prefer var declarations be placed at the top of their scope JS-0102
Anti-pattern
Minor
3 months agoa year old
All 'var' declarations must be at the top of the function scope
14declare global {
15	// allow global `var` declarations
16	// eslint-disable-next-line no-var
17	var prisma: PrismaClient<typeof clientOptions> | undefined18}
19
20const clientOptions = {
All 'var' declarations must be at the top of the function scope
26	global.crowdinOta = crowdinOta
27}
28declare global {
29	var crowdinOta: OtaClient | undefined30}
31const { crowdinDistTimestamp, fetchCrowdinDbKey, fetchCrowdinFile } = createCommonFns(crowdinOta)
32
All 'var' declarations must be at the top of the function scope
22	global.crowdinEdgeOta = crowdinEdgeOta
23}
24declare global {
25	var crowdinEdgeOta: OtaClient | undefined26}
27
28const { crowdinDistTimestamp, fetchCrowdinDbKey, fetchCrowdinFile } = createCommonFns(crowdinEdgeOta)
All 'var' declarations must be at the top of the function scope
17	global.crowdinApi = crowdinApi
18}
19declare global {
20	var crowdinApi: Crowdin | undefined21}
22export const { getStringIdByKey } = createCommonFns(crowdinApi)
23export { branches, sourceFiles, projectId } from '../constants'
All 'var' declarations must be at the top of the function scope
17	global.crowdinEdge = crowdinEdge
18}
19declare global {
20	var crowdinEdge: Crowdin | undefined21}
22export const { getStringIdByKey } = createCommonFns(crowdinEdge)
23export { branches, sourceFiles, projectId } from '../constants'