Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Use Inflint to follow files and folders convention
Tal Rofe
Tal Rofe

Posted on

     

Use Inflint to follow files and folders convention

INTRO

In the last months I worked with some juniors on the same project. Usually in order to overcome some bad practices and bad code, I add some linters:ESLint,Stylint,commitlint and alsoprettier.

It usually helps a lot and I avoid redundant code reviews for dummy things.

However, there was 1 thing I couldn't avoid.Files and folders names.
Although I had some clear convention with my file structure, other people kept on creating files and folders that did not follow the repository convention.

First thing I thought of was applying some file structure linter.
But I couldn't find any proper linter for this.
I found one which could not be applied withlint-staged and has very low maintenance and features.So.. I created my own package!

INFLINT

WHO??

It is a file system linter. This tool will scan your file structure in the repository, and validates, according to provided configuration, that the files and folders match the provided convention.

WHERE??

You can check it out here:
https://www.npmjs.com/package/inflint

Or look at the source code here:
https://github.com/Vinyl-Depository/Inflint

demo

Image description

Not only you get a lot of configurations options with the main features: "Rules" and "Aliases" but this tool can also be applied together withlint-staged:

"**/*":"inflint"
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software Developer
  • Location
    Tel Aviv
  • Education
    BSc in Computer Science
  • Work
    Open Source Developer
  • Joined

More fromTal Rofe

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp