-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
It's pretty common to run multiple tools on the same set of files. For example, with JS code you might run prettier and eslint. It'd be nice if there was a way to share these lists across commands. Otherwise if you have a long list you just have to copy it, which is a maintenance hassle.
Here's an idea of the syntax off the top of my head:
[shared.includes]
js = [ "..." ]
[shared.excludes]
js = [ "..." ]
[commands.prettier]
shared-include = "js"
shared-exclude = "js"
[commands.eslint]
shared-include = "js"
shared-exclude = "js"I think the shared.(include|exclude) bit makes sense. I'm less certain of the shared-(include|exclude) naming. I would also note that these should be strings or arrays of strings, to allow for using multiple shared lists. When these are used, we also want to allow an include or exclude key. I think these would be combined, with the per-command keys coming last in the list, so that they override anything in the shared lists.