@semcore/stylelint-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@semcore/stylelint-plugin

version downloads License: MIT

This component is part of the Intergalactic 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 is intergalactic/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.

Dependencies (2)

Dev Dependencies (4)

Package Sidebar

Install

npm i @semcore/stylelint-plugin

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

29.6 kB

Total Files

8

Last publish

Collaborators

  • m.sereniti-semrush
  • semrushinc