Add Prettier config for JS/TS/HTML formatting

This helps ensure a consistent code style and helps editors like Zed
that do LSP format-on-save by default.
This commit is contained in:
Arseny Kapoulkine
2024-07-22 10:39:47 -07:00
parent ee4f89e790
commit dcb0e0e91c
2 changed files with 10 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"useTabs": true,
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"printWidth": 150,
}
+3
View File
@@ -107,6 +107,9 @@ dev: $(DEMO)
format:
clang-format -i $(LIBRARY_SOURCES) $(DEMO_SOURCES) $(GLTFPACK_SOURCES)
formatjs:
prettier -w js/*.js gltf/*.js demo/*.html js/*.ts
js: js/meshopt_decoder.js js/meshopt_decoder.module.js js/meshopt_encoder.js js/meshopt_encoder.module.js js/meshopt_simplifier.js js/meshopt_simplifier.module.js
symbols: $(BUILD)/amalgamated.so