v2.1.0
[2.1.0] - 2025-04-21
Added
- Luau: Added support for parsing user-defined type functions (#938)
- Luau: Added support for parsing attributes (
@native/@deprecated) on functions - Added support for CfxLua (FiveM) syntax formatting. This is available with
syntax = "cfxlua"(#855) - Added a pre-built binary release for
stylua-linux-aarch64-musl.zip - Added error hints on parse failurse when a potential Lua syntax conflict is noticed (e.g., Lua 5.2 vs Luau syntax for labels
::and generics>>) (#960 / #962)
Changed
- Updated StyLua release GitHub action to
ubuntu-22.04workers due to GitHub's deprecation ofubuntu-20.04. This may mean the pre-built release artifacts published to GitHub no longer work onubuntu-20.04and require a manual build.
Fixed
- Luau: fixed parentheses incorrectly removed in
(expr :: assertion) < foowhen multilining the expression, leading to a syntax error (#940) - Fixed panic when attempting to format a file outside of the current working directory when
--respect-ignoresis enabled (#969) - Fixed unnecessary semicolons being introduced at the end of statements when incorrectly determined as ambiguous (#963)
- Fixed malformed formatting of function calls where parentheses are removed but there are comments in between the parentheses and the expression. Now, we will keep the parentheses in these cases, except for trailing comments (#964)
- Fixed malformed formatting of table field expression when there are comments in between the equals and the value (#942)
External Contributions
- Bump fullmoon to 1.2.0 by @Ukendio in #945
- fix: use "summary" for the missing
--checkerror message by @eitamal in #949 - Document --stdin-filepath in README.md by @notpeter in #954
- Fix panic when
--respect-ignores --stdin-filepathon external path to cwd by @phanen in #969 - Support Cfx Lua Syntax by @Kuuzoo in #972
New Contributors
- @Ukendio made their first contribution in #945
- @eitamal made their first contribution in #949
- @notpeter made their first contribution in #954
- @phanen made their first contribution in #969
- @Kuuzoo made their first contribution in #972
Full Changelog: v2.0.2...v2.1.0