-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent formatting for JS files for the website #2386
Comments
A lot of yew maintainers use intelij. |
IntelliJ can locate it automatically if you've installed it in your project |
Some things to consider, if we go ahead with prettier:
I personally would prefer a tool we can install using cargo instead of npm + prettier |
@voidpumpkin I had a look to save you some time - and I could find dprint. Which looks to be a rust version of prettier that was used by Deno until a couple of years ago when they switched to their internal There is also Rome Tools which are quite active and pushing hard to complete their project in rust. Hope this info is of some help! Side reading info on rust tools for javascript |
I don't see how that's any different than running
Just add a Ideally in the future, we should have Yew SSG build our site. In the meantime, we should just use node tools |
Prettier formats .md files which we have more than just in website folder |
I think it's fine if we only format .md files in website directory. Like other .md files, .toml files are also not formatted |
I like the look of |
It has it's own VS Code extension. There's no plugin that I could find for IJ though, which is unfortunate. In any case, I think we should start with prettier for website and if that's not enough, improve from there. I'll send a PR for that soon |
If we do it only for website forlder then i would rather go with just prettier My expectation was that we could format all .md files in our repo |
Would EditorConfig work for .md for the entire project? It can also specify formatting for |
I was able to find it in the marketplace. Looks recently updated as well? |
Prettier is widely used at 18 million downloads. EditorConfig at 4.5 million. Dprint is less than 100... |
A formatting hook in the future, but what about a Prettier config for now?
I'm using this to keep the format of what I see in the current docs.
website/.pretterrc.json
The text was updated successfully, but these errors were encountered: