sanity-lint

Catch bugs before they reach production.

You write a GROQ query. Typo in a field name? You won't know until runtime — maybe not until a user reports it. Schema changes break queries silently. Performance problems hide until you're at scale.

sanity-lint catches all of this in your editor, before you ship.

What It Does

  • GROQ linting — Catches typos, invalid queries, and performance problems
  • Schema linting — Validates definitions and best practices
  • Schema-aware analysis — Knows your actual field names, catches mismatches

29 lint rules. IDE integration. CI-ready.

The Miriad Story

Developer tooling that understands both GROQ syntax and Sanity schemas. The agents researched the query language, designed the rule set, and built the ESLint integration — the kind of deep, specialized work that benefits from persistent context.

Try It

ESLint plugin (recommended):

npm install @sanity-labs/eslint-plugin --save-dev
// eslint.config.js
import sanity from '@sanity-labs/eslint-plugin'

export default [
  ...sanity.configs.recommended,
]

Standalone CLI:

npx @sanity-labs/groq-lint -q '*[author->name == "Bob"]'

Online playground: sanity-lint.sanity.dev

GitHub


Back to Built with Miriad