We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e0e0ff commit 0738ef8Copy full SHA for 0738ef8
1 file changed
src/runtime_adapters.ts
@@ -1,6 +1,8 @@
1
-/* eslint-disable no-restricted-imports */
+/* eslint-disable no-restricted-imports, @typescript-eslint/no-require-imports */
2
+
3
// We squash the restricted import errors here because we are using type-only imports, which
4
// do not impact the driver's actual runtime dependencies.
5
+// We also allow restricted imports in this file, because we expect this file to be the only place actually importing restricted Node APIs.
6
7
import type * as os from 'os';
8
@@ -42,7 +44,6 @@ export interface Runtime {
42
44
*/
43
45
export function resolveRuntimeAdapters(options: MongoClientOptions): Runtime {
46
return {
- // eslint-disable-next-line @typescript-eslint/no-require-imports
47
os: options.runtimeAdapters?.os ?? require('os')
48
};
49
}
0 commit comments