Parsing Alias Error #451
-
|
I have some tokens exported from Figma using TokensBrücke that look like this: When I run the CLI build I get this error: Shouldn't terrazzo be able to parse that alias? Am I missing something about how to format the tokens? I don't see anything in the docs about aliases, but they are part of the DTCG spec, so I assume it should be able to work? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Could you post the full original JSON for |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @drwpow-figma for the quick response! That's the issue. |
Beta Was this translation helpful? Give feedback.
-
|
It does. Thanks!
Is there a way with Terrazzo to lint the whole file and find all the issues like this, without it bailing out on the first error? I'm finding other ones that are wrong, but since it errors out immediately, I can't tell what all the problems might be.
…On Wed, Mar 19, 2025 at 12:37 PM, Drew Powers < ***@***.*** > wrote:
Yup that’s it—it does need to be exported as fontFamily so it’s throwing
the correct validation error.
Technically, there is no $type: string in the design token specification (
https://www.w3.org/community/design-tokens/ ). Figma Variables are
“string” type because they were developed while the design token spec was
still being worked on (technically it’s still not 100% stable yet—but
close!).
Terrazzo allows $type: string just as a “bridge” but only when you are
handling the token type with your own plugin (the default plugins may or
may not ignore it). But when it comes to trying to plug $type: string into
a valid design token type like $type: typography , it correctly throws an
error.
Hope this helps 🙂
—
Reply to this email directly, view it on GitHub (
#451 (reply in thread)
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAA7YYTQMTZAWUOCAOYRY332VGMNFAVCNFSM6AAAAABZLIMXW6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENJVGQ2TONY
).
You are receiving this because you authored the thread. Message ID: <terrazzoapp/terrazzo/repo-discussions/451/comments/12554577
@ github. com>
|
Beta Was this translation helpful? Give feedback.
Could you post the full original JSON for
typography? It’s not a parsing error; it’s telling you that it thinkstypography.font.family.sansdoesn’t have$type: "fontFamily". Could be a bug, but would have to see the full JSON to tell