12import { prisma } from '~db/client'
13import { type JobDef } from '~db/prisma/jobPreRun'
14
15import * as jobList from './data-migrations' 16
17/**
18 * Job Runner
6 publicProcedure,
7} from '~api/lib/trpc'
8
9import * as schema from './schemas'10
11const NAMESPACE = 'user'
12
6 publicProcedure,
7} from '~api/lib/trpc'
8
9import * as schema from './schemas' 10
11const NAMESPACE = 'service'
12
6 publicProcedure,
7} from '~api/lib/trpc'
8
9import * as schema from './schemas'10
11const NAMESPACE = 'review'
12
1import { defineRouter, importHandler, permissionedProcedure, publicProcedure } from '~api/lib/trpc'
2
3import * as schema from './schemas' 4
5const NAMESPACE = 'page'
6
Wildcard imports are easier to write, but make it harder to pick out the specific functions or objects from a dependency that are used in a file.
import * from 'module';
// there is no clear way to tell if
// `someFunction` has been imported
// from 'module'.
someFunction();
Therefore, it is recommended to explicit imports wherever possible.
NOTE: Some libraries do not expose themselves as ESModules. In cases like these, it is recommended to use a skipcq comment to suppress this issue.
import * as axios from 'axios'
import * as Sentry from '@sentry/node'
try {
const result = await axios.get();
// ...
} catch (err) {
Sentry.captureException(err);
}
import axios from 'axios'
// skipcq: JS-C1003 - sentry does not expose itself as an ES Module.
import * as Sentry from '@sentry/node'
try {
const result = await axios.get();
// ...
} catch (err) {
Sentry.captureException(err);
}