denoland / deno_lint

Blazing fast linter for JavaScript and TypeScript written in Rust
https://lint.deno.land/
MIT License
1.51k stars 163 forks source link

relax the `no-console` rule within the `Deno.test` calls or the whole test file #1243

Closed king8fisher closed 3 months ago

king8fisher commented 5 months ago

If it is totally harmless to reference console within the boundaries of tests, that would be awesome.

I guess, tests can also call helper functions, so may be this will have to affect whole test files. Only if there is no way to import any helper functions or classes located in the test files by regular files.

dsherret commented 4 months ago

I personally like the lint rule for Deno.test calls. Sometimes if I accidentally leave a console.log there then the test output gets noisy so it's nice to have the lint rule help me clean those up. I just add a // deno-lint-ignore no-console if I really want to do that.

king8fisher commented 3 months ago

Feels like an unnecessary addition after all!