flaviostutz / monolint

Linter for monorepos. Checks folder structure, module contents, file contents and naming conventions
MIT License
7 stars 4 forks source link

When a package marker existing in a parent path of another module, it shouldn't be considered a module #55

Closed flaviostutz closed 1 year ago

flaviostutz commented 1 year ago

Current Behavior

When using the following dir structure, root path is wrongly identified as a module (because it contains package.json

/package.json
/module1
    /package.json
/module2
    /package.json

Expected Behavior

Root shouldn't be identified as a module, only the leaves

Possible Solution

Monolint should ignore any modules that have other modules identified inside them, making all parent path markers to be ignored and only leaf dirs to be considered modules.

Steps to Reproduce (for bugs)

Run this in any npm workspaces enabled repo