Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

no-console doesn't complain about console functions when calling them indirectly #3207

Closed
Goodwine opened this issue Sep 8, 2017 · 0 comments

Comments

@Goodwine
Copy link

Goodwine commented Sep 8, 2017

Bug Report

  • TSLint version: 5.6.0
  • TypeScript version: 2.4.2
  • Running TSLint via: Atom

TypeScript code being linted

let x = [1, 2, 3];
console.log(x);
x.forEach(console.log);

with tslint.json configuration:

{
  "rules": {
    "no-console": true
  }
}

Actual behavior

The linter complains console.log(x);

Expected behavior

The linter complains console.log(x); and x.forEach(console.log);
The linter should not only listen for console.* functions, it should also complain about any property.

shalomdotnet pushed a commit to shalomdotnet/tslint that referenced this issue Jul 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant