We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Intl
1 parent 014341b commit f2fa82cCopy full SHA for f2fa82c
packages/eslint-plugin/src/rules/unbound-method.ts
@@ -82,6 +82,11 @@ const SUPPORTED_GLOBALS = [
82
'Intl',
83
] as const;
84
const nativelyBoundMembers = SUPPORTED_GLOBALS.map(namespace => {
85
+ if (!(namespace in global)) {
86
+ // node.js might not have namespaces like Intl depending on compilation options
87
+ // https://nodejs.org/api/intl.html#intl_options_for_building_node_js
88
+ return [];
89
+ }
90
const object = global[namespace];
91
return Object.getOwnPropertyNames(object)
92
.filter(
0 commit comments