selene
selene copied to clipboard
Selene should search for configuration files that begin with a dot
Selene should allow prefixing all of its configuration with a dot. StyLua allows this.
This would aid with having developer tooling configurations being distinguished from ordinary source files.
For example, I would have a file, .selene.toml, that contains the same things as selene.toml. In addition, I would have a .my-custom-stdlib.yaml file that contains my custom standard library. In my selene.toml, I would source it as my-custom-stdlib.
Workaround: Specify the --config option when running selene, and prefix your std with a dot.
.selene.toml seems fine, but I think standard libraries should just work with putting the dot in the std name itself, we already have a bunch of weird combinatorics with them
This is a convention of most formaters/linters. It would be very desireable.
Is there a stronger motivation for this? Introducing multiple ways to do the same thing is not great, and eslint is moving away from such behavior.
eslint is moving away from such behavior.
ESLint is moving away from their old config format entirely. It's not really about prefixing with a ., which is usually just to treat the config as a hidden file.
eslint is moving away from such behavior.
ESLint is moving away from their old config format entirely. It's not really about prefixing with a
., which is usually just to treat the config as a hidden file.
I more meant there doesn’t seem to be a strong enough use case for eslint to support dot-prefixed configs in their new system. What’s different about lua where this would be worth a more complicated config resolution?
I'm going to close this for now as I don't see the benefits worth the added complexity. I'm not entirely opposed to reopening this in the future if there's a stronger motivation.
chriscerie as already mentioned, it is a strong convention for all linters across all operative systems.
You can check out other tools.
In case you are not familiar, on UNIX system (Linux, MacOS, and others), adding a dot in front of the file, make the file hidden for file browsers. That way we avoid polluting our user projects.
What’s different about lua where this would be worth a more complicated config resolution?
Right, as stated it has nothing to do with Lua and entirely to do with supporting filesystems that expect prefixing with a dot to hide files. This can easily be asked of any tooling that uses the file system. I can't find any documentation one way or the other with regard to eslint because, again, this is a new file name with an entirely new format and that coincidentally is removing the dot prefixing the old name. If they don't have plans for this with their new format I would fully expect issues to show up very quickly for it for the same reason, just as you find issues of the same nature for virtually every tool.
The better question is what makes selene unique to other tools in not wanting/needing to support hidden files on unix filesystems?
Thanks. When we see a mainstream tool move away from a convention it's natural to question why and it's better to document such considerations now than later.