SamVerschueren / clinton

Project style linter
MIT License
122 stars 9 forks source link

`max-depth` rule #19

Closed SamVerschueren closed 8 years ago

SamVerschueren commented 8 years ago

max-depth would ensure that the maximum directory depth is not more than X. For instances, if we have the following project structure

- /
  - index.js
  - lib
     - utils
        - foo.js

Thus foo.js is located at depth is 3 and the rule will fail if max-depth is set to 2.

Not sure if this is something we actually want. But the higher the depth, the more complex the project structure becomes. So it might be useful. And if so, wat would we use as value and should it be an error or a warning?

// @sindresorhus @jamestalmage @kevva @jfmengels

sindresorhus commented 8 years ago

I would do warning and depth of 4 as default.

SamVerschueren commented 8 years ago

Added this one but took 5 as default. I ran it over AVA and it was 8. We can always reconsider the need of this rule in the future.