Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Disable the use of console.error (#427)
Browse files Browse the repository at this point in the history
I have noticed that this project already locally disables this rule (as if it were present in the config) at https://github.com/astorije/tslint-microsoft-contrib/blame/master/src/functionNameRule.ts#L101-L103 and https://github.com/astorije/tslint-microsoft-contrib/blame/master/src/reactUnusedPropsAndStateRule.ts#L71-L73.

We realized `console.error` was not forbidden in the recommended configuration and think it would be a sane thing to enforce by default. I reckon this will be a breaking change however.
  • Loading branch information
astorije authored and Josh Goldberg committed Jul 4, 2018
1 parent 8e06f7c commit 2cc469b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions recommended_ruleset.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
"no-backbone-get-set-outside-model": true,
"no-bitwise": true,
"no-conditional-assignment": true,
"no-console": [true, "debug", "info", "log", "time", "timeEnd", "trace"],
"no-console": [true, "debug", "error", "info", "log", "time", "timeEnd", "trace"],
"no-constant-condition": true,
"no-control-regex": true,
"no-debugger": true,
Expand Down Expand Up @@ -263,4 +263,3 @@ module.exports = {
"valid-typeof": false,
}
};

3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"no-console": [
true,
"debug",
"error",
"info",
"log",
"time",
Expand Down Expand Up @@ -308,4 +309,4 @@
"type-literal-delimiter": false,
"use-default-type-parameter": false
}
}
}

0 comments on commit 2cc469b

Please sign in to comment.