ls-lint
ls-lint copied to clipboard
How to lint directory names with extensions without using a regex?
I'm trying to lint the name of iconset directories. I was using snake case for all directory names, so previously my rule was:
ls:
.dir: snake_case
but now that the project contains .iconset
directories, I'm forced to use a regex like this:
ls:
.dir: snake_case | regex:^[a-z]+(_[a-z]+)*\.iconset$
to make sure that the part before .iconset
is in snake case.
I think it would be great if we can find a way to allow people to lint directory names just like filenames.
For now there are no plans to support this. I'll leave that open to keep that in mind