QuiiBz / sherif

Opinionated, zero-config linter for JavaScript monorepos
MIT License
790 stars 11 forks source link

`packages-without-package-json` - False positives #86

Open Netail opened 1 month ago

Netail commented 1 month ago

Hello, I am getting false-positive errors regarding the packages-without-package-json rule.

{
  "workspaces": [
    "apps/*",
    "packages/*",
    "packages/ui/external/*",
  ]
}

./apps/.npm/package.json doesn't exists; A folder created by NPM ./packages/ui/package.json doesn't exists; a sub-folder used by another workspaces glob, but does not contain source code itself

QuiiBz commented 1 month ago

This behavior is expected, as any folder in e.g. apps/* is considered a package. We could (and maybe should) ignore .npm folders though, and for packages/ui you should update your workspaces configuration to add !packages/ui

Netail commented 1 month ago

We could (and maybe should) ignore .npm folders though

I guess a set of predefined folders to ignore would work :)

Alright, add the exclude glob for the other one