# .stylelintrc.yml
extends: stylelint-config-standard
# add the plugin:
plugins:
- ./node_modules/@rhds/tokens/plugins/stylelint.js
# Make sure to activate the rule:
rules:
rhds/token-values: true
rhds/no-unknown-token-name: true
Be sure to configure your editor to fix stylelint issues on save:
Replaces deprecated tokens with their new versions.
Validates that the fallback values for tokens correspond with the values specified in the token sources. Automatically fixed incorrect values. This rule has no options.
Validates CSS Custom Property names beginning with --rh
are legit token names.
This rule can take a dictionary of names to migrate, and if it finds one of the specified names, it will automatically replace it with the new one.
rules:
rhds/no-unknown-token-name:
- true
- allowed:
- --rh-icon-color
migrations:
# instances of gray-90 will be replaced with gray-95
--rh-color-gray-90: --rh-color-gray-95