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

Be less like eslint and more like prettier

dutzi opened this issue · comments

Incorporating yet another tool that screams at you when you’ve done something wrong might be hard in some teams.

People will say “ah, why do we need this? Just take a look at the other file names for reference”.

But, if this tool, after configured properly, would also be able to scaffold parts of the project, that would be super awesome.

I imagine a cli counterpart that, for example, if you can run as follows:

ls-lint create component ComponentName

Would create a folder named ComponentName and within it create ComponentName.tsx and ComponentName.module.scss.

For now, these files will be empty files, but in future versions, ls-lint could also generate those files based on templates provided by the user.

Wdyt?

The title of this issue is a bit misleading, as my example tends more toward Yeoman, or similar scaffolding tools, than towards prettier.

Another option, more like prettier would be that this tool could offer to “fix” folder/file names as it is watching over changes.

I like this idea.

"Just take a look at the other file names for reference" - By default, with no config, maybe it could do this, using some kind of naive statistical analysis on the existing files.

For the autofixing idea, please check out benawad/destiny on github.

Closed for now; ls-lint is for all kind of programming languages, so this feature request would blow up the main idea

Thanks for your contributions anyway!