vlt / affordances
  • Quickstart
  • Concepts
  • Guides
  • Reference
  • Overview
    • Overview
    • Reference
  1. Reference
  2. /
  3. API reference
  4. /
  5. @affordances/lint

@affordances/lint

Two lint rules for Affordances apps, for ESLint and oxlint's JS plugins:

  • affordances/require-affordance warns when a control calls a server action (action, formAction, onClick, or onSubmit using an import from an actions module) outside an <Affordance>.
  • affordances/static-action-name errors when defineAction has no name, or a name that isn't a string literal, which codegen can't read.
Terminal
vlt install -D @affordances/lint
JavaScript
// eslint.config.js
import affordances from '@affordances/lint'

export default [affordances.configs.recommended]

Docs: https://github.com/vltpkg/affordances/blob/main/apps/docs/content/guides/lint.mdx


PreviousReferenceNextReference

Make your app agent-operable

Give every page a graph and every server action an agent path: HTTP, WebMCP, and MCP, with the same session and the same checks. One command sets it up.

Read the quickstart