puter currently has on format standard on js code, which causes some troubles for contributors:
- when a contributor format a js file, it causes hundreds of diffs and make the pr hard to review
- vscode "format modified lines" is a temporary workaround but only works for tiny commits. it failed when a commit involves changes to nest block (if/for/...)
- different format tools yield different code, which makes a standard is desired
here I propose some solutions:
- [short term] make a "format-only" commit when needed
- [middle term] define a standard style for the code format, it should be integrated easily with popular editor (vim/vscode/...)
- [long term] add lint to ci