seaofvoices / darklua

A command line tool that transforms Lua code
https://darklua.com/
MIT License
78 stars 10 forks source link

Normalize configuration to snake case #113

Closed jeparlefrancais closed 1 year ago

jeparlefrancais commented 1 year ago

Darklua rules are currently written with snake case (like remove_empty_do) but most of its config is in kebab case (like the retain-lines generator). The upcoming configuration for bundling or require modes is also kebab case.

For consistency and simplicity, it would be easier if everything was using one kind of casing. Since darklua configuration file support json5, it is more useful if it uses snake case, because it does not need to wrap object properties in quotes:

{
    require_mode: { name: "path" }
}

Where as if we would use kebab case:

{
    "require-mode": { name: "path" }
}