Support $value by replacing every instance that refers to value with $value ?? value, so that $value takes precedence while allowing value next to it still as a token group name, to be compliant with the spec
Support $type by adding a preprocessing step so that design tokens inherit the $type from its ancestor tree if available. Other than this, type wasn't used in general in Style-Dictionary, but uses CTI structure instead to determine token types. This will be fixed in another PR.
Support $description property by supporting it in createPropertyFormatter comment utility that adds it as a comment in the output, this was a very small change only
add the above 3 props to the DesignToken type interface
clean up eslint config and enforce some extra rules to prevent human errors (like leaving in an it.only, debugging related console.log, leftover vars potentially getting hoisted and causing bugs, etc.)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description of changes:
Summary:
value
with$value ?? value
, so that$value
takes precedence while allowingvalue
next to it still as a token group name, to be compliant with the specit.only
, debugging relatedconsole.log
, leftovervar
s potentially getting hoisted and causing bugs, etc.)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.