@semcore/stylelint-plugin
v0.0.1
Published
Semrush Intergalactic stylelint plugin
Downloads
4
Readme
@semcore/stylelint-plugin
This component is part of the Intergalactic Design System
📖 Component documentation
🏠 Design system
The stylelint plugin help developers avoid mistakes in design token names.
Install
npm install intergalactic
Usage
// .stylelintrc.json
{
"extends": ["stylelint-config-standard"],
"plugins": ["intergalactic/stylelint-plugin"],
"rules": {
"intergalactic/design-tokens": true
}
}
Available options
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.
Alternative usage
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",
}]
}
}
👤 Author
UI-kit team and others ❤️
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a ⭐️ if this project helped you!
📝 License
This project is MIT licensed.