remithomas / eslint-plugin-ban

Ban some methods and functions
ISC License
31 stars 3 forks source link

wildcard support for method names #24

Closed FDIM closed 2 years ago

FDIM commented 2 years ago

I've just bumped into an odd case with no console rule and wanted to use this ban rule instead.

How about supporting cases like this?

{ 'name': ['console', '*'], 'message': 'Unexpected console statement' },

Now I have to list all the methods, which is a bit silly for a potentially evolving API. I can open a PR with a change if it looks OK :)