I have just triggered landing for the ESLint rule no-console on our production code.
As the name suggests, this disallows the use of `console.*` in JavaScript code and will reject uses. However, for our production code, we will allow:
We are enabling this so that we are more intentional in our
logging, and in reducing unnecessary console logging. This should
also help to reduce accidental cases of committing redundant
console.log statements.
The error and warn functions can still be used for appropriate exception situations.
For general debug logging that should be landed in the tree, please use a console instance created by console.createInstance, with an appropriate default level of logging.
We have currently disabled the rule on files that are using the disallowed functions. We will address them over time.
For test code we have not made a decision yet - there are some inconsistencies in test logging between info() and console.* that we'd like to look.
Mark.