Disallow console expressions
- ⭐️ This rule is included in
plugin:sppt/recommended
preset.- ✒️ The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
count(1);
With options
:
{ "allowMethods": [] }
console.count(3);
With options
:
{ "allowMethods": ["count"] }
error(1);
info(1);
log(1);
profile(1);
time(1);
timeEnd(1);
timeStart(1);
console.count(1);
With options
:
{ "allowMethods": [] }
Errors: No console.count expressions are allowed
console.error(1);
With options
:
{ "allowMethods": [] }
Errors: No console.error expressions are allowed
console.info(1);
With options
:
{ "allowMethods": [] }
Errors: No console.info expressions are allowed
console.profile(1);
With options
:
{ "allowMethods": [] }
Errors: No console.profile expressions are allowed
console.time(1);
With options
:
{ "allowMethods": [] }
Errors: No console.time expressions are allowed
console.timeEnd(1);
With options
:
{ "allowMethods": [] }
Errors: No console.timeEnd expressions are allowed
console.timeStart(1);
With options
:
{ "allowMethods": [] }
Errors: No console.timeStart expressions are allowed
(TODO: how does this rule check code?)
(TODO: what do options exist?)