Skip to content

v2.1.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 21 Apr 18:00

[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.04 workers due to GitHub's deprecation of ubuntu-20.04. This may mean the pre-built release artifacts published to GitHub no longer work on ubuntu-20.04 and require a manual build.

Fixed

  • Luau: fixed parentheses incorrectly removed in (expr :: assertion) < foo when 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-ignores is 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 --check error message by @eitamal in #949
  • Document --stdin-filepath in README.md by @notpeter in #954
  • Fix panic when --respect-ignores --stdin-filepath on external path to cwd by @phanen in #969
  • Support Cfx Lua Syntax by @Kuuzoo in #972

New Contributors

Full Changelog: v2.0.2...v2.1.0