Skip to content

Commit 49faefb

Browse files
mysticateakaicataldo
authored andcommitted
Fix: no-obj-calls false positive (fixes #12437) (#12467)
1 parent b3dbd96 commit 49faefb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"debug": "^4.0.1",
5353
"doctrine": "^3.0.0",
5454
"eslint-scope": "^5.0.0",
55-
"eslint-utils": "^1.4.2",
55+
"eslint-utils": "^1.4.3",
5656
"eslint-visitor-keys": "^1.1.0",
5757
"espree": "^6.1.2",
5858
"esquery": "^1.0.1",

tests/lib/rules/no-obj-calls.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ ruleTester.run("no-obj-calls", rule, {
6161
{
6262
code: "function foo() { var Atomics = bar(); var baz = Atomics(5); }",
6363
globals: { Atomics: false }
64+
},
65+
{
66+
code: "var construct = typeof Reflect !== \"undefined\" ? Reflect.construct : undefined; construct();",
67+
globals: { Reflect: false }
6468
}
6569
],
6670
invalid: [

0 commit comments

Comments
 (0)