Biome plugin to warn developers to use app.logger instead of console.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 445
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
While working on Bolt apps I am normally reaching for the console to log any info/warn/errors. To keep things consistent I created this custom Biome plugin using Grit. I think this would be a great addition to Bolt's developer experience!
Requirements
Here's an example of the .grit plugin:
// Biome GritQL plugin to warn against console usage and suggest app.logger
or {
`console.log($args)` as $node where {
register_diagnostic(
span = $node,
message = "Use app.logger.info() instead of console.log()",
severity = "warn"
)
},
`console.error($args)` as $node where {
register_diagnostic(
span = $node,
message = "Use app.logger.error() instead of console.error()",
severity = "warn"
)
},
`console.warn($args)` as $node where {
register_diagnostic(
span = $node,
message = "Use app.logger.warn() instead of console.warn()",
severity = "warn"
)
},
`console.info($args)` as $node where {
register_diagnostic(
span = $node,
message = "Use app.logger.info() instead of console.info()",
severity = "warn"
)
},
`console.debug($args)` as $node where {
register_diagnostic(
span = $node,
message = "Use app.logger.debug() instead of console.debug()",
severity = "warn"
)
}
}
and here's an example of the warning:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named. Start by locating the repository's Biome and Grit plugin configuration, then compare the integration with the plugin example in the issue. Done means console.log, console.error, console.warn, console.info, and console.debug produce warnings recommending the corresponding app.logger method.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100