Skip to content

Latest commit

 

History

891 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@lapidist/design-lint

npm version build license

@lapidist/design-lint is a Design System Runtime (DSR) for JavaScript, TypeScript, and style sheets. It enforces design token usage, component and import policies, and design system conventions across your entire codebase — backed by a long-lived kernel daemon that holds the authoritative token graph in memory and serves every lint invocation via a Unix socket.

The runtime is built on the Design Token Interchange Format (DTIF) and exposes an MCP server for AI assistant integration, an LSP server for editor diagnostics, a snapshot format for portable offline use, and a DSCP document generator for AI context (DESIGN_SYSTEM.md).

Quick start

@lapidist/design-lint requires Node.js ≥22. The first invocation starts the DSR kernel automatically; subsequent invocations connect to the running kernel.

# run without installing
npx @lapidist/design-lint@latest src

# or add to your project
pnpm add --save-dev @lapidist/design-lint
npx design-lint init
npx design-lint src

See the Usage guide for the full command reference.

Why design-lint?

General purpose linters understand code style, not design systems. @lapidist/design-lint bridges that gap by enforcing token usage and component conventions across your codebase.

Token awareness

@lapidist/design-lint flags raw values against your configured token constraints to keep colour, spacing, and typography consistent. Some rules (such as design-token/spacing) support a strictReference option to require CSS variable references rather than matching raw token values. Learn more in the rule reference.

Auto-fixes

Run with --fix to apply available rule fixes and tidy up your code. Fix support is rule-specific; not every diagnostic is auto-fixable. See the usage guide for fix options.

Broad language support

Lint JavaScript, TypeScript, CSS, SCSS and Less, including inline styles (string attributes and JSX object literals with literal values) and configured tagged template sources. Dynamic inline style expressions remain unsupported. Indented .sass files currently report parse-error diagnostics.

Extensible

Extend behaviour with custom rules, formatters, and token path name transforms for your design system.

Advantage @lapidist/design-lint Generic linters
Design token validation
Token deprecation warnings
Multi-language style + code linting ⚠️ (varies)

For more background, read the introductory blog post.

Documentation

The complete documentation is available under the docs/ directory and on design-lint.lapidist.net. See docs/index.md for the documentation landing page.

Document Purpose
Usage CLI flags, watch mode, kernel commands, and caching.
Configuration Rule levels, plugin activation, and ignore patterns.
Config presets recommended, strict, and ai-agent shareable configs.
Rules Rule reference grouped by category.
Formatters Built-in and custom output formats.
Migration Upgrading from v7 to v8 (kernel architecture, DTIF tokens).
Plugins Writing and loading custom rule plugins.
Policy Centrally-owned guardrails that consumer configs cannot weaken.
CI GitHub Actions examples and kernel setup for CI environments.
API Programmatic usage with TypeScript types.
Architecture How the DSR kernel, token graph, and lint surface work together.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md and follow the Code of Conduct.

License

MIT

About

DTIF-powered, design-system-aware linter for JavaScript, TypeScript, and CSS: validating tokens and components to keep every interface consistent.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages