eslint/no-console Restriction β
What it does β
Disallows using the global console object.
Why is this bad? β
In JavaScript that is designed to be executed in the browser, itβs considered a best practice to avoid using methods on console. Such messages are considered to be for debugging purposes and therefore not suitable to ship to the client.
Example β
javascript
console.log("here");
How to use β
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny no-console
json
{
"rules": {
"no-console": "error"
}
}