figma-plugin
figma-plugin copied to clipboard
Add option to choose json indentation type
Is your feature request related to a problem? Please describe. Our project uses Prettier code formatter and tabs instead of spaces for indentation. Our team is currently setting up and applying tokens to components in Figma and code.
What our process currently looks like:
- Designer pushes up their changes to a tokens branch in GitHub with json file using the default spaces instead of tabs indentation
- Checks always fail due to Prettier indentation error
- Developer pulls down changes from the tokens branch into their own branch, fixes the error, applies tokens in code, and merges changes
- The tokens branch gets conflicts due to differences in formatting, and the developer has to fix conflicts and revert the formatting to what's coming from the plugin for the designer's next push
Due to the indentation formatting differences between the Figma json file and our code, we always have to fix formatting issues and perform additional and time-consuming steps.
Describe the solution you'd like Add an option to change the indentation formatting of the json file to tabs.
Additional context
Error
Current indentation
Option for preferred indentation
I think this would make a nice config parameter that users can define in the settings and we save in the $metadata.json
(or $metadata key
in the single file sync)
We basically currently stringify our JSON by using 2 spaces, but that could be something users could configure to be tabs
instead.
@six7 Thanks for the response. Any idea about the priority of getting this implemented?
It's not very high on our list so far, but I'll add it to our quick wins which means it might get picked up sooner during sprints.
It's not very high on our list so far, but I'll add it to our quick wins which means it might get picked up sooner during sprints.
I hope it gets picked up sooner due to being a quick win. Thanks for the update!