denoland / deno_lint

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

feat: add fresh-server-event-handlers rule #1171

Closed marvinhagemeister closed 1 year ago

marvinhagemeister commented 1 year ago

A common friction point of new users trying out fresh is that they try to install event handlers in server-only components inside routes/. These components are only ever rendered on the server, so attaching event handlers does nothing. Users would get confused by that.

This PR adds a linting rule for when a user tries to add an event handler in a server component.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.