smikula / good-fences

Code boundary management for TypeScript projects
MIT License
185 stars 18 forks source link

Support negate glob pattern #115

Open aztack opened 2 years ago

aztack commented 2 years ago

For example: Disallow importing react

{
  "dependencies": [
    "!react"
  ]
}
smikula commented 2 years ago

Currently good-fences acts as a whitelist, so you would disallow react by not including it in the dependencies array. It seems like you want something more like a blacklist, where the you would allow all dependencies except those listed. Maybe something like:

    "!dependences": [
        "react"
    ]

Or if that doesn't make sense, maybe you can explain a bit more about what you're trying to achieve?