./devel/stylua, Opinionated Lua code formatter

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 0.17.1, Package name: stylua-0.17.1, Maintainer: pkgsrc-users

StyLua is an opinionated code formatter for Lua 5.1, 5.2, 5.3, 5.4, and Luau,
built using full-moon. StyLua is inspired by the likes of prettier, it parses
your Lua codebase, and prints it back out from scratch, enforcing a consistent
code style.


Master sites:

Filesize: 364.249 KB

Version history: (Expand)


CVS history: (Expand)


   2023-04-13 14:35:16 by Thomas Klausner | Files touched by this commit (1) | Package updated
Log message:
stylua: fix distinfo after update
   2023-03-31 17:19:29 by Nikita | Files touched by this commit (2)
Log message:
stylua: Update to version 0.17.1

ChangeLog (taken from https://github.com/JohnnyMorganz/StyLua/releases/tag/v0.17.1):

v0.17.1
Fixed

    Bumped internal parser dependency which should fix parsing problems for \ 
comments with Chinese characters, and multiline string escapes
    Fixed comments in punctuated lists for return statements or assignments \ 
being incorrectly formatted leading to syntax errors (#662)
    Fixed line endings not being correctly formatted in multiline string \ 
literals and comments (#665)

What's Changed

    Adding Homebrew instructions by @benfrain in #661
    Fix comments in punctuated list for returns and assignments by \ 
@JohnnyMorganz in #663
    Cleanup trivia code by @JohnnyMorganz in #664
    Format line endings in multiline strings and comments by @JohnnyMorganz in #666
   2023-03-29 21:27:25 by Nikita | Files touched by this commit (3) | Package updated
Log message:
stylua: update to version 0.17.0

ChangeLog:

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.

    Published StyLua to the Docker Hub

0.16.1 - 2023-02-10
Fixed

    Fixed mistransformation of a function argument in a multilined function call \ 
when the argument contains a comment, causing a syntax error. We now attempt to \ 
hang the expression (#648)
    Fixed verify AST flagging a false positive for parentheses removed around a \ 
Luau type (#643)

0.16.0 - 2023-01-15
Added

    Unnecessary parentheses around Luau types will now be removed (#611)
    Collapse a body containing only a goto statement when \ 
collapse_simple_statement is set (#618)

Changed

    Update internal parser:
        (lua52) Support Lua 5.2 fractional hexidecimal / hexidecimal with \ 
exponents (#621)
        (lua52) Support LuaJIT number suffixes LL/ULL/i (#621)
        (lua52) Support \z escape sequences in strings (#613)
        (luau) Support Luau string interpolation (#607)
    Several optimisations applied to formatting functions to reduce time taken. \ 
Files which previously did not terminate (6MB+) now finish in reasonable time. \ 
(#591)
    Assignments of the form local name = function will no longer hang at the \ 
equals token, and instead force parameters multiline, to reduce unnecessary \ 
indentation. (#595)

Fixed

    Fixed an anonymous function assignment local x = function() being \ 
unnecessarily indented if the function body contains a comment (#627)
    Fixed malformed formatting when there is a newline between a return token \ 
and the expressions (#605)
    Fixed malformed formatting of multi-assignment or multi-returns where there \ 
is a comment within the expressions list (#637)
   2023-01-09 18:48:34 by Nikita | Files touched by this commit (5)
Log message:
Import devel/stylua as stylua version 0.15.3

StyLua is an opinionated code formatter for Lua 5.1, 5.2, 5.3, 5.4, and Luau,
built using full-moon. StyLua is inspired by the likes of prettier, it parses
your Lua codebase, and prints it back out from scratch, enforcing a consistent
code style.