Skip to content

Add lint plugin for Juniper #48

@KyleJune

Description

@KyleJune

I think it would be nice to have lint rules that can check that route files are valid. Here are some issues I'd like it to be able to catch

  • Client route importing from server route file
  • LoaderData generics not matching. loader return should mate RouteLoaderArgs LoaderData if specified. Do the same for actions.
  • The default exported route component having LoaderData or ActionData that doesn't match the loader and actions types. Same for ErrorBoundary and HydrateFallback.

Not sure if all of these are possible but detection of those issues would be helpful. Deno has some built in lint rules for their fresh framework that could be found here.

Here is a link to Deno's documentation on lint plugins. At the time of making this issue, it shows as being experimental/unstable.
https://docs.deno.com/runtime/reference/lint_plugins/

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions