Replies: 1 comment 4 replies
-
Yes, it is the best channel for communication between plugins. Also, you may use |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We transform our design tokens to CSS custom properties. I want to pass along metadata like
deprecated
so we can use a linter to inform teams using deprecated tokens they should use something else.I think we could follow the SassDoc comment convention for translating the metadata to the CSS source code.
For a simplified example: tokens.json
That would get transformed to: tokens.css
I'm making a PostCSS plugin to look for the CSS custom property definitions proceeded by the
@deprecated
comment, collect them into an array, and pass them along to the next plugin to use, like a Stylelint plugin. Then if a product engineer runs the Stylelint plugin against code that uses the deprecated CSS custom property it would warn them.Here's a simple version of the plugin that analyzes the CSS custom property definitions:
Would
result.messages
be the best way to store an array of the deprecated properties for the next plugin to use or is there something better?Beta Was this translation helpful? Give feedback.
All reactions