This component is part of the Intergalactic Design System
The stylelint plugin help developers avoid mistakes in design token names.
npm install intergalactic
// .stylelintrc.json
{
"extends": ["stylelint-config-standard"],
"plugins": ["intergalactic/stylelint-plugin"],
"rules": {
"intergalactic/design-tokens": true
}
}
-
include
- adds custom design tokens to the list of allowed tokens. -
exclude
- removes design tokens from the list of allowed tokens. -
tokensSource
- path to the file with design tokens. Default isintergalactic/utils/lib/themes/default.json
. -
tokensPrefix
- design tokens (default is--intergalactic-
). Only css variables with this prefix are considered as design tokens.
With @semcore/ui
package:
// .stylelintrc.json
{
"extends": ["stylelint-config-standard"],
"plugins": ["intergalactic/stylelint-plugin"],
"rules": {
"intergalactic/design-tokens": [true, {
"tokensSource": "node_modules/@semcore/ui/utils/lib/themes/default.json",
}]
}
}
With @semcore/utils
package:
// .stylelintrc.json
{
"extends": ["stylelint-config-standard"],
"plugins": ["intergalactic/stylelint-plugin"],
"rules": {
"intergalactic/design-tokens": [true, {
"tokensSource": "node_modules/@semcore/utils/lib/themes/default.json",
}]
}
}
UI-kit team and others ❤️
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
This project is MIT licensed.