Skip to content

v0.17.0

Compare
Choose a tag to compare
@github-actions github-actions released this 11 Mar 16:54

[0.17.0] - 2023-03-11

Added

  • Added support for "sort requires", which sorts top-level statements of the form local NAME = require(EXPR) lexicographically on NAME.
    We do this by treating a group of consecutive requires as a "block", and then sorting only within the block. Any other statement, or an empty line, between require statements will split the group into two separate blocks (and can be used to separate the sorting). A block of requires will not move around the file.
    Roblox Luau statements of the form local NAME = game:GetService(EXPR) will also be sorted separately.

This feature is disabled by default. To enable it, add the following to your stylua.toml:

[sort_requires]
enabled = true

Note: we assume that all requires are pure with no side effects. It is not recommended to use this feature if the ordering of your requires matter.

  • Added support for EditorConfig, which is taken into account only if no stylua.toml was found.

This feature is enabled by default, it can be disabled using --no-editorconfig.


What's Changed

New Contributors

Full Changelog: v0.16.1...v0.17.0