Rule Change: add more suggestions and detailed message for no-console
when there is allow
option #19229
Open
Description
opened on Dec 8, 2024
What rule do you want to change?
no-console
What change do you want to make?
Implement suggestions
How do you think the change should be implemented?
A new default behavior
Example code
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
console.log('Hello, World!');
What does the rule currently do for this code?
There is a suggestion to just remove console.log()
completely (#17493).
The message also says that console.log()
is simply not allowed.
What will the rule do after it's changed?
Additionally, there are suggestions to replacing console.log()
with the options specified in allow
.
And the message indicates which options are allowed.
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
No response
Metadata
Assignees
Type
Projects
Status
Feedback Needed
Activity