mysticatea / eslint-plugin-node

Additional ESLint's rules for Node.js
MIT License
958 stars 167 forks source link

Allow regex for allowModules #270

Open gpoitch opened 3 years ago

gpoitch commented 3 years ago

Ability to use a string or regex for allowModules. For example, say I have a directory I alias in typescript/webpack/whatever to @foo, I want to to allow everything in that directory:

settings: {
    node: {
      allowModules: [/^@foo\//', 'bar']
    }
}

This should help address some other issues such as #217, #233 in a generic way.