loeffel-io / ls-lint

An extremely fast directory and filename linter - Bring some structure to your project filesystem

Home Page:https://ls-lint.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Special characters in filename - [id].tsx

binary64 opened this issue · comments

Hi, what would the regex be to allow a file called [id].tsx ?

Many thanks

Hey @binary64, like this [\d]+ or \[id\] ?

Ah this works:

.tsx: 'regex:\[\d\]$'

for the [xxxx].tsx files but not for regular files like index.tsx

But this doesn't

.tsx: 'regex:\[\d\]$ | kebabcase'

Working solution:

.tsx: 'kebabcase | regex:\[[a-z]*\]$

Not sure what I did wrong but it's working now. Thank you.