Skip to content

Create linter rule or plugin to validate route.[method].config.ts #2

@nico-hyperjump

Description

@nico-hyperjump

We need a linter to make sure the exported functions exist and correct:

  • make sure requestValidator is exported and it's zod object with correct properties
  • make sure responseValidator is exported and it's zod object
  • make user handler function is exported with correct signature

requestValidator

It should have the following optional properties:

  • body
  • params
  • searchParams
  • headers
  • user

handler

  • The handler function must be typed with HandlerFunc<typeof requestValidator, typeof responseValidator>

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions