Project Search uses StyLua for Lua formatting.
Using cargo:
cargo install stylua --lockedOr using npm / npx without a global install:
npx @johnnymorganz/stylua-bin --versionsudo pacman -S styluabrew install styluaFrom the repository root:
make formatThis runs:
stylua lua scriptsIt formats:
lua/**/*.luascripts/**/*.lua
make format-checkThis runs:
stylua --check lua scriptsmake checkmake check includes:
format-checkvalidatetesttest-runner
Create a dedicated branch:
git checkout main
git pull --ff-only
git checkout -b style/format-luaRun formatting:
make formatReview the diff:
git diff -- lua scriptsRun all checks:
make checkCommit only formatting changes:
git add lua scripts
git commit -m "style: format lua files"Push and open a pull request:
git push -u origin style/format-luaCI installs StyLua using cargo and runs:
make checkThis means CI fails when Lua files are not formatted.
Keep formatting PRs focused. Avoid mixing formatting with behavior changes, tests, templates, or docs updates.