Skip to content

suggestion: Fresh lint plugin #2950

@iuioiua

Description

@iuioiua

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"]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions