-
Notifications
You must be signed in to change notification settings - Fork 724
Open
Description
The Deno runtime currently has the fresh
linting tag that includes a set of a linting rules. I suggest moving these rules out of the runtime (Rust) and into a custom lint plugin (TypeScript) for Fresh located at fresh/lint-plugin
. Benefits include a lower barrier to entry, as Deno lint plugins are written in TypeScript rather than Rust, the lint plugin being closer to where its used and a small trimming of the runtime.
Rules
The Fresh lint plugin can be kept lean by only implementing those rules within the fresh
lint tag that only apply to Fresh. Any other rules that are also within the recommended
, react
or jsx
tags don't need to be implemented. Rules to be implemented are:
-
fresh-handler-export
(source) -
fresh-server-event-handlers
(source) -
prefer-signals
- prefer Signals overuseState()
-
no-non-island-imports
(or something like that) - see discussion in Discord
deno.json
{
"lint": {
"rules": {
- "tags": ["fresh"],
+ "tags": ["recommended", "react", "jsx"],
+ "plugins": ["fresh/lint-plugin"]
}
}
}
SisyphusZheng, predaytor, csvn and fry69
Metadata
Metadata
Assignees
Labels
No labels