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:
deno.json
{
"lint": {
"rules": {
- "tags": ["fresh"],
+ "tags": ["recommended", "react", "jsx"],
+ "plugins": ["fresh/lint-plugin"]
}
}
}
The Deno runtime currently has the
freshlinting 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 atfresh/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
freshlint tag that only apply to Fresh. Any other rules that are also within therecommended,reactorjsxtags 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 Discorddeno.json{ "lint": { "rules": { - "tags": ["fresh"], + "tags": ["recommended", "react", "jsx"], + "plugins": ["fresh/lint-plugin"] } } }