Skip to content

Commit 0738ef8

Browse files
comments
1 parent 9e0e0ff commit 0738ef8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/runtime_adapters.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
/* eslint-disable no-restricted-imports */
1+
/* eslint-disable no-restricted-imports, @typescript-eslint/no-require-imports */
2+
23
// We squash the restricted import errors here because we are using type-only imports, which
34
// 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.
46

57
import type * as os from 'os';
68

@@ -42,7 +44,6 @@ export interface Runtime {
4244
*/
4345
export function resolveRuntimeAdapters(options: MongoClientOptions): Runtime {
4446
return {
45-
// eslint-disable-next-line @typescript-eslint/no-require-imports
4647
os: options.runtimeAdapters?.os ?? require('os')
4748
};
4849
}

0 commit comments

Comments
 (0)