console.log()
with tslint.json
configuration:
{
"extends": "tslint-microsoft-contrib",
"rules": {
"no-console": {
"options": [
"time",
"timeEnd"
]
}
}
}
tslint-microsoft-contrib:
"no-console": [
true,
"debug",
"info",
"log",
"time",
"timeEnd",
"trace"
],
Does not fail for console.log.
Should fail.
The options for this rule are a blacklist, not a whitelist.
If you don't specify any banned methods, all are banned by default. If you specify options, only those methods are banned.
We should definitely add the ability to whitelist certain methods instead of blacklisting all other methods. But that's out of scope for this issue.
I would like to implement it as whitelist, but I don't see any good way to implement it without breaking changes.
Do you have any hint for me?
@CSchulz #924 already contains some thoughts on this topic. This discussion should continue over there.
Most helpful comment
@CSchulz #924 already contains some thoughts on this topic. This discussion should continue over there.