ls-lint
ls-lint copied to clipboard
Strict mode?
At the moment the rules kick in if an extension has been matched. It would be nice to stipulate that only files of a certain extension are allowed (with case rules enforced).
Please provide more infos
Sorry I seem to have pressed the return key prematurely!
Haha, no problem! Could you please make an example about that
I have this setup for my components folder...
ls:
src/components/**:
.dir: PascalCase
.ts: camelCase
.test.ts: camelCase
.tsx: PascalCase
.test.tsx: PascalCase
.stories.tsx: PascalCase
.d.ts: kebab-case
I would like to stop people creating js files in here
Got it! Like https://github.com/loeffel-io/ls-lint/issues/30 we could create something like not_exists rule
What do you think?
Yes that sounds like it would work, you could have exists(count). Same rule could enforce no occurrences exists(0) and may theres a case where you only ever want one occurrence of that extension exists(1).
Also I thought as a work around for my js rule, I could for now set a regex that insists on a char not allowed by filesystems.
yea, i will think about that some time
I think this will be added in v2 👍