@dino-labs/stylelint-config
v0.2.0
Published
Shared Stylelint config for Dino Design: semantic tokens only, no raw values, no margins.
Maintainers
Readme
@dino-labs/stylelint-config
The shared Stylelint config for Dino Design, an open-source agentic design system. It keeps stylesheets on-system: semantic tokens instead of raw values, and padding and gap instead of margins.
Early release. Versions
0.xmay tighten rules between minor versions. The release notes list each change.
Install
npm install --save-dev @dino-labs/stylelint-config stylelint// stylelint.config.js
export { default } from '@dino-labs/stylelint-config';What it checks
- Tokens, not raw values. Colour, fill, stroke, padding, gap, radius, font family, size and weight, letter-spacing, line-height and durations take a custom property, including inside shorthands such as
borderandtransition. Plain keywords such asinherit,transparent,currentColor,noneand0are fine. - Custom properties that exist. Every
var()names a Dino Design token, one of your site tokens, or a property declared in the same stylesheet. Avar()with a fallback, such asvar(--card-gap, var(--dino-space-m)), is a knob and passes. - Semantic tokens only. Primitive tokens such as
--dino-base-color-gray-600are rejected, and so is a raw colour anywhere, local custom properties and shadows included. A deprecated token is rejected with its replacement named. - No margins except
0. - Disable comments explain themselves. Each needs a reason after
--, must disable something, and must name a real rule.
.hero {
/* stylelint-disable-next-line declaration-property-value-allowed-list -- centres the page column */
margin-inline: auto;
}Site tokens
An app with tokens of its own, such as a brand colour Dino Design doesn't have, names their files:
// stylelint.config.js
import { brand } from '@dino-labs/stylelint-config';
export default brand({ siteTokens: ['src/styles/site-tokens.css'] });Their custom properties count as known everywhere. Inside those files, and only there, a token may alias a Dino Design primitive or hold a raw value:
/* src/styles/site-tokens.css */
:root {
--site-color-brand: var(--dino-base-color-azure-600);
--site-color-coffee: #6f4e37;
}Paths resolve from the working directory; pass root to resolve them from elsewhere.
License
MIT © 2026 Ibrahim Moazzam. See LICENSE.
