make fmt rewrites vendored static/js/alpine.min.js (missing .prettierignore) #185
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while working #175: running
make fmtreformatsstatic/js/alpine.min.js—script/fmtpasses the globstatic/js/*.jsto prettier and there is no.prettierignore, sothe vendored minified Alpine.js bundle gets expanded/rewritten.
Vendored artifacts must never be reformatted; a formatter pass
should leave the tree identical unless first-party code changed.
Remediation: add a
.prettierignorecontaining at leaststatic/js/alpine.min.js(or*.min.js). Verifyscript/fmt'sexplicit file arguments still respect the ignore file (prettier
requires
--ignore-pathhandling to be confirmed when files arepassed explicitly); if not, adjust the glob in
script/fmttoexclude minified files.
Definition of done:
make fmton a clean tree produces zero modifications(
git statusclean afterward)static/js/alpine.min.jsbyte-identical before and aftermake fmtdashboard.js,deployment.js,utils.js) isstill formatted
main