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

Allow complete no-console rule #2492

Closed
Jameskmonger opened this issue Apr 4, 2017 · 4 comments · Fixed by #2610 or singapore/lint-condo#282
Closed

Allow complete no-console rule #2492

Jameskmonger opened this issue Apr 4, 2017 · 4 comments · Fixed by #2610 or singapore/lint-condo#282

Comments

@Jameskmonger
Copy link

After reading the documentation for the no-console rule, I was surprised to see that I have to list all console methods manually.

It would be good to be able to specify the following to lint against all console methods:

"rules": {
  "no-console": [ true, "log" ]
}
nchen63 pushed a commit that referenced this issue Apr 29, 2017
[rule-change] `no-console` bans all console methods when no methods are specified
Fixes: #2602
Fixes: #2492
@Jameskmonger
Copy link
Author

Thanks @nchen63

@SgtPooki
Copy link

What is the syntax for banning only certain methods now?

@adidahiya
Copy link
Contributor

@SgtPooki same as before. #2610 was a backwards-compatible change.

@SgtPooki
Copy link

@adidahiya you're correct. I was editing my no-console in the jsRules section on accident and not seeing the rule working like I was expecting. Thanks for the quick response.

        "no-console": [
            true,
            "dir",
            "dirxml",
            "log"
        ],

works for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants