darklua
darklua copied to clipboard
A command line tool that transforms Lua code
Issue: https://discord.com/channels/385151591524597761/1135953303142936747/1222518948495626280
A recent RFC was implemented in Luau that defines an entry in the config file to support require aliases. Darklua can use this config to reduce the configuration overhead. Link...
For example, applying `remove_assertions` with the default parameter for the rule, the following input: ```lua local head = assert(character:FindFirstChild("Head"), "head is missing!") ``` becomes: ```lua local head = character:FindFirstChild("Head") and...
Takes something like this: ```lua local function getFoo() return "foo" end local var = getFoo() ``` And turns into: ```lua local function getFoo() return "foo" end local var = "foo"...
If statements nested more than 9 times prevents replication https://github.com/seaofvoices/darklua/assets/103523730/476cc851-afea-4db2-91ac-c95b49fab2cc
Hi, first off, I recognize this is quite the undertaking, so I don't really expect any work to be done until enough people have real use cases for it and...
A schema definition for the `darklua.json` config file would be helpful. + linking it on `https://darklua.com/` would be pretty nice
When processing a type like this: ```lua type _fieldDefStack = Array ``` Darklua currently adds parentheses around `GraphQLField?` which creates invalid syntax: ```lua type _fieldDefStack = Array -- invalid in...
Remove usage of `//` in binary expressions and in `//=` assignments. Example: ```lua return 10 // divider ``` Converts to ```lua return math.floor(10 / divider) ```
When converting requires using a rojo sourcemap, if the source file is not present in the sourcemap, the error still mentions that it could not find the require path in...