Skip to content

Commit

Permalink
Fix: no-obj-calls false positive (fixes #12437) (#12467)
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea authored and kaicataldo committed Oct 24, 2019
1 parent b3dbd96 commit 49faefb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -52,7 +52,7 @@
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"eslint-scope": "^5.0.0",
"eslint-utils": "^1.4.2",
"eslint-utils": "^1.4.3",
"eslint-visitor-keys": "^1.1.0",
"espree": "^6.1.2",
"esquery": "^1.0.1",
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/rules/no-obj-calls.js
Expand Up @@ -61,6 +61,10 @@ ruleTester.run("no-obj-calls", rule, {
{
code: "function foo() { var Atomics = bar(); var baz = Atomics(5); }",
globals: { Atomics: false }
},
{
code: "var construct = typeof Reflect !== \"undefined\" ? Reflect.construct : undefined; construct();",
globals: { Reflect: false }
}
],
invalid: [
Expand Down

0 comments on commit 49faefb

Please sign in to comment.