Enable ESLint rule no-console on production code
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox125 fixed)
Tracking | Status | |
---|---|---|
firefox125 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
As discussed in bug 1881519, we want to enable ESLint rule no-console across our production code, to help ensure that we're not unnecessarily/unintentionally spamming the console, and that we're thinking about the correct log levels for messages.
We are allowing console.error
, console.warn
and console.createInstance
. Everything else will be disallowed eventually. For now, we'll turn the rule off for existing failures and enable those over time.
Assignee | ||
Comment 1•8 months ago
|
||
This gives us the option to specify rule variations for all tests without having to copy across the configurations.
More importantly, we can also apply this to anything under /test/
or /tests/
and so we can catch utils and other files that the specific test configurations don't already catch.
Assignee | ||
Comment 2•8 months ago
|
||
Allow for console.error, console.warn and console.createInstance, but fail for everything else.
Comment 4•8 months ago
|
||
bugherder |
Description
•