Skip to content

False positive with no-obj-calls #12437

@julien-f

Description

@julien-f

Tell us about your environment

Environment Info:

Node version: v8.16.1
npm version: v6.11.3
Local ESLint version: v6.5.1 (Currently used)
Global ESLint version: Not found

What parser (default, Babel-ESLint, etc.) are you using?

default

Please show your full configuration:

Configuration
module.exports = {
  env: { es6: true },
  rules: { "no-obj-calls": "error" }
};

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined;
construct();
eslint index.js

What did you expect to happen?

Should produce no error because I'm not calling Reflect.

What actually happened? Please include the actual, raw output from ESLint.

/index.js
  2:1  error  'construct' is not a function  no-obj-calls

✖ 1 problem (1 error, 0 warnings)

Are you willing to submit a pull request to fix this bug?

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyruleRelates to ESLint's core rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions